Closed Bug 1790303 Opened 2 years ago Closed 2 years ago

Make XUL have min-width/height: 0 by default.

Categories

(Core :: XUL, task)

task

Tracking

()

RESOLVED WONTFIX

People

(Reporter: emilio, Assigned: emilio)

References

Details

Attachments

(1 obsolete file)

So that the minimum sizing that flexbox / grid has doesn't apply when emulating it.

UL boxes allow their children to shrink, so using min-sizes of zero
allow us to preserve that behavior when emulating -moz-box with flexbox.

This fixes some tests with emulated flexbox enabled
(tests that expect a <browser> to shrink under 150px for example).

To do this we need to revert an accidental change from bug 1527410.
Don't treat a min-height/width: 0 as "set" for XUL purposes. See the !=
0 here which is before that change:

https://searchfox.org/mozilla-central/rev/51aa53dc4e3194aa4cb105fdfd599bbec552c4f8/layout/xul/nsBox.cpp#509

This makes min-height discontinuous on XUL layout, but I think that's
fine, since XUL's behavior here is quite a mess already, and is the
pre-existing behavior anyways. Keep 0% for when you want "really zero"
behavior. Our front-end already had a few cases of that.

Attachment #9294168 - Attachment is obsolete: true

XUL min-size is fairly different than flex min-size, but I think we can work with what we have here in practice.

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: