Last Comment Bug 585347 - Direct children of the <math/> element do not stretch
: Direct children of the <math/> element do not stretch
Status: RESOLVED DUPLICATE of bug 236963
:
Product: Core
Classification: Components
Component: MathML (show other bugs)
: Trunk
: All All
: -- normal (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
Mentors:
Depends on:
Blocks: 557086
  Show dependency treegraph
 
Reported: 2010-08-07 11:12 PDT by Frédéric Wang (:fredw)
Modified: 2012-11-30 05:11 PST (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
testcase (794 bytes, application/xhtml+xml)
2010-08-07 11:12 PDT, Frédéric Wang (:fredw)
no flags Details

Description Frédéric Wang (:fredw) 2010-08-07 11:12:05 PDT
The testcase demonstrates the problem.
This bug makes the embStretch1 test fail:
http://www.w3.org/Math/testsuite/build/main/Topics/EmbellishedOp/embStretch1-full.xhtml
Comment 1 Frédéric Wang (:fredw) 2010-08-07 11:12:34 PDT
Created attachment 463820 [details]
testcase
Comment 2 Frédéric Wang (:fredw) 2011-04-16 12:33:37 PDT
First experiments to find where the problem comes from: the Stretch is called on the mo but the size passed seems incorrect.

The size taken for the math element is given by aDesiredSize.mBoundingMetrics here:

http://mxr.mozilla.org/mozilla-central/source/layout/mathml/nsMathMLContainerFrame.cpp#541

I don't know if it is related to bug 219873...
Comment 3 Frédéric Wang (:fredw) 2011-04-16 12:38:56 PDT
BTW, the bug can also be seen on the Webkit MathML Demo page (section Operator Stretching):

http://www.webkit.org/demos/mathml/MathMLDemo.xhtml
Comment 4 Karl Tomlinson (:karlt) 2011-04-17 20:33:10 PDT
Only nsMathMLContainerFrame knows (through GetPrefferedStretchSize) what size to use in stretching its children.

Possible solutions might be:

1) Reimplementing nsMathMLmathBlockFrame using nsMathMLContainerFrame.
   The line-breaking provided by nsBlockFrame would typically not be very
   good anyway.

2) Or insert an nsMathMLmrowFrame under the nsMathMLmathBlockFrame.  Perhaps
   this could be done with an anonymous mrow element, though don't know what
   consequences that might have.
Comment 5 Frédéric Wang (:fredw) 2011-04-17 23:07:26 PDT
I guess your suggestions apply to nsMathMLmathInlineFrame too?
In both cases, it seems that it is going to break the line-breaking support for the direct children of the <math/> element...
Comment 6 Karl Tomlinson (:karlt) 2011-04-17 23:17:18 PDT
Yes, and yes.  Have you noticed line-breaking working effectively, anywhere?
Comment 7 Frédéric Wang (:fredw) 2011-04-18 09:05:08 PDT
(In reply to comment #6)
> Yes, and yes.  Have you noticed line-breaking working effectively, anywhere?

If you mean whether line-breaking is implemented in other UAs, I don't know. However, I think our line-breaking implementation - even limited - is important for many pages that contain several inline formulas inside paragraphs of text. At least, I find line-breaking more important than this bug, which can be worked-around by users with the insertions of <mrow/> in their MathML sources.
Comment 8 Frédéric Wang (:fredw) 2012-11-30 05:11:01 PST

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

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