mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
style: Tidy up PseudoElement::should_exist.
MozReview-Commit-ID: Enr1NHONmtp
This commit is contained in:
parent
fd8b4b59c2
commit
92a69fbd9a
1 changed files with 3 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue