зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1521631 - Implement overflow: overlay as an alias on auto, and enable on Nightly. r=boris
See related webcompat issues and discussion in https://github.com/w3c/csswg-drafts/issues/8063 Differential Revision: https://phabricator.services.mozilla.com/D165058
This commit is contained in:
Родитель
ccfcb5b77a
Коммит
8fce3a5311
|
@ -11648,15 +11648,27 @@ if (IsCSSPropertyPrefEnabled("layout.css.caption-side-non-standard.enabled")) {
|
|||
}
|
||||
|
||||
{
|
||||
const enabled = IsCSSPropertyPrefEnabled(
|
||||
const mozHiddenUnscrollableEnabled = IsCSSPropertyPrefEnabled(
|
||||
"layout.css.overflow-moz-hidden-unscrollable.enabled"
|
||||
);
|
||||
const overlayEnabled = IsCSSPropertyPrefEnabled(
|
||||
"layout.css.overflow-overlay.enabled"
|
||||
);
|
||||
for (let p of ["overflow", "overflow-x", "overflow-y"]) {
|
||||
let prop = gCSSProperties[p];
|
||||
let values = enabled ? prop.other_values : prop.invalid_values;
|
||||
values.push("-moz-hidden-unscrollable");
|
||||
let mozHiddenUnscrollableValues = mozHiddenUnscrollableEnabled
|
||||
? prop.other_values
|
||||
: prop.invalid_values;
|
||||
let overlayValues = overlayEnabled
|
||||
? prop.other_values
|
||||
: prop.invalid_values;
|
||||
mozHiddenUnscrollableValues.push("-moz-hidden-unscrollable");
|
||||
overlayValues.push("overlay");
|
||||
if (p == "overflow") {
|
||||
values.push("-moz-hidden-unscrollable -moz-hidden-unscrollable");
|
||||
mozHiddenUnscrollableValues.push(
|
||||
"-moz-hidden-unscrollable -moz-hidden-unscrollable"
|
||||
);
|
||||
overlayValues.push("overlay overlay");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8566,6 +8566,13 @@
|
|||
mirror: always
|
||||
rust: true
|
||||
|
||||
# Is support for CSS overflow: overlay enabled
|
||||
- name: layout.css.overflow-overlay.enabled
|
||||
type: RelaxedAtomicBool
|
||||
value: @IS_NIGHTLY_BUILD@
|
||||
mirror: always
|
||||
rust: true
|
||||
|
||||
# Is support for overscroll-behavior enabled?
|
||||
- name: layout.css.overscroll-behavior.enabled
|
||||
type: bool
|
||||
|
|
|
@ -2229,7 +2229,10 @@ impl Parse for Overflow {
|
|||
"clip" => Self::Clip,
|
||||
#[cfg(feature = "gecko")]
|
||||
"-moz-hidden-unscrollable" if static_prefs::pref!("layout.css.overflow-moz-hidden-unscrollable.enabled") => {
|
||||
Overflow::Clip
|
||||
Overflow::Clip
|
||||
},
|
||||
"overlay" if static_prefs::pref!("layout.css.overflow-overlay.enabled") => {
|
||||
Overflow::Auto
|
||||
},
|
||||
})
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче