mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
style: Reject non-positive resolution values in media queries.
Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1366961 See: https://github.com/w3c/csswg-drafts/issues/1454
This commit is contained in:
parent
e24d96cdd0
commit
fa93d82041
1 changed files with 4 additions and 0 deletions
|
@ -181,6 +181,10 @@ impl Resolution {
|
|||
_ => return Err(()),
|
||||
};
|
||||
|
||||
if value <= 0. {
|
||||
return Err(())
|
||||
}
|
||||
|
||||
Ok(match_ignore_ascii_case! { &unit,
|
||||
"dpi" => Resolution::Dpi(value),
|
||||
"dppx" => Resolution::Dppx(value),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue