From e084d8e9d2e0c69cc387286f15335b5ffc3541b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Tue, 2 Feb 2021 23:45:25 +0000 Subject: [PATCH] style: Remove focus-visible feature flag. This shipped in 85, we can remove the feature flag now. Keep :-moz-focusring as an alias to :focus-visible at parse time. Differential Revision: https://phabricator.services.mozilla.com/D103752 --- components/style/gecko/non_ts_pseudo_class_list.rs | 2 -- components/style/gecko/selector_parser.rs | 4 +--- components/style/gecko/wrapper.rs | 1 - 3 files changed, 1 insertion(+), 6 deletions(-) diff --git a/components/style/gecko/non_ts_pseudo_class_list.rs b/components/style/gecko/non_ts_pseudo_class_list.rs index 7ed67725df0..1fff5d19050 100644 --- a/components/style/gecko/non_ts_pseudo_class_list.rs +++ b/components/style/gecko/non_ts_pseudo_class_list.rs @@ -55,8 +55,6 @@ macro_rules! apply_non_ts_list { ("fullscreen", Fullscreen, IN_FULLSCREEN_STATE, _), ("-moz-modal-dialog", MozModalDialog, IN_MODAL_DIALOG_STATE, PSEUDO_CLASS_ENABLED_IN_UA_SHEETS), ("-moz-topmost-modal-dialog", MozTopmostModalDialog, IN_TOPMOST_MODAL_DIALOG_STATE, PSEUDO_CLASS_ENABLED_IN_UA_SHEETS), - // TODO(emilio): This is inconsistently named (the capital R). - ("-moz-focusring", MozFocusRing, IN_FOCUSRING_STATE, _), ("-moz-broken", MozBroken, IN_BROKEN_STATE, _), ("-moz-loading", MozLoading, IN_LOADING_STATE, _), ("-moz-has-dir-attr", MozHasDirAttr, IN_HAS_DIR_ATTR_STATE, PSEUDO_CLASS_ENABLED_IN_UA_SHEETS), diff --git a/components/style/gecko/selector_parser.rs b/components/style/gecko/selector_parser.rs index b619f58af60..7010de45c7f 100644 --- a/components/style/gecko/selector_parser.rs +++ b/components/style/gecko/selector_parser.rs @@ -102,6 +102,7 @@ impl NonTSPseudoClass { "-moz-full-screen" => Some(NonTSPseudoClass::Fullscreen), "-moz-read-only" => Some(NonTSPseudoClass::ReadOnly), "-moz-read-write" => Some(NonTSPseudoClass::ReadWrite), + "-moz-focusring" => Some(NonTSPseudoClass::FocusVisible), "-webkit-autofill" => Some(NonTSPseudoClass::Autofill), _ => None, } @@ -136,9 +137,6 @@ impl NonTSPseudoClass { /// Returns whether the pseudo-class is enabled in content sheets. #[inline] fn is_enabled_in_content(&self) -> bool { - if let NonTSPseudoClass::FocusVisible = *self { - return static_prefs::pref!("layout.css.focus-visible.enabled"); - } if let NonTSPseudoClass::Autofill = *self { return static_prefs::pref!("layout.css.autofill.enabled"); } diff --git a/components/style/gecko/wrapper.rs b/components/style/gecko/wrapper.rs index 3a4bd8d759c..80a2478e94c 100644 --- a/components/style/gecko/wrapper.rs +++ b/components/style/gecko/wrapper.rs @@ -2042,7 +2042,6 @@ impl<'le> ::selectors::Element for GeckoElement<'le> { NonTSPseudoClass::MozDragOver | NonTSPseudoClass::MozDevtoolsHighlighted | NonTSPseudoClass::MozStyleeditorTransitioning | - NonTSPseudoClass::MozFocusRing | NonTSPseudoClass::MozMathIncrementScriptLevel | NonTSPseudoClass::InRange | NonTSPseudoClass::OutOfRange |