Skip to content

Commit

Permalink
style: Reject non-positive resolution values in media queries.
Browse files Browse the repository at this point in the history
  • Loading branch information
emilio committed May 23, 2017
1 parent e24d96c commit fa93d82
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions components/style/gecko/media_queries.rs
Expand Up @@ -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),
Expand Down

0 comments on commit fa93d82

Please sign in to comment.