Anonymous flex item gets left behind with just whitespace inside of it, when linewrapped text gets removed from flex container
Categories
(Core :: Layout: Flexbox, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr115 | --- | unaffected |
firefox127 | --- | unaffected |
firefox128 | --- | verified |
firefox129 | --- | verified |
People
(Reporter: dholbert, Assigned: emilio)
References
(Regression)
Details
(Keywords: regression)
Attachments
(3 files)
773 bytes,
text/html
|
Details | |
48 bytes,
text/x-phabricator-request
|
RyanVM
:
approval-mozilla-beta+
|
Details | Review |
864 bytes,
text/html
|
Details |
Spinning this off from bug 1901233, for the unusual situation that we ran into there.
Adding and then removing a text node in a flex container will cause us to add and then remove an anonymous flex item wrapper-box -- that's what's supposed to happen, at least. BUT: if the text is linewrapped, we fail to remove the anonymous flex item, for some reason.
The straggling anon box can cause trouble because (a) it violates invariants (which caused a crash in bug 1901233) and (b) it influences how packing space is distributed, e.g. if the flex container uses justify-content:space-around
or gap
to distribute packing space around flex items.
Assignee | ||
Comment 1•3 months ago
|
||
Seems this could be a regression from bug 1850834? I'm afk for the day, but if you can check and ni? me if so, I can look.
Reporter | ||
Comment 2•3 months ago
|
||
Reporter | ||
Comment 3•3 months ago
|
||
It is indeed! Thanks.
Testing Nightlies from the day before vs. the day after that bug's patch merged to central:
- Nightly 2024-06-03 gives "good" results on the attached testcase (lime square)
- Nightly 2024-06-05 gives "bad" results on the attached testcase (mostly-red square)
Reporter | ||
Comment 4•3 months ago
•
|
||
Also, warning, the attached testcase might cause a crash in devtools code, in nightlies from around 2024-06-05 to 2024-06-11 or so, if you try to inspect the <div id="flex">
node with the "Layout" devtools pane open. (That crash is bug 1901233, which we've made into a more graceful silent failure via the patch that landed over there.)
Comment 5•3 months ago
|
||
Set release status flags based on info from the regressing bug 1850834
Assignee | ||
Updated•3 months ago
|
Assignee | ||
Comment 6•3 months ago
|
||
Since RemoveFrame also removes them and would leave the wrapping box
empty.
Updated•3 months ago
|
Reporter | ||
Comment 7•3 months ago
|
||
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/0018551e3c86 Account for continuations to remove anonymous wrappers. r=dholbert
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/46746 for changes under testing/web-platform/tests
Comment 10•3 months ago
|
||
bugherder |
Upstream PR merged by moz-wptsync-bot
Reporter | ||
Comment 12•3 months ago
|
||
ni as reminder to request uplift in a few days
Assignee | ||
Comment 13•3 months ago
|
||
Comment on attachment 9407181 [details]
Bug 1902156 - Account for continuations to remove anonymous wrappers. r=dholbert,TYLin
Beta/Release Uplift Approval Request
- User impact if declined: Incorrect layout in some cases
- Is this code covered by automated tests?: Yes
- Has the fix been verified in Nightly?: Yes
- Needs manual test from QE?: Yes
- If yes, steps to reproduce: comment 0
- List of other uplifts needed: none
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): Trivialish fix.
- String changes made/needed: none
- Is Android affected?: Yes
Assignee | ||
Updated•3 months ago
|
Comment 14•3 months ago
|
||
Comment on attachment 9407181 [details]
Bug 1902156 - Account for continuations to remove anonymous wrappers. r=dholbert,TYLin
Approved for 128.0b4.
Updated•3 months ago
|
Comment 15•3 months ago
|
||
uplift |
https://hg.mozilla.org/releases/mozilla-beta/rev/bc185cd0cb3b
Updated•3 months ago
|
Comment 16•3 months ago
|
||
Verified fixed using Nightly 129.0a1 (20240616215431) and Beta 128.0b4 (20240615190628) on Windows 10, MacOS 14 and Ubuntu 24.04.
Description
•