Closed
Bug 1190646
Opened 9 years ago
Closed 9 years ago
"ASSERTION: Stretching should be in the vertical direction"
Categories
(Core :: MathML, defect)
Core
MathML
Tracking
()
RESOLVED
FIXED
mozilla43
People
(Reporter: jruderman, Assigned: jkitch)
References
(Blocks 1 open bug)
Details
(Keywords: assertion, testcase)
Attachments
(3 files, 1 obsolete file)
###!!! ASSERTION: Stretching should be in the vertical direction: 'isVertical', file layout/mathml/nsMathMLChar.cpp, line 1131
The assertion is part of code added in https://hg.mozilla.org/mozilla-central/rev/7d09c6ea9ae5 (patch for bug 407059).
Stir DOM found this by modifying https://dxr.mozilla.org/mozilla-central/source/layout/reftests/mathml/stretchy-largeop-1.html (test for bug 1092053).
Reporter | ||
Comment 1•9 years ago
|
||
Assignee | ||
Comment 2•9 years ago
|
||
The code later checks if largeops have reached a sufficient size by checking the vertical direction only
https://hg.mozilla.org/mozilla-central/annotate/2ddec2dedced/layout/mathml/nsMathMLChar.cpp#l1240
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.
Assignee | ||
Comment 3•9 years ago
|
||
Assignee | ||
Comment 4•9 years ago
|
||
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.
Comment 5•9 years ago
|
||
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/mathfont.properties 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
http://hg.mozilla.org/mozilla-central/file/3e51753a099f/layout/mathml/nsMathMLmoFrame.cpp#l455
and reference it in the source code ; with a warning about this stretch direction requirement?
Comment 6•9 years ago
|
||
@Jesse: do you use these tests in your fuzzing tools:
http://hg.mozilla.org/mozilla-central/file/3e51753a099f/layout/mathml/tests/stretchy-and-large-operators.html
https://github.com/fred-wang/MathFonts#testcase
Flags: needinfo?(jruderman)
Reporter | ||
Comment 7•9 years ago
|
||
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)
Updated•9 years ago
|
Attachment #8644933 -
Flags: review?(fred.wang)
Assignee | ||
Comment 8•9 years ago
|
||
Assignee | ||
Comment 9•9 years ago
|
||
Assignee | ||
Comment 10•9 years ago
|
||
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?(fred.wang)
Comment 11•9 years ago
|
||
Comment on attachment 8651766 [details] [diff] [review]
patch
Review of attachment 8651766 [details] [diff] [review]:
-----------------------------------------------------------------
Thanks!
Attachment #8651766 -
Flags: review?(fred.wang) → review+
Assignee | ||
Comment 12•9 years ago
|
||
Assignee | ||
Updated•9 years ago
|
Keywords: checkin-needed
Comment 13•9 years ago
|
||
Keywords: checkin-needed
Comment 14•9 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox43:
--- → fixed
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla43
You need to log in
before you can comment on or make changes to this bug.
Description
•