mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Add support for pre-wrap
and pre-line
values for white-space
.
This is mostly straightforward. I had to modify a couple of places which were accidentally discarding whitespace. Fixes #1513.
This commit is contained in:
parent
5e4f132b3b
commit
3a451ff845
17 changed files with 427 additions and 104 deletions
|
@ -804,8 +804,11 @@ 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 => true,
|
||||
_ => false,
|
||||
white_space::T::normal |
|
||||
white_space::T::nowrap => true,
|
||||
white_space::T::pre |
|
||||
white_space::T::pre_wrap |
|
||||
white_space::T::pre_line => false,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue