Closed Bug 403579 Opened 17 years ago Closed 17 years ago

"ASSERTION: Attempted to subtract [n - nscoord_MAX]" with percentage margin in table cell

Categories

(Core :: Layout: Tables, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jruderman, Assigned: dholbert)

References

Details

(Keywords: assertion, testcase)

Attachments

(2 files)

Attached file testcase
Loading the testcase triggers four assertions:

###!!! ASSERTION: Doing nscoord addition with values > nscoord_MAX: 'a < nscoord_MAX && b < nscoord_MAX', file ../../dist/include/gfx/nsCoord.h, line 151

###!!! ASSERTION: nscoord addition will reach or pass nscoord_MAX: '(PRInt64)a + (PRInt64)b < (PRInt64)nscoord_MAX', file ../../dist/include/gfx/nsCoord.h, line 153

###!!! ASSERTION: Doing nscoord subtraction with values > nscoord_MAX: 'a < nscoord_MAX && b < nscoord_MAX', file ../../dist/include/gfx/nsCoord.h, line 208

###!!! ASSERTION: Attempted to subtract [n - nscoord_MAX]: 'Not Reached', file ../../dist/include/gfx/nsCoord.h, line 194
Attached patch fixSplinter Review
Assignee: nobody → dholbert
OS: Mac OS X → All
Status: NEW → ASSIGNED
Comment on attachment 288556 [details] [diff] [review]
fix

First chunk is similar to patch for bug 402893, but for the collective nonpct columns.

Second chunk is necessary because guess_pref can be nscoord_MAX if we hit this line (at the end of the context region) in an earlier iteration of the loop:

>             guess_pref = NSCoordSaturatingAdd(guess_pref, pref_width);
Attachment #288556 - Flags: review?(roc)
Attachment #288556 - Flags: approval1.9?
Comment on attachment 288556 [details] [diff] [review]
fix

dholbert out of p1-2 bugs? :-)
Attachment #288556 - Flags: approval1.9? → approval1.9+
(In reply to comment #3)
> dholbert out of p1-2 bugs? :-)

Was just fixing these as a mental break, 'cause they're pretty quick fixes and are in code I'm very familiar with. :)

Patch checked in:
BasicTableLayoutStrategy.cpp
new revision: 3.263; previous revision: 3.262
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Crashtest checked in.
Flags: in-testsuite+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: