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

RESOLVED FIXED in mozilla1.7alpha

Status

()

Core
Layout: R & A Pos
P2
normal
RESOLVED FIXED
14 years ago
14 years ago

People

(Reporter: Erik Arvidsson, Assigned: bz)

Tracking

({testcase})

Trunk
mozilla1.7alpha
testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments)

(Reporter)

Description

14 years ago
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.
(Reporter)

Comment 1

14 years ago
Created attachment 137044 [details]
A div with both left and right inside another div

No red should be seen at any time
Created attachment 137066 [details] [diff] [review]
Fix (diff -u)

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.
Created attachment 137067 [details] [diff] [review]
Fix (diff -uw)
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+
(Assignee)

Updated

14 years ago
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
Last Resolved: 14 years ago
Resolution: --- → FIXED

Comment 7

14 years ago
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....

Comment 9

14 years ago
Filed Bug 230249 for the assertion.

Comment 10

14 years ago
Fix causes a new bug 232754.
You need to log in before you can comment on or make changes to this bug.