Open
Bug 394078
Opened 17 years ago
Updated 2 years ago
Setting width to a percentage value on XUL box children fails
Categories
(Core :: XUL, defect)
Core
XUL
Tracking
()
NEW
People
(Reporter: jwatt, Unassigned)
References
Details
Attachments
(2 files)
Setting the CSS 'width' property to a percentage value on children of XUL boxes fails.
Reporter | ||
Comment 1•17 years ago
|
||
Adding flex="1" to the <div> "fixes" things - unless of course you want to use a percentage other than 100%.
Comment 2•17 years ago
|
||
The problem is that XUL layout asks the box for its pref width (which ends up computing to 0 in this case) and then starts it off with that size as the computed size, more or less.
This is basically a duplicate of one of the existing "XUL does not play nice with the CSS box model" bugs.
Also known as "don't do that". ;)
Reporter | ||
Comment 3•17 years ago
|
||
By "don't do that", do you mean we don't want to/won't fix this?
FWIW here's an SVG example that's similar. For it, the problem is that nsFrame::BoxReflow passes an nsSize with unconstrained size to nsSVGOuterSVGFrame::ComputeSize as aCBSize.
Comment 4•17 years ago
|
||
(In reply to comment #3)
> By "don't do that", do you mean we don't want to/won't fix this?
>
Fixing the XUL box implementation is my plan for the Mozilla 2 timeframe.
Reporter | ||
Comment 5•17 years ago
|
||
Okay, thanks Neil. Feel free to keep this bug open or close it, as you prefer.
Comment 6•17 years ago
|
||
> By "don't do that", do you mean we don't want to/won't fix this?
I mean that to fix it one first has to spec out the interaction between the flexbox and CSS box models, then implement it.
> FWIW here's an SVG example that's similar.
Frankly, if you just want to allow using SVG in XUL effectively, you should just make SVG implement the XUL box layout methods instead of relying on the underspecified, underdesigned, and buggy flexbox-to-css-box shim code.
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: xptoolkit.xul → xptoolkit.widgets
Updated•16 years ago
|
OS: Windows XP → All
Hardware: x86 → All
Comment 8•16 years ago
|
||
#1 jwatt
<svg flex="1" > works fine for me,
now add width and height at 100%, this still displays fine in mozilla, but then if one makes an app in os x this will not display at all.
Does this apply to other OS?
Comment 9•14 years ago
|
||
ref: https://bugzilla.mozilla.org/show_bug.cgi?id=529761 for flexbox bug
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•