aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/inline.rs
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2014-10-04 19:17:39 -0700
committerPatrick Walton <pcwalton@mimiga.net>2014-10-07 13:39:41 -0700
commitd30762bb9f5a40915bc103694f1b99dd7206a4f6 (patch)
treed79d32e2e2e1507ef55cfcf090dd5dba35b10ced /components/layout/inline.rs
parent543f11b62b9da6a5362f96e5c85f660ee68acf76 (diff)
downloadservo-d30762bb9f5a40915bc103694f1b99dd7206a4f6.tar.gz
servo-d30762bb9f5a40915bc103694f1b99dd7206a4f6.zip
layout: `white_space::pre` should not yield ignorable whitespace.
Improves the Google home page.
Diffstat (limited to 'components/layout/inline.rs')
-rw-r--r--components/layout/inline.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/components/layout/inline.rs b/components/layout/inline.rs
index 86522e1d958..700ffa56602 100644
--- a/components/layout/inline.rs
+++ b/components/layout/inline.rs
@@ -708,7 +708,7 @@ impl InlineFragments {
let mut new_fragments = Vec::new();
let mut skipping = true;
for fragment in fragments {
- if skipping && fragment.is_whitespace_only() {
+ if skipping && fragment.is_ignorable_whitespace() {
debug!("stripping ignorable whitespace from start");
continue
}
@@ -727,7 +727,8 @@ impl InlineFragments {
}
let mut new_fragments = self.fragments.clone();
- while new_fragments.len() > 0 && new_fragments.as_slice().last().as_ref().unwrap().is_whitespace_only() {
+ while new_fragments.len() > 0 &&
+ new_fragments.as_slice().last().as_ref().unwrap().is_ignorable_whitespace() {
debug!("stripping ignorable whitespace from end");
drop(new_fragments.pop());
}