Bug 160543
Summary: | [meta] Reorganize the MathMLElement hierarchy | ||
---|---|---|---|
Product: | WebKit | Reporter: | Frédéric Wang (:fredw) <fred.wang> |
Component: | MathML | Assignee: | 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)
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 | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Frédéric Wang (:fredw)
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)
A new MathMLRootElement class is introduced in bug 161300 but I believe this bug is now essentially fixed.