diff --git a/components/style/properties/computed_value_flags.rs b/components/style/properties/computed_value_flags.rs index bddb451861e..4ddc9a1f42a 100644 --- a/components/style/properties/computed_value_flags.rs +++ b/components/style/properties/computed_value_flags.rs @@ -41,10 +41,6 @@ bitflags! { /// A flag used to mark styles which are a pseudo-element or under one. const IS_IN_PSEUDO_ELEMENT_SUBTREE = 1 << 4; - /// A flag used to mark styles which are in a display: none subtree, or - /// under one. - const IS_IN_DISPLAY_NONE_SUBTREE = 1 << 5; - /// Whether this style inherits the `display` property. /// /// This is important because it may affect our optimizations to avoid @@ -77,7 +73,6 @@ impl ComputedValueFlags { ComputedValueFlags::IS_STYLE_IF_VISITED | ComputedValueFlags::IS_RELEVANT_LINK_VISITED | ComputedValueFlags::CAN_BE_FRAGMENTED | - ComputedValueFlags::IS_IN_DISPLAY_NONE_SUBTREE | ComputedValueFlags::IS_IN_PSEUDO_ELEMENT_SUBTREE | ComputedValueFlags::HAS_TEXT_DECORATION_LINES } diff --git a/components/style/properties/properties.mako.rs b/components/style/properties/properties.mako.rs index ba38d9532d0..81e9a09cbe8 100644 --- a/components/style/properties/properties.mako.rs +++ b/components/style/properties/properties.mako.rs @@ -2537,13 +2537,6 @@ impl ComputedValues { self.visited_style.as_ref().and_then(|s| s.rules.as_ref()) } - /// Returns whether we're in a display: none subtree. - pub fn is_in_display_none_subtree(&self) -> bool { - use properties::computed_value_flags::ComputedValueFlags; - - self.flags.contains(ComputedValueFlags::IS_IN_DISPLAY_NONE_SUBTREE) - } - /// Gets a reference to the custom properties map (if one exists). pub fn custom_properties(&self) -> Option<<&Arc<::custom_properties::CustomPropertiesMap>> { self.custom_properties.as_ref() diff --git a/components/style/style_adjuster.rs b/components/style/style_adjuster.rs index 4fcbffc5345..2bb400f63ec 100644 --- a/components/style/style_adjuster.rs +++ b/components/style/style_adjuster.rs @@ -204,12 +204,6 @@ impl<'a, 'b: 'a> StyleAdjuster<'a, 'b> { .insert(ComputedValueFlags::HAS_TEXT_DECORATION_LINES); } - if display == Display::None { - self.style - .flags - .insert(ComputedValueFlags::IS_IN_DISPLAY_NONE_SUBTREE); - } - if self.style.is_pseudo_element() { self.style .flags