зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1685917 - Remove layout.css.file-selector-button.enabled pref. r=heycam
On by default since bug 1662478 (Firefox 82) Depends on D101289 Differential Revision: https://phabricator.services.mozilla.com/D101290
This commit is contained in:
Родитель
2b7ccb7ce1
Коммит
076de04bde
|
@ -92,22 +92,13 @@ if (
|
|||
});
|
||||
}
|
||||
|
||||
if (Services.prefs.getBoolPref("layout.css.file-selector-button.enabled")) {
|
||||
// System colors reserved to UA / chrome sheets
|
||||
whitelist.push({
|
||||
sourceName: /(?:res|gre-resources)\/forms\.css$/i,
|
||||
errorMessage: /Expected color but found \u2018-moz.*/i,
|
||||
platforms: ["linux"],
|
||||
isFromDevTools: false,
|
||||
});
|
||||
} else {
|
||||
// Reserved to UA sheets, behind a pref for content.
|
||||
whitelist.push({
|
||||
sourceName: /(?:res|gre-resources)\/forms\.css$/i,
|
||||
errorMessage: /Unknown pseudo-.*file-selector-button/i,
|
||||
isFromDevTools: false,
|
||||
});
|
||||
}
|
||||
// System colors reserved to UA / chrome sheets
|
||||
whitelist.push({
|
||||
sourceName: /(?:res|gre-resources)\/forms\.css$/i,
|
||||
errorMessage: /Expected color but found \u2018-moz.*/i,
|
||||
platforms: ["linux"],
|
||||
isFromDevTools: false,
|
||||
});
|
||||
|
||||
if (!Services.prefs.getBoolPref("layout.css.autofill.enabled")) {
|
||||
// Reserved to UA sheets, behind a pref for content.
|
||||
|
|
|
@ -92,5 +92,4 @@ CSS_PSEUDO_ELEMENT(mozTextControlPreview, ":-moz-text-control-preview",
|
|||
CSS_PSEUDO_ELEMENT_ENABLED_IN_UA_SHEETS)
|
||||
|
||||
CSS_PSEUDO_ELEMENT(fileSelectorButton, ":file-selector-button",
|
||||
CSS_PSEUDO_ELEMENT_ENABLED_IN_UA_SHEETS |
|
||||
CSS_PSEUDO_ELEMENT_SUPPORTS_USER_ACTION_STATE)
|
||||
|
|
|
@ -119,13 +119,8 @@ class nsCSSPseudoElements {
|
|||
}
|
||||
|
||||
static bool EnabledInContent(Type aType) {
|
||||
switch (aType) {
|
||||
case Type::fileSelectorButton:
|
||||
return mozilla::StaticPrefs::layout_css_file_selector_button_enabled();
|
||||
default:
|
||||
return !PseudoElementHasAnyFlag(
|
||||
aType, CSS_PSEUDO_ELEMENT_ENABLED_IN_UA_SHEETS_AND_CHROME);
|
||||
}
|
||||
return !PseudoElementHasAnyFlag(
|
||||
aType, CSS_PSEUDO_ELEMENT_ENABLED_IN_UA_SHEETS_AND_CHROME);
|
||||
}
|
||||
|
||||
static bool IsEnabled(Type aType, EnabledState aEnabledState) {
|
||||
|
|
|
@ -6740,13 +6740,6 @@
|
|||
value: true
|
||||
mirror: always
|
||||
|
||||
# Is support for the ::file-selector-button pseudo-element enabled?
|
||||
- name: layout.css.file-selector-button.enabled
|
||||
type: RelaxedAtomicBool
|
||||
value: true
|
||||
mirror: always
|
||||
rust: true
|
||||
|
||||
# Whether the computed value of line-height: normal returns the `normal`
|
||||
# keyword rather than a pixel value based on the first available font.
|
||||
#
|
||||
|
|
|
@ -160,12 +160,7 @@ impl PseudoElement {
|
|||
|
||||
/// Whether this pseudo-element is enabled for all content.
|
||||
pub fn enabled_in_content(&self) -> bool {
|
||||
match *self {
|
||||
PseudoElement::FileSelectorButton => {
|
||||
static_prefs::pref!("layout.css.file-selector-button.enabled")
|
||||
},
|
||||
_ => (self.flags() & structs::CSS_PSEUDO_ELEMENT_ENABLED_IN_UA_SHEETS_AND_CHROME) == 0,
|
||||
}
|
||||
self.flags() & structs::CSS_PSEUDO_ELEMENT_ENABLED_IN_UA_SHEETS_AND_CHROME == 0
|
||||
}
|
||||
|
||||
/// Whether this pseudo is enabled explicitly in UA sheets.
|
||||
|
|
Загрузка…
Ссылка в новой задаче