Closed Bug 430356 Opened 17 years ago Closed 17 years ago

[FIX]"ASSERTION: width less than zero: 'result >= 0'" with tabpanels, visibility:collapse, width:-moz-max-content

Categories

(Core :: Layout, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.1a2

People

(Reporter: jruderman, Assigned: bzbarsky)

References

Details

(Keywords: assertion, testcase)

Attachments

(2 files)

Attached file testcase
###!!! ASSERTION: width less than zero: 'result >= 0', file /Users/jruderman/trunk/mozilla/layout/base/nsLayoutUtils.cpp, line 1872
Looks to me like a bug in nsBoxFrame::GetPrefWidth. I thought we had something on file about this already.... In this case, GetPrefSize() returns a width of 0 (because of the collapsing), but GetBorderAndPadding() returns something with a LeftRight() of 1080. So nsBoxFrame::GetPrefWidth returns a negative number. This asserts in nsLayoutUtils::ComputeWidthValue (which is the assert in comment 0) and then clamps the value to 0.
Whiteboard: DUPEME?
Attached patch FixSplinter Review
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Attachment #331359 - Flags: superreview?(dbaron)
Attachment #331359 - Flags: review?(dbaron)
Summary: "ASSERTION: width less than zero: 'result >= 0'" with tabpanels, visibility:collapse, width:-moz-max-content → [FIX]"ASSERTION: width less than zero: 'result >= 0'" with tabpanels, visibility:collapse, width:-moz-max-content
Whiteboard: DUPEME?
Comment on attachment 331359 [details] [diff] [review] Fix r+sr=dbaron Although I wonder whether GetBorderAndPadding should be checking the collapsed state...
Attachment #331359 - Flags: superreview?(dbaron)
Attachment #331359 - Flags: superreview+
Attachment #331359 - Flags: review?(dbaron)
Attachment #331359 - Flags: review+
Checked in, with crashtest.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.1a2
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: