mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Auto merge of #17006 - emilio:negative-resolution, r=upsuper
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 <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17006) <!-- Reviewable:end -->
This commit is contained in:
commit
8d950bd620
1 changed files with 4 additions and 0 deletions
|
@ -185,6 +185,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