diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2016-10-10 08:11:32 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-10 08:11:32 -0500 |
commit | 960d884fd4dd2ad5dabfb4dd9d52e50f9d5c292c (patch) | |
tree | 59abeceac29dbe45b55d44eccd06670ae2e461ff | |
parent | 37340d0c26dc03500804432c3caef00bbd178733 (diff) | |
parent | 3772b4881b7a057399d0e4d21aac1e75023fb874 (diff) | |
download | servo-960d884fd4dd2ad5dabfb4dd9d52e50f9d5c292c.tar.gz servo-960d884fd4dd2ad5dabfb4dd9d52e50f9d5c292c.zip |
Auto merge of #13673 - Manishearth:no-prefs-geckolib, r=emilio
Don't pref-gate properties in geckolib mode
This led to me wasting a lot of time trying to figure out why my column-count implementation in gecko didn't work.
We might eventually want to hook into the Gecko prefs, but the mechanism would probably be different
r? @emilio
<!-- 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/13673)
<!-- Reviewable:end -->
-rw-r--r-- | components/style/properties/longhand/box.mako.rs | 2 | ||||
-rw-r--r-- | components/style/properties/properties.mako.rs | 4 | ||||
-rw-r--r-- | components/style/stylesheets.rs | 3 |
3 files changed, 5 insertions, 4 deletions
diff --git a/components/style/properties/longhand/box.mako.rs b/components/style/properties/longhand/box.mako.rs index becbe5ee300..896b5fa09ba 100644 --- a/components/style/properties/longhand/box.mako.rs +++ b/components/style/properties/longhand/box.mako.rs @@ -60,7 +60,7 @@ match_ignore_ascii_case! { try!(input.expect_ident()), % for value in values: "${value}" => { - % if value in experimental_values: + % if value in experimental_values and product == "servo": if !::util::prefs::PREFS.get("layout.${value}.enabled") .as_boolean().unwrap_or(false) { return Err(()) diff --git a/components/style/properties/properties.mako.rs b/components/style/properties/properties.mako.rs index 49fa22055df..da734f41270 100644 --- a/components/style/properties/properties.mako.rs +++ b/components/style/properties/properties.mako.rs @@ -767,7 +767,7 @@ impl PropertyDeclaration { return PropertyDeclarationParseResult::UnknownProperty } % endif - % if property.experimental: + % if property.experimental and product == "servo": if !::util::prefs::PREFS.get("${property.experimental}") .as_boolean().unwrap_or(false) { return PropertyDeclarationParseResult::ExperimentalProperty @@ -797,7 +797,7 @@ impl PropertyDeclaration { return PropertyDeclarationParseResult::UnknownProperty } % endif - % if shorthand.experimental: + % if shorthand.experimental and product == "servo": if !::util::prefs::PREFS.get("${shorthand.experimental}") .as_boolean().unwrap_or(false) { return PropertyDeclarationParseResult::ExperimentalProperty diff --git a/components/style/stylesheets.rs b/components/style/stylesheets.rs index 556d6bbc49d..9cd106a2110 100644 --- a/components/style/stylesheets.rs +++ b/components/style/stylesheets.rs @@ -504,7 +504,8 @@ impl<'a, 'b> AtRuleParser for NestedRuleParser<'a, 'b> { Ok(AtRuleType::WithBlock(AtRulePrelude::FontFace)) }, "viewport" => { - if ::util::prefs::PREFS.get("layout.viewport.enabled").as_boolean().unwrap_or(false) { + if ::util::prefs::PREFS.get("layout.viewport.enabled").as_boolean().unwrap_or(false) || + cfg!(feature = "gecko") { Ok(AtRuleType::WithBlock(AtRulePrelude::Viewport)) } else { Err(()) |