Last Comment Bug 380266 - (mspace-linebreak) MathML rendering errors : mspace linebreak
(mspace-linebreak)
: MathML rendering errors : mspace linebreak
Status: RESOLVED DUPLICATE of bug 534962
[close-me-2012-04-08]
:
Product: Core
Classification: Components
Component: MathML (show other bugs)
: Trunk
: All All
: -- normal with 3 votes (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
Mentors:
http://www.w3.org/Math/testsuite/buil...
Depends on:
Blocks: mathml-2
  Show dependency treegraph
 
Reported: 2007-05-10 03:50 PDT by Michel de Becdelièvre
Modified: 2012-11-11 13:07 PST (History)
7 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Parsing of linebreak attribute (4.58 KB, patch)
2009-09-02 07:53 PDT, Frédéric Wang (:fredw)
no flags Details | Diff | Splinter Review
Patch (2.83 KB, patch)
2010-02-02 14:09 PST, Frédéric Wang (:fredw)
no flags Details | Diff | Splinter Review
Testcase (704 bytes, application/xhtml+xml)
2010-02-02 14:09 PST, Frédéric Wang (:fredw)
no flags Details

Description Michel de Becdelièvre 2007-05-10 03:50:17 PDT
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3

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).

Reproducible: Always

Steps to Reproduce:
1.any use of <mspace linebreak="newline" /> in any expression is ignored.
2.
3.
Actual Results:  
no line break, no usable workaround found.

Expected Results:  
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.
Comment 1 Frédéric Wang (:fredw) 2009-09-02 07:53:08 PDT
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?
Comment 2 Frédéric Wang (:fredw) 2009-09-02 18:01:44 PDT
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);
+
   return NS_OK;

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.

http://www.w3.org/TR/2009/WD-MathML3-20090604/chapter3.html#presm.mspace
Comment 3 Frédéric Wang (:fredw) 2009-09-03 08:56:03 PDT
(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)
Comment 4 Frédéric Wang (:fredw) 2010-02-02 14:09:04 PST
Created attachment 424866 [details] [diff] [review]
Patch
Comment 5 Frédéric Wang (:fredw) 2010-02-02 14:09:59 PST
Created attachment 424867 [details]
Testcase
Comment 6 Bill Gianopoulos [:WG9s] 2010-08-21 10:56:54 PDT
The patch here does not appear to fix the issue from the original test from the URL in the patch:

http://www.w3.org/Math/testsuite/build/main/Presentation/TokenElements/mspace/mspaceAbreak3-full.xhtml
Comment 7 Bill Gianopoulos [:WG9s] 2010-08-21 10:57:56 PDT
(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:
             ^^^^^
             bug
Comment 8 Frédéric Wang (:fredw) 2010-08-22 06:11:53 PDT
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.
Comment 9 Frédéric Wang (:fredw) 2012-03-08 05:57:21 PST
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.
Comment 10 Frédéric Wang (:fredw) 2012-11-11 13:07:20 PST

*** This bug has been marked as a duplicate of bug 534962 ***

Note You need to log in before you can comment on or make changes to this bug.