style: Tidy up PseudoElement::should_exist.

MozReview-Commit-ID: Enr1NHONmtp
This commit is contained in:
Emilio Cobos Álvarez 2017-11-07 15:56:25 +01:00
parent fd8b4b59c2
commit 92a69fbd9a
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C

View file

@ -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;
}