Title: [203163] trunk
Revision
203163
Author
[email protected]
Date
2016-07-13 09:10:58 -0700 (Wed, 13 Jul 2016)

Log Message

The display property of many MathML elements can not be overriden by page authors
https://bugs.webkit.org/show_bug.cgi?id=139403

Source/WebCore:

The mathml.css user agent stylesheet currently forces most MathML elements to render with
'display: block'. We remove the !important keyword so that users can override the display
property, for example to hide elements with 'display: none'. This is consistent with the
behavior for SVG or HTML elements.

Patch by Frederic Wang <[email protected]> on 2016-07-13
Reviewed by Brent Fulgham.

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

* css/mathml.css:
(math):
(math[display="block"]):
(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):
(mtd > *):

LayoutTests:

Patch by Frederic Wang <[email protected]> on 2016-07-13
Reviewed by Brent Fulgham.

* imported/mathml-in-html5/mathml/relations/css-styling/display-1-expected.html: Added.
* imported/mathml-in-html5/mathml/relations/css-styling/display-1.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (203162 => 203163)


--- trunk/LayoutTests/ChangeLog	2016-07-13 16:08:51 UTC (rev 203162)
+++ trunk/LayoutTests/ChangeLog	2016-07-13 16:10:58 UTC (rev 203163)
@@ -1,5 +1,15 @@
 2016-07-13  Frederic Wang  <[email protected]>
 
+        The display property of many MathML elements can not be overriden by page authors
+        https://bugs.webkit.org/show_bug.cgi?id=139403
+
+        Reviewed by Brent Fulgham.
+
+        * imported/mathml-in-html5/mathml/relations/css-styling/display-1-expected.html: Added.
+        * imported/mathml-in-html5/mathml/relations/css-styling/display-1.html: Added.
+
+2016-07-13  Frederic Wang  <[email protected]>
+
         Update Windows expectations for two MathML tests.
 
         Unreviewed test gardening.

Added: trunk/LayoutTests/imported/mathml-in-html5/mathml/relations/css-styling/display-1-expected.html (0 => 203163)


--- trunk/LayoutTests/imported/mathml-in-html5/mathml/relations/css-styling/display-1-expected.html	                        (rev 0)
+++ trunk/LayoutTests/imported/mathml-in-html5/mathml/relations/css-styling/display-1-expected.html	2016-07-13 16:10:58 UTC (rev 203163)
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>display (reference)</title>
+</head>
+<body>
+  <p>Test passes if you see a green square.</p>
+  <div style="background: green; width: 200px; height: 200px;">
+  </div>
+</body>
+</html>
Property changes on: trunk/LayoutTests/imported/mathml-in-html5/mathml/relations/css-styling/display-1-expected.html
___________________________________________________________________

Added: svn:eol-style

+LF \ No newline at end of property

Added: svn:mime-type

+text/html \ No newline at end of property

Added: trunk/LayoutTests/imported/mathml-in-html5/mathml/relations/css-styling/display-1.html (0 => 203163)


--- trunk/LayoutTests/imported/mathml-in-html5/mathml/relations/css-styling/display-1.html	                        (rev 0)
+++ trunk/LayoutTests/imported/mathml-in-html5/mathml/relations/css-styling/display-1.html	2016-07-13 16:10:58 UTC (rev 203163)
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>display</title>
+<link rel="help" href=""
+<link rel="match" href=""
+<meta name="assert" content="Verify that the 'display: none' property works on MathML elements.">
+</head>
+<body>
+  <p>Test passes if you see a green square.</p>
+  <div style="background: green; width: 200px; height: 200px;">
+    <math style="display: none;"><mspace width="200px" height="200px" mathbackground="red"/></math>
+  </div>
+</body>
+</html>
Property changes on: trunk/LayoutTests/imported/mathml-in-html5/mathml/relations/css-styling/display-1.html
___________________________________________________________________

Added: svn:eol-style

+LF \ No newline at end of property

Added: svn:mime-type

+text/html \ No newline at end of property

Modified: trunk/Source/WebCore/ChangeLog (203162 => 203163)


--- trunk/Source/WebCore/ChangeLog	2016-07-13 16:08:51 UTC (rev 203162)
+++ trunk/Source/WebCore/ChangeLog	2016-07-13 16:10:58 UTC (rev 203163)
@@ -1,3 +1,23 @@
+2016-07-13  Frederic Wang  <[email protected]>
+
+        The display property of many MathML elements can not be overriden by page authors
+        https://bugs.webkit.org/show_bug.cgi?id=139403
+
+        The mathml.css user agent stylesheet currently forces most MathML elements to render with
+        'display: block'. We remove the !important keyword so that users can override the display
+        property, for example to hide elements with 'display: none'. This is consistent with the
+        behavior for SVG or HTML elements.
+
+        Reviewed by Brent Fulgham.
+
+        Test: imported/mathml-in-html5/mathml/relations/css-styling/display-1.html
+
+        * css/mathml.css:
+        (math):
+        (math[display="block"]):
+        (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):
+        (mtd > *):
+
 2016-07-13  Youenn Fablet  <[email protected]>
 
         [Fetch API] Response should not become disturbed on the ReadableStream creation

Modified: trunk/Source/WebCore/css/mathml.css (203162 => 203163)


--- trunk/Source/WebCore/css/mathml.css	2016-07-13 16:08:51 UTC (rev 203162)
+++ trunk/Source/WebCore/css/mathml.css	2016-07-13 16:10:58 UTC (rev 203163)
@@ -108,13 +108,13 @@
 }
 
 math {
-    display: inline !important;
+    display: inline;
     padding-left: 1px;
     padding-right: 1px;
 }
 
 math[display="block"] {
-    display: block !important;
+    display: block;
     page-break-inside: avoid;
     /* -webkit-margin-before: 1em; -- FIXME: Ask www-math for a default MathML stylesheet, including this (or margin-top). */
     -webkit-margin-after: 1em;
@@ -121,7 +121,7 @@
 }
 
 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 {
-    display: block !important;
+    display: block;
 }
 
 ms, mtext, mi, mn, mo, annotation, mtd {
@@ -184,7 +184,7 @@
 }
 /* Use inline-block for children so that the text-align property is taken into account */
 mtd > * {
-    display: inline-block !important;
+    display: inline-block;
 }
 
 mtable[columnalign="left"], mtr[columnalign="left"], mtd[columnalign="left"] {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to