NEW 180346
Improve downcast of MathML element classes
https://bugs.webkit.org/show_bug.cgi?id=180346
Summary Improve downcast of MathML element classes
Frédéric Wang (:fredw)
Reported 2017-12-04 03:12:58 PST
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
Note You need to log in before you can comment on or make changes to this bug.