XUL boxes do not adhere to box-sizing rules

NEW
Unassigned

Status

()

Core
XUL
17 years ago
8 years ago

People

(Reporter: David Hyatt, Unassigned)

Tracking

Trunk
mozilla1.1alpha
x86
Windows 2000
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

17 years ago
This is a showstopper for Mozilla 1.0.  When objects inside a box specify 
widths and heights, the box *includes* borders and padding in this 
computation.  Therefore the object ends up with a width/height equal to the 
specified size + margins, when it should end up with a width/height equal to 
the specified size + border + padding + margins.

The fix is to change the default computation for boxes to augment preferred, 
min, and max sizes with borders/padding, and to make it obey the box-sizing 
property so that people can still get the old behavior if they want it.

This could have a subtle and far-reaching impact on our skins and our UI, but 
it is a given that as boxes become standardized by the CSS WG that the 
width/height computation will be done this way.  If we don't change it now, 
we'll end up in backwards-compatibility hell post-1.0.
(Reporter)

Updated

17 years ago
Blocks: 70753
Status: NEW → ASSIGNED
Whiteboard: [XUL1.0]
Target Milestone: --- → mozilla0.9.1
(Reporter)

Comment 1

17 years ago
Here's another fun one for ya, arik.
Assignee: hyatt → arik
Status: ASSIGNED → NEW
We should be able to ease the transition by judicious use of -moz-box-sizing
in the xul.css file.
Keywords: mozilla0.9

Comment 3

17 years ago
pushing off
Status: NEW → ASSIGNED
Target Milestone: mozilla0.9.1 → mozilla0.9.2

Comment 4

17 years ago
Created attachment 37009 [details]
non-working test case to show the problem

Comment 5

17 years ago
so i've added a test case that doesn't work, and i'm not sure why, if someone
with more xul expertise wants to help out that would be great ;-)

Comment 6

17 years ago
->moz 1.0
Target Milestone: mozilla0.9.2 → mozilla1.0
(Reporter)

Updated

17 years ago
Whiteboard: [XUL1.0] → [xul1.0-layout-box]
(Reporter)

Comment 7

17 years ago
mine.
Assignee: arik → hyatt
Status: ASSIGNED → NEW
(Reporter)

Comment 8

17 years ago
This can always be fudged away later as a skin-defined policy.  Not going to 
worry about this for XUL1.0.
No longer blocks: 70753
Status: NEW → ASSIGNED
Whiteboard: [xul1.0-layout-box]
Target Milestone: mozilla1.0 → mozilla1.1

Updated

10 years ago
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: jrgmorrison → xptoolkit.widgets

Updated

8 years ago
Assignee: hyatt → nobody

Updated

8 years ago
Status: ASSIGNED → NEW
You need to log in before you can comment on or make changes to this bug.