Closed Bug 1929178 Opened 9 months ago Closed 8 months ago

<input> textfield as -webkit-box flex item doesn't shrink below intrinsic size in Firefox (but does shrink in other browsers)

Categories

(Core :: Layout: Flexbox, defect)

defect

Tracking

()

VERIFIED FIXED
135 Branch
Tracking Status
firefox134 --- wontfix
firefox135 --- verified

People

(Reporter: dholbert, Assigned: TYLin)

References

Details

(Keywords: webcompat:platform-bug)

Attachments

(4 files)

Attached file testcase 1

[This is the underlying bug behind WebCompat Site Report Bug 1925259.]

STR:

  1. Load attached testcsae.

EXPECTED RESULTS:
Textfield should shrink to fit inside teal box.

ACTUAL RESULTS:
Textfield does not shrink enough; it overflows quite a ways beyond the right side of the teal box.

Chrome 132.0.6793.2 (Official Build) dev (64-bit) and Epiphany (gnome-web) version 47 both give EXPECTED RESULTS.
Firefox Nightly 134.0a1 (2024-11-04) (64-bit) gives ACTUAL RESULTS.

Summary: <input> textfield as -webkit-box flex item doesn't shrink below intrinsic size content size in Firefox (but does shrink in other browsers) → <input> textfield as -webkit-box flex item doesn't shrink below intrinsic size in Firefox (but does shrink in other browsers)

With this helper, we are able to get percentage basis only when needed.

While I'm here, I revised the code comment by adopting the review comments in
https://phabricator.services.mozilla.com/D120519#inline-666075

Assignee: nobody → aethanyc
Status: NEW → ASSIGNED

This patch makes it easier to use IsLegacyBox(this) to test whether the flex
container is legacy or not.

Pushed by aethanyc@gmail.com: https://hg.mozilla.org/integration/autoland/rev/785e1d3da060 Part 1 - Add a helper to get percentage basis when computing specified size suggestion. r=dholbert https://hg.mozilla.org/integration/autoland/rev/c05545b2d1f6 Part 2 - Make PartiallyResolveAutoMinSize() a nsFlexContainer's protected member function. r=dholbert https://hg.mozilla.org/integration/autoland/rev/8c9ad1da1fb0 Part 3 - Allow flex item in legacy flex container to shrink below its automatic minimum size. r=dholbert
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/49358 for changes under testing/web-platform/tests
Status: ASSIGNED → RESOLVED
Closed: 8 months ago
Resolution: --- → FIXED
Target Milestone: --- → 135 Branch
Upstream PR merged by moz-wptsync-bot
Upstream PR merged by moz-wptsync-bot

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

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

For more information, please visit BugBot documentation.

Flags: needinfo?(aethanyc)

This bug has existed for years. Let's have it ride the train.

Flags: needinfo?(aethanyc)

I was able to reproduce the issue on an affected Firefox Nightly 134.0a1 from 2024-11-04, using Windows 11 while loading the test case attached in Comment 0.
Verified as fixed on Firefox 135.0b2 using Windows 11, macOS 13.6 and Ubuntu 22.04. Textfield shrinks inside teal box.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: