COMMIT_MESSAGE

 1Bug 139403 - The display property of many MathML elements can not be overriden by page authors
 2

LayoutTests/ChangeLog

112016-07-08 Frederic Wang <fwang@igalia.com>
22
 3 The display property of many MathML elements can not be overriden by page authors
 4 https://bugs.webkit.org/show_bug.cgi?id=139403
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 * accessibility/roles-computedRoleString-expected.txt: Remove the space generated <math> tag, now that 'display: none' works on it.
 9 * platform/gtk/accessibility/roles-computedRoleString-expected.txt: Ditto.
 10 * imported/mathml-in-html5/mathml/relations/css-styling/display-1-expected.html: Added.
 11 * imported/mathml-in-html5/mathml/relations/css-styling/display-1.html: Added.
 12
 132016-07-08 Frederic Wang <fwang@igalia.com>
 14
315 Use Radical* constants from the OpenType MATH table.
416 https://bugs.webkit.org/show_bug.cgi?id=155638
517

LayoutTests/accessibility/roles-computedRoleString-expected.txt

1  X
 1X
22This tests that native elements and ARIA overrides result in the same ARIA computed role, regardless of platform.
33
44On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".

LayoutTests/imported/mathml-in-html5/mathml/relations/css-styling/display-1-expected.html

 1<!DOCTYPE html>
 2<html>
 3<head>
 4<meta charset="utf-8">
 5<title>display (reference)</title>
 6</head>
 7<body>
 8 <p>Test passes if you see a green square.</p>
 9 <div style="background: green; color: red; width: 200px; height: 200px;">
 10 </div>
 11</body>
 12</html>

LayoutTests/imported/mathml-in-html5/mathml/relations/css-styling/display-1.html

 1<!DOCTYPE html>
 2<html>
 3<head>
 4<meta charset="utf-8">
 5<title>display</title>
 6<link rel="help" href="http://www.mathml-association.org/MathMLinHTML5/S2.html#SS3.SSS1">
 7<link rel="match" href="display-1-ref.html"/>
 8<meta name="assert" content="Verify that the 'display: none' property works on MathML elements.">
 9</head>
 10<body>
 11 <p>Test passes if you see a green square.</p>
 12 <div style="background: green; color: red; width: 200px; height: 200px;">
 13 <math style="display: none;"><mspace width="200px" height="200px" mathbackground="red"/></math>
 14 </div>
 15</body>
 16</html>

LayoutTests/platform/gtk/accessibility/roles-computedRoleString-expected.txt

1  X
 1X
22This tests that native elements and ARIA overrides result in the same ARIA computed role, regardless of platform.
33
44On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".

Source/WebCore/ChangeLog

112016-07-08 Frederic Wang <fwang@igalia.com>
22
 3 The display property of many MathML elements can not be overriden by page authors
 4 https://bugs.webkit.org/show_bug.cgi?id=139403
 5
 6 The mathml.css user agent stylesheet currently forces most MathML elements to render with
 7 'display: block'. We remove the !important property so that users can override the display
 8 property, for example to hide elements with 'display: none'. This is consistent with the
 9 behavior for SVG or HTML elements.
 10
 11 Reviewed by NOBODY (OOPS!).
 12
 13 Test: imported/mathml-in-html5/mathml/relations/css-styling/display-1.html
 14
 15 * css/mathml.css:
 16 (math):
 17 (math[display="block"]):
 18 (ms, mspace, mtext, mi, mn, mo, mrow, mfenced, mfrac, msub, msup, msubsup, mmultiscripts, mprescripts, none, munder, mover, munderover, msqrt, mroot, merror, mphantom, mstyle, menclose, semantics, mpadded, maction):
 19 (mtd > *):
 20
 212016-07-08 Frederic Wang <fwang@igalia.com>
 22
323 Use Radical* constants from the OpenType MATH table.
424 https://bugs.webkit.org/show_bug.cgi?id=155638
525

Source/WebCore/css/mathml.css

@@math {
9595}
9696
9797math {
98  display: inline !important;
 98 display: inline;
9999 padding-left: 1px;
100100 padding-right: 1px;
101101}
102102
103103math[display="block"] {
104  display: block !important;
 104 display: block;
105105 page-break-inside: avoid;
106106 /* -webkit-margin-before: 1em; -- FIXME: Ask www-math for a default MathML stylesheet, including this (or margin-top). */
107107 -webkit-margin-after: 1em;
108108}
109109
110110ms, mspace, mtext, mi, mn, mo, mrow, mfenced, mfrac, msub, msup, msubsup, mmultiscripts, mprescripts, none, munder, mover, munderover, msqrt, mroot, merror, mphantom, mstyle, menclose, semantics, mpadded, maction {
111  display: block !important;
 111 display: block;
112112}
113113
114114ms, mtext, mi, mn, mo, annotation, mtd {

@@mtd {
191191}
192192/* Use inline-block for children so that the text-align property is taken into account */
193193mtd > * {
194  display: inline-block !important;
 194 display: inline-block;
195195}
196196
197197mtable[columnalign="left"], mtr[columnalign="left"], mtd[columnalign="left"] {