Bug 179739

Summary: Consistent handling of out-of-flow children in MathML layout functions
Product: WebKit Reporter: Frédéric Wang (:fredw) <fred.wang>
Component: MathMLAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: rego, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=123348
Bug Depends on: 178865, 276026    
Bug Blocks: 195797    

Frédéric Wang (:fredw)
Reported 2017-11-15 11:16:55 PST
Extracted from bug 178865. Almost all layout functions in MathML ignore out-of-flow children, except RenderMathMLRow. Consider for example <math> <mtext style="position: absolute; left: 100px; top: 100px;">A</mtext> <mfrac> <mtext style="position: absolute; left: 100px; top: 100px;">B</mtext> <mtext></mtext> </mfrac> </math> where A is absolutely positioned but the numerator B is not. It's not clear whether it's really an important use cases. Maybe we should add special insertPositionedObject calls in all MathML layout functions to be compatible with the CSS behavior. Or maybe we should remove the special handling in RenderMathMLRow to reduce code complexity.
Attachments
Frédéric Wang (:fredw)
Comment 1 2024-07-04 03:59:15 PDT
MathML Core should now clearly defines how to handle out-of-flow children, so we should follow that: https://w3c.github.io/mathml-core/ Related to that is bug 123348. MathML 3 defines elements with unexpected number of children as "invalid" (e.g. a fraction with three children). MathML Core essentially says that the child count is based on *in-flow* children and that "invalid" markup should be laid out as an mrow.
Harry Chen
Comment 2 2024-08-02 17:23:26 PDT
EWS
Comment 3 2024-09-25 09:48:48 PDT
Committed 284225@main (7c0a9d18a4e0): <https://commits.webkit.org/284225@main> Reviewed commits have been landed. Closing PR #31676 and removing active labels.
Radar WebKit Bug Importer
Comment 4 2024-09-25 09:49:15 PDT
Note You need to log in before you can comment on or make changes to this bug.