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:
bors-servo 2017-05-24 22:20:37 -05:00 committed by GitHub
commit 8d950bd620

View file

@ -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),