Closed
Bug 246706
Opened 22 years ago
Closed 22 years ago
inconsistency in dealing with inflexible spacers
Categories
(Core :: XUL, defect)
Core
XUL
Tracking
()
RESOLVED
FIXED
People
(Reporter: bryner, Assigned: bryner)
Details
(Keywords: fixed-aviary1.0, fixed1.7.5)
Attachments
(2 files)
|
384 bytes,
application/vnd.mozilla.xul+xml
|
Details | |
|
618 bytes,
patch
|
dbaron
:
review+
dbaron
:
superreview+
mkaply
:
approval1.7.5+
|
Details | Diff | Splinter Review |
If you have a spacer that has only a min-width specified in CSS, and is not
flexible, then the parent box will miscalculate how much space is needed. This
results in a shortage of space when the parent box lays out its children so that
the last child may not get its min-width even if there is plenty of room.
Here's what causes the problem:
- In nsSprocketLayout::GetMinWidth(), we use the preferred size as the min size
for inflexible children. This is the size used when computing the min-width of
the parent box. Since the preferred width is not specified, it uses 0 as the
min width.
- In nsSprocketLayout::ComputeChildSizes() (used to lay out the children), we do
the same thing, but these sizes have previously been bounds-checked in
PopulateBoxSizes to ensure that min <= pref <= max. So the min-size used here
is the actual min size from CSS. This inconsistency is the source of the problem.
Since most of the box code assumes that min <= pref <= max, I think this should
be the case for nsBox::GetPrefSize() as well. It's already done in
nsContainerBox::GetPrefSize, which is why this bug only affects leaf boxes such
as spacers.
| Assignee | ||
Comment 1•22 years ago
|
||
The label should not wrap. Instead, the parent box should expand to give it
enough space.
| Assignee | ||
Comment 2•22 years ago
|
||
| Assignee | ||
Updated•22 years ago
|
Attachment #150745 -
Flags: superreview?(dbaron)
Attachment #150745 -
Flags: review?(dbaron)
Attachment #150745 -
Flags: superreview?(dbaron)
Attachment #150745 -
Flags: superreview+
Attachment #150745 -
Flags: review?(dbaron)
Attachment #150745 -
Flags: review+
| Assignee | ||
Comment 3•22 years ago
|
||
checked in
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
| Assignee | ||
Updated•22 years ago
|
Keywords: fixed-aviary1.0
Whiteboard: fixed-aviary-1.0
| Assignee | ||
Comment 5•22 years ago
|
||
Comment on attachment 150745 [details] [diff] [review]
patch
We should take this for 1.7 since we're taking the gtk2 native theme changes, I
think this is needed for that to work properly.
Attachment #150745 -
Flags: approval1.7.x?
Comment 6•22 years ago
|
||
Comment on attachment 150745 [details] [diff] [review]
patch
a=mkaply for 1.7 - please mark fixed1.7.x when checked in.
Attachment #150745 -
Flags: approval1.7.x? → approval1.7.x+
| Assignee | ||
Updated•21 years ago
|
Keywords: fixed1.7.x
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: xptoolkit.widgets
You need to log in
before you can comment on or make changes to this bug.
Description
•