Closed Bug 1988301 Opened 11 months ago Closed 11 months ago

Add a pref to (temporarily) prevent `-webkit-fill-available` from being parsed in `{min,max}-{height,width}` (while still letting it be parsed in width & height)

Categories

(Core :: CSS Parsing and Computation, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
145 Branch
Tracking Status
firefox145 --- fixed

People

(Reporter: dholbert, Assigned: dholbert)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file)

In my work on the (currently-preffed-off) -webkit-fill-available towards the end of last year, we got it fully working for height, but it never got switched on because there are still some issues to sort out to get it working properly for min-height and max-height; that's why the keyword is still disabled.

I recall those {min,max}-{width,height} issues requiring a ~medium-size amount of work to sort out. I intend to pick that up again ~now and hope to complete it fairly soon -- but also, as an even-shorter-term route to mitigating most of the compat pain here, it looks like it'd be fairly straightforward to ship our existing support for -webkit-fill-available only as a keyword for width and height, excluding the min/max properties. I think that'd be worth doing as an ~easy mitigation, since most of the compat pain we see for this keyword is from its use in height in particular[1]. And then after we've done that, we can ship support for the keyword in {min,max}-{width,height}.

(As far as I've seen, sites tend to just use this keyword in one property -- nearly always height -- and don't do fancy things like expecting support in one property implies support in another property.)

Doing this will require some temporary shims in our CSS parsing code (to add an additional pref-check for usages of this keyword in {min,max}-{width,height} in a branch of the parsing code specifically for those properties), but at first glance it looks like it's doable and not too gross.

[1] From a quick look through the bugs tracked on our -webkit-fill-available bustage bugs, it looks like these ones all use it on height: bug 1944727, bug 1918019, bug 1911579, bug 1896571, bug 1886566, bug 1978907, bug 1949113. (Also bug 1971690 though in that case the site is now gone.) Those account for most of the bugs (and most of the site-popularity-based score) of the bustage there.

To do this, I intent to add an additional about:config pref (maybe layout.css.webkit-fill-available.min-max-properties.enabled).

The intent will be that the existing pref, layout.css.webkit-fill-available.enabled, will remain the top-level pref to control whether we parse the value at all, and layout.css.webkit-fill-available.min-max-properties.enabled is an additional control for whether we'll even attempt to parse it for {min,max}-{width,height}.

Then, we'll be able to toggle the existing layout.css.webkit-fill-available.enabled to true and let that ride the trains to get things working for width and height; and then when we're confident that the {min,max}-{width,height} implementation is robust, we can also enable layout.css.webkit-fill-available.min-max-properties.enabled to get this shipping for those properties as well.

Assignee: nobody → dholbert
Status: NEW → ASSIGNED

(reframing the bug summary to be about adding the new pref to add differential behavior between these properties. I'll file a separate bug to cover enabling the main pref while leaving this new pref off.)

Summary: Add temporary support for `-webkit-fill-available` just in `height` and `width` (but not `{min,max}-{height,width}` yet) → Add a pref to (temporarily) prevent `-webkit-fill-available` from being parsed in `{min,max}-{height,width}` (while still letting it be parsed in width & height)
Blocks: 1988938
Blocks: 1989071

Backed out for causing reftest failures @grid-item-auto-min-size-clamp-007.html.

Flags: needinfo?(dholbert)

Thanks - sorry about that, I'll take a look.

That was almost certainly from the other patch in this stack, so I've retriggered lando for just this one (which on its own should not impact behavior).

Flags: needinfo?(dholbert)
Pushed by dholbert@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/0860fac76783 https://hg.mozilla.org/integration/autoland/rev/7a155e6b7316 Add an additional pref to guard -webkit-fill-available support in properties beyond 'width' and 'height'. r=dshin,firefox-style-system-reviewers
Pushed by nbeleuzu@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/67bda0d1e4e3 https://hg.mozilla.org/mozilla-central/rev/600c3474655b Add an additional pref to guard -webkit-fill-available support in properties beyond 'width' and 'height'. r=dshin,firefox-style-system-reviewers
Status: ASSIGNED → RESOLVED
Closed: 11 months ago
Resolution: --- → FIXED
Target Milestone: --- → 145 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: