-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Implement font-size: math. #52066
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement font-size: math. #52066
Conversation
|
Depends on #52063 |
|
EWS run on previous version of this PR (hash 8daa5f8) Details |
|
EWS run on previous version of this PR (hash 5929cd4) Details |
|
EWS run on previous version of this PR (hash ebc4f54) Details |
|
EWS run on previous version of this PR (hash c78c6b3) Details |
|
EWS run on previous version of this PR (hash f0d8245) Details |
fred-wang
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought I had left comments the other day, but not sure it worked.
...c/web-platform-tests/mathml/relations/css-styling/writing-mode/writing-mode-002-expected.txt
Outdated
Show resolved
Hide resolved
...ported/w3c/web-platform-tests/mathml/relations/html5-tree/dynamic-childlist-002-expected.txt
Outdated
Show resolved
Hide resolved
|
I'm not super familiar with the CSS code, so would be good to have a second reviewer advice. |
|
EWS run on previous version of this PR (hash af84245) Details |
|
EWS run on previous version of this PR (hash efb6652) Details |
|
EWS run on previous version of this PR (hash 7bbe672) Details |
|
EWS run on previous version of this PR (hash 2b8404c) Details |
|
EWS run on previous version of this PR (hash 70eedeb) Details |
|
EWS run on previous version of this PR (hash c2ea4e0) Details |
|
EWS run on previous version of this PR (hash 591e77e) Details |
|
EWS run on previous version of this PR (hash b8d0b8d) Details |
|
EWS run on previous version of this PR (hash 63b32f0) Details |
63b32f0 to
8d3c8ad
Compare
|
EWS run on previous version of this PR (hash 8d3c8ad) Details |
LayoutTests/mathml/presentation/scripts-underover-expected.html
Outdated
Show resolved
Hide resolved
| </table> | ||
|
|
||
| <div style="position: absolute; top: 250px; left: 10px;"> | ||
| <!-- This verifies that the scripts are drawn smaller. --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: maybe you can explain a bit more that this is a 0.71 scale factor because that's the default value suggested by the spec when the current font does not have a MATH table.
(If we upstream that, it's likely this won't work well in Firefox, because it will try to pick a math font)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have tested this on Firefox and while it does work for me, you are right that it may not always work depending on the font configuration. We should also probably split this test if we upstream it because the two parts (the table and the small scripts) are not that related and have different fuzzing ranges.
8d3c8ad to
b60be7e
Compare
|
EWS run on current version of this PR (hash b60be7e) Details |
e428fde to
37465a6
Compare
|
EWS run on current version of this PR (hash 37465a6) Details |
|
EWS run on previous version of this PR (hash e428fde) Details |
|
Safe-Merge-Queue: Build #78487. |
https://bugs.webkit.org/show_bug.cgi?id=49309 Reviewed by Frédéric Wang. Parse `font-size: math` and add the logic to compute the scale of the font https://www.w3.org/TR/css-fonts-4/#valdef-font-size-math. This is gated behind the `CSSMathDepth` preference. A new user agent spreadsheet is added to keep the legacy behaviour when the preference is not enabled. * LayoutTests/TestExpectations: * LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/math-script-level-and-math-style/math-script-level-002.tentative-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-fonts/math-script-level-and-math-style/math-script-level-004.tentative-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/mathml/relations/css-styling/scriptlevel-001-expected.txt: Renamed from LayoutTests/platform/ios/imported/w3c/web-platform-tests/mathml/relations/css-styling/scriptlevel-001-expected.txt. * LayoutTests/imported/w3c/web-platform-tests/mathml/relations/css-styling/size-containment-001.tentative-expected.txt: Renamed from LayoutTests/platform/glib/imported/w3c/web-platform-tests/mathml/relations/css-styling/size-containment-001.tentative-expected.txt. * LayoutTests/mathml/presentation/scripts-subsup-expected.html: * LayoutTests/mathml/presentation/scripts-subsup.html: * LayoutTests/mathml/presentation/scripts-underover-expected.html: * LayoutTests/mathml/presentation/scripts-underover.html: * LayoutTests/platform/glib/TestExpectations: * LayoutTests/platform/glib/accessibility/math-multiscript-attributes-expected.txt: * LayoutTests/platform/glib/mathml/opentype/horizontal-expected.txt: * LayoutTests/platform/glib/mathml/opentype/horizontal-munderover-expected.txt: * LayoutTests/platform/glib/mathml/opentype/opentype-stretchy-horizontal-expected.txt: * LayoutTests/platform/glib/mathml/presentation/bug159513-expected.txt: * LayoutTests/platform/ios/imported/w3c/web-platform-tests/mathml/relations/css-styling/scriptlevel-001-expected.txt: * LayoutTests/platform/ios/imported/w3c/web-platform-tests/mathml/relations/css-styling/size-containment-001.tentative-expected.txt: * LayoutTests/platform/ios/mathml/opentype/opentype-stretchy-horizontal-expected.txt: * LayoutTests/platform/mac/imported/w3c/web-platform-tests/mathml/relations/css-styling/scriptlevel-001-expected.txt: Removed. * LayoutTests/platform/mac/imported/w3c/web-platform-tests/mathml/relations/css-styling/size-containment-001.tentative-expected.txt: * LayoutTests/platform/mac/mathml/opentype/opentype-stretchy-horizontal-expected.txt: * Source/WebCore/CMakeLists.txt: * Source/WebCore/DerivedSources-input.xcfilelist: * Source/WebCore/DerivedSources.make: * Source/WebCore/css/CSSProperties.json: * Source/WebCore/css/CSSValueKeywords.in: * Source/WebCore/css/mathml.css: (mroot > :not(:first-child)): (msub > :not(:first-child),): * Source/WebCore/css/mathmlFontSizeMath.css: Added. (#if defined(ENABLE_MATHML) && ENABLE_MATHML): (math): * Source/WebCore/css/mathmlLegacyFontSizeMath.css: Added. (#if defined(ENABLE_MATHML) && ENABLE_MATHML): (msub > :not(:first-child),): * Source/WebCore/css/parser/CSSParserContext.cpp: (WebCore::applyUASheetBehaviorsToContext): (WebCore::add): * Source/WebCore/css/parser/CSSParserContext.h: * Source/WebCore/css/parser/CSSPropertyParserConsumer+Font.cpp: (WebCore::CSSPropertyParserHelpers::consumeFontSizeUnresolved): * Source/WebCore/style/InspectorCSSOMWrappers.cpp: (WebCore::Style::InspectorCSSOMWrappers::collectDocumentWrappers): * Source/WebCore/style/StyleBuilderCustom.h: (WebCore::Style::BuilderCustom::determineMathDepthScale): (WebCore::Style::BuilderCustom::applyValueFontSize): * Source/WebCore/style/StyleResolveForFont.cpp: (WebCore::Style::fontSizeFromUnresolvedFontSize): * Source/WebCore/style/UserAgentStyle.cpp: (WebCore::Style::UserAgentStyle::ensureDefaultStyleSheetsForElement): * Source/WebCore/style/UserAgentStyle.h: Canonical link: https://commits.webkit.org/304802@main
37465a6 to
9d77743
Compare
|
Committed 304802@main (9d77743): https://commits.webkit.org/304802@main Reviewed commits have been landed. Closing PR #52066 and removing active labels. |
9d77743
37465a6
🧪 win-tests🛠 playstation