Setting the CSS 'width' property to a percentage value on children of XUL boxes fails.
Created attachment 278661 [details] testcase (if you see any red the test has failed) Adding flex="1" to the <div> "fixes" things - unless of course you want to use a percentage other than 100%.
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". ;)
Created attachment 278734 [details] SVG testcase 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.
(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.
Okay, thanks Neil. Feel free to keep this bug open or close it, as you prefer.
> 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.
#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?
ref: https://bugzilla.mozilla.org/show_bug.cgi?id=529761 for flexbox bug