Bug 1400762 - Make dom.webcomponents.enabled pref doesn't control CustomElements feature; draft
authorEdgar Chen <echen@mozilla.com>
Wed, 15 Nov 2017 15:41:14 +0800
changeset 698124 e8001e14da906762bf0bb11cd47196d80ef7066f
parent 698123 cb9b8980f4c7812e35a594ee70f8a8c7eb00ff92
child 699456 41c8e530e2630b316053d1e2d72a58bcca1a092a
push id89219
push userechen@mozilla.com
push dateWed, 15 Nov 2017 10:05:36 +0000
bugs1400762
milestone59.0a1
Bug 1400762 - Make dom.webcomponents.enabled pref doesn't control CustomElements feature; CustomElements feature now is only controlled by dom.webcomponents.customelements.enabled pref. MozReview-Commit-ID: G6hdIAsSeX7
dom/base/CustomElementRegistry.h
dom/base/crashtests/crashtests.list
dom/tests/mochitest/webcomponents/test_bug1276240.html
layout/generic/crashtests/crashtests.list
--- a/dom/base/CustomElementRegistry.h
+++ b/dom/base/CustomElementRegistry.h
@@ -354,18 +354,17 @@ class CustomElementRegistry final : publ
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(CustomElementRegistry)
 
 public:
   static bool IsCustomElementEnabled(JSContext* aCx = nullptr,
                                      JSObject* aObject = nullptr)
   {
-    return nsContentUtils::IsCustomElementsEnabled() ||
-           nsContentUtils::IsWebComponentsEnabled();
+    return nsContentUtils::IsCustomElementsEnabled();
   }
 
   explicit CustomElementRegistry(nsPIDOMWindowInner* aWindow);
 
   /**
    * Looking up a custom element definition.
    * https://html.spec.whatwg.org/#look-up-a-custom-element-definition
    */
--- a/dom/base/crashtests/crashtests.list
+++ b/dom/base/crashtests/crashtests.list
@@ -206,17 +206,17 @@ load 1230422.html
 load 1251361.html
 pref(dom.webcomponents.enabled,true) load 1281715.html
 load 1304437.html
 pref(dom.IntersectionObserver.enabled,true) load 1324209.html
 load 1324500.html
 pref(dom.IntersectionObserver.enabled,true) load 1326194-1.html
 pref(dom.IntersectionObserver.enabled,true) load 1326194-2.html
 pref(dom.IntersectionObserver.enabled,true) load 1332939.html
-pref(dom.webcomponents.enabled,true) load 1341693.html
+pref(dom.webcomponents.customelements.enabled,true) load 1341693.html
 load 1352453.html
 pref(dom.IntersectionObserver.enabled,true) load 1353529.xul
 load 1368327.html
 pref(dom.IntersectionObserver.enabled,true) load 1369363.xul
 load 1370072.html
 pref(clipboard.autocopy,true) load 1370737.html
 pref(dom.IntersectionObserver.enabled,true) load 1370968.html
 load 1373750.html
--- a/dom/tests/mochitest/webcomponents/test_bug1276240.html
+++ b/dom/tests/mochitest/webcomponents/test_bug1276240.html
@@ -42,14 +42,14 @@ function runTest() {
 }
 
 // test with webcomponents enabled
 test();
 
 // test with webcomponents disabled
 SimpleTest.waitForExplicitFinish();
 SpecialPowers.pushPrefEnv(
-  { 'set': [["dom.webcomponents.enabled", false]]}, runTest);
+  { 'set': [["dom.webcomponents.customelements.enabled", false]]}, runTest);
 
 </script>
 </pre>
 </body>
 </html>
--- a/layout/generic/crashtests/crashtests.list
+++ b/layout/generic/crashtests/crashtests.list
@@ -581,17 +581,17 @@ asserts(11) asserts-if(stylo&&Android,27
 pref(font.size.inflation.minTwips,200) load 1032450.html
 load 1032613-1.svg
 load 1032613-2.html
 load 1037903.html
 load 1039454-1.html
 load 1042489.html
 load 1054010-1.html
 load 1058954-1.html
-asserts-if(!stylo,0-2) skip-if(stylo) pref(dom.webcomponents.enabled,true) load 1059138-1.html # bug 1389936 for non-stylo, bug 1409136 for stylo.
+asserts-if(!stylo,0-2) skip-if(stylo) pref(dom.webcomponents.enabled,true) pref(dom.webcomponents.customelements.enabled,true) load 1059138-1.html # bug 1389936 for non-stylo, bug 1409136 for stylo.
 load 1134531.html
 load 1134667.html
 load 1137723-1.html
 load 1137723-2.html
 load 1140268-1.html
 load 1145768.html
 load 1145931.html
 load 1146103.html