Skip to content
Permalink
Browse files
childShouldCreateRenderer should return false for the mspace element
https://bugs.webkit.org/show_bug.cgi?id=128325

Patch by Frédéric Wang <fred.wang@free.fr> on 2014-02-07
Reviewed by Chris Fleizach.

Source/WebCore:

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):

LayoutTests:

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.

Canonical link: https://commits.webkit.org/146398@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@163626 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
fred-wang authored and webkit-commit-queue committed Feb 7, 2014
1 parent dd6bbe9 commit ddad858c7d9924c47d6ba0e97a29a669ebafb23d
Showing 7 changed files with 69 additions and 1 deletion.
@@ -1,3 +1,18 @@
2014-02-07 Frédéric Wang <fred.wang@free.fr>

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 <jfernandez@igalia.com>

[CSS Grid Layout] Rename grid-definition-{columns|rows} to match the new syntax
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -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
@@ -0,0 +1,14 @@
<!doctype html>
<html>
<head>
<title>mspace children</title>
<meta charset="utf-8"/>
</head>
<body>

<p>This test passes if &lt;mspace&gt; does not create child renderers.</p>

<math><mspace width="100px" height="200" depth="300px">Text Node <mtext>x</mtext></mspace></math>

</body>
</html>
@@ -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
@@ -1,3 +1,18 @@
2014-02-07 Frédéric Wang <fred.wang@free.fr>

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 <jfernandez@igalia.com>

[CSS Grid Layout] Rename grid-definition-{columns|rows} to match the new syntax
@@ -86,7 +86,7 @@ RenderPtr<RenderElement> MathMLTextElement::createElementRenderer(PassRef<Render

bool MathMLTextElement::childShouldCreateRenderer(const Node& child) const
{
return child.isTextNode();
return !hasLocalName(mspaceTag) && child.isTextNode();
}

}

0 comments on commit ddad858

Please sign in to comment.