diff --git a/components/style/style_adjuster.rs b/components/style/style_adjuster.rs index 5e66e91e894..31028f98571 100644 --- a/components/style/style_adjuster.rs +++ b/components/style/style_adjuster.rs @@ -152,63 +152,6 @@ impl<'a, 'b: 'a> StyleAdjuster<'a, 'b> { } } - /// https://html.spec.whatwg.org/multipage/#inert-subtrees - /// - /// If -moz-inert is applied then add: - /// -moz-user-focus: none; - /// -moz-user-input: none; - /// -moz-user-modify: read-only; - /// user-select: none; - /// pointer-events: none; - /// cursor: default; - /// - /// NOTE: dialog:-moz-topmost-modal-dialog is used to override above - /// rules to remove the inertness for the topmost modal dialog. - /// - /// NOTE: If this or the pointer-events tweak is removed, then - /// minimal-xul.css and the scrollbar style caching need to be tweaked. - #[cfg(feature = "gecko")] - fn adjust_for_inert(&mut self) { - use crate::values::specified::ui::CursorKind; - use crate::values::specified::ui::UserSelect; - use properties::longhands::_moz_inert::computed_value::T as Inert; - use properties::longhands::_moz_user_focus::computed_value::T as UserFocus; - use properties::longhands::_moz_user_input::computed_value::T as UserInput; - use properties::longhands::_moz_user_modify::computed_value::T as UserModify; - use properties::longhands::cursor::computed_value::T as Cursor; - use properties::longhands::pointer_events::computed_value::T as PointerEvents; - - let needs_update = { - let ui = self.style.get_inherited_ui(); - if ui.clone__moz_inert() == Inert::None { - return; - } - - ui.clone__moz_user_focus() != UserFocus::None || - ui.clone__moz_user_input() != UserInput::None || - ui.clone__moz_user_modify() != UserModify::ReadOnly || - ui.clone_pointer_events() != PointerEvents::None || - ui.clone_cursor().keyword != CursorKind::Default || - ui.clone_cursor().images != Default::default() - }; - - if needs_update { - let ui = self.style.mutate_inherited_ui(); - ui.set__moz_user_focus(UserFocus::None); - ui.set__moz_user_input(UserInput::None); - ui.set__moz_user_modify(UserModify::ReadOnly); - ui.set_pointer_events(PointerEvents::None); - ui.set_cursor(Cursor { - images: Default::default(), - keyword: CursorKind::Default, - }); - } - - if self.style.get_ui().clone_user_select() != UserSelect::None { - self.style.mutate_ui().set_user_select(UserSelect::None); - } - } - /// Whether we should skip any item-based display property blockification on /// this element. fn skip_item_display_fixup(&self, element: Option) -> bool @@ -909,7 +852,6 @@ impl<'a, 'b: 'a> StyleAdjuster<'a, 'b> { #[cfg(feature = "gecko")] { self.adjust_for_appearance(element); - self.adjust_for_inert(); self.adjust_for_marker_pseudo(); } self.set_bits();