Handle positioned elements in MathML
Categories
(Core :: MathML, defect)
Tracking
()
People
(Reporter: fwang, Unassigned)
References
(Blocks 1 open bug)
Details
I can't find any existing bug so I'm opening one. Here is a basic testcase
<math>
<mfrac>
<mn style="position: absolute; left: 100px; top: 100px;">1</mn>
<mn>2</mn>
</mfrac>
<mfrac>
<mn style="position: absolute; left: 200px; top: 100px;">3</mn>
<mn>4</mn>
<mn>5</mn>
</mfrac>
</math>
In the first mfrac, the 1 should be placed at the specified location while the mfrac is rendered as an mrow with a single child (2).
In the second mfrac, 3 should be placed at the specified location while the mfrac is rendered with a numerator 4 and a denominator 5.
This is what WebKit and Chromium. Gecko instead just ignore absoluting positioning, so the first is rendered as 1/2 and the second as an mrow 345.
https://w3c.github.io/mathml-core/#layout-algorithms
The MathML Core spec refers to "in-flow" at several places, including how we determine "invalid markup" (i.e. fallback to 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.
Description
•