RESOLVED FIXED 160543
[meta] Reorganize the MathMLElement hierarchy
https://bugs.webkit.org/show_bug.cgi?id=160543
Summary [meta] Reorganize the MathMLElement hierarchy
Frédéric Wang (:fredw)
Reported 2016-08-04 03:50:43 PDT
I've opened bug 160540 and bug 160542 as two simple improvements. MathMLInlineContainerElement also sounds a bad name for something that is now going to produce RenderMathMLBlocks. The update in MathMLInlineContainerElement::childrenChanged is also probably only necessary in mrow-like elements (mrow of element with inferred mrow like msqrt) but MathMLInlineContainerElement is used for other elements like fraction or scripts. At the moment most of the elements are actually MathMLInlineContainerElement and I believe most of the code of MathMLElement could be moved in a derived class. Maybe the following hierarchy will be better: MathMLElement < MathMLPresentationElement MathMLPresentationElement < MathMLAnnotationElement, MathMLFractionElement, MathMLRowElement, MathMLScriptsElement, MathMLSelectElement, MathMLSpaceElement, MathMLTokenElement MathMLRowElement < MathMLMencloseElement, MathMLPaddedElement, MathMLMathElement MathMLScriptsElement < MathMLUnderOverElement MathMLTokenElement < MathMLOperatorElement We do like SVG and add a class MathMLUnknownElement deriving from MathMLElement that return false for rendererIsNeeded and that is used as a fallback class.
Attachments
Frédéric Wang (:fredw)
Comment 1 2016-08-26 02:54:24 PDT
It turns out that MathMLSelectElement must be an mrow since it really behaves as a "selected mrow". Here is the updated proposal: MathMLElement MathMLPresentationElement MathMLAnnotationElement MathMLFractionElement MathMLRowElement MathMLMathElement MathMLMencloseElement MathMLPaddedElement MathMLSelectElement MathMLScriptsElement MathMLUnderOverElement MathMLSpaceElement MathMLTokenElement MathMLOperatorElement MathMLUnknownElement
Frédéric Wang (:fredw)
Comment 2 2017-12-02 01:33:58 PST
A new MathMLRootElement class is introduced in bug 161300 but I believe this bug is now essentially fixed.
Note You need to log in before you can comment on or make changes to this bug.