зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1521399 - Remove layout.css.overflow.moz-scrollbars.enabled. r=mats
We've been shipping it for a few releases already, see bug 1481125. Differential Revision: https://phabricator.services.mozilla.com/D17081 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
e658f2346a
Коммит
c16bf47250
|
@ -4386,7 +4386,12 @@ var gCSSProperties = {
|
|||
other_values: [ "auto", "scroll", "hidden", "-moz-hidden-unscrollable",
|
||||
"auto auto", "auto scroll", "hidden scroll", "auto hidden",
|
||||
"-moz-hidden-unscrollable -moz-hidden-unscrollable" ],
|
||||
invalid_values: [ "-moz-hidden-unscrollable -moz-scrollbars-none" ]
|
||||
invalid_values: [
|
||||
"-moz-hidden-unscrollable -moz-scrollbars-none",
|
||||
"-moz-scrollbars-none",
|
||||
"-moz-scrollbars-horizontal",
|
||||
"-moz-scrollbars-vertical",
|
||||
],
|
||||
},
|
||||
"overflow-x": {
|
||||
domProp: "overflowX",
|
||||
|
@ -8520,17 +8525,6 @@ if (IsCSSPropertyPrefEnabled("layout.css.step-position-jump.enabled")) {
|
|||
);
|
||||
}
|
||||
|
||||
const OVERFLOW_MOZKWS = [
|
||||
"-moz-scrollbars-none",
|
||||
"-moz-scrollbars-horizontal",
|
||||
"-moz-scrollbars-vertical",
|
||||
];
|
||||
if (IsCSSPropertyPrefEnabled("layout.css.overflow.moz-scrollbars.enabled")) {
|
||||
gCSSProperties["overflow"].other_values.push(...OVERFLOW_MOZKWS);
|
||||
} else {
|
||||
gCSSProperties["overflow"].invalid_values.push(...OVERFLOW_MOZKWS);
|
||||
}
|
||||
|
||||
// Copy aliased properties' fields from their alias targets. Keep this logic
|
||||
// at the bottom of this file to ensure all the aliased properties are
|
||||
// processed.
|
||||
|
|
|
@ -34,20 +34,6 @@ for (i = 0; i < vals.length; ++i) {
|
|||
is(c(), vals[i], "Simple property set");
|
||||
}
|
||||
|
||||
if (SpecialPowers.getBoolPref("layout.css.overflow.moz-scrollbars.enabled")) {
|
||||
$('t').style.overflow = mozVals[0];
|
||||
is($('t').style.getPropertyValue("overflow-y"), "scroll", "Roundtrip");
|
||||
is($('t').style.getPropertyValue("overflow-x"), "hidden", "Roundtrip");
|
||||
is($('t').style.overflow, "hidden scroll", "Shorthand read directly");
|
||||
is(c(), "hidden scroll", "Shorthand computed");
|
||||
|
||||
$('t').style.overflow = mozVals[1];
|
||||
is($('t').style.getPropertyValue("overflow-x"), "scroll", "Roundtrip");
|
||||
is($('t').style.getPropertyValue("overflow-y"), "hidden", "Roundtrip");
|
||||
is($('t').style.overflow, "scroll hidden", "Shorthand read directly");
|
||||
is(c(), "scroll hidden", "Shorthand computed");
|
||||
}
|
||||
|
||||
for (i = 0; i < vals.length; ++i) {
|
||||
for (j = 0; j < vals.length; ++j) {
|
||||
$('t').setAttribute("style",
|
||||
|
|
|
@ -847,13 +847,6 @@ VARCACHE_PREF(
|
|||
bool, false
|
||||
)
|
||||
|
||||
// Is overflow: -moz-scrollbars-* value enabled?
|
||||
VARCACHE_PREF(
|
||||
"layout.css.overflow.moz-scrollbars.enabled",
|
||||
layout_css_overflow_moz_scrollbars_enabled,
|
||||
bool, false
|
||||
)
|
||||
|
||||
// Does arbitrary ::-webkit-* pseudo-element parsed?
|
||||
VARCACHE_PREF(
|
||||
"layout.css.unknown-webkit-pseudo-element",
|
||||
|
|
|
@ -11,47 +11,11 @@
|
|||
spec="https://drafts.csswg.org/css-overflow/#propdef-overflow"
|
||||
>
|
||||
use crate::properties::longhands::overflow_x::parse as parse_overflow;
|
||||
% if product == "gecko":
|
||||
use crate::properties::longhands::overflow_x::SpecifiedValue;
|
||||
% endif
|
||||
|
||||
pub fn parse_value<'i, 't>(
|
||||
context: &ParserContext,
|
||||
input: &mut Parser<'i, 't>,
|
||||
) -> Result<Longhands, ParseError<'i>> {
|
||||
% if product == "gecko":
|
||||
use crate::gecko_bindings::structs;
|
||||
let moz_kw_enabled = unsafe {
|
||||
structs::StaticPrefs_sVarCache_layout_css_overflow_moz_scrollbars_enabled
|
||||
};
|
||||
if moz_kw_enabled {
|
||||
let moz_kw_found = input.try(|input| {
|
||||
try_match_ident_ignore_ascii_case! { input,
|
||||
"-moz-scrollbars-horizontal" => {
|
||||
Ok(expanded! {
|
||||
overflow_x: SpecifiedValue::Scroll,
|
||||
overflow_y: SpecifiedValue::Hidden,
|
||||
})
|
||||
}
|
||||
"-moz-scrollbars-vertical" => {
|
||||
Ok(expanded! {
|
||||
overflow_x: SpecifiedValue::Hidden,
|
||||
overflow_y: SpecifiedValue::Scroll,
|
||||
})
|
||||
}
|
||||
"-moz-scrollbars-none" => {
|
||||
Ok(expanded! {
|
||||
overflow_x: SpecifiedValue::Hidden,
|
||||
overflow_y: SpecifiedValue::Hidden,
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
if moz_kw_found.is_ok() {
|
||||
return moz_kw_found
|
||||
}
|
||||
}
|
||||
% endif
|
||||
let overflow_x = parse_overflow(context, input)?;
|
||||
let overflow_y =
|
||||
input.try(|i| parse_overflow(context, i)).unwrap_or(overflow_x);
|
||||
|
|
Загрузка…
Ссылка в новой задаче