Source/WebCore: Invalid cast in WebCore::toRenderMathMLBlock
authorbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 29 Oct 2013 17:40:52 +0000 (17:40 +0000)
committerbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 29 Oct 2013 17:40:52 +0000 (17:40 +0000)
commit09dd06d4bc2dd5434fe380f445a092b0b44d5d77
treee257efea1bc556f26c5fcbc6599afbc0d3222b57
parenta4ef46ed1f65593761aee6e9d67b907ec1fecb18
Source/WebCore: Invalid cast in WebCore::toRenderMathMLBlock
https://bugs.webkit.org/show_bug.cgi?id=121728
rdar://problem/15046151

Reviewed by Dean Jackson.

Tested by: mathml/arbitrary-markup.html

* dom/Element.h: Expose childShouldCreateRenderer for
MathML as well as SVG builds.
* dom/Node.h:
(WebCore::Node::isMathMLElement): Added.
* mathml/MathMLElement.cpp:
(WebCore::MathMLElement::create): Create as MathML Element.
(WebCore::MathMLElement::childShouldCreateRenderer):
Only allow the child to emit a renderer if it is a
MathML element.
* mathml/MathMLElement.h:

LayoutTests: [MathML] invalid cast in WebCore::toRenderMathMLBlock
https://bugs.webkit.org/show_bug.cgi?id=121728

Reviewed by Dean Jackson.

* mathml/arbitrary-markup-expected.txt: Added.
* mathml/arbitrary-markup.html: Added.
* mathml/mfenced-root-layer.html: Modified to avoid invalid
use of arbitrary markup inside mfenced element.
* mathml/mfenced-root-layer-expected.txt: Rebaselined.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158198 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
LayoutTests/ChangeLog
LayoutTests/mathml/arbitrary-markup-expected.txt [new file with mode: 0644]
LayoutTests/mathml/arbitrary-markup.html [new file with mode: 0644]
LayoutTests/mathml/mfenced-root-layer-expected.txt
LayoutTests/mathml/mfenced-root-layer.html
Source/WebCore/ChangeLog
Source/WebCore/dom/Element.h
Source/WebCore/dom/Node.h
Source/WebCore/mathml/MathMLElement.cpp
Source/WebCore/mathml/MathMLElement.h
Source/WebCore/mathml/MathMLTextElement.cpp
Source/WebCore/mathml/MathMLTextElement.h
Source/WebCore/rendering/mathml/RenderMathMLScripts.cpp