Bug 1909773 part 4: Add support for '-webkit-fill-available' as an alias for the CSS 'stretch' behavior (off-by-default for now). r=emilio
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). Differential Revision: https://phabricator.services.mozilla.com/D217687
This commit is contained in:
@@ -2113,8 +2113,18 @@ static void SetValueToExtremumLength(nsROCSSPrimitiveValue* aValue,
|
||||
return aValue->SetString("min-content");
|
||||
case nsIFrame::ExtremumLength::MozAvailable:
|
||||
return aValue->SetString("-moz-available");
|
||||
case nsIFrame::ExtremumLength::Stretch:
|
||||
case nsIFrame::ExtremumLength::Stretch: {
|
||||
// By default we serialize this value using the standard "stretch"
|
||||
// keyword. The exception is when that keyword is explicitly preffed off
|
||||
// and the legacy "-webkit-fill-available" keyword is preffed on; in
|
||||
// that case, we serialize to the legacy webkit-prefixed alias, to
|
||||
// ensure that we can round-trip properly.
|
||||
if (!StaticPrefs::layout_css_stretch_size_keyword_enabled() &&
|
||||
StaticPrefs::layout_css_webkit_fill_available_enabled()) {
|
||||
return aValue->SetString("-webkit-fill-available");
|
||||
}
|
||||
return aValue->SetString("stretch");
|
||||
}
|
||||
case nsIFrame::ExtremumLength::FitContent:
|
||||
return aValue->SetString("fit-content");
|
||||
case nsIFrame::ExtremumLength::FitContentFunction:
|
||||
|
||||
Reference in New Issue
Block a user