Last Comment Bug 227819 - [FIXr]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
: testcase
Product: Core
Classification: Components
Component: Layout: R & A Pos (show other bugs)
: Trunk
: All All
: P2 normal (vote)
: mozilla1.7alpha
Assigned To: Boris Zbarsky [:bz] (TPAC)
: Hixie (not reading bugmail)
Depends on:
  Show dependency treegraph
Reported: 2003-12-08 07:28 PST by Erik Arvidsson
Modified: 2004-01-31 19:54 PST (History)
2 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

A div with both left and right inside another div (1.18 KB, text/html)
2003-12-08 07:33 PST, Erik Arvidsson
no flags Details
Fix (diff -u) (17.55 KB, patch)
2003-12-08 14:00 PST, Boris Zbarsky [:bz] (TPAC)
no flags Details | Diff | Splinter Review
Fix (diff -uw) (15.80 KB, patch)
2003-12-08 14:03 PST, Boris Zbarsky [:bz] (TPAC)
dbaron: review+
dbaron: superreview+
Details | Diff | Splinter Review

Description Erik Arvidsson 2003-12-08 07:28:29 PST
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.
Comment 1 Erik Arvidsson 2003-12-08 07:33:14 PST
Created attachment 137044 [details]
A div with both left and right inside another div

No red should be seen at any time
Comment 2 Boris Zbarsky [:bz] (TPAC) 2003-12-08 14:00:03 PST
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.
Comment 3 Boris Zbarsky [:bz] (TPAC) 2003-12-08 14:03:43 PST
Created attachment 137067 [details] [diff] [review]
Fix (diff -uw)
Comment 4 Boris Zbarsky [:bz] (TPAC) 2003-12-08 14:04:56 PST
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.
Comment 5 Boris Zbarsky [:bz] (TPAC) 2003-12-08 14:08:00 PST
Comment 6 Boris Zbarsky [:bz] (TPAC) 2004-01-05 17:41:00 PST
Checked in for 1.7a.
Comment 7 Philip K. Warren 2004-01-06 14:32:46 PST
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
line 2532
Break: at file
line 2532
Comment 8 Boris Zbarsky [:bz] (TPAC) 2004-01-06 14:46:39 PST
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 Philip K. Warren 2004-01-06 15:01:50 PST
Filed Bug 230249 for the assertion.
Comment 10 Brian Earley 2004-01-31 19:54:20 PST
Fix causes a new bug 232754.

Note You need to log in before you can comment on or make changes to this bug.