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: | MathML | Assignee: | 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)
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 | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Frédéric Wang (:fredw)
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
Pull request: https://github.com/WebKit/WebKit/pull/31676
EWS
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
<rdar://problem/136683070>