Closed Bug 1920510 Opened 2 years ago Closed 2 years ago

Support CSS display: contents in XUL

Categories

(Core :: CSS Parsing and Computation, enhancement)

enhancement
Points:
2

Tracking

()

RESOLVED FIXED
132 Branch
Tracking Status
firefox132 --- fixed

People

(Reporter: sthompson, Assigned: sthompson)

References

(Blocks 1 open bug)

Details

(Whiteboard: [fidefe-tabgrps-tabbrowser])

Attachments

(1 file, 1 external file)

https://searchfox.org/mozilla-central/rev/466db50bfdddc209f068e281e552a2583d82f958/servo/components/style/style_adjuster.rs#123-127

See attached screenshot with proof of concept where display: contents works correctly in the page content HTML but does not work correctly with XUL <box> elements in the browser chrome.

Emilio pointed out that display: contents has been suppressed for XUL since at least 2018. The comment in the code points out that display: contents is never used in XUL so it does not need support.

I'm working on https://bugzilla.mozilla.org/show_bug.cgi?id=1918686 as part of the Tab Groups project and trying to ensure that tabs get laid out with the same width regardless of whether or not the tabs are contained in a tab group. In that project, the inner HTML of <tabs> can look something like:

<tab />
<tab />
<tab-group />
  <label />
  <tab />
  <tab />
<tab />
<tab-group />
  <label />
  <tab />

display: contents on tab-group would allow the tab elements with flex: 100 100 to be considered equally when laying out the <tabs> flexbox contents.

Assignee: nobody → sthompson

UL was opted out of support for the CSS display: contents rule due to lack of use, but there may be a valid use case for display: contents in the tab bar with the introduction of tab groups.

See Bug 1918686 for the tab groups use case.

Try build https://treeherder.mozilla.org/jobs?repo=try&revision=f52d1736b77c12affcd44521e786b0f0de5615fd

All failures appear to be known, intermittent problems unrelated to CSS rules/DOM display

Blocks: 1907099, 1918686
Points: --- → 2
Whiteboard: [fidefe-tabgrps-tabbrowser]
Pushed by sthompson@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/305be93092af Enable CSS display: contents in XUL r=emilio
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 132 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: