aboutsummaryrefslogtreecommitdiffstats
path: root/components/util
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2014-12-07 22:54:56 -0800
committerPatrick Walton <pcwalton@mimiga.net>2014-12-15 17:41:37 -0800
commit10f1ed5e311e7092d3e24b58c4960f5e8a511ac0 (patch)
treeef72767ba32a4268b20002c1a80a0d13ea9b47a4 /components/util
parente0e14c60d68474a0dec94d2ec71d979a95fbc6a6 (diff)
downloadservo-10f1ed5e311e7092d3e24b58c4960f5e8a511ac0.tar.gz
servo-10f1ed5e311e7092d3e24b58c4960f5e8a511ac0.zip
style: Parse the legacy `border` attribute per the legacy HTML specification.
Additionally, this patch cleans up some miscellaneous formatting issues and refactors files in `layout/css/` somewhat to eliminate needless levels of indirection. It also fixes our handling of presentational hints that only apply if border is nonzero.
Diffstat (limited to 'components/util')
-rw-r--r--components/util/str.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/util/str.rs b/components/util/str.rs
index 28aedee4f30..0428d0db5b2 100644
--- a/components/util/str.rs
+++ b/components/util/str.rs
@@ -61,7 +61,8 @@ pub static HTML_SPACE_CHARACTERS: StaticCharVec = &[
'\u000d',
];
-pub fn split_html_space_chars<'a>(s: &'a str) -> Filter<'a, &'a str, CharSplits<'a, StaticCharVec>> {
+pub fn split_html_space_chars<'a>(s: &'a str)
+ -> Filter<'a, &'a str, CharSplits<'a, StaticCharVec>> {
s.split(HTML_SPACE_CHARACTERS).filter(|&split| !split.is_empty())
}
@@ -76,7 +77,6 @@ fn do_parse_integer<T: Iterator<char>>(input: T) -> Option<i64> {
}
}
-
let mut input = input.skip_while(|c| {
HTML_SPACE_CHARACTERS.iter().any(|s| s == c)
}).peekable();