Closed Bug 1822131 Opened 2 years ago Closed 2 years ago

Allow XUL to shrink by default

Categories

(Core :: XUL, task)

task

Tracking

()

RESOLVED FIXED
113 Branch
Tracking Status
firefox113 --- fixed

People

(Reporter: emilio, Assigned: emilio)

References

(Regressed 2 open bugs)

Details

Attachments

(2 files)

Bug 1821920 and bug 1821871 are instances of an interesting behavior change from bug 1820534.

The default flex-basis of old XUL was auto instead of max-content, so stuff that used to wrap now no longer does in an horizontal flex container:

This code prevents items from shrinking.

Per the comment, a few tests relied on this, but I believe it should generally be safe to shrink the items. This only causes to shrink if they have an explicit width but no explicit min-width.

Some tests like test_mousescroll.xhtml hit this, because they have explicit sizes but min-width: auto ends up being 0 effectively, but I believe we should tweak those tests instead.

Component: Settings UI → XUL
Product: Firefox → Core
Attachment #9322795 - Attachment mime type: text/plain → text/html

Bug 1821920 and bug 1821871 are instances of an interesting behavior change
from bug 1820534.

The default flex-basis of old XUL was auto instead of max-content, because of this code:

https://searchfox.org/mozilla-central/rev/af78418c4b5f2c8721d1a06486cf4cf0b33e1e8d/layout/generic/nsFlexContainerFrame.cpp#1327

So stuff that used to wrap now no longer does, in an horizontal flex container,
since xul.css prevents XUL elements from shrinking.

Per the comment, a few tests relied on this, but I believe it should generally
be safe to shrink the items. This only causes to shrink if they have an
explicit width but no min-width (including min-width: auto).

Some tests like test_mousescroll.xhtml hit this, because they have explicit
sizes but min-width: auto ends up being 0 effectively, but I believe we should
tweak those tests instead.

Attachment #9322806 - Attachment description: Bug 1822131 - Allow XUL to shrink. r=dholbert,Gijs,dao → Bug 1822131 - Allow XUL elements to shrink-by-default. r=dholbert,Gijs,dao
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e3fb28ffc489 Allow XUL elements to shrink-by-default. r=dholbert

Backed out for causing reftest failures on 540247-1.xhtml

Backout link

Push with failures

Failure log

There are also these TVs if you could take a look.

Flags: needinfo?(emilio)
Flags: needinfo?(emilio)
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/aa9a63adab87 Allow XUL elements to shrink-by-default. r=dholbert
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 113 Branch
Regressions: 1822576
Regressions: 1822578
Regressions: 1822591
Regressions: 1822217
Regressions: 1822759
Regressions: 1822771
Regressions: 1822819
Regressions: 1822829
Regressions: 1823171
Regressions: 1823520
Regressions: 1823515
Regressions: 1823764

If the browser is small in width, the Findbar buttons and result description will wrap.
See screencast: https://youtu.be/qjR3ViLsU3w .

Not that there is anything wrong with it, is this intentional change?

Flags: needinfo?(emilio)

It's not intentional as "I was looking at the findbar when making this change", but it's not surprising and since it's a progression (before they overflowed) seems ok.

Flags: needinfo?(emilio)
Regressions: 1827049
Regressions: 1873074
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: