Diff
Modified: trunk/LayoutTests/ChangeLog (163625 => 163626)
--- trunk/LayoutTests/ChangeLog 2014-02-07 17:45:49 UTC (rev 163625)
+++ trunk/LayoutTests/ChangeLog 2014-02-07 18:20:01 UTC (rev 163626)
@@ -1,3 +1,18 @@
+2014-02-07 Frédéric Wang <[email protected]>
+
+ childShouldCreateRenderer should return false for the mspace element
+ https://bugs.webkit.org/show_bug.cgi?id=128325
+
+ Reviewed by Chris Fleizach.
+
+ Add tests to ensure that the mspace element does not have renderer
+ children.
+
+ * mathml/presentation/mspace-children-expected.png: Added.
+ * mathml/presentation/mspace-children-expected.txt: Added.
+ * mathml/presentation/mspace-children.html: Added.
+ * platform/mathml/presentation/mspace-children-expected.txt: Added.
+
2014-02-07 Javier Fernandez <[email protected]>
[CSS Grid Layout] Rename grid-definition-{columns|rows} to match the new syntax
Added: trunk/LayoutTests/mathml/presentation/mspace-children-expected.png
(Binary files differ)
Property changes on: trunk/LayoutTests/mathml/presentation/mspace-children-expected.png
___________________________________________________________________
Added: svn:mime-type
Added: trunk/LayoutTests/mathml/presentation/mspace-children-expected.txt (0 => 163626)
--- trunk/LayoutTests/mathml/presentation/mspace-children-expected.txt (rev 0)
+++ trunk/LayoutTests/mathml/presentation/mspace-children-expected.txt 2014-02-07 18:20:01 UTC (rev 163626)
@@ -0,0 +1,12 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x371
+ RenderBlock {HTML} at (0,0) size 800x371
+ RenderBody {BODY} at (8,16) size 784x347
+ RenderBlock {P} at (0,0) size 784x17
+ RenderText {#text} at (0,0) size 378x17
+ text run at (0,0) width 378: "This test passes if <mspace> does not create child renderers."
+ RenderBlock (anonymous) at (0,33) size 784x314
+ RenderMathMLMath {math} at (0,14) size 102x300 [padding: 0 1 0 1]
+ RenderMathMLSpace {mspace} at (1,0) size 100x300
+ RenderText {#text} at (0,0) size 0x0
Added: trunk/LayoutTests/mathml/presentation/mspace-children.html (0 => 163626)
--- trunk/LayoutTests/mathml/presentation/mspace-children.html (rev 0)
+++ trunk/LayoutTests/mathml/presentation/mspace-children.html 2014-02-07 18:20:01 UTC (rev 163626)
@@ -0,0 +1,14 @@
+<!doctype html>
+<html>
+ <head>
+ <title>mspace children</title>
+ <meta charset="utf-8"/>
+ </head>
+ <body>
+
+ <p>This test passes if <mspace> does not create child renderers.</p>
+
+ <math><mspace width="100px" height="200" depth="300px">Text Node <mtext>x</mtext></mspace></math>
+
+ </body>
+</html>
Added: trunk/LayoutTests/platform/mac/mathml/presentation/mspace-children-expected.txt (0 => 163626)
--- trunk/LayoutTests/platform/mac/mathml/presentation/mspace-children-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/mac/mathml/presentation/mspace-children-expected.txt 2014-02-07 18:20:01 UTC (rev 163626)
@@ -0,0 +1,12 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x372
+ RenderBlock {HTML} at (0,0) size 800x372
+ RenderBody {BODY} at (8,16) size 784x348
+ RenderBlock {P} at (0,0) size 784x18
+ RenderText {#text} at (0,0) size 378x18
+ text run at (0,0) width 378: "This test passes if <mspace> does not create child renderers."
+ RenderBlock (anonymous) at (0,34) size 784x314
+ RenderMathMLMath {math} at (0,14) size 102x300 [padding: 0 1 0 1]
+ RenderMathMLSpace {mspace} at (1,0) size 100x300
+ RenderText {#text} at (0,0) size 0x0
Modified: trunk/Source/WebCore/ChangeLog (163625 => 163626)
--- trunk/Source/WebCore/ChangeLog 2014-02-07 17:45:49 UTC (rev 163625)
+++ trunk/Source/WebCore/ChangeLog 2014-02-07 18:20:01 UTC (rev 163626)
@@ -1,3 +1,18 @@
+2014-02-07 Frédéric Wang <[email protected]>
+
+ childShouldCreateRenderer should return false for the mspace element
+ https://bugs.webkit.org/show_bug.cgi?id=128325
+
+ Reviewed by Chris Fleizach.
+
+ The mspace element can not have children so this makes its
+ childShouldCreateRenderer always return false.
+
+ Test: mathml/presentation/mspace-children.html
+
+ * mathml/MathMLTextElement.cpp:
+ (WebCore::MathMLTextElement::childShouldCreateRenderer):
+
2014-02-07 Javier Fernandez <[email protected]>
[CSS Grid Layout] Rename grid-definition-{columns|rows} to match the new syntax
Modified: trunk/Source/WebCore/mathml/MathMLTextElement.cpp (163625 => 163626)
--- trunk/Source/WebCore/mathml/MathMLTextElement.cpp 2014-02-07 17:45:49 UTC (rev 163625)
+++ trunk/Source/WebCore/mathml/MathMLTextElement.cpp 2014-02-07 18:20:01 UTC (rev 163626)
@@ -86,7 +86,7 @@
bool MathMLTextElement::childShouldCreateRenderer(const Node& child) const
{
- return child.isTextNode();
+ return !hasLocalName(mspaceTag) && child.isTextNode();
}
}