Make anonymous box wrapping inside XUL boxes be similar to modern flex boxes.
Categories
(Core :: Layout, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox106 | --- | fixed |
People
(Reporter: emilio, Assigned: emilio)
References
(Blocks 1 open bug)
Details
Attachments
(3 files)
Assignee | ||
Comment 1•2 years ago
|
||
I haven't spotted any UI regression from this, and this should generally
make the XUL -> modern flex transition easier, and simplify some
of the relevant code.
This does fix a few layout issues with emulated flexbox.
For the most part, this shouldn't change behavior without that. This
changes behavior if you have mixed inline/non-inline content in the same
XUL box (before they'd get a single item, now you'd get the flexbox /
grid behavior of one item per inline run). But I pushed a patch with
some asserts and they didn't fire on our browser mochitests, so I think
we're good.
Assignee | ||
Comment 2•2 years ago
|
||
This has no behavior change, just unifies the pseudo-element used for
these.
Assignee | ||
Comment 3•2 years ago
|
||
Possibly line-clamp should only work in -webkit- ones but I've preserved
behavior on this patch.
Depends on D156375
Assignee | ||
Comment 8•2 years ago
|
||
Hey, Daniel, FYI, re. comment 7. I had missed this test because it was expected to fail on GTK (bug 1309107), and I usually run all the reftests, but on linux64, sigh.
The special-case in TextOverflow.cpp
removed in comment 5 is actually why text-overflow: inherit
mattered on the xul anon block (basically, we "jumped" one frame to make text-overflow work on XUL boxes). However, I think it's better to skip / remove the test that to keep it working, here's why:
- It matches regular flexbox / -webkit-box / etc.
- It doesn't make much sense conceptually since now we can have multiple anon items rather than just one.
- Can be trivially made to work on the front-end if needed by using block layout.
- I audited our front-end CSS for usage of
text-overflow:
and I didn't find a single use with XUL box (the closest was a XUL<description>
, but that generates a block frame).
So all-in-all it probably makes sense to remove this special case. Thoughts?
Comment 9•2 years ago
|
||
Sounds reasonable to me, yup. Thanks for the quick follow-up!
Comment 10•2 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/f36ff98a4bcb
https://hg.mozilla.org/mozilla-central/rev/61a98c3f4a30
https://hg.mozilla.org/mozilla-central/rev/ef451461f420
https://hg.mozilla.org/mozilla-central/rev/f28a82034cbc
Description
•