Skip to content

Commit

Permalink
Handle device-pixel-ratio-webkit pref correctly.
Browse files Browse the repository at this point in the history
  • Loading branch information
upsuper committed Jul 31, 2017
1 parent d34d662 commit a59fcee
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions components/style/gecko/media_queries.rs
Expand Up @@ -490,10 +490,13 @@ impl Expression {
let result = {
let mut feature_name = &**ident;

// TODO(emilio): this is under a pref in Gecko.
if starts_with_ignore_ascii_case(feature_name, "-webkit-") {
if unsafe { structs::StylePrefs_sWebkitPrefixedAliasesEnabled } &&
starts_with_ignore_ascii_case(feature_name, "-webkit-") {
feature_name = &feature_name[8..];
flags |= nsMediaFeature_RequirementFlags::eHasWebkitPrefix as u8;
if unsafe { structs::StylePrefs_sWebkitDevicePixelRatioEnabled } {
flags |= nsMediaFeature_RequirementFlags::eWebkitDevicePixelRatioPrefEnabled as u8;
}
}

let range = if starts_with_ignore_ascii_case(feature_name, "min-") {
Expand Down

0 comments on commit a59fcee

Please sign in to comment.