Skip to content

Commit 74250f4

Browse files
Ahmad-S792Ahmad Saleem
authored andcommitted
[MathML] none and mprescripts should be laid out as mrow elements
https://bugs.webkit.org/show_bug.cgi?id=308442 rdar://170940035 Reviewed by Frédéric Wang. This patch aligns WeKit with Gecko / Firefox and Blink / Chromium. Change none and mprescripts from MathMLPresentationElement to MathMLRowElement in mathtags.in so they get RenderMathMLRow. The spec [1] states: "The <mprescripts> element is laid out as an mrow element." [1] https://w3c.github.io/mathml-core/#prescripts-and-tensor-indices-mmultiscripts This consequently fixes stretchy operators inside these elements, as RenderMathMLRow calls stretchVerticalOperatorsAndLayoutChildren(). This is safe because all code handling these elements in RenderMathMLScripts.cpp uses tag name checks, not C++ type checks. * LayoutTests/TestExpectations: Progressions * LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/mrow/inferred-mrow-stretchy-expected.txt: Ditto * Source/WebCore/mathml/mathtags.in: > Rebaselines: * LayoutTests/platform/glib/accessibility/math-multiscript-attributes-expected.txt: * LayoutTests/platform/mac/accessibility/math-multiscript-attributes-expected.txt: * LayoutTests/accessibility/mac/mathml-multiscript-expected.txt: Canonical link: https://commits.webkit.org/308050@main
1 parent 6cd45e7 commit 74250f4

File tree

6 files changed

+55
-6
lines changed

6 files changed

+55
-6
lines changed

LayoutTests/TestExpectations

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2052,8 +2052,6 @@ imported/w3c/web-platform-tests/mathml/presentation-markup/operators/mo-movablel
20522052
imported/w3c/web-platform-tests/mathml/presentation-markup/operators/op-dict-8.html [ ImageOnlyFailure ]
20532053
imported/w3c/web-platform-tests/mathml/presentation-markup/operators/op-dict-9.html [ ImageOnlyFailure ]
20542054
imported/w3c/web-platform-tests/mathml/presentation-markup/operators/painting-stretchy-operator-001.html [ ImageOnlyFailure ]
2055-
imported/w3c/web-platform-tests/mathml/presentation-markup/scripts/mprescripts-001.html [ ImageOnlyFailure ]
2056-
imported/w3c/web-platform-tests/mathml/presentation-markup/scripts/none-001.html [ ImageOnlyFailure ]
20572055
imported/w3c/web-platform-tests/mathml/presentation-markup/scripts/underover-stretchy-002.html [ ImageOnlyFailure ]
20582056
imported/w3c/web-platform-tests/mathml/relations/css-styling/display-with-overflow.html [ ImageOnlyFailure ]
20592057
imported/w3c/web-platform-tests/mathml/relations/css-styling/floats/floating-inside-mathml-with-block-display.html [ ImageOnlyFailure ]

LayoutTests/accessibility/mac/mathml-multiscript-expected.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,13 @@ Prescripts:
9393

9494
Check multiscript with 'none' tags.
9595
Postscripts:
96+
0. AXMathSuperscript = AXEmptyGroup
9697
0. AXMathSubscript = AXMathNumber
9798
1. AXMathSubscript = AXMathNumber
9899

99100
Prescripts:
100101
0. AXMathSuperscript = AXMathIdentifier
102+
0. AXMathSubscript = AXEmptyGroup
101103
1. AXMathSubscript = AXMathNumber
102104

103105
PASS successfullyParsed is true

LayoutTests/imported/w3c/web-platform-tests/mathml/presentation-markup/mrow/inferred-mrow-stretchy-expected.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ PASS operator stretching inside Menclose
99
PASS operator stretching inside Mpadded
1010
PASS operator stretching inside Unknown
1111
FAIL operator stretching inside Mtd assert_greater_than_equal: expected a number greater than or equal to 100 but got 10
12-
FAIL operator stretching inside None assert_greater_than_equal: expected a number greater than or equal to 100 but got 10
13-
FAIL operator stretching inside Mprescripts assert_greater_than_equal: expected a number greater than or equal to 100 but got 10
12+
PASS operator stretching inside None
13+
PASS operator stretching inside Mprescripts
1414
PASS operator stretching inside Mfenced
1515
PASS operator stretching inside A
1616

LayoutTests/platform/glib/accessibility/math-multiscript-attributes-expected.txt

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,24 @@ AXRequired: 0
6565
AXChecked: 0
6666
AXPlatformAttributes: multiscript-type:post, tag:mi
6767
------------
68+
AXRole: AXGroup
69+
AXParent: AXSection
70+
AXChildren: 0
71+
AXPosition: { 8.00000, -33.0000 }
72+
AXSize: { 32.0000, 10.0000 }
73+
AXTitle:
74+
AXDescription:
75+
AXFocusable: 0
76+
AXFocused: 0
77+
AXSelectable: 0
78+
AXSelected: 0
79+
AXMultiSelectable: 0
80+
AXEnabled: 1
81+
AXExpanded: 0
82+
AXRequired: 0
83+
AXChecked: 0
84+
AXPlatformAttributes: tag:mprescripts
85+
------------
6886
AXRole: AXSubscript
6987
AXParent: AXSection
7088
AXChildren: 0

LayoutTests/platform/mac/accessibility/math-multiscript-attributes-expected.txt

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,37 @@ AXEditableAncestor: (null)
100100
AXHighestEditableAncestor: (null)
101101
AXElementBusy: 0
102102

103+
------------
104+
AXRole: AXGroup
105+
AXSubrole: AXEmptyGroup
106+
AXRoleDescription: group
107+
AXChildren:
108+
AXChildrenInNavigationOrder:
109+
AXHelp:
110+
AXParent:
111+
AXSize: NSSize: {27, 10}
112+
AXTitle:
113+
AXDescription:
114+
AXValue:
115+
AXFocused: 0
116+
AXEnabled: 1
117+
AXWindow:
118+
AXSelectedTextMarkerRange: (null)
119+
AXStartTextMarker:
120+
AXEndTextMarker:
121+
AXVisited: 0
122+
AXLinkedUIElements:
123+
AXSelected: 0
124+
AXBlockQuoteLevel: 0
125+
AXTopLevelUIElement:
126+
AXLanguage:
127+
AXDOMIdentifier:
128+
AXDOMClassList:
129+
AXFocusableAncestor:
130+
AXEditableAncestor: (null)
131+
AXHighestEditableAncestor: (null)
132+
AXElementBusy: 0
133+
103134
------------
104135
AXRole: AXGroup
105136
AXSubrole: AXMathIdentifier

Source/WebCore/mathml/mathtags.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ mtable interfaceName=MathMLPresentationElement, JSInterfaceName=MathMLElement
3333
mtr interfaceName=MathMLPresentationElement, JSInterfaceName=MathMLElement
3434
mtd interfaceName=MathMLPresentationElement, JSInterfaceName=MathMLElement
3535
mmultiscripts interfaceName=MathMLScriptsElement, JSInterfaceName=MathMLElement
36-
mprescripts interfaceName=MathMLPresentationElement, JSInterfaceName=MathMLElement
36+
mprescripts interfaceName=MathMLRowElement, JSInterfaceName=MathMLElement
3737
menclose interfaceName=MathMLMencloseElement, JSInterfaceName=MathMLElement
38-
none interfaceName=MathMLPresentationElement, JSInterfaceName=MathMLElement
38+
none interfaceName=MathMLRowElement, JSInterfaceName=MathMLElement
3939
semantics interfaceName=MathMLSelectElement, JSInterfaceName=MathMLElement
4040

4141
maligngroup interfaceName=MathMLPresentationElement, JSInterfaceName=MathMLElement

0 commit comments

Comments
 (0)