Closed Bug 451518 Opened 17 years ago Closed 17 years ago

in an assertion ComputedWidth() checked twice for being >= 0

Categories

(Core :: Layout, defect)

defect
Not set
minor

Tracking

()

RESOLVED FIXED

People

(Reporter: andrzej.p, Assigned: philor)

References

()

Details

Attachments

(1 file, 1 obsolete file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1 Build Identifier: in layout/xul/base/src/nsBoxFrame.cpp in the beginning of nsBoxFrame::Reflow there is a NS_ASSERTION, which asserts aReflowState.ComputedWidth() >=0 && aReflowState.ComputedWidth() >= 0 (the same thing twice). It seems a bug. Reproducible: Always Steps to Reproduce: Review layout/xul/base/src/nsBoxFrame.cpp. Actual Results: Found the suspicious line of code where the same thing is checked twice. Expected Results: Probably should be aReflowState.ComputedWidth() >=0 && aReflowState.ComputedHeight() >= 0.
Blocks: 367442
Status: UNCONFIRMED → NEW
Component: General → Layout: Misc Code
Ever confirmed: true
Product: Firefox → Core
QA Contact: general → layout.misc-code
Version: unspecified → Trunk
Attached patch Fix v.1 (obsolete) — Splinter Review
I'm untroubled by any actual understanding of the code, but I'm betting this is what you meant to do in bug 367442, since it's what you did in the copy of the same code in nsLeafBoxFrame.cpp.
Assignee: nobody → philringnalda
Status: NEW → ASSIGNED
Attachment #335010 - Flags: superreview?(bzbarsky)
Attachment #335010 - Flags: review?(bzbarsky)
Comment on attachment 335010 [details] [diff] [review] Fix v.1 You want ComputedHeight(), not mComputedHeight(). This patch wouldn't compile as written... Good catch, though! and r+sr with the 'm' removed.
Attachment #335010 - Flags: superreview?(bzbarsky)
Attachment #335010 - Flags: superreview-
Attachment #335010 - Flags: review?(bzbarsky)
Attachment #335010 - Flags: review-
Attached patch for checkinSplinter Review
Well, the good news is that now my script to build debug actually does, instead of building opt in my opt objdir and then changing to the debug objdir, apparently hoping (and apparently with good reason) that I wouldn't notice what it had done.
Attachment #335010 - Attachment is obsolete: true
Pushed changeset 7615810bd835
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Product: Core → Core Graveyard
Component: Layout: Misc Code → Layout
Product: Core Graveyard → Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: