Repository navigation
Remove keyword values for mathsize when MathMLCore is enabled - #4851
Conversation
|
EWS run on previous version of this PR (hash d3bec20) Details |
|
EWS run on previous version of this PR (hash 766e002) Details |
|
EWS run on previous version of this PR (hash 3625bfc) Details |
mrego
left a comment
There was a problem hiding this comment.
I don't know how to comment on the commit message, so let's try here.
Whey is this [GTK][WPE] only?
And about the commit message it looks we're missing something at:
MathML Core only accepts instead [2]
Also there are some weird double spacing there and lately in the message. Could you review and update it?
|
EWS run on current version of this PR (hash 8e8e63f) Details
|
Not sure whether that's possible with github...
This was the original bug title. We only remove this on GTK/WPE because maintainers of other ports (e.g. Apple) may not want to unship existing features.
I think I previously did a force push and copied the commit message by hand. I tried to fix things a bit and ran |
https://bugs.webkit.org/show_bug.cgi?id=197493 Reviewed by Manuel Rego Casasnovas. Currently the mathsize attribute relies on convertMathSizeIfNeeded to convert legacy MathML3 names (`small`, `normal`, `big`) and converts unitless values to percentages. It is then passed to the CSS parser which accepts other `font-size` values (such as `x-small`, `larger`, etc) [1] even if they are not part of MathML. MathML Core only accepts `<length-percentage>` instead [2]. This commit adds a new path when MathML Core is enabled. It passes the mathsize value as it, removing CSS `<absolute-size>`, `<relative-size>` and `math` keywords. This change is thus removing support for legacy MathML3 names, nonzero unitless values and CSS keywords. However, due to some weird CSS bug [3] we still need to explicitly disallow nonzero unitless values. * LayoutTests/TestExpectations: Remove failures for three WPT tests. * LayoutTests/imported/w3c/web-platform-tests/mathml/relations/css-styling/lengths-2.html: Ditto. * LayoutTests/imported/w3c/web-platform-tests/mathml/relations/css-styling/lengths-2-expected.txt: Update expectation since we made some progress. * LayoutTests/platform/glib/imported/w3c/web-platform-tests/mathml/relations/css-styling/lengths-2-expected.txt: Ditto. * LayoutTests/imported/w3c/web-platform-tests/mathml/relations/css-styling/mathsize-attribute-css-keywords.html: Force MathML Core to be enabled, so "small" is not allowed. * LayoutTests/imported/w3c/web-platform-tests/mathml/relations/css-styling/mathsize-attribute-legacy-values.html: Ditto. * LayoutTests/mathml/presentation/attributes-mathsize.html: Force MathML Core to be disabled, so legacy features are still supported. * Source/WebCore/mathml/MathMLElement.cpp: (WebCore::isDisallowedMathSizeAttribute): Helper function to remove CSS font-size keywords and nonzero unitless values (i.e. not <length-percentage>). (WebCore::MathMLElement::collectPresentationalHintsForAttribute): Add new path explained above when MathML Core is enabled. [1] https://www.w3.org/TR/css-fonts-4/#font-size-prop [2] https://w3c.github.io/mathml-core/#dfn-mathsize [3] https://bugs.webkit.org/show_bug.cgi?id=245927 Canonical link: https://commits.webkit.org/255112@main
|
Committed 255112@main (df8ef2e): https://commits.webkit.org/255112@main Reviewed commits have been landed. Closing PR #4851 and removing active labels. |
df8ef2e
8e8e63f
🛠 mac-debug🧪 ios-wk2🛠 mac-AS-debug🧪 api-mac🧪 mac-wk1🧪 mac-AS-debug-wk2