Order of buttons on menu toolbar changes after restart / new window
Categories
(Core :: Layout, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox84 | --- | fixed |
People
(Reporter: 08xjcec48, Assigned: emilio)
References
Details
Attachments
(5 files)
Updated•8 years ago
|
Comment 1•8 years ago
|
||
Comment 2•8 years ago
|
||
Comment 4•8 years ago
|
||
Comment 7•8 years ago
|
||
Comment 8•8 years ago
|
||
Comment 9•8 years ago
|
||
Comment 10•8 years ago
|
||
Comment 11•8 years ago
|
||
Comment 12•8 years ago
|
||
Comment 13•8 years ago
|
||
Comment 14•8 years ago
|
||
Comment 15•8 years ago
|
||
Reporter | ||
Comment 17•8 years ago
|
||
Comment 18•8 years ago
|
||
Reporter | ||
Comment 19•8 years ago
|
||
Comment 20•7 years ago
|
||
Comment 22•7 years ago
|
||
Comment 23•7 years ago
|
||
Comment 24•7 years ago
|
||
Comment 25•7 years ago
|
||
Assignee | ||
Comment 26•7 years ago
|
||
Assignee | ||
Updated•7 years ago
|
Comment 27•7 years ago
|
||
Assignee | ||
Comment 28•7 years ago
|
||
Comment 29•7 years ago
|
||
Comment 30•7 years ago
|
||
Assignee | ||
Comment 31•7 years ago
|
||
Comment 32•7 years ago
|
||
Assignee | ||
Comment 33•7 years ago
|
||
Assignee | ||
Comment 34•7 years ago
|
||
Comment 35•7 years ago
|
||
Comment 36•7 years ago
|
||
Comment 37•7 years ago
|
||
Comment 38•7 years ago
|
||
Comment 39•7 years ago
|
||
Updated•7 years ago
|
Comment 41•7 years ago
|
||
Assignee | ||
Comment 42•7 years ago
|
||
Comment 43•7 years ago
|
||
Comment 44•7 years ago
|
||
Comment 45•7 years ago
|
||
Reporter | ||
Comment 46•7 years ago
|
||
Comment 47•7 years ago
|
||
Comment 48•7 years ago
|
||
Comment 49•7 years ago
|
||
(In reply to Dão Gottwald [::dao] from comment #48)
I guess we may be able to work around the layout issue here by using a
customization target in the menubar as well, then. Dão/Mike, does that sound
feasible,Yeah.
WFM!
Comment 52•5 years ago
|
||
(In reply to Emilio Cobos Álvarez (:emilio) from comment #34)
So comment 25 doesn't repro for me on Linux. I'm supposed to see the two
toolbar buttons swapped, right?Which OS can you repro this in? Is there any OS-dependent rule related to
those?
The steps in bug 1671820 are on Linux. Does this help with reproducing?
(Also, a lot of the discussion in this bug is about XBL, and XBL is now gone, but the problem persists, which is a little surprising...)
Assignee | ||
Comment 53•5 years ago
|
||
Ok, so I could repro bug 1671820 here, and yes, that was very helpful, I understand what's going on now. Some bits of our discussion:
emilio
gijs: ok, I can repro if I leave just the downloads button
gijs: ok so I see why this happens
gijs: indeed .titlebar-buttonbox-container { -moz-box-ordinal-group: 1000; } is part of the issue
gijs: so the issue is that -moz-box-ordinal-group works by reordering the frames (unlike the order property)
gijs: so when you insert the downloads button (or other items) dynamically, the previous sibling in this case is the titlebar-buttonbox-container which is at the end of the frame tree
gijs: so we find the titlebar-buttonbox-container as the reference frame to insert after (since the frame tree mimics DOM order), and then reorder (so we have <flexible> <searchbar> <titlebar-buttonbox-container> <downloads> and reorder it so that the ordinal groups are ordered which ends up being <flexible> <searchbar> <downloads> <titlebar-buttonbox-container>
gijs: so the order ends up being wrong
gijs: (or not match the DOM order at least)
gijs
emilio: OK. Would switching to order help? Is that feasible without wholesale-switching to new-flexbox for everything in there?
emilio
gijs: so fixing it is slightly annoying... either rewrite xul box layout to use CSSOrderAwareIterator rather than the bespoke reordering (fwiw, the emulate-box-with-flex work dholbert was doing should fix it)
gijs: or somehow teach the frame constructor about ordinal-group, which I'm not particularly excited about...
gijs: switching the toolbar to flex / order would work too of course
gijs
but we'd need to switch the entire toolbar, right?
that's gonna be a right old can o worms
emilio
gijs: (well, work == paper over it), and yes, likely
gijs
hm, so that leaves adding the container as discussed in the bug
or trying to fix the insertion logic to pick another insertion point
ie insert before whatever comes after the buttons atm
emilio
gijs: I can look at whether there's a better fix in layout land, maybe switching to CSSOrderAwareIterator is not that terrible...
gijs
as that won't matter for DOM order and sounds like it'll fix the issue, maybe?
emilio
gijs: Yeah, that should work too
gijs
emilio: rewriting any XUL layout thing sounds like a can of worms tho
although this setup is "amazing" it's a bit of an edgecase and I dunno what else might end up breaking, and I'm sure (read in sarcastic voice) we have excellent (not) unit-test coverage of all the XUL layout stuff :|
emilio
gijs: we'll see... but yes, a bit, see also bug 1665476 where I tried to remove some XUL code and ended up crashing all WR reftests
gijs
:'(
emilio
gijs: but anyhow I'll paste the diagnostic into the bug, and I'll poke a bit later. There might be an even easier fix
gijs: maybe just fixing the XUL reordering to account for dom order too would work
Assignee | ||
Comment 54•5 years ago
|
||
So potential fixes:
- Don't use
-moz-box-ordinal-group
on the front-end to reorder the window close buttons, either:- Reorder the window buttons on the DOM.
- Switch the toolbar to use
flex
/order
.
- Fix the sorting in XUL layout to either:
- Account for DOM order.
- Don't reorder frames (use
CSSOrderAwareIterator
or such).
I believe the "Account for DOM order" might be the least tricky but we'll see...
Assignee | ||
Comment 55•5 years ago
|
||
Updated•5 years ago
|
Assignee | ||
Comment 56•5 years ago
|
||
Depends on D94788
Assignee | ||
Comment 57•5 years ago
|
||
Instead, sort stuff using CSSOrderAwareFrameIterator. The current
sorting is broken in presence of dynamic insertions, consider the
following <Child(order)> combination in the DOM:
<A(1000)> <B(0)>
That'd look like:
<B(0)> <A(1000)>
On the frame tree. However when appending a child before B so that the
DOM looks like:
<A(1000)> <C(0)> <B(0)>
The frame constructor will properly insert after A, and the reordering,
which is stable, will end up with:
<B(0)> <C(0)> <A(1000)>
Which is the wrong frame tree order.
We only use -moz-box-tree-ordinal in regular sprocket layout, so just
handle it there rather than everywhere.
Depends on D94789
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Comment 59•5 years ago
|
||
Comment 60•5 years ago
|
||
bugherder |
Comment 61•5 years ago
|
||
Assignee | ||
Updated•5 years ago
|
Comment 62•5 years ago
|
||
bugherder |
Description
•