Closed Bug 1190646 Opened 9 years ago Closed 8 years ago

"ASSERTION: Stretching should be in the vertical direction"


(Core :: MathML, defect)

Not set



Tracking Status
firefox42 --- affected
firefox43 --- fixed


(Reporter: jruderman, Assigned: jkitch)


(Blocks 1 open bug)


(Keywords: assertion, testcase)


(3 files, 1 obsolete file)

Attached file testcase
###!!! ASSERTION: Stretching should be in the vertical direction: 'isVertical', file layout/mathml/nsMathMLChar.cpp, line 1131

The assertion is part of code added in (patch for bug 407059).

Stir DOM found this by modifying (test for bug 1092053).
Attached file stack
The code later checks if largeops have reached a sufficient size by checking the vertical direction only

so at first glance simply forcing isVertical to true for largeops is enough.

I'll have a more detailed look to confirm the correctness of that thought.
Attached patch patch (obsolete) — Splinter Review
The rest of the function defines the minimum size of all largeops as a height (not a problem as horizontally stretching laregops do not exist), so the result of this failed assertion is that largeops are not stretched to the appropriate size.

There are two options.  
1.  Change the callers so largeops are detected and are always passed vertical directions for stretching.
2.  Ignore the direction passed to the function and always treat largeops as vertical.

As there are no horizontally stretching largeops, option 2 seems the simpler choice.  The former is complicated by multiple code paths (with/without inferred mrows) and nesting.
Assignee: nobody → jkitch.bug
Attachment #8644933 - Flags: review?(
I think the point of the assertion is really to verify that largeops are stretched in vertical direction, so it would be better to ensure the stretching is called with the right direction.

So I propose to check that all largeop operators in layout/mathml/ also have direction:vertical. I think it is enough to fix the bug?

Also, can you please open a bug for the XXX comment in

and reference it in the source code ; with a warning about this stretch direction requirement?
No, I only use reftests/crashtests as starting points for DOMFuzz. I suppose I could add other static-ish test suites, or even try my luck with the DOM at the end of each mochitest.
Flags: needinfo?(jruderman)
Attachment #8644933 - Flags: review?(
Blocks: 1197771
Attached patch patchSplinter Review
All largeops are considered vertical in the operator dictionary.

A testcase covering the affected operators has been added to detect the assertion and ensure that it doesn't cause unintended stretching.
Attachment #8644933 - Attachment is obsolete: true
Attachment #8651766 - Flags: review?(
Comment on attachment 8651766 [details] [diff] [review]

Review of attachment 8651766 [details] [diff] [review]:

Attachment #8651766 - Flags: review?( → review+
Keywords: checkin-needed
Closed: 8 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla43
You need to log in before you can comment on or make changes to this bug.