From 4cd8813a816528a6b4f9c50bf7438a6edad266d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Fri, 13 Dec 2019 13:27:27 +0000 Subject: [PATCH] style: Remove full-screen-api.unprefix.enabled. It's been enabled since Firefox 64. Differential Revision: https://phabricator.services.mozilla.com/D56951 --- components/style/gecko/non_ts_pseudo_class_list.rs | 3 +-- components/style/gecko/selector_parser.rs | 12 +++--------- components/style/gecko/wrapper.rs | 1 - 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/components/style/gecko/non_ts_pseudo_class_list.rs b/components/style/gecko/non_ts_pseudo_class_list.rs index eca60fdc586..8d9fc3d2d85 100644 --- a/components/style/gecko/non_ts_pseudo_class_list.rs +++ b/components/style/gecko/non_ts_pseudo_class_list.rs @@ -48,8 +48,7 @@ macro_rules! apply_non_ts_list { ("indeterminate", Indeterminate, indeterminate, IN_INDETERMINATE_STATE, _), ("-moz-devtools-highlighted", MozDevtoolsHighlighted, mozDevtoolsHighlighted, IN_DEVTOOLS_HIGHLIGHTED_STATE, PSEUDO_CLASS_ENABLED_IN_UA_SHEETS), ("-moz-styleeditor-transitioning", MozStyleeditorTransitioning, mozStyleeditorTransitioning, IN_STYLEEDITOR_TRANSITIONING_STATE, PSEUDO_CLASS_ENABLED_IN_UA_SHEETS), - ("fullscreen", Fullscreen, fullscreen, IN_FULLSCREEN_STATE, PSEUDO_CLASS_ENABLED_IN_UA_SHEETS_AND_CHROME), - ("-moz-full-screen", MozFullScreen, mozFullScreen, IN_FULLSCREEN_STATE, _), + ("fullscreen", Fullscreen, fullscreen, IN_FULLSCREEN_STATE, _), // TODO(emilio): This is inconsistently named (the capital R). ("-moz-focusring", MozFocusRing, mozFocusRing, IN_FOCUSRING_STATE, _), ("-moz-broken", MozBroken, mozBroken, IN_BROKEN_STATE, _), diff --git a/components/style/gecko/selector_parser.rs b/components/style/gecko/selector_parser.rs index fec3c9247c3..18878213244 100644 --- a/components/style/gecko/selector_parser.rs +++ b/components/style/gecko/selector_parser.rs @@ -137,6 +137,7 @@ impl NonTSPseudoClass { ([$(($css:expr, $name:ident, $gecko_type:tt, $state:tt, $flags:tt),)*]) => { match_ignore_ascii_case! { &name, $($css => Some(NonTSPseudoClass::$name),)* + "-moz-full-screen" => Some(NonTSPseudoClass::Fullscreen), _ => None, } } @@ -169,16 +170,9 @@ impl NonTSPseudoClass { } /// Returns whether the pseudo-class is enabled in content sheets. + #[inline] fn is_enabled_in_content(&self) -> bool { - match *self { - // For pseudo-classes with pref, the availability in content - // depends on the pref. - NonTSPseudoClass::Fullscreen => static_prefs::pref!("full-screen-api.unprefix.enabled"), - // Otherwise, a pseudo-class is enabled in content when it - // doesn't have any enabled flag. - _ => !self - .has_any_flag(NonTSPseudoClassFlag::PSEUDO_CLASS_ENABLED_IN_UA_SHEETS_AND_CHROME), - } + !self.has_any_flag(NonTSPseudoClassFlag::PSEUDO_CLASS_ENABLED_IN_UA_SHEETS_AND_CHROME) } /// Get the state flag associated with a pseudo-class, if any. diff --git a/components/style/gecko/wrapper.rs b/components/style/gecko/wrapper.rs index e0079921072..21fffb975c7 100644 --- a/components/style/gecko/wrapper.rs +++ b/components/style/gecko/wrapper.rs @@ -2045,7 +2045,6 @@ impl<'le> ::selectors::Element for GeckoElement<'le> { NonTSPseudoClass::Disabled | NonTSPseudoClass::Checked | NonTSPseudoClass::Fullscreen | - NonTSPseudoClass::MozFullScreen | NonTSPseudoClass::Indeterminate | NonTSPseudoClass::PlaceholderShown | NonTSPseudoClass::Target |