Title: [249272] trunk
Revision
249272
Author
[email protected]
Date
2019-08-29 07:54:54 -0700 (Thu, 29 Aug 2019)

Log Message

Address some MathML FIXMEs
https://bugs.webkit.org/show_bug.cgi?id=201293

Patch by Rob Buis <[email protected]> on 2019-08-29
Reviewed by Frédéric Wang.

Source/WebCore:

Add element tag checks for data, time and dialog.

* mathml/MathMLOperatorDictionary.h:
* mathml/MathMLPresentationElement.cpp:
(WebCore::MathMLPresentationElement::isPhrasingContent):
(WebCore::MathMLPresentationElement::isFlowContent):

LayoutTests:

Also test newly exposed data and time elements.

* mathml/presentation/foreign-element-in-token-expected.txt:
* mathml/presentation/foreign-element-in-token.html:
* platform/ios-wk2/mathml/presentation/foreign-element-in-token-expected.txt:
* platform/mac-wk2/mathml/presentation/foreign-element-in-token-expected.txt:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (249271 => 249272)


--- trunk/LayoutTests/ChangeLog	2019-08-29 13:11:25 UTC (rev 249271)
+++ trunk/LayoutTests/ChangeLog	2019-08-29 14:54:54 UTC (rev 249272)
@@ -1,3 +1,17 @@
+2019-08-29  Rob Buis  <[email protected]>
+
+        Address some MathML FIXMEs 
+        https://bugs.webkit.org/show_bug.cgi?id=201293
+
+        Reviewed by Frédéric Wang.
+
+        Also test newly exposed data and time elements.
+
+        * mathml/presentation/foreign-element-in-token-expected.txt:
+        * mathml/presentation/foreign-element-in-token.html:
+        * platform/ios-wk2/mathml/presentation/foreign-element-in-token-expected.txt:
+        * platform/mac-wk2/mathml/presentation/foreign-element-in-token-expected.txt:
+
 2019-08-28  Ryosuke Niwa  <[email protected]>
 
         Make tabIndex IDL attribute reflect its content attribute

Modified: trunk/LayoutTests/mathml/presentation/foreign-element-in-token-expected.txt (249271 => 249272)


--- trunk/LayoutTests/mathml/presentation/foreign-element-in-token-expected.txt	2019-08-29 13:11:25 UTC (rev 249271)
+++ trunk/LayoutTests/mathml/presentation/foreign-element-in-token-expected.txt	2019-08-29 14:54:54 UTC (rev 249272)
@@ -27,6 +27,9 @@
 datalist: 
 mi
 
+data: 
+mi
+
 del: 
 mi
 
@@ -102,6 +105,9 @@
 svg: 
 mi
 
+time: 
+mi
+
 u: 
 mi
 
@@ -135,6 +141,9 @@
 datalist: 
 mn
 
+data: 
+mn
+
 del: 
 mn
 
@@ -210,6 +219,9 @@
 svg: 
 mn
 
+time: 
+mn
+
 u: 
 mn
 
@@ -243,6 +255,9 @@
 datalist: 
 mtext
 
+data: 
+mtext
+
 del: 
 mtext
 
@@ -318,6 +333,9 @@
 svg: 
 mtext
 
+time: 
+mtext
+
 u: 
 mtext
 
@@ -351,6 +369,9 @@
 datalist: 
 mo
 
+data: 
+mo
+
 del: 
 mo
 
@@ -426,6 +447,9 @@
 svg: 
 mo
 
+time: 
+mo
+
 u: 
 mo
 

Modified: trunk/LayoutTests/mathml/presentation/foreign-element-in-token.html (249271 => 249272)


--- trunk/LayoutTests/mathml/presentation/foreign-element-in-token.html	2019-08-29 13:11:25 UTC (rev 249271)
+++ trunk/LayoutTests/mathml/presentation/foreign-element-in-token.html	2019-08-29 14:54:54 UTC (rev 249272)
@@ -11,8 +11,8 @@
   
     <p>Foreign phrasing content should create renderers:</p>
 
-    <!-- The following elements are not covered by this test: wbr, audio, data,
-         time, canvas, iframe, map, video, textarea, meter, noscript, progress,
+    <!-- The following elements are not covered by this test: wbr, audio,
+         canvas, iframe, map, video, textarea, meter, noscript, progress,
          script, select, template, br, area. -->
 
     <p>a: <math><mi><a>mi</a></mi></math></p>
@@ -24,6 +24,7 @@
     <p>cite: <math><mi><cite>mi</cite></mi></math></p>
     <p>code: <math><mi><code>mi</code></mi></math></p>
     <p>datalist: <math><mi><datalist>mi</datalist></mi></math></p>
+    <p>data: <math><mi><data>mi</data></mi></math></p>
     <p>del: <math><mi><del>mi</del></mi></math></p>
     <p>dfn: <math><mi><dfn>mi</dfn></mi></math></p>
     <p>em: <math><mi><em>mi</em></mi></math></p>
@@ -49,6 +50,7 @@
     <p>sub: <math><mi><sub>mi</sub></mi></math></p>
     <p>sup: <math><mi><sup>mi</sup></mi></math></p>
     <p>svg: <math><mi><svg><text>mi</text></svg></mi></math></p>
+    <p>time: <math><mi><time>mi</time></mi></math></p>
     <p>u: <math><mi><u>mi</u></mi></math></p>
     <p>var: <math><mi><var>mi</var></mi></math></p>
 
@@ -61,6 +63,7 @@
     <p>cite: <math><mn><cite>mn</cite></mn></math></p>
     <p>code: <math><mn><code>mn</code></mn></math></p>
     <p>datalist: <math><mn><datalist>mn</datalist></mn></math></p>
+    <p>data: <math><mn><data>mn</data></mn></math></p>
     <p>del: <math><mn><del>mn</del></mn></math></p>
     <p>dfn: <math><mn><dfn>mn</dfn></mn></math></p>
     <p>em: <math><mn><em>mn</em></mn></math></p>
@@ -86,6 +89,7 @@
     <p>sub: <math><mn><sub>mn</sub></mn></math></p>
     <p>sup: <math><mn><sup>mn</sup></mn></math></p>
     <p>svg: <math><mn><svg><text>mn</text></svg></mn></math></p>
+    <p>time: <math><mn><time>mn</time></mn></math></p>
     <p>u: <math><mn><u>mn</u></mn></math></p>
     <p>var: <math><mn><var>mn</var></mn></math></p>
 
@@ -98,6 +102,7 @@
     <p>cite: <math><mtext><cite>mtext</cite></mtext></math></p>
     <p>code: <math><mtext><code>mtext</code></mtext></math></p>
     <p>datalist: <math><mtext><datalist>mtext</datalist></mtext></math></p>
+    <p>data: <math><mtext><data>mtext</data></mtext></math></p>
     <p>del: <math><mtext><del>mtext</del></mtext></math></p>
     <p>dfn: <math><mtext><dfn>mtext</dfn></mtext></math></p>
     <p>em: <math><mtext><em>mtext</em></mtext></math></p>
@@ -123,6 +128,7 @@
     <p>sub: <math><mtext><sub>mtext</sub></mtext></math></p>
     <p>sup: <math><mtext><sup>mtext</sup></mtext></math></p>
     <p>svg: <math><mtext><svg><text>mtext</text></svg></mtext></math></p>
+    <p>time: <math><mtext><time>mtext</time></mtext></math></p>
     <p>u: <math><mtext><u>mtext</u></mtext></math></p>
     <p>var: <math><mtext><var>mtext</var></mtext></math></p>
 
@@ -135,6 +141,7 @@
     <p>cite: <math><mo><cite>mo</cite></mo></math></p>
     <p>code: <math><mo><code>mo</code></mo></math></p>
     <p>datalist: <math><mo><datalist>mo</datalist></mo></math></p>
+    <p>data: <math><mo><data>mo</data></mo></math></p>
     <p>del: <math><mo><del>mo</del></mo></math></p>
     <p>dfn: <math><mo><dfn>mo</dfn></mo></math></p>
     <p>em: <math><mo><em>mo</em></mo></math></p>
@@ -160,6 +167,7 @@
     <p>sub: <math><mo><sub>mo</sub></mo></math></p>
     <p>sup: <math><mo><sup>mo</sup></mo></math></p>
     <p>svg: <math><mo><svg><text>mo</text></svg></mo></math></p>
+    <p>time: <math><mo><time>mo</time></mo></math></p>
     <p>u: <math><mo><u>mo</u></mo></math></p>
     <p>var: <math><mo><var>mo</var></mo></math></p>
 

Modified: trunk/LayoutTests/platform/ios-wk2/mathml/presentation/foreign-element-in-token-expected.txt (249271 => 249272)


--- trunk/LayoutTests/platform/ios-wk2/mathml/presentation/foreign-element-in-token-expected.txt	2019-08-29 13:11:25 UTC (rev 249271)
+++ trunk/LayoutTests/platform/ios-wk2/mathml/presentation/foreign-element-in-token-expected.txt	2019-08-29 14:54:54 UTC (rev 249272)
@@ -26,6 +26,9 @@
 
 datalist: 
 
+data: 
+mi
+
 del: 
 mi
 
@@ -101,6 +104,9 @@
 svg: 
 mi
 
+time: 
+mi
+
 u: 
 mi
 
@@ -133,6 +139,9 @@
 
 datalist: 
 
+data: 
+mn
+
 del: 
 mn
 
@@ -208,6 +217,9 @@
 svg: 
 mn
 
+time: 
+mn
+
 u: 
 mn
 
@@ -240,6 +252,9 @@
 
 datalist: 
 
+data: 
+mtext
+
 del: 
 mtext
 
@@ -315,6 +330,9 @@
 svg: 
 mtext
 
+time: 
+mtext
+
 u: 
 mtext
 
@@ -347,6 +365,9 @@
 
 datalist: 
 
+data: 
+mo
+
 del: 
 mo
 
@@ -422,6 +443,9 @@
 svg: 
 mo
 
+time: 
+mo
+
 u: 
 mo
 

Modified: trunk/LayoutTests/platform/mac-wk2/mathml/presentation/foreign-element-in-token-expected.txt (249271 => 249272)


--- trunk/LayoutTests/platform/mac-wk2/mathml/presentation/foreign-element-in-token-expected.txt	2019-08-29 13:11:25 UTC (rev 249271)
+++ trunk/LayoutTests/platform/mac-wk2/mathml/presentation/foreign-element-in-token-expected.txt	2019-08-29 14:54:54 UTC (rev 249272)
@@ -26,6 +26,9 @@
 
 datalist: 
 
+data: 
+mi
+
 del: 
 mi
 
@@ -101,6 +104,9 @@
 svg: 
 mi
 
+time: 
+mi
+
 u: 
 mi
 
@@ -133,6 +139,9 @@
 
 datalist: 
 
+data: 
+mn
+
 del: 
 mn
 
@@ -208,6 +217,9 @@
 svg: 
 mn
 
+time: 
+mn
+
 u: 
 mn
 
@@ -240,6 +252,9 @@
 
 datalist: 
 
+data: 
+mtext
+
 del: 
 mtext
 
@@ -315,6 +330,9 @@
 svg: 
 mtext
 
+time: 
+mtext
+
 u: 
 mtext
 
@@ -347,6 +365,9 @@
 
 datalist: 
 
+data: 
+mo
+
 del: 
 mo
 
@@ -422,6 +443,9 @@
 svg: 
 mo
 
+time: 
+mo
+
 u: 
 mo
 

Modified: trunk/Source/WebCore/ChangeLog (249271 => 249272)


--- trunk/Source/WebCore/ChangeLog	2019-08-29 13:11:25 UTC (rev 249271)
+++ trunk/Source/WebCore/ChangeLog	2019-08-29 14:54:54 UTC (rev 249272)
@@ -1,3 +1,17 @@
+2019-08-29  Rob Buis  <[email protected]>
+
+        Address some MathML FIXMEs 
+        https://bugs.webkit.org/show_bug.cgi?id=201293
+
+        Reviewed by Frédéric Wang.
+
+        Add element tag checks for data, time and dialog.
+
+        * mathml/MathMLOperatorDictionary.h:
+        * mathml/MathMLPresentationElement.cpp:
+        (WebCore::MathMLPresentationElement::isPhrasingContent):
+        (WebCore::MathMLPresentationElement::isFlowContent):
+
 2019-08-29  Zan Dobersek  <[email protected]>
 
         [Nicosia] Nicosia::Animation is missing the copy assignment operator

Modified: trunk/Source/WebCore/mathml/MathMLOperatorDictionary.h (249271 => 249272)


--- trunk/Source/WebCore/mathml/MathMLOperatorDictionary.h	2019-08-29 13:11:25 UTC (rev 249271)
+++ trunk/Source/WebCore/mathml/MathMLOperatorDictionary.h	2019-08-29 14:54:54 UTC (rev 249272)
@@ -35,7 +35,7 @@
 namespace MathMLOperatorDictionary {
 enum Form { Infix, Prefix, Postfix };
 enum Flag {
-    Accent = 0x1, // FIXME: This must be used to implement accentunder/accent on munderover (https://bugs.webkit.org/show_bug.cgi?id=124826).
+    Accent = 0x1,
     Fence = 0x2, // This has no visual effect but allows to expose semantic information via the accessibility tree.
     LargeOp = 0x4,
     MovableLimits = 0x8,

Modified: trunk/Source/WebCore/mathml/MathMLPresentationElement.cpp (249271 => 249272)


--- trunk/Source/WebCore/mathml/MathMLPresentationElement.cpp	2019-08-29 13:11:25 UTC (rev 249271)
+++ trunk/Source/WebCore/mathml/MathMLPresentationElement.cpp	2019-08-29 14:54:54 UTC (rev 249272)
@@ -86,7 +86,6 @@
     }
 
     if (is<HTMLElement>(node)) {
-        // FIXME: add the <data> and <time> tags when they are implemented.
         auto& htmlElement = downcast<HTMLElement>(node);
         return htmlElement.hasTagName(HTMLNames::aTag)
             || htmlElement.hasTagName(HTMLNames::abbrTag)
@@ -101,6 +100,7 @@
             || htmlElement.hasTagName(HTMLNames::citeTag)
             || htmlElement.hasTagName(HTMLNames::codeTag)
             || htmlElement.hasTagName(HTMLNames::datalistTag)
+            || htmlElement.hasTagName(HTMLNames::dataTag)
             || htmlElement.hasTagName(HTMLNames::delTag)
             || htmlElement.hasTagName(HTMLNames::dfnTag)
             || htmlElement.hasTagName(HTMLNames::emTag)
@@ -133,6 +133,7 @@
             || htmlElement.hasTagName(HTMLNames::supTag)
             || htmlElement.hasTagName(HTMLNames::templateTag)
             || htmlElement.hasTagName(HTMLNames::textareaTag)
+            || htmlElement.hasTagName(HTMLNames::timeTag)
             || htmlElement.hasTagName(HTMLNames::uTag)
             || htmlElement.hasTagName(HTMLNames::varTag)
             || htmlElement.hasTagName(HTMLNames::videoTag)
@@ -154,12 +155,12 @@
         return false;
 
     auto& htmlElement = downcast<HTMLElement>(node);
-    // FIXME add the <dialog> tag when it is implemented.
     return htmlElement.hasTagName(HTMLNames::addressTag)
         || htmlElement.hasTagName(HTMLNames::articleTag)
         || htmlElement.hasTagName(HTMLNames::asideTag)
         || htmlElement.hasTagName(HTMLNames::blockquoteTag)
         || htmlElement.hasTagName(HTMLNames::detailsTag)
+        || htmlElement.hasTagName(HTMLNames::dialogTag)
         || htmlElement.hasTagName(HTMLNames::divTag)
         || htmlElement.hasTagName(HTMLNames::dlTag)
         || htmlElement.hasTagName(HTMLNames::fieldsetTag)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to