Bug 180346
Summary: | Improve downcast of MathML element classes | ||
---|---|---|---|
Product: | WebKit | Reporter: | Frédéric Wang (:fredw) <fred.wang> |
Component: | MathML | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW | ||
Severity: | Normal | CC: | darin, lambda |
Priority: | P2 | ||
Version: | WebKit Nightly Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Bug Depends on: | 161300 | ||
Bug Blocks: |
Frédéric Wang (:fredw)
See bug 161300 comment 3.
Currently we only have a SPECIALIZE_TYPE_TRAITS macro for the base MathMLElement class and we use static_cast in renderer classes:
fred@igalia-fwang:~/src-obj/webkit/WebKit$ grep MathML Source/WebCore/rendering/mathml/* | grep 'nodeForNonAnonymous'
Source/WebCore/rendering/mathml/RenderMathMLFraction.h: MathMLFractionElement& element() const { return static_cast<MathMLFractionElement&>(nodeForNonAnonymous()); }
Source/WebCore/rendering/mathml/RenderMathMLOperator.cpp: return static_cast<MathMLOperatorElement&>(nodeForNonAnonymous());
Source/WebCore/rendering/mathml/RenderMathMLPadded.h: MathMLPaddedElement& element() const { return static_cast<MathMLPaddedElement&>(nodeForNonAnonymous()); }
Source/WebCore/rendering/mathml/RenderMathMLRoot.cpp: return static_cast<MathMLRootElement&>(nodeForNonAnonymous());
Source/WebCore/rendering/mathml/RenderMathMLRow.cpp: return static_cast<MathMLRowElement&>(nodeForNonAnonymous());
Source/WebCore/rendering/mathml/RenderMathMLScripts.cpp: return static_cast<MathMLScriptsElement&>(nodeForNonAnonymous());
Source/WebCore/rendering/mathml/RenderMathMLSpace.h: MathMLSpaceElement& element() const { return static_cast<MathMLSpaceElement&>(nodeForNonAnonymous()); }
Source/WebCore/rendering/mathml/RenderMathMLToken.cpp: return static_cast<MathMLTokenElement&>(nodeForNonAnonymous());
Source/WebCore/rendering/mathml/RenderMathMLUnderOver.cpp: return static_cast<MathMLUnderOverElement&>(nodeForNonAnonymous());
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |