Closed Bug 227819 Opened 21 years ago Closed 21 years ago

[FIXr]left and right results in wrong width with box-sizing border-box

Categories

(Core :: Layout: Positioned, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla1.7alpha

People

(Reporter: erik, Assigned: bzbarsky)

Details

(Keywords: testcase)

Attachments

(3 files)

When both left and right are supplied the width of the element stretches. Hover when the box sizing is not set to content-box the width is incorrect. This is most likely because the box sizing property is incorrectly ignored in this case.
No red should be seen at any time
Attached patch Fix (diff -u)Splinter Review
Actually, the problem is that the box-sizing property is _applied_ in this case (to widths/heights that already subtract off the paddings/borders in their computation). It should not be.
Attached patch Fix (diff -uw)Splinter Review
Comment on attachment 137067 [details] [diff] [review] Fix (diff -uw) David, would you review? The CSSParser changes were prompted by some of the (unjustified, without those changes, hence commented out) layout assertions... and happen to fix a CSS-compliance bug as far as I can tell.
Attachment #137067 - Flags: superreview?(dbaron)
Attachment #137067 - Flags: review?(dbaron)
Taking.
Assignee: position → bz-vacation
OS: Windows XP → All
Priority: -- → P2
Hardware: PC → All
Summary: left and right results in wrong width with box-sizing border-box → [FIX]left and right results in wrong width with box-sizing border-box
Target Milestone: --- → mozilla1.7alpha
Attachment #137066 - Attachment description: Fix → Fix (diff -u)
Attachment #137067 - Attachment description: Same as diff -w → Fix (diff -uw)
Attachment #137067 - Flags: superreview?(dbaron)
Attachment #137067 - Flags: superreview+
Attachment #137067 - Flags: review?(dbaron)
Attachment #137067 - Flags: review+
Summary: [FIX]left and right results in wrong width with box-sizing border-box → [FIXr]left and right results in wrong width with box-sizing border-box
Checked in for 1.7a.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Since this checkin, I am getting the following assertion several hundred times when running the editor: ###!!! 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
Philip, would you mind filing a separate bug on me on that assert? I'll have to debug to see what's up....
Filed Bug 230249 for the assertion.
Fix causes a new bug 232754.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: