Closed Bug 1789114 Opened 2 years ago Closed 2 years ago

Wrap attribute broken for emulated -moz-box

Categories

(Core :: Layout, defect)

defect

Tracking

()

VERIFIED FIXED
106 Branch
Tracking Status
firefox-esr91 --- unaffected
firefox-esr102 --- unaffected
firefox104 --- unaffected
firefox105 --- verified
firefox106 --- verified

People

(Reporter: aminomancer, Assigned: emilio)

References

(Regression)

Details

(Keywords: regression)

Attachments

(3 files)

Attached image An example of the bug

Since the changes in bug 1784265, the send-to-device client buttons in the "Send tab to device" subview (sign in to FxA, sync a device and give it a long name, open app menu, click profile button, click Send tab to device) are not wrapping as expected. The labels overflow without an ellipsis either. They used to wrap onto multiple lines. You can also test this by just adding wrap="true" to any toolbarbutton in a panel and making its label long enough to overflow. I also attached a picture of an example. (Bisection yielded this pushlog btw)

Flags: needinfo?(emilio)

(Also here's an image of how it looked before)

Set release status flags based on info from the regressing bug 1784265

Some context on why this used to work:

When wrap=true, we add inline text to the <label>. It has a
-moz-box display, so we wrap their kids in a
::-moz-xul-anonymous-block:

https://searchfox.org/mozilla-central/rev/39a48ce1b2b20a004dfa364d0587164f838b62b0/layout/base/nsCSSFrameConstructor.cpp#9882-9908

Before my patch, flex attributes did affect this anonymous block, but
-moz-box-flex set from CSS didn't, which was inconsistent, so I chose
the CSS behavior. The old flex attribute behavior we could get by
inheriting -moz-box-flex here:

https://searchfox.org/mozilla-central/rev/39a48ce1b2b20a004dfa364d0587164f838b62b0/layout/style/res/ua.css#210

But given modern flex / grid items don't have that, it seems bad to
further diverge. Instead, since we're relying on block behavior
implicitly anyways, do that explicitly instead, which works for both.

Assignee: nobody → emilio
Status: NEW → ASSIGNED
Flags: needinfo?(emilio)
Blocks: 1789123
Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/cdf7161e6f07
Use block rather than -moz-box display for subview button text. r=aminomancer
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 106 Branch

The patch landed in nightly and beta is affected.
:emilio, is this bug important enough to require an uplift?

  • If yes, please nominate the patch for beta approval.
  • If no, please set status-firefox105 to wontfix.

For more information, please visit auto_nag documentation.

Flags: needinfo?(emilio)

Comment on attachment 9293003 [details]
Bug 1789114 - Use block rather than -moz-box display for subview button text. r=aminomancer

Beta/Release Uplift Approval Request

  • User impact if declined: in some locales text that's supposed to wrap might get clipped instead.
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: comment 0 for example
  • List of other uplifts needed: none
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Simple css change.
  • String changes made/needed: none
  • Is Android affected?: No
Flags: needinfo?(emilio)
Attachment #9293003 - Flags: approval-mozilla-beta?
Flags: qe-verify+
QA Whiteboard: [qa-triaged]

Verified as fixed in our latest Nightly build 106.0a1 (2022-09-05).

Comment on attachment 9293003 [details]
Bug 1789114 - Use block rather than -moz-box display for subview button text. r=aminomancer

Approved for 105.0b8.

Attachment #9293003 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Verified as fixed in Beta 105.0b8.

Status: RESOLVED → VERIFIED
QA Whiteboard: [qa-triaged]
Flags: qe-verify+
Regressions: 1790003
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: