mirror of
https://github.com/servo/servo.git
synced 2025-08-04 05:00:08 +01:00
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.
This commit is contained in:
parent
e0e14c60d6
commit
10f1ed5e31
19 changed files with 350 additions and 127 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue