Bug 160543

Summary: [meta] Reorganize the MathMLElement hierarchy
Product: WebKit Reporter: Frédéric Wang (:fredw) <fred.wang>
Component: MathMLAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: alex, rego
Priority: P2    
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Bug Depends on: 160540, 160542, 161050, 161053, 161230, 161232, 161297, 161298, 161300, 161377    
Bug Blocks:    

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.