Closed Bug 1794630 Opened 2 years ago Closed 2 years ago

Improve splitters for browser chrome use cases.

Categories

(Firefox :: Theme, task)

task

Tracking

()

RESOLVED FIXED
108 Branch
Tracking Status
firefox107 --- wontfix
firefox108 --- fixed

People

(Reporter: emilio, Assigned: emilio)

References

(Regressed 1 open bug)

Details

Attachments

(5 files)

The browser chrome splitters are really trivial, they mostly just want to resize one of the elements, but splitters right now resize across the whole box container (minus non-flexible items depending on resizebefore/resizeafter).

I think we can simplify various bits quite a lot if we do some tweaks to splitters.

This trivially enhances splitters so that resizing a single element,
which is a common thing to do in our front-end code, is easier.

This is really what we want. Remove the CSS hack so we always flex.

Depends on D159069

This simplifies the widget tracker code to avoid having to remove random
width attributes in all children.

Depends on D159070

This is not easy to test precisely. What the width attribute / property
set is the preferred size, but the boxes can flex expanding that, which
may cause jumps when dragging. This is easy to see with the previous
patches on the urlbar / searchbar split.

Attachment #9298041 - Attachment description: Bug 1794630 - Use resizebefore="sibling" for resizing the url bar. r=Gijs → Bug 1794630 - Use resizebefore="sibling" for resizing the sidebar. r=Gijs
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f75b1de2fb54 Implement resize{before,after}=none/sibling for XUL splitters. r=TYLin
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d08cef967d68 Improve behavior of splitters when child box is flexible. r=TYLin
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/86161113004d Use resizebefore="sibling" for resizing the sidebar. r=Gijs
Pushed by emilio@crisal.io: https://hg.mozilla.org/integration/autoland/rev/d0d3534da317 Disable the new test for now to avoid orange on Linux.

Need to make the test work with smaller viewports.

Flags: needinfo?(emilio)
Status: RESOLVED → REOPENED
Flags: needinfo?(emilio)
Resolution: FIXED → ---

Make sure that the relevant box is in the viewport even on automation.

Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/16f084b9ecdb Fix and re-enable test_splitter_sibling.xhtml.
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/fde57ffc3be6 Use resize*=sibling for searchbar container. r=dao
Status: REOPENED → RESOLVED
Closed: 2 years ago2 years ago
Resolution: --- → FIXED
Regressions: 1795199
Regressions: 1795818

Sheriffs, can we back out https://hg.mozilla.org/mozilla-central/rev/fde57ffc3be6 from beta for causing bug 1795199? I'd rather do that than uplifting the relevant fixes.

Flags: needinfo?(sheriffs)

Backed out changeset fde57ffc3be6 from beta for causing Bug 1795199 and as per Emilio's request.

Backout link

Flags: needinfo?(sheriffs) → needinfo?(emilio)

Thanks!

Flags: needinfo?(emilio)
Target Milestone: 107 Branch → 108 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: