From 92a69fbd9a7c5b70b3fc3c86e8e8d44f8ed4d643 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Tue, 7 Nov 2017 15:56:25 +0100 Subject: [PATCH] style: Tidy up PseudoElement::should_exist. MozReview-Commit-ID: Enr1NHONmtp --- components/style/gecko/pseudo_element.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/components/style/gecko/pseudo_element.rs b/components/style/gecko/pseudo_element.rs index 0a3d4647e00..8da1c2832ca 100644 --- a/components/style/gecko/pseudo_element.rs +++ b/components/style/gecko/pseudo_element.rs @@ -160,12 +160,11 @@ impl PseudoElement { /// Whether this pseudo-element should actually exist if it has /// the given styles. - pub fn should_exist(&self, style: &ComputedValues) -> bool - { - let display = style.get_box().clone_display(); - if display == display::T::none { + pub fn should_exist(&self, style: &ComputedValues) -> bool { + if style.get_box().clone_display() == display::T::none { return false; } + if self.is_before_or_after() && style.ineffective_content_property() { return false; }