Closed
Bug 230249
Opened 21 years ago
Closed 21 years ago
[FIX]Assertion: Negative Width Input - very bad: 'mComputedWidth >= 0'
Categories
(Core :: Layout, defect, P1)
Core
Layout
Tracking
()
VERIFIED
FIXED
mozilla1.7alpha
People
(Reporter: pkwarren, Assigned: bzbarsky)
Details
Attachments
(1 file)
1.30 KB,
patch
|
dbaron
:
review+
dbaron
:
superreview+
|
Details | Diff | Splinter Review |
In a debug build from today, I am getting the following assertion several
hundred times while running the editor. It seems to be triggered just from
moving the mouse around the user interface - i.e. move the mouse from the text
input area over all of the buttons on the toolbar and all of the menus.
###!!! ASSERTION: Negative Width Input - very bad: 'mComputedWidth >= 0', file
/home/pkw/sb/mozilla/trunk/mozilla/layout/html/base/src/nsHTMLReflowState.cpp,
line 2532
Break: at file
/home/pkw/sb/mozilla/trunk/mozilla/layout/html/base/src/nsHTMLReflowState.cpp,
line 2532
I have only tested this on AIX (GTK2 build) for now so I'm not sure if this
affects all platforms or not.
The assertion (not necessarily the code which triggers the assertion) is a
result of the checkin for Bug 227819.
Reporter | ||
Comment 1•21 years ago
|
||
This assertion is not limited to the Editor - I am also getting it in the Browser.
Assignee | ||
Comment 2•21 years ago
|
||
What are the steps to reproduce for browser?
Reporter | ||
Comment 3•21 years ago
|
||
Same as for the Editor - it is triggered just by moving the mouse around the
interface (not clicking anything).
Assignee | ||
Comment 4•21 years ago
|
||
The problem here is that
athttp://lxr.mozilla.org/seamonkey/source/layout/xul/base/src/nsBoxToBlockAdaptor.cpp#802
on the first layout of the adaptor size.width is 0, so availableWidth for the
reflow state is 0. But the style for the area frame involved has nonzero
margins, so when nsHTMLReflowState::ComputeBlockBoxData does:
mComputedWidth = availableWidth - mComputedMargin.left -
mComputedMargin.right - mComputedBorderPadding.left -
mComputedBorderPadding.right;
we end up with a negative computed width.
I would think that we should use a PR_MAX with 0 here...
Assignee | ||
Comment 5•21 years ago
|
||
Assignee | ||
Updated•21 years ago
|
OS: AIX → All
Priority: -- → P1
Hardware: Other → All
Summary: Assertion: Negative Width Input - very bad: 'mComputedWidth >= 0' → [FIX]Assertion: Negative Width Input - very bad: 'mComputedWidth >= 0'
Target Milestone: --- → mozilla1.7alpha
Assignee | ||
Comment 6•21 years ago
|
||
Comment on attachment 138536 [details] [diff] [review]
Patch
David, would you review?
Attachment #138536 -
Flags: superreview?(dbaron)
Attachment #138536 -
Flags: review?(dbaron)
Attachment #138536 -
Flags: superreview?(dbaron)
Attachment #138536 -
Flags: superreview+
Attachment #138536 -
Flags: review?(dbaron)
Attachment #138536 -
Flags: review+
Assignee | ||
Comment 7•21 years ago
|
||
Checked in.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 8•21 years ago
|
||
I am no longer seeing this warning in today's build.
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•