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(())