mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Extend whitespace::T with additional helper methods
This commit is contained in:
parent
a5babb89a0
commit
7de7cb4786
5 changed files with 47 additions and 48 deletions
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue