Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 5639c8e5efb63017fc4bf1b91d274b6b5a4a0dc5
https://github.com/WebKit/WebKit/commit/5639c8e5efb63017fc4bf1b91d274b6b5a4a0dc5
Author: Eri Pazos Pérez <[email protected]>
Date: 2026-04-30 (Thu, 30 Apr 2026)
Changed paths:
M LayoutTests/accessibility/ios-simulator/math.html
M LayoutTests/accessibility/mac/math-alttext.html
M LayoutTests/accessibility/mac/mathml-elements.html
M LayoutTests/accessibility/mac/mathml-root.html
M LayoutTests/accessibility/math-fenced.html
M LayoutTests/accessibility/math-mo-fences-and-separators.html
M LayoutTests/accessibility/math-multiscript-attributes.html
M LayoutTests/accessibility/math-text.html
M LayoutTests/fast/css/readonly-pseudoclass-common-element-expected.txt
M LayoutTests/fast/css/readwrite-pseudoclass-editable-expected.txt
M
LayoutTests/fast/layers/accumulated-offset-overflow-Render-geometry-map-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/editing/other/mathml-html-serializtion-on-copy.html
M
LayoutTests/imported/w3c/web-platform-tests/html/dom/documents/dom-tree-accessors/document.getElementsByName/document.getElementsByName-namespace-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/html/dom/documents/dom-tree-accessors/document.getElementsByName/document.getElementsByName-namespace-xhtml-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/math-parse03-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/direction/direction-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/size-and-position-of-stretchy-fences-with-default-font-001-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/mathml/relations/css-styling/attribute-mapping-002-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/mathml/relations/css-styling/floats/not-floating-001-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/mathml/relations/css-styling/mathvariant-auto-selection-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/mathml/relations/css-styling/overflow/computed-value-001.html
M
LayoutTests/imported/w3c/web-platform-tests/mathml/relations/css-styling/width-height-001-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/clipboard-event-handlers.tentative-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/html-or-foreign-element-interfaces.tentative-expected.txt
M LayoutTests/mathml/arbitrary-markup-expected.txt
M LayoutTests/mathml/fenced-whitespace-separators-crash-expected.txt
M LayoutTests/mathml/mfrac-nested-expected.txt
M LayoutTests/mathml/msub-anonymous-child-render-crash-expected.txt
A
LayoutTests/mathml/non-core/mathvariant/attributes-mathvariant-expected.html
A LayoutTests/mathml/non-core/mathvariant/attributes-mathvariant.html
M
LayoutTests/mathml/non-core/mathvariant/mathvariant-basic-transforms-with-default-font.html
M LayoutTests/mathml/non-core/mathvariant/mathvariant-bold-fraktur.html
M LayoutTests/mathml/non-core/mathvariant/mathvariant-bold-italic.html
M LayoutTests/mathml/non-core/mathvariant/mathvariant-bold-sans-serif.html
M LayoutTests/mathml/non-core/mathvariant/mathvariant-bold-script.html
M LayoutTests/mathml/non-core/mathvariant/mathvariant-bold.html
M LayoutTests/mathml/non-core/mathvariant/mathvariant-case-sensitivity.html
M
LayoutTests/mathml/non-core/mathvariant/mathvariant-double-struck-font-style-font-weight.html
M LayoutTests/mathml/non-core/mathvariant/mathvariant-double-struck.html
M LayoutTests/mathml/non-core/mathvariant/mathvariant-fraktur.html
A
LayoutTests/mathml/non-core/mathvariant/mathvariant-inheritance-expected.html
A LayoutTests/mathml/non-core/mathvariant/mathvariant-inheritance.html
M LayoutTests/mathml/non-core/mathvariant/mathvariant-initial.html
M LayoutTests/mathml/non-core/mathvariant/mathvariant-italic.html
M LayoutTests/mathml/non-core/mathvariant/mathvariant-looped.html
M LayoutTests/mathml/non-core/mathvariant/mathvariant-monospace.html
M
LayoutTests/mathml/non-core/mathvariant/mathvariant-sans-serif-bold-italic.html
M LayoutTests/mathml/non-core/mathvariant/mathvariant-sans-serif-italic.html
M LayoutTests/mathml/non-core/mathvariant/mathvariant-sans-serif.html
M LayoutTests/mathml/non-core/mathvariant/mathvariant-script.html
M LayoutTests/mathml/non-core/mathvariant/mathvariant-stretched.html
M LayoutTests/mathml/non-core/mathvariant/mathvariant-tailed.html
A LayoutTests/mathml/non-core/mathvariant/mathvariant-tokens-expected.html
A LayoutTests/mathml/non-core/mathvariant/mathvariant-tokens.html
A
LayoutTests/mathml/non-core/mathvariant/tokenElements-mathvariant-expected.html
A LayoutTests/mathml/non-core/mathvariant/tokenElements-mathvariant.html
R LayoutTests/mathml/presentation/attributes-mathvariant-expected.html
R LayoutTests/mathml/presentation/attributes-mathvariant.html
M
LayoutTests/mathml/presentation/foreign-element-in-annotation-xml-expected.txt
R LayoutTests/mathml/presentation/mathvariant-inheritance-expected.html
R LayoutTests/mathml/presentation/mathvariant-inheritance.html
R LayoutTests/mathml/presentation/mathvariant-tokens-expected.html
R LayoutTests/mathml/presentation/mathvariant-tokens.html
M LayoutTests/mathml/presentation/stretchy-depth-height-expected.txt
M LayoutTests/mathml/presentation/sup-nested-expected.txt
R LayoutTests/mathml/presentation/tokenElements-mathvariant-expected.html
R LayoutTests/mathml/presentation/tokenElements-mathvariant.html
M
LayoutTests/platform/glib/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/size-and-position-of-stretchy-fences-with-default-font-001-expected.txt
M
LayoutTests/platform/glib/mathml/presentation/foreign-element-in-annotation-xml-expected.txt
M LayoutTests/platform/ios/TestExpectations
M
LayoutTests/platform/ios/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/size-and-position-of-stretchy-fences-with-default-font-001-expected.txt
M
LayoutTests/platform/ios/imported/w3c/web-platform-tests/mathml/relations/css-styling/floats/not-floating-001-expected.txt
M Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
M Source/WebCore/CMakeLists.txt
M Source/WebCore/DerivedSources-input.xcfilelist
M Source/WebCore/DerivedSources.make
M Source/WebCore/css/mathmlCoreExtras.css
A Source/WebCore/css/mathmlCoreMathvariant.css
M Source/WebCore/mathml/MathMLElement.cpp
M Source/WebCore/mathml/MathMLFractionElement.h
M Source/WebCore/mathml/MathMLMathElement.cpp
M Source/WebCore/mathml/MathMLMathElement.h
M Source/WebCore/mathml/MathMLPresentationElement.cpp
M Source/WebCore/mathml/MathMLPresentationElement.h
M Source/WebCore/mathml/MathMLRowElement.cpp
M Source/WebCore/mathml/MathMLRowElement.h
M Source/WebCore/mathml/MathMLScriptsElement.h
M Source/WebCore/mathml/MathMLTokenElement.cpp
M Source/WebCore/mathml/MathMLTokenElement.h
M Source/WebCore/rendering/mathml/RenderMathMLToken.cpp
M Source/WebCore/style/InspectorCSSOMWrappers.cpp
M Source/WebCore/style/UserAgentStyle.cpp
M Source/WebCore/style/UserAgentStyle.h
Log Message:
-----------
Align mathvariant attribute with MathML Core
https://bugs.webkit.org/show_bug.cgi?id=202302
Reviewed by Frédéric Wang Nélar.
The CoreMathMLDeprecateLegacyMathvariant preference is used to disable the
previous mathvariant behaviour and other variations. The UA stylesheet is
updated to align with the spec, implementing the italic transform on mi
nodes using text-transform: math-auto.
The mathvariant attribute can only be present on mi nodes
(https://w3c.github.io/mathml-core/#dfn-mathvariant). If specified,
it resets the text-transform to none using a presentational hint.
* LayoutTests/accessibility/ios-simulator/math.html:
* LayoutTests/accessibility/mac/math-alttext.html:
* LayoutTests/accessibility/mac/mathml-elements.html:
* LayoutTests/accessibility/mac/mathml-root.html:
* LayoutTests/accessibility/math-fenced.html:
* LayoutTests/accessibility/math-mo-fences-and-separators.html:
* LayoutTests/accessibility/math-multiscript-attributes.html:
* LayoutTests/accessibility/math-text.html:
* LayoutTests/fast/css/readonly-pseudoclass-common-element-expected.txt:
* LayoutTests/fast/css/readwrite-pseudoclass-editable-expected.txt:
*
LayoutTests/fast/layers/accumulated-offset-overflow-Render-geometry-map-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/editing/other/mathml-html-serializtion-on-copy.html:
*
LayoutTests/imported/w3c/web-platform-tests/html/dom/documents/dom-tree-accessors/document.getElementsByName/document.getElementsByName-namespace-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/html/dom/documents/dom-tree-accessors/document.getElementsByName/document.getElementsByName-namespace-xhtml-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/html/syntax/parsing/math-parse03-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/direction/direction-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/size-and-position-of-stretchy-fences-with-default-font-001-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/mathml/relations/css-styling/attribute-mapping-002-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/mathml/relations/css-styling/floats/not-floating-001-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/mathml/relations/css-styling/mathvariant-auto-selection-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/mathml/relations/css-styling/overflow/computed-value-001.html:
*
LayoutTests/imported/w3c/web-platform-tests/mathml/relations/css-styling/width-height-001-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/clipboard-event-handlers.tentative-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/mathml/relations/html5-tree/html-or-foreign-element-interfaces.tentative-expected.txt:
* LayoutTests/mathml/arbitrary-markup-expected.txt:
* LayoutTests/mathml/fenced-whitespace-separators-crash-expected.txt:
* LayoutTests/mathml/mfrac-nested-expected.txt:
* LayoutTests/mathml/msub-anonymous-child-render-crash-expected.txt:
* LayoutTests/mathml/non-core/mathvariant/attributes-mathvariant-expected.html:
Renamed from
LayoutTests/mathml/presentation/attributes-mathvariant-expected.html.
* LayoutTests/mathml/non-core/mathvariant/attributes-mathvariant.html: Renamed
from LayoutTests/mathml/presentation/attributes-mathvariant.html.
*
LayoutTests/mathml/non-core/mathvariant/mathvariant-basic-transforms-with-default-font.html:
* LayoutTests/mathml/non-core/mathvariant/mathvariant-bold-fraktur.html:
* LayoutTests/mathml/non-core/mathvariant/mathvariant-bold-italic.html:
* LayoutTests/mathml/non-core/mathvariant/mathvariant-bold-sans-serif.html:
* LayoutTests/mathml/non-core/mathvariant/mathvariant-bold-script.html:
* LayoutTests/mathml/non-core/mathvariant/mathvariant-bold.html:
* LayoutTests/mathml/non-core/mathvariant/mathvariant-case-sensitivity.html:
*
LayoutTests/mathml/non-core/mathvariant/mathvariant-double-struck-font-style-font-weight.html:
* LayoutTests/mathml/non-core/mathvariant/mathvariant-double-struck.html:
* LayoutTests/mathml/non-core/mathvariant/mathvariant-fraktur.html:
*
LayoutTests/mathml/non-core/mathvariant/mathvariant-inheritance-expected.html:
Renamed from
LayoutTests/mathml/presentation/mathvariant-inheritance-expected.html.
* LayoutTests/mathml/non-core/mathvariant/mathvariant-inheritance.html: Renamed
from LayoutTests/mathml/presentation/mathvariant-inheritance.html.
* LayoutTests/mathml/non-core/mathvariant/mathvariant-initial.html:
* LayoutTests/mathml/non-core/mathvariant/mathvariant-italic.html:
* LayoutTests/mathml/non-core/mathvariant/mathvariant-looped.html:
* LayoutTests/mathml/non-core/mathvariant/mathvariant-monospace.html:
*
LayoutTests/mathml/non-core/mathvariant/mathvariant-sans-serif-bold-italic.html:
* LayoutTests/mathml/non-core/mathvariant/mathvariant-sans-serif-italic.html:
* LayoutTests/mathml/non-core/mathvariant/mathvariant-sans-serif.html:
* LayoutTests/mathml/non-core/mathvariant/mathvariant-script.html:
* LayoutTests/mathml/non-core/mathvariant/mathvariant-stretched.html:
* LayoutTests/mathml/non-core/mathvariant/mathvariant-tailed.html:
* LayoutTests/mathml/non-core/mathvariant/mathvariant-tokens-expected.html:
Renamed from LayoutTests/mathml/presentation/mathvariant-tokens-expected.html.
* LayoutTests/mathml/non-core/mathvariant/mathvariant-tokens.html: Renamed from
LayoutTests/mathml/presentation/mathvariant-tokens.html.
*
LayoutTests/mathml/non-core/mathvariant/tokenElements-mathvariant-expected.html:
Renamed from
LayoutTests/mathml/presentation/tokenElements-mathvariant-expected.html.
* LayoutTests/mathml/non-core/mathvariant/tokenElements-mathvariant.html:
Renamed from LayoutTests/mathml/presentation/tokenElements-mathvariant.html.
*
LayoutTests/mathml/presentation/foreign-element-in-annotation-xml-expected.txt:
* LayoutTests/mathml/presentation/stretchy-depth-height-expected.txt:
* LayoutTests/mathml/presentation/sup-nested-expected.txt:
*
LayoutTests/platform/glib/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/size-and-position-of-stretchy-fences-with-default-font-001-expected.txt:
*
LayoutTests/platform/glib/mathml/presentation/foreign-element-in-annotation-xml-expected.txt:
* LayoutTests/platform/ios/TestExpectations:
*
LayoutTests/platform/ios/imported/w3c/web-platform-tests/mathml/presentation-markup/operators/size-and-position-of-stretchy-fences-with-default-font-001-expected.txt:
*
LayoutTests/platform/ios/imported/w3c/web-platform-tests/mathml/relations/css-styling/floats/not-floating-001-expected.txt:
* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
* Source/WebCore/CMakeLists.txt:
* Source/WebCore/DerivedSources-input.xcfilelist:
* Source/WebCore/DerivedSources.make:
* Source/WebCore/css/mathmlCoreExtras.css:
* Source/WebCore/css/mathmlCoreMathvariant.css: Copied from
Source/WebCore/css/mathmlCoreExtras.css.
(#if defined(ENABLE_MATHML) && ENABLE_MATHML):
* Source/WebCore/mathml/MathMLElement.cpp:
(WebCore::MathMLElement::hasPresentationalHintsForAttribute const):
(WebCore::MathMLElement::collectPresentationalHintsForAttribute):
* Source/WebCore/mathml/MathMLFractionElement.h:
* Source/WebCore/mathml/MathMLMathElement.cpp:
(WebCore::MathMLMathElement::attributeChanged):
(WebCore::MathMLMathElement::acceptsLegacyMathVariantAttribute):
* Source/WebCore/mathml/MathMLMathElement.h:
* Source/WebCore/mathml/MathMLPresentationElement.cpp:
(WebCore::MathMLPresentationElement::specifiedMathVariant):
(WebCore::MathMLPresentationElement::attributeChanged):
* Source/WebCore/mathml/MathMLPresentationElement.h:
(WebCore::MathMLPresentationElement::acceptsLegacyMathVariantAttribute):
(WebCore::MathMLPresentationElement::acceptsMathVariantAttribute): Deleted.
* Source/WebCore/mathml/MathMLRowElement.cpp:
(WebCore::MathMLRowElement::acceptsLegacyMathVariantAttribute):
(WebCore::MathMLRowElement::acceptsMathVariantAttribute):
* Source/WebCore/mathml/MathMLRowElement.h:
* Source/WebCore/mathml/MathMLScriptsElement.h:
* Source/WebCore/mathml/MathMLTokenElement.cpp:
(WebCore::MathMLTokenElement::acceptsLegacyMathVariantAttribute):
* Source/WebCore/mathml/MathMLTokenElement.h:
* Source/WebCore/rendering/mathml/RenderMathMLToken.cpp:
(WebCore::RenderMathMLToken::computePreferredLogicalWidths):
* Source/WebCore/style/InspectorCSSOMWrappers.cpp:
(WebCore::Style::InspectorCSSOMWrappers::collectDocumentWrappers):
* Source/WebCore/style/UserAgentStyle.cpp:
(WebCore::Style::UserAgentStyle::ensureDefaultStyleSheetsForElement):
* Source/WebCore/style/UserAgentStyle.h:
Canonical link: https://commits.webkit.org/312406@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications