Add off-by-default support for 'stretch' and '-webkit-fill-available' as aliases for existing -moz-available behavior
Categories
(Core :: Layout, enhancement)
Tracking
()
Tracking | Status | |
---|---|---|
firefox130 | --- | fixed |
People
(Reporter: dholbert, Assigned: dholbert)
References
(Blocks 3 open bugs)
Details
Attachments
(4 files)
As a step towards real '-webkit-fill-available' / 'stretch' support, I've got a patch stack to implement those CSS keywords (off-by-default for now) simply as aliases for our existing -moz-available behavior.
That's all I'm doing with this bug here; then, in bug 1872755, I'll iterate on top of this to add block-axis handling for these newly-added keywords (so that they expand to fill the containing block when used as 'height', for example). (Later on, we can tentatively expand that block-axis behavior to also happen for -moz-available
in bug 527285, being cautious to watch for webcompat fallout from that change to our legacy prefixed keyword.)
Assignee | ||
Comment 1•4 months ago
|
||
This patch doesn't change behavior.
This change might look like a very-marginal deduplication, but it will help
reduce repeated code in later patches in this series (there are two more shared
"BehavesLike{...}" functions that will be added to this macro).
Assignee | ||
Comment 2•4 months ago
|
||
This patch doesn't change behavior.
The '-moz-available' keyword is our closest equivalent to the CSS 'stretch'
keyword, specifically for the inline axis (since we currently nerf
'-moz-available' to behave like the initial value in the block axis). Hence, it
makes sense to say that the '-moz-available' keyword "Behaves Like Stretch On
Inline Axis".
By abstracting the existing behavior behind this helper-function, we can
start implementing the actual 'stretch' value in terms of this existing
behavior, in later patches.
Assignee | ||
Comment 3•4 months ago
|
||
This patch is intended to be mechanical, just adding the new keyword as an
alias for the existing behavior, basically.
In a later bug, 'stretch' will gain additional capabilities before we enable
the pref. After that, I intend to ultimately make '-moz-available' an alias of
'stretch', assuming that doing so is web-compatible.
Assignee | ||
Comment 4•4 months ago
|
||
Both '-webkit-fill-available' and 'stretch' are equivalent to '-moz-available'
at this point in the patch series, and both are off-by-default, because
actually supporting them would require that we add special logic to handle them
as block-axis sizes (which I'll do in a separate bug).
Assignee | ||
Comment 5•4 months ago
|
||
Assignee | ||
Comment 7•4 months ago
|
||
(In reply to Daniel Holbert [:dholbert] from comment #5)
Try: https://treeherder.mozilla.org/jobs?repo=try&revision=15115b569abdd009b9c1f4e5c564c538b31de1d9
(Note, this^ Try run had a mochitest failure in layout/style/test/test_value_computation.html
from me forgetting to add the -webkit prefixed keyword to an array of -moz-available
aliases in that test file; I addressed that in https://phabricator.services.mozilla.com/D217687?vs=894602&id=894897#toc before landing.)
I did another mochitests-only Try run with that fix here:
https://treeherder.mozilla.org/jobs?repo=try&revision=8130291a9f06475160cf704365118245eb41db55
where the orange is all intermittent, I think (aside from the ES orange which is a nit that I later addressed before actually landing)
Just before landing I kicked off a mach try auto
try run, which is still going and is here, though I don't anticipate any test failures given the above:
https://treeherder.mozilla.org/jobs?repo=try&revision=dd8e4233a54d5ebeac1101d5e3f5120ba8d97439
Comment 8•4 months ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/15995deb04ce
https://hg.mozilla.org/mozilla-central/rev/e67adc2224e9
https://hg.mozilla.org/mozilla-central/rev/7496f354f4f2
https://hg.mozilla.org/mozilla-central/rev/385ced980d83
Description
•