Bug 864005: Remove mentions of & checks for 'layout.css.supports-rule.enabled' pref. r=heycam r=khuey
authorDaniel Holbert <dholbert@cs.stanford.edu>
Wed, 04 Jun 2014 21:07:07 -0700
changeset 207050 8137176a31734f39f120dab27b7ddad578c8deab
parent 207049 8406a2b981c58de5a466dbb482a4f4c5ebd70f11
child 207051 e9859d8b5e516ce16f1343a0174a2f2caba2434f
push id494
push userraliiev@mozilla.com
push dateMon, 25 Aug 2014 18:42:16 +0000
treeherdermozilla-release@a3cc3e46b571 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersheycam, khuey
bugs864005
milestone32.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 864005: Remove mentions of & checks for 'layout.css.supports-rule.enabled' pref. r=heycam r=khuey
dom/base/nsDOMClassInfo.cpp
dom/webidl/CSS.webidl
layout/reftests/scoped-style/reftest.list
layout/reftests/w3c-css/import-tests.py
layout/reftests/w3c-css/received/reftest.list
layout/reftests/w3c-css/submitted/conditional3/reftest.list
layout/style/nsCSSParser.cpp
layout/style/nsCSSRules.h
layout/style/test/test_condition_text.html
layout/style/test/test_css_supports.html
layout/style/test/test_css_supports_variables.html
layout/style/test/test_rule_insertion.html
layout/style/test/test_supports_rules.html
modules/libpref/src/init/all.js
--- a/dom/base/nsDOMClassInfo.cpp
+++ b/dom/base/nsDOMClassInfo.cpp
@@ -2610,23 +2610,16 @@ OldBindingConstructorEnabled(const nsGlo
       expose = nsContentUtils::IsSystemPrincipal(aWin->GetPrincipal());
     }
 
     if (!expose) {
       return false;
     }
   }
 
-  // Don't expose CSSSupportsRule unless @supports processing is enabled.
-  if (aStruct->mDOMClassInfoID == eDOMClassInfo_CSSSupportsRule_id) {
-    if (!CSSSupportsRule::PrefEnabled()) {
-      return false;
-    }
-  }
-
   // Don't expose CSSFontFeatureValuesRule unless the pref is enabled
   if (aStruct->mDOMClassInfoID == eDOMClassInfo_CSSFontFeatureValuesRule_id) {
     return nsCSSFontFeatureValuesRule::PrefEnabled();
   }
 
   return true;
 }
 
--- a/dom/webidl/CSS.webidl
+++ b/dom/webidl/CSS.webidl
@@ -5,22 +5,21 @@
  *
  * The origin of this IDL file is
  * http://dev.w3.org/csswg/css3-conditional/
  *
  * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  * liability, trademark and document use rules apply.
  */
 
-[Pref="layout.css.supports-rule.enabled"]
 interface CSS {
-  [Throws, Pref="layout.css.supports-rule.enabled"]
+  [Throws]
   static boolean supports(DOMString property, DOMString value);
 
-  [Throws, Pref="layout.css.supports-rule.enabled"]
+  [Throws]
   static boolean supports(DOMString conditionText);
 };
 
 // http://dev.w3.org/csswg/cssom/#the-css.escape%28%29-method
 partial interface CSS {
   [Throws]
   static DOMString escape(DOMString ident);
 };
--- a/layout/reftests/scoped-style/reftest.list
+++ b/layout/reftests/scoped-style/reftest.list
@@ -46,12 +46,12 @@
 == scoped-style-dynamic-015.svg scoped-style-dynamic-015-ref.svg
 == scoped-style-import.html scoped-style-import-ref.html
 == scoped-style-media.html scoped-style-media-ref.html
 == scoped-style-namespace.html scoped-style-namespace-ref.html
 == scoped-style-charset.html scoped-style-charset-ref.html
 == scoped-style-document.html scoped-style-document-ref.html
 HTTP(..) == scoped-style-font-face.html scoped-style-font-face-ref.html
 == scoped-style-keyframes.html scoped-style-keyframes-ref.html
-pref(layout.css.supports-rule.enabled,true) == scoped-style-supports.html scoped-style-supports-ref.html
+== scoped-style-supports.html scoped-style-supports-ref.html
 pref(layout.css.scope-pseudo.enabled,true) == scoped-style-pseudo-001.html scoped-style-pseudo-001-ref.html
 pref(layout.css.scope-pseudo.enabled,true) == scoped-style-pseudo-002.html scoped-style-pseudo-002-ref.html
 pref(layout.css.scope-pseudo.enabled,true) == scoped-style-pseudo-003.html scoped-style-pseudo-003-ref.html
--- a/layout/reftests/w3c-css/import-tests.py
+++ b/layout/reftests/w3c-css/import-tests.py
@@ -43,18 +43,23 @@ gPrefixedProperties = [
     "column-rule-color",
     "column-rule-style",
     "column-rule-width",
     "columns",
     "column-span",
     "column-width"
 ]
 
+# Map of about:config prefs that need toggling, for a given test subdirectory.
+# Entries should look like:
+#  "$SUBDIR_NAME": "pref($PREF_NAME, $PREF_VALUE)"
+#
+# For example, when "@supports" was behind a pref, gDefaultPreferences had:
+#  "css3-conditional": "pref(layout.css.supports-rule.enabled,true)"
 gDefaultPreferences = {
-    "css3-conditional": "pref(layout.css.supports-rule.enabled,true)"
 }
 
 gLog = None
 gFailList = {}
 gDestPath = None
 gSrcPath = None
 support_dirs_mapped = set()
 filemap = {}
--- a/layout/reftests/w3c-css/received/reftest.list
+++ b/layout/reftests/w3c-css/received/reftest.list
@@ -18,19 +18,16 @@
 == css3-namespace/syntax-008.xml css3-namespace/ref-lime-2.xml
 == css3-namespace/syntax-009.xml css3-namespace/ref-lime-1.xml
 == css3-namespace/syntax-010.xml css3-namespace/ref-lime-3.xml
 == css3-namespace/syntax-011.xml css3-namespace/ref-lime-6.xml
 == css3-namespace/syntax-012.xml css3-namespace/ref-lime-3.xml
 == css3-namespace/syntax-013.xml css3-namespace/ref-lime-5.xml
 == css3-namespace/syntax-014.xml css3-namespace/ref-lime-3.xml
 == css3-namespace/syntax-015.xml css3-namespace/ref-lime-1.xml
-
-default-preferences pref(layout.css.supports-rule.enabled,true)
-
 == css3-conditional/at-supports-001.html css3-conditional/at-supports-001-ref.html
 == css3-conditional/at-supports-002.html css3-conditional/at-supports-001-ref.html
 == css3-conditional/at-supports-003.html css3-conditional/at-supports-001-ref.html
 == css3-conditional/at-supports-004.html css3-conditional/at-supports-001-ref.html
 == css3-conditional/at-supports-005.html css3-conditional/at-supports-001-ref.html
 == css3-conditional/at-supports-006.html css3-conditional/at-supports-001-ref.html
 == css3-conditional/at-supports-007.html css3-conditional/at-supports-001-ref.html
 == css3-conditional/at-supports-008.html css3-conditional/at-supports-001-ref.html
--- a/layout/reftests/w3c-css/submitted/conditional3/reftest.list
+++ b/layout/reftests/w3c-css/submitted/conditional3/reftest.list
@@ -1,10 +1,8 @@
-default-preferences pref(layout.css.supports-rule.enabled,true)
-
 == css-supports-001.xht support/pass.xht
 == css-supports-002.xht support/pass.xht
 == css-supports-003.xht support/pass.xht
 == css-supports-004.xht support/pass.xht
 == css-supports-005.xht support/pass.xht
 == css-supports-006.xht support/pass.xht
 == css-supports-007.xht support/pass.xht
 == css-supports-008.xht support/pass.xht
--- a/layout/style/nsCSSParser.cpp
+++ b/layout/style/nsCSSParser.cpp
@@ -2562,18 +2562,17 @@ CSSParserImpl::ParseAtRule(RuleAppendFun
     newSection = eCSSSection_General;
 
   } else if ((nsCSSProps::IsEnabled(eCSSPropertyAlias_MozAnimation) &&
               mToken.mIdent.LowerCaseEqualsLiteral("-moz-keyframes")) ||
              mToken.mIdent.LowerCaseEqualsLiteral("keyframes")) {
     parseFunc = &CSSParserImpl::ParseKeyframesRule;
     newSection = eCSSSection_General;
 
-  } else if (mToken.mIdent.LowerCaseEqualsLiteral("supports") &&
-             CSSSupportsRule::PrefEnabled()) {
+  } else if (mToken.mIdent.LowerCaseEqualsLiteral("supports")) {
     parseFunc = &CSSParserImpl::ParseSupportsRule;
     newSection = eCSSSection_General;
 
   } else {
     if (!NonMozillaVendorIdentifier(mToken.mIdent)) {
       REPORT_UNEXPECTED_TOKEN(PEUnknownAtRule);
       OUTPUT_ERROR();
     }
--- a/layout/style/nsCSSRules.h
+++ b/layout/style/nsCSSRules.h
@@ -9,17 +9,16 @@
 #ifndef nsCSSRules_h_
 #define nsCSSRules_h_
 
 #include "mozilla/Attributes.h"
 #include "mozilla/Move.h"
 
 #include "mozilla/MemoryReporting.h"
 #include "mozilla/css/GroupRule.h"
-#include "mozilla/Preferences.h"
 #include "nsIDOMCSSConditionRule.h"
 #include "nsIDOMCSSFontFaceRule.h"
 #include "nsIDOMCSSFontFeatureValuesRule.h"
 #include "nsIDOMCSSGroupingRule.h"
 #include "nsIDOMCSSMediaRule.h"
 #include "nsIDOMCSSMozDocumentRule.h"
 #include "nsIDOMCSSSupportsRule.h"
 #include "nsIDOMMozCSSKeyframeRule.h"
@@ -630,21 +629,16 @@ public:
   // nsIDOMCSSConditionRule interface
   NS_DECL_NSIDOMCSSCONDITIONRULE
 
   // nsIDOMCSSSupportsRule interface
   NS_DECL_NSIDOMCSSSUPPORTSRULE
 
   virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const;
 
-  static bool PrefEnabled()
-  {
-    return Preferences::GetBool("layout.css.supports-rule.enabled");
-  }
-
 protected:
   bool mUseGroup;
   nsString mCondition;
 };
 
 } // namespace mozilla
 
 #endif /* !defined(nsCSSRules_h_) */
--- a/layout/style/test/test_condition_text.html
+++ b/layout/style/test/test_condition_text.html
@@ -81,13 +81,13 @@ function runTest()
       is(rule.conditionText, rule.media.mediaText, "rule " + i + " conditionText matches media.mediaText");
     }
   }
 
   SimpleTest.finish();
 }
 
 SimpleTest.waitForExplicitFinish();
-SpecialPowers.pushPrefEnv({ "set": [["layout.css.supports-rule.enabled", true]] }, runTest);
+runTest();
 </script>
 </pre>
 </body>
 </html>
--- a/layout/style/test/test_css_supports.html
+++ b/layout/style/test/test_css_supports.html
@@ -122,13 +122,13 @@ function runTest()
   failingDeclarations.forEach(function(aDeclaration) {
     is(CSS.supports(aDeclaration[0], aDeclaration[1]), false, "CSS.supports returns false for unsupported declaration \"" + aDeclaration.join(":") + "\"");
   });
 
   SimpleTest.finish();
 }
 
 SimpleTest.waitForExplicitFinish();
-SpecialPowers.pushPrefEnv({ "set": [["layout.css.supports-rule.enabled", true]] }, runTest);
+runTest();
 </script>
 </pre>
 </body>
 </html>
--- a/layout/style/test/test_css_supports_variables.html
+++ b/layout/style/test/test_css_supports_variables.html
@@ -235,14 +235,13 @@ function runTest()
   failingDeclarations.forEach(function(aDeclaration) {
     is(CSS.supports(aDeclaration[0], aDeclaration[1]), false, "CSS.supports returns false for unsupported declaration \"" + aDeclaration.join(":") + "\"");
   });
 
   SimpleTest.finish();
 }
 
 SimpleTest.waitForExplicitFinish();
-SpecialPowers.pushPrefEnv({ "set": [["layout.css.supports-rule.enabled", true],
-                                    ["layout.css.variables.enabled", true]] }, runTest);
+SpecialPowers.pushPrefEnv({ "set": [["layout.css.variables.enabled", true]] }, runTest);
 </script>
 </pre>
 </body>
 </html>
--- a/layout/style/test/test_rule_insertion.html
+++ b/layout/style/test/test_rule_insertion.html
@@ -202,13 +202,12 @@ function runTest()
       }
     }
   }
 
   SimpleTest.finish();
 }
 
 SimpleTest.waitForExplicitFinish();
-SpecialPowers.pushPrefEnv({ "set": [["layout.css.supports-rule.enabled", true]] }, runTest);
-
+runTest();
 </script>
 </body>
 </html>
--- a/layout/style/test/test_supports_rules.html
+++ b/layout/style/test/test_supports_rules.html
@@ -76,13 +76,13 @@ function runTest() {
   check_balanced_condition("(color: green) or(color: blue)", false);
   check_balanced_condition("(color: green) or/* */(color: blue)", false);
   check_balanced_condition("(color: green)or (color: blue)", false);
 
   SimpleTest.finish();
 }
 
 SimpleTest.waitForExplicitFinish();
-SpecialPowers.pushPrefEnv({ "set": [["layout.css.supports-rule.enabled", true]] }, runTest);
+runTest();
 </script>
 </pre>
 </body>
 </html>
--- a/modules/libpref/src/init/all.js
+++ b/modules/libpref/src/init/all.js
@@ -1826,19 +1826,16 @@ pref("layout.css.devPixelsPerPx", "-1.0"
 pref("layout.css.masking.enabled", false);
 #else
 pref("layout.css.masking.enabled", true);
 #endif
 
 // Is support for mix-blend-mode enabled?
 pref("layout.css.mix-blend-mode.enabled", true);
 
-// Is support for the the @supports rule enabled?
-pref("layout.css.supports-rule.enabled", true);
-
 // Is support for CSS Filters enabled?
 pref("layout.css.filters.enabled", false);
 
 // Is support for CSS sticky positioning enabled?
 pref("layout.css.sticky.enabled", true);
 
 // Is support for CSS "will-change" enabled?
 pref("layout.css.will-change.enabled", false);