Summary: | [MathML] Layout invalid markup as an <mrow> | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Brent Fulgham <bfulgham> | ||||
Component: | MathML | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | NEW --- | ||||||
Severity: | Normal | CC: | ahmad.saleem792, alex, fred.wang, mrobinson, webkit-bug-importer | ||||
Priority: | P2 | Keywords: | InRadar, WPTImpact | ||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=254093 | ||||||
Bug Depends on: | 153991 | ||||||
Bug Blocks: | 195797 | ||||||
Attachments: |
|
Description
Brent Fulgham
2013-10-25 11:04:59 PDT
I looked at the torture tests in WebKitGTK+ and they seem fine. See also http://www.whatwg.org/specs/web-apps/current-work/multipage/the-map-element.html#mathml: "User agents must act as if any MathML element whose contents does not match the element's content model was replaced, for the purposes of MathML layout and rendering, by an merror element in the MathML namespace containing some appropriate error message." Created attachment 215269 [details]
testcase
(In reply to comment #1) > I looked at the torture tests in WebKitGTK+ and they seem fine. I think this comment was intended for Bug 121728. :-) At the moment, the choice in the in-progress MathML refactoring is just to not display anything for invalid markup. However, we may do something as in Gecko and the refactoring will make that much easier. So I'm making this depends on bug 153991. (That said, I suspect we want to spend more time on supporting valid markup than on deciding a fallback rendering for invalid markup...) Renaming the bug. MathML Core says to render invalid markup as an mrow, for example: "If the <mfrac> element has less or more than two in-flow children, its layout algorithm is the same as the <mrow> element. Otherwise, the first in-flow child is called numerator, the second in-flow child is called denominator and the layout algorithm is explained below." Chromium does that, and there is a plan for Firefox to align with that behavior. Firefox 106 and Chrome 109 implements the "mrow fallback" behavior described in the MathML Core specification and there is a WPT test for that: https://wpt.fyi/results/mathml/presentation-markup/mrow/mrow-fallback.html |