Closed
Bug 403559
Opened 17 years ago
Closed 17 years ago
"ASSERTION: something is probably wrong somewhere" with very stretchy <mfenced> parentheses
Categories
(Core :: MathML, defect)
Tracking
()
RESOLVED
FIXED
mozilla1.9beta3
People
(Reporter: jruderman, Assigned: karlt)
References
Details
(Keywords: assertion, testcase)
Attachments
(2 files)
220 bytes,
application/xhtml+xml
|
Details | |
9.78 KB,
patch
|
roc
:
review+
roc
:
superreview+
roc
:
approval1.9+
|
Details | Diff | Splinter Review |
Loading the testcase triggers:
###!!! ASSERTION: something is probably wrong somewhere: '1000 != count', file /Users/jruderman/trunk/mozilla/layout/mathml/base/src/nsMathMLChar.cpp, line 2410
Assignee | ||
Comment 1•17 years ago
|
||
Decide on the maximum number of glue glyphs to draw during measuring and detect zero-sized glue, rather than leaving a big gap when painting.
Comment on attachment 295028 [details] [diff] [review]
calculate maximum height when measuring
+ nscoord sum = 0;
+ if (aGlyphs[first] != aGlyphs[glue]) sum = aSizes[first];
+ if (aGlyphs[middle] != aGlyphs[glue]) sum += aSizes[middle];
+ if (aGlyphs[last] != aGlyphs[glue]) sum += aSizes[last];
Slight simplification: define static SizeOfNonGlueGlyph(aGlyphs, aSizes, index) and set "sum = SizeOfNonGlueGlyph(aGlyphs, aSizes, first) + SizeOfNonGlueGlyph(aGlyphs, aSizes, middle) + SizeOfNonGlueGlyph(aGlyphs, aSizes, last);"
+ else if (bmdata[3].ascent + bmdata[3].descent > 0) {
Can we use a symbolic constant instead of 3? I guess existing code uses '3', so never mind :-(
r+sr with the first comment
Attachment #295028 -
Flags: superreview+
Attachment #295028 -
Flags: review?(roc)
Attachment #295028 -
Flags: review+
Assignee | ||
Updated•17 years ago
|
Attachment #295028 -
Flags: approval1.9?
Attachment #295028 -
Flags: approval1.9? → approval1.9+
Assignee | ||
Comment 3•17 years ago
|
||
(In reply to comment #2)
> (From update of attachment 295028 [details] [diff] [review])
> + nscoord sum = 0;
> + if (aGlyphs[first] != aGlyphs[glue]) sum = aSizes[first];
> + if (aGlyphs[middle] != aGlyphs[glue]) sum += aSizes[middle];
> + if (aGlyphs[last] != aGlyphs[glue]) sum += aSizes[last];
>
> Slight simplification: define static SizeOfNonGlueGlyph(aGlyphs, aSizes,
> index) and set "sum = SizeOfNonGlueGlyph(aGlyphs, aSizes, first) +
> SizeOfNonGlueGlyph(aGlyphs, aSizes, middle) + SizeOfNonGlueGlyph(aGlyphs,
> aSizes, last);"
After discussion with roc, used a while^Wfor loop instead.
Checked in: layout/mathml/base/src/nsMathMLChar.cpp revision 1.137.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9 M11
You need to log in
before you can comment on or make changes to this bug.
Description
•