Title: [202572] trunk
- Revision
- 202572
- Author
- [email protected]
- Date
- 2016-06-28 10:01:29 -0700 (Tue, 28 Jun 2016)
Log Message
Phrasing content should be accepted in <mo> elements
https://bugs.webkit.org/show_bug.cgi?id=130245
Patch by Frederic Wang <[email protected]> on 2016-06-28
Reviewed by Brent Fulgham.
Source/WebCore:
After r202420, the RenderMathMLOperator element no longer messes with anonymous block and
text nodes. Hence it is now safe to allow foreign content inside <mo>.
We extend foreign-element-in-token.html to cover the mo case.
* mathml/MathMLTextElement.cpp:
(WebCore::MathMLTextElement::childShouldCreateRenderer): Remove the early return for <mo> so
that it accepts phrasing content children.
LayoutTests:
* mathml/presentation/foreign-element-in-token.html: Copy test cases to
check <mo> elements too.
* mathml/presentation/foreign-element-in-token-expected.txt: Add the
expectations for <mo>.
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (202571 => 202572)
--- trunk/LayoutTests/ChangeLog 2016-06-28 16:53:27 UTC (rev 202571)
+++ trunk/LayoutTests/ChangeLog 2016-06-28 17:01:29 UTC (rev 202572)
@@ -1,3 +1,15 @@
+2016-06-28 Frederic Wang <[email protected]>
+
+ Phrasing content should be accepted in <mo> elements
+ https://bugs.webkit.org/show_bug.cgi?id=130245
+
+ Reviewed by Brent Fulgham.
+
+ * mathml/presentation/foreign-element-in-token.html: Copy test cases to
+ check <mo> elements too.
+ * mathml/presentation/foreign-element-in-token-expected.txt: Add the
+ expectations for <mo>.
+
2016-06-28 Alexey Proskuryakov <[email protected]>
Sierra test expectation gardening.
Modified: trunk/LayoutTests/mathml/presentation/foreign-element-in-token-expected.txt (202571 => 202572)
--- trunk/LayoutTests/mathml/presentation/foreign-element-in-token-expected.txt 2016-06-28 16:53:27 UTC (rev 202571)
+++ trunk/LayoutTests/mathml/presentation/foreign-element-in-token-expected.txt 2016-06-28 17:01:29 UTC (rev 202572)
@@ -324,6 +324,114 @@
var:
mtext
+a:
+mo
+
+abbr:
+mo
+
+b:
+mo
+
+bdi:
+mo
+
+bdo:
+mo
+
+button:
+mo
+
+cite:
+mo
+
+code:
+mo
+
+datalist:
+mo
+
+del:
+mo
+
+dfn:
+mo
+
+em:
+mo
+
+embed:
+mo
+
+i:
+mo
+
+img:
+mo
+
+input:
+mo
+
+ins:
+mo
+
+kbd:
+mo
+
+keygen:
+mo
+
+label:
+mo
+
+mark:
+mo
+
+math:
+mo
+
+object:
+mo
+
+output:
+mo
+
+q:
+mo
+
+ruby:
+mo
+
+s:
+mo
+
+samp:
+mo
+
+small:
+mo
+
+span:
+mo
+
+strong:
+mo
+
+sub:
+mo
+
+sup:
+mo
+
+svg:
+mo
+
+u:
+mo
+
+var:
+mo
+
Foreign non-phrasing content should not create renderers:
p:
Modified: trunk/LayoutTests/mathml/presentation/foreign-element-in-token.html (202571 => 202572)
--- trunk/LayoutTests/mathml/presentation/foreign-element-in-token.html 2016-06-28 16:53:27 UTC (rev 202571)
+++ trunk/LayoutTests/mathml/presentation/foreign-element-in-token.html 2016-06-28 17:01:29 UTC (rev 202572)
@@ -126,16 +126,53 @@
<p>u: <math><mtext><u>mtext</u></mtext></math></p>
<p>var: <math><mtext><var>mtext</var></mtext></math></p>
+ <p>a: <math><mo><a>mo</a></mo></math></p>
+ <p>abbr: <math><mo><abbr>mo</abbr></mo></mth></p>
+ <p>b: <math><mo><b>mo</b></mo></math></p>
+ <p>bdi: <math><mo><bdi>mo</bdi></mo></math></p>
+ <p>bdo: <math><mo><bdo>mo</bdo></mo></math></p>
+ <p>button: <math><mo><button>mo</button></mo></math></p>
+ <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>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>
+ <p>embed: <math><mo><embed>mo</embed></mo></math></p>
+ <p>i: <math><mo><i>mo</i></mo></math></p>
+ <p>img: <math><mo><img>mo</img></mo></math></p>
+ <p>input: <math><mo><input>mo</input></mo></math></p>
+ <p>ins: <math><mo><ins>mo</ins></mo></math></p>
+ <p>kbd: <math><mo><kbd>mo</kbd></mo></math></p>
+ <p>keygen: <math><mo><keygen>mo</keygen></mo></math></p>
+ <p>label: <math><mo><label>mo</label></mo></math></p>
+ <p>mark: <math><mo><mark>mo</mark></mo></math></p>
+ <p>math: <math><mo><math><mo>mo</mo></math></mo></math></p>
+ <p>object: <math><mo><object>mo</object></mo></math></p>
+ <p>output: <math><mo><output>mo</output></mo></math></p>
+ <p>q: <math><mo><q>mo</q></mo></math></p>
+ <p>ruby: <math><mo><ruby>mo</ruby></mo></math></p>
+ <p>s: <math><mo><s>mo</s></mo></math></p>
+ <p>samp: <math><mo><samp>mo</samp></mo></math></p>
+ <p>small: <math><mo><small>mo</small></mo></math></p>
+ <p>span: <math><mo><span>mo</span></mo></math></p>
+ <p>strong: <math><mo><strong>mo</strong></mo></math></p>
+ <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>u: <math><mo><u>mo</u></mo></math></p>
+ <p>var: <math><mo><var>mo</var></mo></math></p>
+
<p>Foreign non-phrasing content should not create renderers:</p>
- <p>p: <math><mi><p>mi</p></mi><mtext><p>mi</p></mtext><mn><p>mn</p></mn></math></p>
- <p>div: <math><mi><div>mi</div></mi><mtext><div>mi</div></mtext><mn><div>mn</div></mn></math></p>
- <p>h1: <math><mi><h1>mi</h1></mi><mtext><h1>mi</h1></mtext><mn><h1>mn</h1></mn></math></p>
- <p>h2: <math><mi><h2>mi</h2></mi><mtext><h2>mi</h2></mtext><mn><h2>mn</h2></mn></math></p>
- <p>h3: <math><mi><h3>mi</h3></mi><mtext><h3>mi</h3></mtext><mn><h3>mn</h3></mn></math></p>
- <p>h4: <math><mi><h4>mi</h4></mi><mtext><h4>mi</h4></mtext><mn><h4>mn</h4></mn></math></p>
- <p>h6: <math><mi><h6>mi</h6></mi><mtext><h6>mi</h6></mtext><mn><h6>mn</h6></mn></math></p>
- <p>blockquote: <math><mi><blockquote>mi</blockquote></mi><mtext><blockquote>mi</blockquote></mtext><mn><blockquote>mn</blockquote></mn></math></p>
+ <p>p: <math><mi><p>mi</p></mi><mtext><p>mi</p></mtext><mn><p>mn</p></mn><mo><p>mo</p></mo></math></p>
+ <p>div: <math><mi><div>mi</div></mi><mtext><div>mi</div></mtext><mn><div>mn</div></mn><mo><div>mo</div></mo></math></p>
+ <p>h1: <math><mi><h1>mi</h1></mi><mtext><h1>mi</h1></mtext><mn><h1>mn</h1></mn><mo><h1>mo</h1></mo></math></p>
+ <p>h2: <math><mi><h2>mi</h2></mi><mtext><h2>mi</h2></mtext><mn><h2>mn</h2></mn><mo><h2>mo</h2></mo></math></p>
+ <p>h3: <math><mi><h3>mi</h3></mi><mtext><h3>mi</h3></mtext><mn><h3>mn</h3></mn><mo><h3>mo</h3></mo></math></p>
+ <p>h4: <math><mi><h4>mi</h4></mi><mtext><h4>mi</h4></mtext><mn><h4>mn</h4></mn><mo><h4>mo</h4></mo></math></p>
+ <p>h6: <math><mi><h6>mi</h6></mi><mtext><h6>mi</h6></mtext><mn><h6>mn</h6></mn><mo><h6>mo</h6></mo></math></p>
+ <p>blockquote: <math><mi><blockquote>mi</blockquote></mi><mtext><blockquote>mi</blockquote></mtext><mn><blockquote>mn</blockquote></mn><mo><blockquote>mo</blockquote></mo></math></p>
</body>
</html>
Modified: trunk/Source/WebCore/ChangeLog (202571 => 202572)
--- trunk/Source/WebCore/ChangeLog 2016-06-28 16:53:27 UTC (rev 202571)
+++ trunk/Source/WebCore/ChangeLog 2016-06-28 17:01:29 UTC (rev 202572)
@@ -1,3 +1,19 @@
+2016-06-28 Frederic Wang <[email protected]>
+
+ Phrasing content should be accepted in <mo> elements
+ https://bugs.webkit.org/show_bug.cgi?id=130245
+
+ Reviewed by Brent Fulgham.
+
+ After r202420, the RenderMathMLOperator element no longer messes with anonymous block and
+ text nodes. Hence it is now safe to allow foreign content inside <mo>.
+
+ We extend foreign-element-in-token.html to cover the mo case.
+
+ * mathml/MathMLTextElement.cpp:
+ (WebCore::MathMLTextElement::childShouldCreateRenderer): Remove the early return for <mo> so
+ that it accepts phrasing content children.
+
2016-06-27 Anders Carlsson <[email protected]>
WebKit::WebPaymentCoordinator leak
Modified: trunk/Source/WebCore/mathml/MathMLTextElement.cpp (202571 => 202572)
--- trunk/Source/WebCore/mathml/MathMLTextElement.cpp 2016-06-28 16:53:27 UTC (rev 202571)
+++ trunk/Source/WebCore/mathml/MathMLTextElement.cpp 2016-06-28 17:01:29 UTC (rev 202572)
@@ -94,8 +94,7 @@
if (hasTagName(MathMLNames::mspaceTag))
return false;
- // FIXME: phrasing content should be accepted in <mo> elements too (https://bugs.webkit.org/show_bug.cgi?id=130245).
- if (hasTagName(MathMLNames::annotationTag) || hasTagName(MathMLNames::moTag))
+ if (hasTagName(MathMLNames::annotationTag))
return child.isTextNode();
// The HTML specification defines <mi>, <mo>, <mn>, <ms> and <mtext> as insertion points.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes