[Webkit-unassigned] [Bug 180346] New: Improve downcast of MathML element classes

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Dec 4 03:12:58 PST 2017


https://bugs.webkit.org/show_bug.cgi?id=180346

            Bug ID: 180346
           Summary: Improve downcast of MathML element classes
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: MathML
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: fred.wang at free.fr
                CC: darin at apple.com, lambda at liu.ms
        Depends on: 161300

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 at 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());


Referenced Bugs:

https://bugs.webkit.org/show_bug.cgi?id=161300
[Bug 161300] Move RenderMathMLRoot:RootType and RenderMathMLScripts:ScriptsType to element classes
-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20171204/2ef1a161/attachment.html>


More information about the webkit-unassigned mailing list