mirror of
https://github.com/servo/servo.git
synced 2025-08-04 05:00:08 +01:00
style: Make Contain::parse simpler
This commit is contained in:
parent
7a9f99eda8
commit
aa1b9a25f6
1 changed files with 2 additions and 12 deletions
|
@ -553,18 +553,8 @@ impl Parse for Contain {
|
||||||
"layout" => Some(Contain::LAYOUT),
|
"layout" => Some(Contain::LAYOUT),
|
||||||
"style" => Some(Contain::STYLE),
|
"style" => Some(Contain::STYLE),
|
||||||
"paint" => Some(Contain::PAINT),
|
"paint" => Some(Contain::PAINT),
|
||||||
"strict" => {
|
"strict" if result.is_empty() => return Ok(Contain::STRICT | Contain::STRICT_BITS),
|
||||||
if result.is_empty() {
|
"none" if result.is_empty() => return Ok(result),
|
||||||
return Ok(Contain::STRICT | Contain::STRICT_BITS)
|
|
||||||
}
|
|
||||||
None
|
|
||||||
},
|
|
||||||
"none" => {
|
|
||||||
if result.is_empty() {
|
|
||||||
return Ok(result)
|
|
||||||
}
|
|
||||||
None
|
|
||||||
},
|
|
||||||
_ => None
|
_ => None
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue