mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Format style component.
This commit is contained in:
parent
31fc6cd565
commit
8dab4d659a
120 changed files with 2207 additions and 1417 deletions
|
@ -158,15 +158,15 @@ pub fn parse_double(string: &str) -> Result<f64, ()> {
|
|||
|
||||
impl AttrValue {
|
||||
pub fn from_serialized_tokenlist(tokens: String) -> AttrValue {
|
||||
let atoms = split_html_space_chars(&tokens).map(Atom::from).fold(
|
||||
vec![],
|
||||
|mut acc, atom| {
|
||||
if !acc.contains(&atom) {
|
||||
acc.push(atom)
|
||||
}
|
||||
acc
|
||||
},
|
||||
);
|
||||
let atoms =
|
||||
split_html_space_chars(&tokens)
|
||||
.map(Atom::from)
|
||||
.fold(vec![], |mut acc, atom| {
|
||||
if !acc.contains(&atom) {
|
||||
acc.push(atom)
|
||||
}
|
||||
acc
|
||||
});
|
||||
AttrValue::TokenList(tokens, atoms)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue