User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:126.96.36.199) Gecko/20070309 Firefox/188.8.131.52
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:184.108.40.206) Gecko/20070309 Firefox/220.127.116.11
The two most frustating bugs I have find in MathML rendering are :
1) bad rendering of line breaks (<mspace linebreak="newline" />), see W3C sample.
2) bad rendering of square root extension (may be font related).
Steps to Reproduce:
1.any use of <mspace linebreak="newline" /> in any expression is ignored.
no line break, no usable workaround found.
display linebreak in math expression.
This prevents the use of any long math expression, hand cutting the expression is not ran option, specially in tables.
Created attachment 398141 [details] [diff] [review]
Parsing of linebreak attribute
I think we can first work on the linebreak="newline" since it is likely to be the most useful / simplest to implement. Any idea about how to force a newline in a MathML formula?
Finally I have been able to force a new line using NS_INLINE_LINE_BREAK_AFTER.
NS_FRAME_SET_TRUNCATION(aStatus, aReflowState, aDesiredSize);
+ if (mLineBreak == LINEBREAK_NEWLINE)
+ aStatus = NS_INLINE_LINE_BREAK_AFTER(aStatus);
I don't think a support for other values than "newline" is really necessary since it is said in MathML3 WD that controlling linebreaking on <mo/> is preferred. Maybe I should modify my patch not to parse these extra values.
(In reply to comment #2)
> Finally I have been able to force a new line using NS_INLINE_LINE_BREAK_AFTER.
Actually it seems a bit more complicated... Currently Mozilla can not linebreak within <mrow>:
http://www.mozilla.org/projects/mathml/update.html (see the section about mrow)
Created attachment 424866 [details] [diff] [review]
Created attachment 424867 [details]
The patch here does not appear to fix the issue from the original test from the URL in the patch:
(In reply to comment #6)
> The patch here does not appear to fix the issue from the original test from the
> URL in the patch:
linebreaking is currently only possible at the level of the math element. Although the patch allows to force linebreaking, it is still impossible to break deeper (in the MathML testsuite, we are inside a mrow). Fixing the bug will be more complicated that I initially thought. I don't plan to work on it for the moment.
The MathML 3 says
"Linebreaking was originally specified on mspace in MathML2, but controlling linebreaking on mo is to be preferred starting with MathML 3."
I don't know if it's really worth implementing linebreaking on mspace, given that this is probably going to become obsolete.
So I think we should either resolve this bug as WONTFIX or as a DUPLICATE of bug 534962.
*** This bug has been marked as a duplicate of bug 534962 ***