mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Invalid three value positions are no longer accepted
This commit is contained in:
parent
082fbe9e15
commit
ddc189c820
3 changed files with 8 additions and 6 deletions
|
@ -187,13 +187,11 @@ impl Parse for Position {
|
|||
} else {
|
||||
// Handle 3 value background position there are several options:
|
||||
if let PositionCategory::LengthOrPercentage = category(&first) {
|
||||
// "length keyword length"
|
||||
Position::new(Some(first), Some(third), None, Some(second))
|
||||
Err(())
|
||||
} else {
|
||||
if let PositionCategory::LengthOrPercentage = category(&second) {
|
||||
if let PositionCategory::LengthOrPercentage = category(&third) {
|
||||
// "keyword length length"
|
||||
Position::new(Some(second), Some(third), Some(first), None)
|
||||
Err(())
|
||||
} else {
|
||||
// "keyword length keyword"
|
||||
Position::new(Some(second), None, Some(first), Some(third))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue