Extend whitespace::T with additional helper methods

This commit is contained in:
Keith Yeung 2015-11-16 01:32:27 -08:00
parent a5babb89a0
commit 7de7cb4786
5 changed files with 47 additions and 48 deletions

View file

@ -63,7 +63,7 @@ use std::mem;
use std::sync::Arc;
use string_cache::{Atom, Namespace};
use style::computed_values::content::ContentItem;
use style::computed_values::{content, display, white_space};
use style::computed_values::{content, display};
use style::node::TElementAttributes;
use style::properties::ComputedValues;
use style::properties::{PropertyDeclaration, PropertyDeclarationBlock};
@ -960,13 +960,7 @@ impl<'ln> ThreadSafeLayoutNode<'ln> {
//
// If you implement other values for this property, you will almost certainly
// want to update this check.
match self.style().get_inheritedtext().white_space {
white_space::T::normal |
white_space::T::nowrap => true,
white_space::T::pre |
white_space::T::pre_wrap |
white_space::T::pre_line => false,
}
!self.style().get_inheritedtext().white_space.preserve_newlines()
}
}