Bug 1428685 - Use dom.webcomponents.shadowdom.enabled pref for Shadow DOM. r=smaug
authorJessica Jong <jjong@mozilla.com>
Tue, 16 Jan 2018 17:42:00 +0800
changeset 399466 bdd0bea249e3ded6e7e9a263ee002205ec30abf9
parent 399465 f9fe9a19adc4b7ee199afe5f755ed3dcf6a46a88
child 399467 e2dd58774f0c37aa843f303a9ede97b9537a357e
push id33266
push usercsabou@mozilla.com
push dateWed, 17 Jan 2018 09:45:23 +0000
treeherdermozilla-central@5a130721f8ea [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1428685
milestone59.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 1428685 - Use dom.webcomponents.shadowdom.enabled pref for Shadow DOM. r=smaug Most of the Shadow DOM related code are behind "dom.webcomponents.enabled" and this pref is only used by Shadow DOM right now, so we should rename it to "dom.webcomponents.shadowdom.enabled" MozReview-Commit-ID: er1c7AsSSW
accessible/tests/mochitest/elm/test_shadowroot.html
accessible/tests/mochitest/hittest/test_shadowroot.html
accessible/tests/mochitest/treeupdate/test_bug1276857.html
devtools/client/inspector/markup/test/browser_markup_anonymous_03.js
devtools/client/inspector/markup/test/head.js
devtools/client/webide/content/runtimedetails.js
devtools/server/tests/mochitest/test_inspector-anonymous.html
dom/base/ChildIterator.cpp
dom/base/DocumentOrShadowRoot.cpp
dom/base/crashtests/1324463.html
dom/base/crashtests/1422931.html
dom/base/crashtests/crashtests.list
dom/base/nsContentUtils.cpp
dom/base/nsContentUtils.h
dom/base/nsDocument.cpp
dom/base/nsDocument.h
dom/base/nsIDocument.h
dom/base/nsTextNode.cpp
dom/base/nsTextNode.h
dom/base/test/test_bug1025933.html
dom/base/test/test_bug1037687.html
dom/events/test/test_bug1079236.html
dom/events/test/test_bug1145910.html
dom/events/test/test_bug1150308.html
dom/events/test/test_bug1264380.html
dom/html/HTMLSlotElement.cpp
dom/ipc/ContentPrefs.cpp
dom/tests/mochitest/webcomponents/head.js
dom/tests/mochitest/webcomponents/test_bug1269155.html
dom/tests/mochitest/webcomponents/test_custom_element_in_shadow.html
dom/tests/mochitest/webcomponents/test_detached_style.html
dom/tests/mochitest/webcomponents/test_document_adoptnode.html
dom/tests/mochitest/webcomponents/test_document_importnode.html
dom/tests/mochitest/webcomponents/test_event_retarget.html
dom/tests/mochitest/webcomponents/test_event_stopping.html
dom/tests/mochitest/webcomponents/test_shadowroot.html
dom/tests/mochitest/webcomponents/test_shadowroot_clonenode.html
dom/tests/mochitest/webcomponents/test_shadowroot_inert_element.html
dom/tests/mochitest/webcomponents/test_shadowroot_style.html
dom/tests/mochitest/webcomponents/test_shadowroot_style_order.html
dom/tests/mochitest/webcomponents/test_style_fallback_content.html
dom/webidl/Element.webidl
dom/webidl/HTMLSlotElement.webidl
dom/webidl/ShadowRoot.webidl
dom/webidl/Text.webidl
layout/base/crashtests/crashtests.list
layout/generic/crashtests/crashtests.list
layout/reftests/bugs/reftest.list
layout/reftests/css-display/reftest.list
layout/reftests/forms/legend/reftest.list
layout/reftests/mathml/reftest.list
layout/reftests/webcomponents/reftest.list
layout/style/crashtests/crashtests.list
modules/libpref/init/all.js
testing/marionette/harness/marionette_harness/tests/unit/test_shadow_dom.py
testing/profiles/prefs_general.js
testing/web-platform/meta/content-security-policy/securitypolicyviolation/targeting.html.ini
testing/web-platform/meta/css/css-backgrounds/background-size-027.html.ini
testing/web-platform/meta/css/css-scoping-1/__dir__.ini
testing/web-platform/meta/css/css-scoping/__dir__.ini
testing/web-platform/meta/css/cssom-view/elementsFromPoint-shadowroot.html.ini
testing/web-platform/meta/css/cssom-view/scrollIntoView-shadow.html.ini
testing/web-platform/meta/css/selectors/__dir__.ini
testing/web-platform/meta/css/selectors4/__dir__.ini
testing/web-platform/meta/custom-elements/adopted-callback.html.ini
testing/web-platform/meta/custom-elements/connected-callbacks.html.ini
testing/web-platform/meta/custom-elements/disconnected-callbacks.html.ini
testing/web-platform/meta/custom-elements/reactions/Element.html.ini
testing/web-platform/meta/custom-elements/reactions/ShadowRoot.html.ini
testing/web-platform/meta/dom/interfaces.html.ini
testing/web-platform/meta/html/dom/interfaces.html.ini
testing/web-platform/meta/html/dom/reflection-misc.html.ini
testing/web-platform/meta/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/not-in-shadow-tree.html.ini
testing/web-platform/meta/html/semantics/forms/the-form-element/form-elements-filter.html.ini
testing/web-platform/meta/html/semantics/forms/the-label-element/label-attributes.html.ini
testing/web-platform/meta/html/semantics/interfaces.html.ini
testing/web-platform/meta/intersection-observer/shadow-content.html.ini
testing/web-platform/meta/payment-request/interfaces.https.html.ini
testing/web-platform/meta/shadow-dom/__dir__.ini
testing/web-platform/meta/touch-events/touch-retargeting.html.ini
--- a/accessible/tests/mochitest/elm/test_shadowroot.html
+++ b/accessible/tests/mochitest/elm/test_shadowroot.html
@@ -20,17 +20,17 @@
   <div id="content" style="display: none"></div>
   <pre id="test">
   </pre>
 
   <script>
     SimpleTest.waitForExplicitFinish();
     SpecialPowers.pushPrefEnv({
       set: [
-        ["dom.webcomponents.enabled", true]
+        ["dom.webcomponents.shadowdom.enabled", true]
       ]
     }, function() {
       // This test loads in an iframe, to ensure that the element instance is
       // loaded with the correct value of the preference.
       var iframe = document.createElement("iframe");
       iframe.src = "test_shadowroot_subframe.html";
       document.body.appendChild(iframe);
     });
--- a/accessible/tests/mochitest/hittest/test_shadowroot.html
+++ b/accessible/tests/mochitest/hittest/test_shadowroot.html
@@ -20,17 +20,17 @@
   <div id="content" style="display: none"></div>
   <pre id="test">
   </pre>
 
   <script>
     SimpleTest.waitForExplicitFinish();
     SpecialPowers.pushPrefEnv({
       set: [
-        ["dom.webcomponents.enabled", true]
+        ["dom.webcomponents.shadowdom.enabled", true]
       ]
     }, function() {
       // This test loads in an iframe, to ensure that the element instance is
       // loaded with the correct value of the preference.
       var iframe = document.createElement("iframe");
       iframe.src = "test_shadowroot_subframe.html";
       document.body.appendChild(iframe);
     });
--- a/accessible/tests/mochitest/treeupdate/test_bug1276857.html
+++ b/accessible/tests/mochitest/treeupdate/test_bug1276857.html
@@ -107,17 +107,17 @@
       gQueue.push(new runTest());
       gQueue.push(new runShadowTest());
       gQueue.invoke(); // will call SimpleTest.finish();
     }
 
     SimpleTest.waitForExplicitFinish();
     SpecialPowers.pushPrefEnv({
       set: [
-        ["dom.webcomponents.enabled", true]
+        ["dom.webcomponents.shadowdom.enabled", true]
       ]
     }, function() {
       // This test loads in an iframe, to ensure that the element instance is
       // loaded with the correct value of the preference.
       let iframe = document.createElement("iframe");
       iframe.id = "iframe";
       iframe.src = "test_bug1276857_subframe.html";
       addA11yLoadEvent(doTest, iframe.contentWindow);
--- a/devtools/client/inspector/markup/test/browser_markup_anonymous_03.js
+++ b/devtools/client/inspector/markup/test/browser_markup_anonymous_03.js
@@ -5,17 +5,17 @@
 "use strict";
 
 // Test shadow DOM content in the markupview.
 // Note that many features are not yet enabled, but basic listing
 // of elements should be working.
 const TEST_URL = URL_ROOT + "doc_markup_anonymous.html";
 
 add_task(function* () {
-  Services.prefs.setBoolPref("dom.webcomponents.enabled", true);
+  Services.prefs.setBoolPref("dom.webcomponents.shadowdom.enabled", true);
 
   let {inspector} = yield openInspectorForURL(TEST_URL);
 
   let shadow = yield getNodeFront("#shadow", inspector.markup);
   let children = yield inspector.walker.children(shadow);
 
   is(shadow.numChildren, 3, "Children of the shadow root are counted");
   is(children.nodes.length, 3, "Children returned from walker");
--- a/devtools/client/inspector/markup/test/head.js
+++ b/devtools/client/inspector/markup/test/head.js
@@ -30,17 +30,17 @@ registerCleanupFunction(() => {
 // Services.prefs.setBoolPref("devtools.dump.emit", true);
 
 // Clear preferences that may be set during the course of tests.
 registerCleanupFunction(() => {
   Services.prefs.clearUserPref("devtools.dump.emit");
   Services.prefs.clearUserPref("devtools.inspector.htmlPanelOpen");
   Services.prefs.clearUserPref("devtools.inspector.sidebarOpen");
   Services.prefs.clearUserPref("devtools.markup.pagesize");
-  Services.prefs.clearUserPref("dom.webcomponents.enabled");
+  Services.prefs.clearUserPref("dom.webcomponents.shadowdom.enabled");
   Services.prefs.clearUserPref("devtools.inspector.showAllAnonymousContent");
 });
 
 /**
  * Some tests may need to import one or more of the test helper scripts.
  * A test helper script is simply a js file that contains common test code that
  * is either not common-enough to be in head.js, or that is located in a
  * separate directory.
--- a/devtools/client/webide/content/runtimedetails.js
+++ b/devtools/client/webide/content/runtimedetails.js
@@ -135,17 +135,17 @@ function EnableCertApps() {
   let device = AppManager.selectedRuntime.device;
   // TODO: Remove `network.disable.ipc.security` once bug 1125916 is fixed.
   device.shell(
     "stop b2g && " +
     "cd /data/b2g/mozilla/*.default/ && " +
     "echo 'user_pref(\"devtools.debugger.forbid-certified-apps\", false);' >> prefs.js && " +
     "echo 'user_pref(\"dom.apps.developer_mode\", true);' >> prefs.js && " +
     "echo 'user_pref(\"network.disable.ipc.security\", true);' >> prefs.js && " +
-    "echo 'user_pref(\"dom.webcomponents.enabled\", true);' >> prefs.js && " +
+    "echo 'user_pref(\"dom.webcomponents.shadowdom.enabled\", true);' >> prefs.js && " +
     "start b2g"
   );
 }
 
 function RootADB() {
   let device = AppManager.selectedRuntime.device;
   device.summonRoot().then(CheckLockState, console.error);
 }
--- a/devtools/server/tests/mochitest/test_inspector-anonymous.html
+++ b/devtools/server/tests/mochitest/test_inspector-anonymous.html
@@ -20,17 +20,17 @@ window.onload = function () {
     require("devtools/server/actors/inspector");
   const nodeFilterConstants =
     require("devtools/shared/dom-node-filter-constants");
   const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
 
   const isStylo = SpecialPowers.DOMWindowUtils.isStyledByServo;
 
   SpecialPowers.pushPrefEnv({"set": [
-    ["dom.webcomponents.enabled", true]
+    ["dom.webcomponents.shadowdom.enabled", true]
   ]});
   SimpleTest.waitForExplicitFinish();
 
   let gWalker = null;
   let gInspectee = null;
 
   addTest(function setup() {
     info("Setting up inspector and walker actors.");
--- a/dom/base/ChildIterator.cpp
+++ b/dom/base/ChildIterator.cpp
@@ -20,17 +20,17 @@ namespace dom {
 ExplicitChildIterator::ExplicitChildIterator(const nsIContent* aParent,
                                              bool aStartAtBeginning)
   : mParent(aParent),
     mChild(nullptr),
     mDefaultChild(nullptr),
     mIsFirst(aStartAtBeginning),
     mIndexInInserted(0)
 {
-  mParentAsSlot = nsDocument::IsWebComponentsEnabled(mParent) ?
+  mParentAsSlot = nsDocument::IsShadowDOMEnabled(mParent) ?
     HTMLSlotElement::FromContent(mParent) : nullptr;
 }
 
 nsIContent*
 ExplicitChildIterator::GetNextChild()
 {
   // If we're already in the inserted-children array, look there first
   if (mIndexInInserted) {
--- a/dom/base/DocumentOrShadowRoot.cpp
+++ b/dom/base/DocumentOrShadowRoot.cpp
@@ -111,17 +111,17 @@ DocumentOrShadowRoot::GetRetargetedFocus
                                            getter_AddRefs(focusedWindow));
     // be safe and make sure the element is from this document
     if (focusedContent && focusedContent->OwnerDoc() == AsNode().OwnerDoc()) {
       if (focusedContent->ChromeOnlyAccess()) {
         focusedContent = focusedContent->FindFirstNonChromeOnlyAccessContent();
       }
 
       if (focusedContent) {
-        if (!nsDocument::IsWebComponentsEnabled(focusedContent)) {
+        if (!nsDocument::IsShadowDOMEnabled(focusedContent)) {
           return focusedContent->AsElement();
         }
 
         if (nsIContent* retarget = Retarget(focusedContent)) {
           return retarget->AsElement();
         }
       }
     }
--- a/dom/base/crashtests/1324463.html
+++ b/dom/base/crashtests/1324463.html
@@ -1,12 +1,12 @@
 <!DOCTYPE html>
 <html>
 <script>
-// requires: user_pref("dom.webcomponents.enabled", true);
+// requires: user_pref("dom.webcomponents.shadowdom.enabled", true);
 addEventListener("DOMContentLoaded", function(){
   let o_0 = document.createElement("span").createShadowRoot();
   let o_1 = document.createElementNS("http://www.mozilla.org/xbl", "binding");
   let o_2 = document.createElementNS("http://www.mozilla.org/xbl", "children");
   let o_3 = document.createTextNode("");
   o_0.appendChild(o_1);
   o_1.appendChild(o_2);
   o_2.appendChild(o_3);
--- a/dom/base/crashtests/1422931.html
+++ b/dom/base/crashtests/1422931.html
@@ -1,6 +1,6 @@
 <!DOCTYPE html>
 <html>
 <body>
-<!-- Testing slot element with "dom.webcomponents.enabled" set to false -->
+<!-- Testing slot element with "dom.webcomponents.shadowdom.enabled" set to false -->
 <slot><div></div></slot>
 </html>
--- a/dom/base/crashtests/crashtests.list
+++ b/dom/base/crashtests/crashtests.list
@@ -189,27 +189,27 @@ load 852381.html
 load 863950.html
 load 864448.html
 load 886213.html
 load 898906.html
 load 930250.html
 load 942979.html
 load 973401.html
 load 978646.html
-pref(dom.webcomponents.enabled,true) load 1024428-1.html
+pref(dom.webcomponents.shadowdom.enabled,true) load 1024428-1.html
 load 1026714.html
-pref(dom.webcomponents.enabled,true) load 1027461-1.html
-pref(dom.webcomponents.enabled,true) load 1029710.html
+pref(dom.webcomponents.shadowdom.enabled,true) load 1027461-1.html
+pref(dom.webcomponents.shadowdom.enabled,true) load 1029710.html
 load 1154598.xhtml
 load 1157995.html
 load 1158412.html
 load 1181619.html
 load 1230422.html
 load 1251361.html
-pref(dom.webcomponents.enabled,true) load 1281715.html
+pref(dom.webcomponents.shadowdom.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.customelements.enabled,true) load 1341693.html
 load 1352453.html
@@ -228,15 +228,15 @@ load 1383478.html
 load 1383780.html
 pref(clipboard.autocopy,true) load 1385272-1.html
 load 1393806.html
 load 1396466.html
 load 1400701.html
 load 1403377.html
 load 1405771.html
 load 1406109-1.html
-pref(dom.webcomponents.enabled,true) load 1324463.html
+pref(dom.webcomponents.shadowdom.enabled,true) load 1324463.html
 pref(dom.webcomponents.customelements.enabled,true) load 1413815.html
 load 1411473.html
-pref(dom.webcomponents.enabled,false) load 1422931.html
-pref(dom.webcomponents.enabled,true) load 1419799.html
+pref(dom.webcomponents.shadowdom.enabled,false) load 1422931.html
+pref(dom.webcomponents.shadowdom.enabled,true) load 1419799.html
 skip-if(!browserIsRemote) pref(dom.webcomponents.customelements.enabled,true) pref(dom.disable_open_during_load,false) load 1419902.html # skip on non e10s loads, Bug 1419902
-pref(dom.webcomponents.enabled,true) load 1428053.html
+pref(dom.webcomponents.shadowdom.enabled,true) load 1428053.html
--- a/dom/base/nsContentUtils.cpp
+++ b/dom/base/nsContentUtils.cpp
@@ -288,17 +288,17 @@ bool nsContentUtils::sIsFullScreenApiEna
 bool nsContentUtils::sIsUnprefixedFullscreenApiEnabled = false;
 bool nsContentUtils::sTrustedFullScreenOnly = true;
 bool nsContentUtils::sIsCutCopyAllowed = true;
 bool nsContentUtils::sIsFrameTimingPrefEnabled = false;
 bool nsContentUtils::sIsPerformanceTimingEnabled = false;
 bool nsContentUtils::sIsResourceTimingEnabled = false;
 bool nsContentUtils::sIsPerformanceNavigationTimingEnabled = false;
 bool nsContentUtils::sIsFormAutofillAutocompleteEnabled = false;
-bool nsContentUtils::sIsWebComponentsEnabled = false;
+bool nsContentUtils::sIsShadowDOMEnabled = false;
 bool nsContentUtils::sIsCustomElementsEnabled = false;
 bool nsContentUtils::sSendPerformanceTimingNotifications = false;
 bool nsContentUtils::sUseActivityCursor = false;
 bool nsContentUtils::sAnimationsAPICoreEnabled = false;
 bool nsContentUtils::sAnimationsAPIElementAnimateEnabled = false;
 bool nsContentUtils::sAnimationsAPIPendingMemberEnabled = false;
 bool nsContentUtils::sGetBoxQuadsEnabled = false;
 bool nsContentUtils::sSkipCursorMoveForSameValueSet = false;
@@ -648,18 +648,18 @@ nsContentUtils::Init()
                                "dom.enable_performance_navigation_timing", true);
 
   Preferences::AddBoolVarCache(&sIsFrameTimingPrefEnabled,
                                "dom.enable_frame_timing", false);
 
   Preferences::AddBoolVarCache(&sIsFormAutofillAutocompleteEnabled,
                                "dom.forms.autocomplete.formautofill", false);
 
-  Preferences::AddBoolVarCache(&sIsWebComponentsEnabled,
-                               "dom.webcomponents.enabled", false);
+  Preferences::AddBoolVarCache(&sIsShadowDOMEnabled,
+                               "dom.webcomponents.shadowdom.enabled", false);
 
   Preferences::AddBoolVarCache(&sIsCustomElementsEnabled,
                                "dom.webcomponents.customelements.enabled", false);
 
   Preferences::AddIntVarCache(&sPrivacyMaxInnerWidth,
                               "privacy.window.maxInnerWidth",
                               1000);
 
--- a/dom/base/nsContentUtils.h
+++ b/dom/base/nsContentUtils.h
@@ -3088,17 +3088,17 @@ public:
                                         uint64_t* aRequestContextID);
 
   static nsresult
   CreateJSValueFromSequenceOfObject(JSContext* aCx,
                                     const mozilla::dom::Sequence<JSObject*>& aTransfer,
                                     JS::MutableHandle<JS::Value> aValue);
 
   static bool
-  IsWebComponentsEnabled() { return sIsWebComponentsEnabled; }
+  IsShadowDOMEnabled() { return sIsShadowDOMEnabled; }
 
   /**
    * Returns true if reserved key events should be prevented from being sent
    * to their target. Instead, the key event should be handled by chrome only.
    */
   static bool ShouldBlockReservedKeys(mozilla::WidgetKeyboardEvent* aKeyEvent);
 
   /**
@@ -3390,17 +3390,17 @@ private:
   static bool sTrustedFullScreenOnly;
   static bool sIsCutCopyAllowed;
   static uint32_t sHandlingInputTimeout;
   static bool sIsPerformanceTimingEnabled;
   static bool sIsResourceTimingEnabled;
   static bool sIsPerformanceNavigationTimingEnabled;
   static bool sIsFrameTimingPrefEnabled;
   static bool sIsFormAutofillAutocompleteEnabled;
-  static bool sIsWebComponentsEnabled;
+  static bool sIsShadowDOMEnabled;
   static bool sIsCustomElementsEnabled;
   static bool sSendPerformanceTimingNotifications;
   static bool sUseActivityCursor;
   static bool sAnimationsAPICoreEnabled;
   static bool sAnimationsAPIElementAnimateEnabled;
   static bool sAnimationsAPIPendingMemberEnabled;
   static bool sGetBoxQuadsEnabled;
   static bool sSkipCursorMoveForSameValueSet;
--- a/dom/base/nsDocument.cpp
+++ b/dom/base/nsDocument.cpp
@@ -1521,17 +1521,17 @@ nsIDocument::nsIDocument()
 {
   SetIsInDocument();
   for (auto& cnt : mIncCounters) {
     cnt = 0;
   }
 
   // Set this when document is created and value stays the same for the lifetime
   // of the document.
-  mIsWebComponentsEnabled = nsContentUtils::IsWebComponentsEnabled();
+  mIsShadowDOMEnabled = nsContentUtils::IsShadowDOMEnabled();
 }
 
 nsDocument::nsDocument(const char* aContentType)
   : nsIDocument()
   , mSubDocuments(nullptr)
   , mFlashClassification(FlashClassification::Unclassified)
   , mHeaderData(nullptr)
   , mIsGoingAway(false)
@@ -2663,37 +2663,37 @@ nsDocument::IsSynthesized() {
   if (internalChan) {
     DebugOnly<nsresult> rv = internalChan->GetResponseSynthesized(&synthesized);
     MOZ_ASSERT(NS_SUCCEEDED(rv), "GetResponseSynthesized shouldn't fail.");
   }
   return synthesized;
 }
 
 bool
-nsDocument::IsWebComponentsEnabled(JSContext* aCx, JSObject* aObject)
+nsDocument::IsShadowDOMEnabled(JSContext* aCx, JSObject* aObject)
 {
   JS::Rooted<JSObject*> obj(aCx, aObject);
 
   JSAutoCompartment ac(aCx, obj);
   JS::Rooted<JSObject*> global(aCx, JS_GetGlobalForObject(aCx, obj));
   nsCOMPtr<nsPIDOMWindowInner> window =
     do_QueryInterface(nsJSUtils::GetStaticScriptGlobal(global));
 
   nsIDocument* doc = window ? window->GetExtantDoc() : nullptr;
   if (!doc) {
     return false;
   }
 
-  return doc->IsWebComponentsEnabled();
+  return doc->IsShadowDOMEnabled();
 }
 
 bool
-nsDocument::IsWebComponentsEnabled(const nsINode* aNode)
-{
-  return aNode->OwnerDoc()->IsWebComponentsEnabled();
+nsDocument::IsShadowDOMEnabled(const nsINode* aNode)
+{
+  return aNode->OwnerDoc()->IsShadowDOMEnabled();
 }
 
 nsresult
 nsDocument::StartDocumentLoad(const char* aCommand, nsIChannel* aChannel,
                               nsILoadGroup* aLoadGroup,
                               nsISupports* aContainer,
                               nsIStreamListener **aDocListener,
                               bool aReset, nsIContentSink* aSink)
--- a/dom/base/nsDocument.h
+++ b/dom/base/nsDocument.h
@@ -621,21 +621,20 @@ public:
 
   virtual void NotifyLayerManagerRecreated() override;
 
   virtual void ScheduleSVGForPresAttrEvaluation(nsSVGElement* aSVG) override;
   virtual void UnscheduleSVGForPresAttrEvaluation(nsSVGElement* aSVG) override;
   virtual void ResolveScheduledSVGPresAttrs() override;
   bool IsSynthesized();
 
-  // Check whether web components are enabled for the global of aObject.
-  static bool IsWebComponentsEnabled(JSContext* aCx, JSObject* aObject);
-  // Check whether web components are enabled for the document this node belongs
-  // to.
-  static bool IsWebComponentsEnabled(const nsINode* aNode);
+  // Check whether shadow DOM is enabled for the global of aObject.
+  static bool IsShadowDOMEnabled(JSContext* aCx, JSObject* aObject);
+  // Check whether shadow DOM is enabled for the document this node belongs to.
+  static bool IsShadowDOMEnabled(const nsINode* aNode);
 private:
   void AddOnDemandBuiltInUASheet(mozilla::StyleSheet* aSheet);
   void SendToConsole(nsCOMArray<nsISecurityConsoleMessage>& aMessages);
 
 public:
   // nsIDOMNode
   NS_FORWARD_NSIDOMNODE_TO_NSINODE_OVERRIDABLE
 
--- a/dom/base/nsIDocument.h
+++ b/dom/base/nsIDocument.h
@@ -3173,19 +3173,19 @@ public:
   {
     MOZ_ASSERT(mIgnoreOpensDuringUnloadCounter);
     --mIgnoreOpensDuringUnloadCounter;
   }
 
   virtual bool AllowPaymentRequest() const = 0;
   virtual void SetAllowPaymentRequest(bool aAllowPaymentRequest) = 0;
 
-  bool IsWebComponentsEnabled() const
+  bool IsShadowDOMEnabled() const
   {
-    return mIsWebComponentsEnabled;
+    return mIsShadowDOMEnabled;
   }
 
   bool ModuleScriptsEnabled();
 
 protected:
   bool GetUseCounter(mozilla::UseCounter aUseCounter)
   {
     return mUseCounters[aUseCounter];
@@ -3533,18 +3533,19 @@ protected:
   bool mBufferingCSPViolations : 1;
 
   // True if the document is allowed to use PaymentRequest.
   bool mAllowPaymentRequest : 1;
 
   // True if the encoding menu should be disabled.
   bool mEncodingMenuDisabled : 1;
 
-  // True if dom.webcomponents.enabled pref is set when document is created.
-  bool mIsWebComponentsEnabled : 1;
+  // True if dom.webcomponents.shadowdom.enabled pref is set when document is
+  // created.
+  bool mIsShadowDOMEnabled : 1;
 
   // Whether <style scoped> support is enabled in this document.
   enum { eScopedStyle_Unknown, eScopedStyle_Disabled, eScopedStyle_Enabled };
   unsigned int mIsScopedStyleEnabled : 2;
 
   // Compatibility mode
   nsCompatibility mCompatMode;
 
--- a/dom/base/nsTextNode.cpp
+++ b/dom/base/nsTextNode.cpp
@@ -154,19 +154,19 @@ nsTextNode::BindToTree(nsIDocument* aDoc
 void nsTextNode::UnbindFromTree(bool aDeep, bool aNullParent)
 {
   ResetDirectionSetByTextNode(this);
 
   nsGenericDOMDataNode::UnbindFromTree(aDeep, aNullParent);
 }
 
 bool
-nsTextNode::IsWebComponentsEnabled(JSContext* aCx, JSObject* aObject)
+nsTextNode::IsShadowDOMEnabled(JSContext* aCx, JSObject* aObject)
 {
-  return nsDocument::IsWebComponentsEnabled(aCx, aObject);
+  return nsDocument::IsShadowDOMEnabled(aCx, aObject);
 }
 
 #ifdef DEBUG
 void
 nsTextNode::List(FILE* out, int32_t aIndent) const
 {
   int32_t index;
   for (index = aIndent; --index >= 0; ) fputs("  ", out);
--- a/dom/base/nsTextNode.h
+++ b/dom/base/nsTextNode.h
@@ -72,17 +72,17 @@ public:
 
   nsresult AppendTextForNormalize(const char16_t* aBuffer, uint32_t aLength,
                                   bool aNotify, nsIContent* aNextSibling);
 
   virtual nsIDOMNode* AsDOMNode() override { return this; }
 
   // Need to have a copy here because including nsDocument.h in this file will
   // fail to build on Windows.
-  static bool IsWebComponentsEnabled(JSContext* aCx, JSObject* aObject);
+  static bool IsShadowDOMEnabled(JSContext* aCx, JSObject* aObject);
 
 #ifdef DEBUG
   virtual void List(FILE* out, int32_t aIndent) const override;
   virtual void DumpContent(FILE* out, int32_t aIndent, bool aDumpAll) const override;
 #endif
 
 protected:
   virtual ~nsTextNode();
--- a/dom/base/test/test_bug1025933.html
+++ b/dom/base/test/test_bug1025933.html
@@ -12,17 +12,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 
   /** Test for Bug 1025933 **/
 
   SimpleTest.waitForExplicitFinish();
 
   function test() {
     SpecialPowers.pushPrefEnv({
       set: [
-        ["dom.webcomponents.enabled", true]
+        ["dom.webcomponents.shadowdom.enabled", true]
       ]
     }, function() {
       var iframe = document.createElement('iframe');
       iframe.srcdoc = '<div id="content"> <div id="host"></div </div>';
 
       iframe.onload = function() {
         var s = iframe.contentDocument.getElementById("host").attachShadow({mode: 'open'});
         s.innerHTML = '<div style="width:100px;height:100px;background:red"></div>';
--- a/dom/base/test/test_bug1037687.html
+++ b/dom/base/test/test_bug1037687.html
@@ -17,17 +17,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 </div>
 <pre id="test">
 </pre>
 <script type="application/javascript">
   /** Test for Bug 1037687 **/
   SimpleTest.waitForExplicitFinish();
   SpecialPowers.pushPrefEnv({
     set: [
-      ["dom.webcomponents.enabled", true]
+      ["dom.webcomponents.shadowdom.enabled", true]
     ]
   }, function() {
     // This test loads in an iframe, to ensure that the element instance is
     // loaded with the correct value of the preference.
     let iframe = document.createElement("iframe");
     iframe.src = "test_bug1037687_subframe.html";
     document.body.appendChild(iframe);
   });
--- a/dom/events/test/test_bug1079236.html
+++ b/dom/events/test/test_bug1079236.html
@@ -46,17 +46,17 @@ https://bugzilla.mozilla.org/show_bug.cg
     synthesizeMouse(file, r.width / 6, r.height / 2, { type: "mousemove"}, iframe.contentWindow);
     iframe.contentDocument.body.onmousemove = null;
   }
 
   SimpleTest.waitForExplicitFinish();
   SimpleTest.waitForFocus(() => {
     SpecialPowers.pushPrefEnv({
       set: [
-        ["dom.webcomponents.enabled", true]
+        ["dom.webcomponents.shadowdom.enabled", true]
       ]
     }, runTests);
   });
 
   </script>
 </head>
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1079236">Mozilla Bug 1079236</a>
--- a/dom/events/test/test_bug1145910.html
+++ b/dom/events/test/test_bug1145910.html
@@ -43,16 +43,16 @@ function runTests() {
 
   SimpleTest.finish();
 };
 
 SimpleTest.waitForExplicitFinish();
 SimpleTest.waitForFocus(() => {
   SpecialPowers.pushPrefEnv({
     set: [
-      ["dom.webcomponents.enabled", true]
+      ["dom.webcomponents.shadowdom.enabled", true]
     ]
   }, runTests);
 });
 
 </script>
 </body>
 </html>
--- a/dom/events/test/test_bug1150308.html
+++ b/dom/events/test/test_bug1150308.html
@@ -39,15 +39,15 @@ function runTests() {
 
   SimpleTest.finish();
 };
 
 SimpleTest.waitForExplicitFinish();
 SimpleTest.waitForFocus(() => {
   SpecialPowers.pushPrefEnv({
     set: [
-      ["dom.webcomponents.enabled", true]
+      ["dom.webcomponents.shadowdom.enabled", true]
     ]
   }, runTests);
 });
 </script>
 </body>
 </html>
--- a/dom/events/test/test_bug1264380.html
+++ b/dom/events/test/test_bug1264380.html
@@ -47,17 +47,17 @@ function runTests()
   SimpleTest.finish();
 }
 
 
 SimpleTest.waitForExplicitFinish();
 SimpleTest.waitForFocus(() => {
   SpecialPowers.pushPrefEnv({
     set: [
-      ["dom.webcomponents.enabled", true]
+      ["dom.webcomponents.shadowdom.enabled", true]
     ]
   }, runTests);
 });
 
 </script>
 
 <body>
 </body>
--- a/dom/html/HTMLSlotElement.cpp
+++ b/dom/html/HTMLSlotElement.cpp
@@ -12,17 +12,17 @@
 #include "nsGkAtoms.h"
 #include "nsDocument.h"
 
 nsGenericHTMLElement*
 NS_NewHTMLSlotElement(already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo,
                       mozilla::dom::FromParser aFromParser)
 {
   RefPtr<mozilla::dom::NodeInfo> nodeInfo(aNodeInfo);
-  if (nsDocument::IsWebComponentsEnabled(nodeInfo->GetDocument())) {
+  if (nsDocument::IsShadowDOMEnabled(nodeInfo->GetDocument())) {
     already_AddRefed<mozilla::dom::NodeInfo> nodeInfoArg(nodeInfo.forget());
     return new mozilla::dom::HTMLSlotElement(nodeInfoArg);
   }
 
   already_AddRefed<mozilla::dom::NodeInfo> nodeInfoArg(nodeInfo.forget());
   return new mozilla::dom::HTMLUnknownElement(nodeInfoArg);
 }
 
--- a/dom/ipc/ContentPrefs.cpp
+++ b/dom/ipc/ContentPrefs.cpp
@@ -77,17 +77,17 @@ const char* mozilla::dom::ContentPrefs::
   "dom.storage.testing",
   "dom.url.encode_decode_hash",
   "dom.url.getters_decode_hash",
   "dom.use_watchdog",
   "dom.vibrator.enabled",
   "dom.vibrator.max_vibrate_list_len",
   "dom.vibrator.max_vibrate_ms",
   "dom.webcomponents.customelements.enabled",
-  "dom.webcomponents.enabled",
+  "dom.webcomponents.shadowdom.enabled",
   "focusmanager.testmode",
   "font.size.inflation.disabledInMasterProcess",
   "font.size.inflation.emPerLine",
   "font.size.inflation.forceEnabled",
   "font.size.inflation.lineThreshold",
   "font.size.inflation.mappingIntercept",
   "font.size.inflation.maxRatio",
   "font.size.inflation.minTwips",
--- a/dom/tests/mochitest/webcomponents/head.js
+++ b/dom/tests/mochitest/webcomponents/head.js
@@ -1,26 +1,26 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 /**
- * Set dom.webcomponents.enabled pref to true and loads an iframe, to ensure
- * that the Element instance is loaded with the correct value of the
+ * Set dom.webcomponents.shadowdom.enabled pref to true and loads an iframe, to
+ * ensure that the Element instance is loaded with the correct value of the
  * preference.
  *
  * @return {Promise} promise that resolves when iframe is loaded.
  */
-function setWebComponentsPrefAndCreateIframe(aSrcDoc) {
+function setShadowDOMPrefAndCreateIframe(aSrcDoc) {
   return new Promise(function (aResolve, aReject) {
     SpecialPowers.pushPrefEnv({
       set: [
-        ["dom.webcomponents.enabled", true]
+        ["dom.webcomponents.shadowdom.enabled", true]
       ]
     }, () => {
       let iframe = document.createElement("iframe");
       iframe.onload = function () { aResolve(iframe.contentDocument); }
       iframe.onerror = function () { aReject('Failed to load iframe'); }
       if (aSrcDoc) {
         iframe.srcdoc = aSrcDoc;
       }
--- a/dom/tests/mochitest/webcomponents/test_bug1269155.html
+++ b/dom/tests/mochitest/webcomponents/test_bug1269155.html
@@ -17,17 +17,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
 /** Test for Bug 1269155 **/
 SimpleTest.waitForExplicitFinish();
 
 var content = '<div id="content" style="display: none"> </div>';
-setWebComponentsPrefAndCreateIframe(content)
+setShadowDOMPrefAndCreateIframe(content)
   .then((aDocument) => {
     var host = aDocument.querySelector('#content');
     var root = host.attachShadow({mode: "open"});
 
     var header1 = aDocument.createElement('h1');
     header1.textContent = 'Shadow Header1';
 
     var paragraph1 = aDocument.createElement('p');
--- a/dom/tests/mochitest/webcomponents/test_custom_element_in_shadow.html
+++ b/dom/tests/mochitest/webcomponents/test_custom_element_in_shadow.html
@@ -12,17 +12,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1087460">Bug 1087460</a>
 
 <script>
 
 SimpleTest.waitForExplicitFinish();
 
 var content = '<div id="container"></div>';
-setWebComponentsPrefAndCreateIframe(content)
+setShadowDOMPrefAndCreateIframe(content)
   .then((aDocument) => {
 
     // Test callback for custom element when used after registration.
 
     var iframeWin = aDocument.defaultView;
     var connectedCallbackCount = 0;
     var disconnectedCallbackCount = 0;
     var attributeChangedCallbackCount = 0;
--- a/dom/tests/mochitest/webcomponents/test_detached_style.html
+++ b/dom/tests/mochitest/webcomponents/test_detached_style.html
@@ -11,17 +11,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 </head>
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1062578">Bug 1062578</a>
 <script>
 
 SimpleTest.waitForExplicitFinish();
 
 var content = '<div id="grabme"></div>';
-setWebComponentsPrefAndCreateIframe(content)
+setShadowDOMPrefAndCreateIframe(content)
   .then((aDocument) => {
     var host = aDocument.createElement("div");
     var shadow = host.attachShadow({mode: "open"});
     shadow.innerHTML = '<style> #inner { height: 200px; } </style><div id="inner">Hello</div>';
 
     var iframeWin = aDocument.defaultView;
     iframeWin.grabme.appendChild(host);
 
--- a/dom/tests/mochitest/webcomponents/test_document_adoptnode.html
+++ b/dom/tests/mochitest/webcomponents/test_document_adoptnode.html
@@ -15,17 +15,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 <p id="display"></p>
 <div id="content" style="display: none">
 
 </div>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
 SimpleTest.waitForExplicitFinish();
-setWebComponentsPrefAndCreateIframe()
+setShadowDOMPrefAndCreateIframe()
   .then((aDocument) => {
     var thrownException = false;
     var shadowRoot = aDocument.createElement('div').attachShadow({mode: "open"});
 
     try {
       aDocument.adoptNode(shadowRoot);
     } catch(err) {
       thrownException = err;
--- a/dom/tests/mochitest/webcomponents/test_document_importnode.html
+++ b/dom/tests/mochitest/webcomponents/test_document_importnode.html
@@ -15,17 +15,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 <p id="display"></p>
 <div id="content" style="display: none">
 
 </div>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
 SimpleTest.waitForExplicitFinish();
-setWebComponentsPrefAndCreateIframe()
+setShadowDOMPrefAndCreateIframe()
   .then((aDocument) => {
     var thrownException = false;
     var shadowRoot = aDocument.createElement('div').attachShadow({mode: "open"});
 
     try {
       aDocument.importNode(shadowRoot);
     } catch(err) {
       thrownException = err;
--- a/dom/tests/mochitest/webcomponents/test_event_retarget.html
+++ b/dom/tests/mochitest/webcomponents/test_event_retarget.html
@@ -9,17 +9,17 @@ https://bugzilla.mozilla.org/show_bug.cg
   <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
 </head>
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=887541">Bug 887541</a>
 <script>
 
 SimpleTest.waitForExplicitFinish();
-setWebComponentsPrefAndCreateIframe()
+setShadowDOMPrefAndCreateIframe()
   .then((aDocument) => {
     /*
      * Creates an event listener with an expected event target.
      */
     function createEventListener(expectedTarget, msg) {
       return function(e) {
         is(e.target, expectedTarget, msg);
       };
--- a/dom/tests/mochitest/webcomponents/test_event_stopping.html
+++ b/dom/tests/mochitest/webcomponents/test_event_stopping.html
@@ -12,17 +12,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=887541">Bug 887541</a>
 <script>
 
 var els = SpecialPowers.Cc["@mozilla.org/eventlistenerservice;1"]
             .getService(SpecialPowers.Ci.nsIEventListenerService);
 
 SimpleTest.waitForExplicitFinish();
-setWebComponentsPrefAndCreateIframe()
+setShadowDOMPrefAndCreateIframe()
   .then((aDocument) => {
     function eventListener(e) {
       eventChain.push(this);
     }
 
     function isEventChain(actual, expected, msg) {
       is(actual.length, expected.length, msg);
       for (var i = 0; i < expected.length; i++) {
--- a/dom/tests/mochitest/webcomponents/test_shadowroot.html
+++ b/dom/tests/mochitest/webcomponents/test_shadowroot.html
@@ -12,17 +12,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=806506">Bug 806506</a>
 <script>
 
 SimpleTest.waitForExplicitFinish();
 
 var content = '<div id="movedtoshadow" class="testclass"></div>' +
               '<svg id="svgmovedtoshadow"></svg>';
-setWebComponentsPrefAndCreateIframe(content)
+setShadowDOMPrefAndCreateIframe(content)
   .then((aDocument) => {
     // Create ShadowRoot.
     var element = aDocument.createElement("div");
     ok(!element.shadowRoot, "div element should not have a shadow root.");
     var shadow = element.attachShadow({mode: "open"});
     is(element.shadowRoot, shadow, "shadowRoot property should return the same shadow root that was just created.");
 
     // Move an element from the document to the ShadowRoot.
--- a/dom/tests/mochitest/webcomponents/test_shadowroot_clonenode.html
+++ b/dom/tests/mochitest/webcomponents/test_shadowroot_clonenode.html
@@ -17,17 +17,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 <div id="content" style="display: none">
 
 </div>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 
 /** Test for Bug 1429982 **/
 SimpleTest.waitForExplicitFinish();
-setWebComponentsPrefAndCreateIframe()
+setShadowDOMPrefAndCreateIframe()
   .then((aDocument) => {
     var element = aDocument.createElement("div");
     var shadowRoot = element.attachShadow({mode: "open"});
     var thrownException = false;
 
     try {
       shadowRoot.cloneNode();
     } catch(err) {
--- a/dom/tests/mochitest/webcomponents/test_shadowroot_inert_element.html
+++ b/dom/tests/mochitest/webcomponents/test_shadowroot_inert_element.html
@@ -11,17 +11,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 </head>
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=806506">Bug 806506</a>
 <script>
 
 SimpleTest.waitForExplicitFinish();
 
 var content = '<div id="grabme"></div>';
-setWebComponentsPrefAndCreateIframe(content)
+setShadowDOMPrefAndCreateIframe(content)
   .then((aDocument) => {
     function runChecks() {
       isnot(aDocument.defaultView.getComputedStyle(shadowSpan, null).getPropertyValue("padding-top"), "10px", "Link element should be inert.");
       is(aDocument.styleSheets.length, numStyleBeforeLoad, "Document style count should remain the same because the style should not be in the doucment.");
       is(shadow.styleSheets.length, 0, "Inert link should not add style to ShadowRoot.");
       // Remove link to make sure we don't get assertions.
       shadow.removeChild(shadowStyle);
       SimpleTest.finish();
--- a/dom/tests/mochitest/webcomponents/test_shadowroot_style.html
+++ b/dom/tests/mochitest/webcomponents/test_shadowroot_style.html
@@ -16,17 +16,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 if (!SpecialPowers.DOMWindowUtils.isStyledByServo) {
   SimpleTest.expectAssertions(3, 3); // GeckoRestyleManager stuff.
 }
 
 SimpleTest.waitForExplicitFinish();
 
 var content = '<div class="tall" id="bodydiv"></div>' +
               '<div id="container"></div>';
-setWebComponentsPrefAndCreateIframe(content)
+setShadowDOMPrefAndCreateIframe(content)
   .then((aDocument) => {
     var iframeWin = aDocument.defaultView;
 
     // Create ShadowRoot.
     var container = aDocument.getElementById("container");
     var elem = aDocument.createElement("div");
     container.appendChild(elem); // Put ShadowRoot host in document.
     var root = elem.attachShadow({mode: "open"});
--- a/dom/tests/mochitest/webcomponents/test_shadowroot_style_order.html
+++ b/dom/tests/mochitest/webcomponents/test_shadowroot_style_order.html
@@ -11,17 +11,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 </head>
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=806506">Bug 806506</a>
 <script>
 
 SimpleTest.waitForExplicitFinish();
 
 var content = '<div id="container"></div>';
-setWebComponentsPrefAndCreateIframe(content)
+setShadowDOMPrefAndCreateIframe(content)
   .then((aDocument) => {
     var iframeWin = aDocument.defaultView;
 
     // Create ShadowRoot.
     var container = aDocument.getElementById("container");
     var elem = aDocument.createElement("div");
     container.appendChild(elem); // Put ShadowRoot host in document.
     var root = elem.attachShadow({mode: "open"});
--- a/dom/tests/mochitest/webcomponents/test_style_fallback_content.html
+++ b/dom/tests/mochitest/webcomponents/test_style_fallback_content.html
@@ -11,17 +11,17 @@ https://bugzilla.mozilla.org/show_bug.cg
 </head>
 <body>
 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=806506">Bug 806506</a>
 <script>
 
 SimpleTest.waitForExplicitFinish();
 
 var content = '<div id="grabme"></div>';
-setWebComponentsPrefAndCreateIframe(content)
+setShadowDOMPrefAndCreateIframe(content)
   .then((aDocument) => {
     var iframeWin = aDocument.defaultView;
 
     var host = aDocument.getElementById("grabme");
     var shadow = host.attachShadow({mode: "open"});
     shadow.innerHTML = '<style id="innerstyle"></style><span id="container"><slot><span id="innerspan">Hello</span></slot></span>';
     var innerStyle = shadow.getElementById("innerstyle");
 
--- a/dom/webidl/Element.webidl
+++ b/dom/webidl/Element.webidl
@@ -249,27 +249,27 @@ partial interface Element {
 // https://dom.spec.whatwg.org/#dictdef-shadowrootinit
 dictionary ShadowRootInit {
   required ShadowRootMode mode;
 };
 
 // https://dom.spec.whatwg.org/#element
 partial interface Element {
   // Shadow DOM v1
-  [Throws, Func="nsDocument::IsWebComponentsEnabled"]
+  [Throws, Func="nsDocument::IsShadowDOMEnabled"]
   ShadowRoot attachShadow(ShadowRootInit shadowRootInitDict);
-  [BinaryName="shadowRootByMode", Func="nsDocument::IsWebComponentsEnabled"]
+  [BinaryName="shadowRootByMode", Func="nsDocument::IsShadowDOMEnabled"]
   readonly attribute ShadowRoot? shadowRoot;
-  [BinaryName="assignedSlotByMode", Func="nsDocument::IsWebComponentsEnabled"]
+  [BinaryName="assignedSlotByMode", Func="nsDocument::IsShadowDOMEnabled"]
   readonly attribute HTMLSlotElement? assignedSlot;
-  [CEReactions, Unscopable, SetterThrows, Func="nsDocument::IsWebComponentsEnabled"]
+  [CEReactions, Unscopable, SetterThrows, Func="nsDocument::IsShadowDOMEnabled"]
            attribute DOMString slot;
 
   // [deprecated] Shadow DOM v0
-  [Throws, Func="nsDocument::IsWebComponentsEnabled"]
+  [Throws, Func="nsDocument::IsShadowDOMEnabled"]
   ShadowRoot createShadowRoot();
 };
 
 Element implements ChildNode;
 Element implements NonDocumentTypeChildNode;
 Element implements ParentNode;
 Element implements Animatable;
 Element implements GeometryUtils;
--- a/dom/webidl/HTMLSlotElement.webidl
+++ b/dom/webidl/HTMLSlotElement.webidl
@@ -6,17 +6,17 @@
  * The origin of this IDL file is
  * https://html.spec.whatwg.org/multipage/forms.html#the-dialog-element
  *
  * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  * Opera Software ASA. You are granted a license to use, reproduce
  * and create derivative works of this document.
  */
 
-[Func="nsDocument::IsWebComponentsEnabled", Exposed=Window, HTMLConstructor]
+[Func="nsDocument::IsShadowDOMEnabled", Exposed=Window, HTMLConstructor]
 interface HTMLSlotElement : HTMLElement {
   [CEReactions, SetterThrows] attribute DOMString name;
   sequence<Node> assignedNodes(optional AssignedNodesOptions options);
 };
 
 dictionary AssignedNodesOptions {
   boolean flatten = false;
 };
--- a/dom/webidl/ShadowRoot.webidl
+++ b/dom/webidl/ShadowRoot.webidl
@@ -12,17 +12,17 @@
 
 // https://dom.spec.whatwg.org/#enumdef-shadowrootmode
 enum ShadowRootMode {
   "open",
   "closed"
 };
 
 // https://dom.spec.whatwg.org/#shadowroot
-[Func="nsDocument::IsWebComponentsEnabled"]
+[Func="nsDocument::IsShadowDOMEnabled"]
 interface ShadowRoot : DocumentFragment
 {
   readonly attribute Element? activeElement;
 
   // Shadow DOM v1
   readonly attribute ShadowRootMode mode;
   readonly attribute Element host;
 
--- a/dom/webidl/Text.webidl
+++ b/dom/webidl/Text.webidl
@@ -14,13 +14,13 @@
 interface Text : CharacterData {
   [Throws]
   Text splitText(unsigned long offset);
   [Throws]
   readonly attribute DOMString wholeText;
 };
 
 partial interface Text {
-  [BinaryName="assignedSlotByMode", Func="nsTextNode::IsWebComponentsEnabled"]
+  [BinaryName="assignedSlotByMode", Func="nsTextNode::IsShadowDOMEnabled"]
   readonly attribute HTMLSlotElement? assignedSlot;
 };
 
 Text implements GeometryUtils;
--- a/layout/base/crashtests/crashtests.list
+++ b/layout/base/crashtests/crashtests.list
@@ -470,17 +470,17 @@ load 1127198-1.html
 load 1140198.html
 load 1143535.html
 load 1153716.html
 load 1156588.html
 load 1162813.xul
 load 1163583.html
 load 1234622-1.html
 load 1235467-1.html
-pref(dom.webcomponents.enabled,true) load 1261351.html
+pref(dom.webcomponents.shadowdom.enabled,true) load 1261351.html
 load 1270797-1.html
 load 1278455-1.html
 load 1286889.html
 load 1288608.html
 load 1288946-1.html
 load 1288946-2a.html
 load 1288946-2b.html
 load 1297835.html
@@ -515,10 +515,10 @@ load 1406562.html
 load 1409088.html
 load 1409147.html
 load 1411138.html
 load 1419762.html
 load 1420533.html
 load 1425959.html
 load 1425893.html
 load 1428353.html
-pref(dom.webcomponents.enabled,true) load 1429088.html
+pref(dom.webcomponents.shadowdom.enabled,true) load 1429088.html
 load 1429961.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) pref(dom.webcomponents.enabled,true) pref(dom.webcomponents.customelements.enabled,true) load 1059138-1.html # bug 1389936
+asserts-if(!stylo,0-2) pref(dom.webcomponents.shadowdom.enabled,true) pref(dom.webcomponents.customelements.enabled,true) load 1059138-1.html # bug 1389936
 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
--- a/layout/reftests/bugs/reftest.list
+++ b/layout/reftests/bugs/reftest.list
@@ -1854,17 +1854,17 @@ pref(layout.css.moz-document.content.ena
 == 1053035-1-grid.html 1053035-1-ref.html
 == 1059167-1.html 1059167-1-ref.html
 == 1059498-1.html 1059498-1-ref.html
 == 1059498-2.html 1059498-1-ref.html
 == 1059498-3.html 1059498-1-ref.html
 == 1062108-1.html 1062108-1-ref.html
 == 1062792-1.html 1062792-1-ref.html
 == 1062963-floatmanager-reflow.html 1062963-floatmanager-reflow-ref.html
-test-pref(dom.webcomponents.enabled,true) == 1066554-1.html 1066554-1-ref.html
+test-pref(dom.webcomponents.shadowdom.enabled,true) == 1066554-1.html 1066554-1-ref.html
 == 1069716-1.html 1069716-1-ref.html
 == 1078262-1.html about:blank
 test-pref(layout.testing.overlay-scrollbars.always-visible,false) == 1081072-1.html 1081072-1-ref.html
 == 1081185-1.html 1081185-1-ref.html
 == 1097437-1.html 1097437-1-ref.html
 == 1103258-1.html 1103258-1-ref.html # assertion crash test with layers culling test
 == 1105137-1.html 1105137-1-ref.html
 fuzzy-if(d2d,36,304) fuzzy-if(/^Windows\x20NT\x2010\.0/.test(http.oscpu)&&d2d,127,701) == 1116480-1-fakeitalic-overflow.html 1116480-1-fakeitalic-overflow-ref.html
--- a/layout/reftests/css-display/reftest.list
+++ b/layout/reftests/css-display/reftest.list
@@ -12,17 +12,17 @@ fuzzy-if(Android,8,604) == display-conte
 fuzzy-if(winWidget,12,100) == display-contents-style-inheritance-1-dom-mutations.html display-contents-style-inheritance-1-ref.html
 == display-contents-tables.xhtml display-contents-tables-ref.xhtml
 == display-contents-tables-2.xhtml display-contents-tables-ref.xhtml
 == display-contents-tables-3.xhtml display-contents-tables-3-ref.xhtml
 == display-contents-visibility-hidden.html display-contents-visibility-hidden-ref.html
 == display-contents-visibility-hidden-2.html display-contents-visibility-hidden-ref.html
 == display-contents-495385-2d.html display-contents-495385-2d-ref.html
 fuzzy-if(Android,7,3935) == display-contents-xbl.xhtml display-contents-xbl-ref.html
-#bug 1421540 fuzzy-if(Android,7,1186) pref(dom.webcomponents.enabled,true) == display-contents-shadow-dom-1.html display-contents-shadow-dom-1-ref.html
+#bug 1421540 fuzzy-if(Android,7,1186) pref(dom.webcomponents.shadowdom.enabled,true) == display-contents-shadow-dom-1.html display-contents-shadow-dom-1-ref.html
 == display-contents-xbl-2.xul display-contents-xbl-2-ref.xul
 == display-contents-xbl-3.xul display-contents-xbl-3-ref.xul
 skip == display-contents-xbl-4.xul display-contents-xbl-4-ref.xul # fails (not just asserts) due to bug 1089223
 asserts(0-1) fuzzy-if(Android,8,3216) == display-contents-fieldset.html display-contents-fieldset-ref.html # bug 1089223
 == display-contents-xbl-5.xul display-contents-xbl-3-ref.xul
 fails-if(!stylo) == display-contents-xbl-6.xhtml display-contents-xbl-6-ref.html # bug 1345809
 == display-contents-xbl-7.xhtml display-contents-xbl-7-ref.html
 == display-contents-list-item-child.html display-contents-list-item-child-ref.html
--- a/layout/reftests/forms/legend/reftest.list
+++ b/layout/reftests/forms/legend/reftest.list
@@ -1,4 +1,4 @@
 == legend.html legend-ref.html
-#bug 1418002 fuzzy-if(skiaContent,1,7) pref(dom.webcomponents.enabled,true) == shadow-dom.html shadow-dom-ref.html
+#bug 1418002 fuzzy-if(skiaContent,1,7) pref(dom.webcomponents.shadowdom.enabled,true) == shadow-dom.html shadow-dom-ref.html
 == 1273433.html 1273433-ref.html
 fails-if(styloVsGecko||stylo) == 1339287.html 1339287-ref.html
--- a/layout/reftests/mathml/reftest.list
+++ b/layout/reftests/mathml/reftest.list
@@ -362,17 +362,17 @@ fuzzy-if(OSX,1,100) fuzzy-if(skiaContent
 == mfrac-C-2.html mfrac-C-2-ref.html
 == mfrac-C-3.html mfrac-C-3-ref.html
 == mfrac-C-4.html mfrac-C-4-ref.html
 fuzzy-if(OSX,1,100) fuzzy-if(skiaContent,1,14) == mfrac-D-1.html mfrac-D-1-ref.html
 == mfrac-D-2.html mfrac-D-2-ref.html
 == mfrac-D-3.html mfrac-D-3-ref.html
 == mfrac-D-4.html mfrac-D-4-ref.html
 == mfrac-E-1.html mfrac-E-1-ref.html
-test-pref(dom.webcomponents.enabled,true) == shadow-dom-1.html shadow-dom-1-ref.html
+test-pref(dom.webcomponents.shadowdom.enabled,true) == shadow-dom-1.html shadow-dom-1-ref.html
 pref(dom.meta-viewport.enabled,true) pref(font.size.inflation.emPerLine,25) == font-inflation-1.html font-inflation-1-ref.html
 test-pref(font.minimum-size.x-math,40) == default-font.html default-font-ref.html
 != radicalbar-1.html about:blank
 != radicalbar-1a.html about:blank
 != radicalbar-1b.html about:blank
 != radicalbar-1c.html about:blank
 fails-if(webrender) != radicalbar-1d.html about:blank
 != radicalbar-2.html about:blank
--- a/layout/reftests/webcomponents/reftest.list
+++ b/layout/reftests/webcomponents/reftest.list
@@ -1,23 +1,23 @@
-pref(dom.webcomponents.enabled,true) == cross-tree-selection-1.html cross-tree-selection-1-ref.html
-pref(dom.webcomponents.enabled,true) == basic-shadow-1.html basic-shadow-1-ref.html
-pref(dom.webcomponents.enabled,true) == basic-shadow-2.html basic-shadow-2-ref.html
-pref(dom.webcomponents.enabled,true) == basic-shadow-3.html basic-shadow-3-ref.html
-pref(dom.webcomponents.enabled,true) == basic-shadow-4.html basic-shadow-4-ref.html
-pref(dom.webcomponents.enabled,true) == fallback-content-1.html fallback-content-1-ref.html
-pref(dom.webcomponents.enabled,true) == remove-insertion-point-1.html remove-insertion-point-1-ref.html
-pref(dom.webcomponents.enabled,true) == nested-insertion-point-1.html nested-insertion-point-1-ref.html
-pref(dom.webcomponents.enabled,true) == update-dist-node-descendants-1.html update-dist-node-descendants-1-ref.html
-pref(dom.webcomponents.enabled,true) fuzzy-if(Android,2,7) == input-transition-1.html input-transition-1-ref.html
-pref(dom.webcomponents.enabled,true) == dynamic-insertion-point-distribution-1.html dynamic-insertion-point-distribution-1-ref.html
-pref(dom.webcomponents.enabled,true) == dynamic-insertion-point-distribution-2.html dynamic-insertion-point-distribution-2-ref.html
-pref(dom.webcomponents.enabled,true) == remove-append-shadow-host-1.html remove-append-shadow-host-1-ref.html
-pref(dom.webcomponents.enabled,true) == reframe-shadow-child-1.html reframe-shadow-child-ref.html
-pref(dom.webcomponents.enabled,true) == reframe-shadow-child-2.html reframe-shadow-child-ref.html
-pref(dom.webcomponents.enabled,true) == style-sharing.html style-sharing-ref.html
-pref(dom.webcomponents.enabled,true) skip-if(!stylo||styloVsGecko) == style-sharing-across-shadow.html style-sharing-ref.html # bug 1412400
-pref(dom.webcomponents.enabled,true) == basic-slot-1.html basic-slot-1-ref.html
-pref(dom.webcomponents.enabled,true) == basic-slot-2.html basic-slot-2-ref.html
-pref(dom.webcomponents.enabled,true) == basic-slot-3.html basic-slot-3-ref.html
-pref(dom.webcomponents.enabled,true) == basic-slot-4.html basic-slot-3-ref.html
-pref(dom.webcomponents.enabled,true) == basic-slot-5.html basic-slot-5-ref.html
-pref(dom.webcomponents.enabled,true) == basic-slot-6.html basic-slot-6-ref.html
+pref(dom.webcomponents.shadowdom.enabled,true) == cross-tree-selection-1.html cross-tree-selection-1-ref.html
+pref(dom.webcomponents.shadowdom.enabled,true) == basic-shadow-1.html basic-shadow-1-ref.html
+pref(dom.webcomponents.shadowdom.enabled,true) == basic-shadow-2.html basic-shadow-2-ref.html
+pref(dom.webcomponents.shadowdom.enabled,true) == basic-shadow-3.html basic-shadow-3-ref.html
+pref(dom.webcomponents.shadowdom.enabled,true) == basic-shadow-4.html basic-shadow-4-ref.html
+pref(dom.webcomponents.shadowdom.enabled,true) == fallback-content-1.html fallback-content-1-ref.html
+pref(dom.webcomponents.shadowdom.enabled,true) == remove-insertion-point-1.html remove-insertion-point-1-ref.html
+pref(dom.webcomponents.shadowdom.enabled,true) == nested-insertion-point-1.html nested-insertion-point-1-ref.html
+pref(dom.webcomponents.shadowdom.enabled,true) == update-dist-node-descendants-1.html update-dist-node-descendants-1-ref.html
+pref(dom.webcomponents.shadowdom.enabled,true) fuzzy-if(Android,2,7) == input-transition-1.html input-transition-1-ref.html
+pref(dom.webcomponents.shadowdom.enabled,true) == dynamic-insertion-point-distribution-1.html dynamic-insertion-point-distribution-1-ref.html
+pref(dom.webcomponents.shadowdom.enabled,true) == dynamic-insertion-point-distribution-2.html dynamic-insertion-point-distribution-2-ref.html
+pref(dom.webcomponents.shadowdom.enabled,true) == remove-append-shadow-host-1.html remove-append-shadow-host-1-ref.html
+pref(dom.webcomponents.shadowdom.enabled,true) == reframe-shadow-child-1.html reframe-shadow-child-ref.html
+pref(dom.webcomponents.shadowdom.enabled,true) == reframe-shadow-child-2.html reframe-shadow-child-ref.html
+pref(dom.webcomponents.shadowdom.enabled,true) == style-sharing.html style-sharing-ref.html
+pref(dom.webcomponents.shadowdom.enabled,true) skip-if(!stylo||styloVsGecko) == style-sharing-across-shadow.html style-sharing-ref.html # bug 1412400
+pref(dom.webcomponents.shadowdom.enabled,true) == basic-slot-1.html basic-slot-1-ref.html
+pref(dom.webcomponents.shadowdom.enabled,true) == basic-slot-2.html basic-slot-2-ref.html
+pref(dom.webcomponents.shadowdom.enabled,true) == basic-slot-3.html basic-slot-3-ref.html
+pref(dom.webcomponents.shadowdom.enabled,true) == basic-slot-4.html basic-slot-3-ref.html
+pref(dom.webcomponents.shadowdom.enabled,true) == basic-slot-5.html basic-slot-5-ref.html
+pref(dom.webcomponents.shadowdom.enabled,true) == basic-slot-6.html basic-slot-6-ref.html
--- a/layout/style/crashtests/crashtests.list
+++ b/layout/style/crashtests/crashtests.list
@@ -107,22 +107,22 @@ load 894245-1.html
 load 915440.html
 load 927734-1.html
 load 930270-1.html
 load 930270-2.html
 load 945048-1.html
 load 972199-1.html
 load 989965-1.html
 load 992333-1.html
-pref(dom.webcomponents.enabled,true) load 1017798-1.html
+pref(dom.webcomponents.shadowdom.enabled,true) load 1017798-1.html
 load 1028514-1.html
 load 1066089-1.html
 load 1074651-1.html
 load 1135534.html
-pref(dom.webcomponents.enabled,true) load 1089463-1.html
+pref(dom.webcomponents.shadowdom.enabled,true) load 1089463-1.html
 pref(layout.css.expensive-style-struct-assertions.enabled,true) load 1136010-1.html
 pref(layout.css.expensive-style-struct-assertions.enabled,true) load 1146101-1.html
 load 1153693-1.html
 load 1161320-1.html
 pref(dom.animations-api.core.enabled,true) load 1161320-2.html
 load 1161366-1.html
 load 1163446-1.html
 load 1164813-1.html
@@ -256,14 +256,14 @@ load 1409502.html
 load 1409931.html
 load 1410226-1.html
 load 1410226-2.html
 load 1411143.html
 load 1411478.html
 load 1413288.html
 load 1413361.html
 load 1415663.html
-pref(dom.webcomponents.enabled,true) load 1415353.html
-load 1415021.html # This should have dom.webcomponents.enabled=true, but it leaks the world, see bug 1416296.
+pref(dom.webcomponents.shadowdom.enabled,true) load 1415353.html
+load 1415021.html # This should have dom.webcomponents.shadowdom.enabled=true, but it leaks the world, see bug 1416296.
 load 1418059.html
 skip-if(!stylo) test-pref(dom.animations-api.core.enabled,true) load 1418867.html
-pref(dom.webcomponents.enabled,true) load 1419554.html
+pref(dom.webcomponents.shadowdom.enabled,true) load 1419554.html
 load 1426312.html
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -1402,17 +1402,17 @@ pref("privacy.trackingprotection.lower_n
 pref("privacy.trackingprotection.lower_network_priority", false);
 #endif
 
 pref("dom.event.contextmenu.enabled",       true);
 pref("dom.event.clipboardevents.enabled",   true);
 pref("dom.event.highrestimestamp.enabled",  true);
 pref("dom.event.coalesce_mouse_move",       true);
 
-pref("dom.webcomponents.enabled",           false);
+pref("dom.webcomponents.shadowdom.enabled", false);
 #ifdef NIGHTLY_BUILD
 pref("dom.webcomponents.customelements.enabled", true);
 #else
 pref("dom.webcomponents.customelements.enabled", false);
 #endif
 
 pref("javascript.enabled",                  true);
 pref("javascript.options.strict",           false);
--- a/testing/marionette/harness/marionette_harness/tests/unit/test_shadow_dom.py
+++ b/testing/marionette/harness/marionette_harness/tests/unit/test_shadow_dom.py
@@ -11,25 +11,25 @@ from marionette_driver.errors import (
 
 from marionette_harness import MarionetteTestCase
 
 
 class TestShadowDom(MarionetteTestCase):
 
     def setUp(self):
         super(TestShadowDom, self).setUp()
-        self.marionette.set_pref("dom.webcomponents.enabled", True)
+        self.marionette.set_pref("dom.webcomponents.shadowdom.enabled", True)
         self.marionette.navigate(self.marionette.absolute_url("test_shadow_dom.html"))
 
         self.host = self.marionette.find_element(By.ID, "host")
         self.marionette.switch_to_shadow_root(self.host)
         self.button = self.marionette.find_element(By.ID, "button")
 
     def tearDown(self):
-        self.marionette.clear_pref("dom.webcomponents.enabled")
+        self.marionette.clear_pref("dom.webcomponents.shadowdom.enabled")
         super(TestShadowDom, self).tearDown()
 
     def test_chrome_error(self):
         with self.marionette.using_context("chrome"):
             self.assertRaises(UnsupportedOperationException,
                               self.marionette.switch_to_shadow_root)
 
     def test_shadow_dom(self):
--- a/testing/profiles/prefs_general.js
+++ b/testing/profiles/prefs_general.js
@@ -60,17 +60,17 @@ user_pref("app.update.enabled", false);
 user_pref("app.update.staging.enabled", false);
 user_pref("app.update.url.android", "");
 // Make sure GMPInstallManager won't hit the network.
 user_pref("media.gmp-manager.url.override", "http://%(server)s/dummy-gmp-manager.xml");
 user_pref("media.gmp-manager.updateEnabled", false);
 user_pref("media.hls.server.url", "http://%(server)s/tests/dom/media/test/hls");
 user_pref("dom.w3c_touch_events.enabled", 1);
 user_pref("layout.accessiblecaret.enabled_on_touch", false);
-user_pref("dom.webcomponents.enabled", false);
+user_pref("dom.webcomponents.shadowdom.enabled", false);
 user_pref("dom.webcomponents.customelements.enabled", true);
 // Existing tests assume there is no font size inflation.
 user_pref("font.size.inflation.emPerLine", 0);
 user_pref("font.size.inflation.minTwips", 0);
 // Disable the caret blinking so we get stable snapshot
 user_pref("ui.caretBlinkTime", -1);
 
 // AddonManager tests require that the experiments provider be present.
--- a/testing/web-platform/meta/content-security-policy/securitypolicyviolation/targeting.html.ini
+++ b/testing/web-platform/meta/content-security-policy/securitypolicyviolation/targeting.html.ini
@@ -1,10 +1,10 @@
 [targeting.html]
-  prefs: [dom.webcomponents.enabled:true, security.csp.enable_violation_events:true]
+  prefs: [dom.webcomponents.shadowdom.enabled:true, security.csp.enable_violation_events:true]
   expected: TIMEOUT
   [These tests should not fail.]
     expected: NOTRUN
 
   [Inline violations target the right element.]
     expected: FAIL
 
   [Correct targeting inside shadow tree (inline handler).]
--- a/testing/web-platform/meta/css/css-backgrounds/background-size-027.html.ini
+++ b/testing/web-platform/meta/css/css-backgrounds/background-size-027.html.ini
@@ -1,2 +1,2 @@
 [background-size-027.html]
-  prefs: [dom.webcomponents.enabled:true]
+  prefs: [dom.webcomponents.shadowdom.enabled:true]
--- a/testing/web-platform/meta/css/css-scoping-1/__dir__.ini
+++ b/testing/web-platform/meta/css/css-scoping-1/__dir__.ini
@@ -1,1 +1,1 @@
-prefs: [dom.webcomponents.enabled:true]
+prefs: [dom.webcomponents.shadowdom.enabled:true]
--- a/testing/web-platform/meta/css/css-scoping/__dir__.ini
+++ b/testing/web-platform/meta/css/css-scoping/__dir__.ini
@@ -1,2 +1,2 @@
-prefs: [dom.webcomponents.enabled:true]
+prefs: [dom.webcomponents.shadowdom.enabled:true]
 
--- a/testing/web-platform/meta/css/cssom-view/elementsFromPoint-shadowroot.html.ini
+++ b/testing/web-platform/meta/css/cssom-view/elementsFromPoint-shadowroot.html.ini
@@ -1,8 +1,8 @@
 [elementsFromPoint-shadowroot.html]
-  prefs: [dom.webcomponents.enabled:true]
+  prefs: [dom.webcomponents.shadowdom.enabled:true]
   [elementsFromPoint on the document root should not return elements in shadow trees]
     expected: FAIL
 
   [elementsFromPoint on a shadow root should include elements in that shadow tree]
     expected: FAIL
 
--- a/testing/web-platform/meta/css/cssom-view/scrollIntoView-shadow.html.ini
+++ b/testing/web-platform/meta/css/cssom-view/scrollIntoView-shadow.html.ini
@@ -1,2 +1,2 @@
 [scrollIntoView-shadow.html]
-  prefs: [dom.webcomponents.enabled:true]
+  prefs: [dom.webcomponents.shadowdom.enabled:true]
--- a/testing/web-platform/meta/css/selectors/__dir__.ini
+++ b/testing/web-platform/meta/css/selectors/__dir__.ini
@@ -1,2 +1,2 @@
-prefs: [dom.webcomponents.enabled:true]
+prefs: [dom.webcomponents.shadowdom.enabled:true]
 
--- a/testing/web-platform/meta/css/selectors4/__dir__.ini
+++ b/testing/web-platform/meta/css/selectors4/__dir__.ini
@@ -1,1 +1,1 @@
-prefs: [dom.webcomponents.enabled:true]
+prefs: [dom.webcomponents.shadowdom.enabled:true]
--- a/testing/web-platform/meta/custom-elements/adopted-callback.html.ini
+++ b/testing/web-platform/meta/custom-elements/adopted-callback.html.ini
@@ -1,2 +1,2 @@
 [adopted-callback.html]
-  prefs: [dom.webcomponents.enabled:true]
+  prefs: [dom.webcomponents.shadowdom.enabled:true]
--- a/testing/web-platform/meta/custom-elements/connected-callbacks.html.ini
+++ b/testing/web-platform/meta/custom-elements/connected-callbacks.html.ini
@@ -1,2 +1,2 @@
 [connected-callbacks.html]
-  prefs: [dom.webcomponents.enabled:true]
+  prefs: [dom.webcomponents.shadowdom.enabled:true]
--- a/testing/web-platform/meta/custom-elements/disconnected-callbacks.html.ini
+++ b/testing/web-platform/meta/custom-elements/disconnected-callbacks.html.ini
@@ -1,2 +1,2 @@
 [disconnected-callbacks.html]
-  prefs: [dom.webcomponents.enabled:true]
+  prefs: [dom.webcomponents.shadowdom.enabled:true]
--- a/testing/web-platform/meta/custom-elements/reactions/Element.html.ini
+++ b/testing/web-platform/meta/custom-elements/reactions/Element.html.ini
@@ -1,10 +1,10 @@
 [Element.html]
-  prefs: [dom.webcomponents.enabled:true]
+  prefs: [dom.webcomponents.shadowdom.enabled:true]
   [removeAttribute on Element must not enqueue an attributeChanged reaction when removing an attribute that does not exist]
     expected: FAIL
 
   [removeAttributeNS on Element must not enqueue an attributeChanged reaction when removing an attribute that does not exist]
     expected: FAIL
 
   [removeAttributeNode on Element must not enqueue an attributeChanged reaction when removing an attribute that does not exist]
     expected: FAIL
--- a/testing/web-platform/meta/custom-elements/reactions/ShadowRoot.html.ini
+++ b/testing/web-platform/meta/custom-elements/reactions/ShadowRoot.html.ini
@@ -1,2 +1,2 @@
 [ShadowRoot.html]
-  prefs: [dom.webcomponents.enabled:true]
+  prefs: [dom.webcomponents.shadowdom.enabled:true]
--- a/testing/web-platform/meta/dom/interfaces.html.ini
+++ b/testing/web-platform/meta/dom/interfaces.html.ini
@@ -1,10 +1,10 @@
 [interfaces.html]
-  prefs: [dom.webcomponents.enabled:true]
+  prefs: [dom.webcomponents.shadowdom.enabled:true]
   [Document interface: attribute origin]
     expected: FAIL
     bug: 931884
 
   [Document interface: xmlDoc must inherit property "origin" with the proper type (3)]
     expected: FAIL
     bug: 931884
 
--- a/testing/web-platform/meta/html/dom/interfaces.html.ini
+++ b/testing/web-platform/meta/html/dom/interfaces.html.ini
@@ -1,10 +1,10 @@
 [interfaces.html]
-  prefs: [dom.forms.inputmode:true, dom.dialog_element.enabled:true, dom.forms.autocomplete.formautofill:true, dom.webcomponents.enabled:true, dom.moduleScripts.enabled:true]
+  prefs: [dom.forms.inputmode:true, dom.dialog_element.enabled:true, dom.forms.autocomplete.formautofill:true, dom.webcomponents.shadowdom.enabled:true, dom.moduleScripts.enabled:true]
 
   [Document interface: attribute domain]
     expected: FAIL
 
   [Document interface: attribute cookie]
     expected: FAIL
 
   [Document interface: attribute body]
--- a/testing/web-platform/meta/html/dom/reflection-misc.html.ini
+++ b/testing/web-platform/meta/html/dom/reflection-misc.html.ini
@@ -1,10 +1,10 @@
 [reflection-misc.html]
-  prefs: [dom.dialog_element.enabled: true, dom.webcomponents.enabled:true, dom.moduleScripts.enabled:true]
+  prefs: [dom.dialog_element.enabled: true, dom.webcomponents.shadowdom.enabled:true, dom.moduleScripts.enabled:true]
 
   [html.tabIndex: setAttribute() to object "3" followed by getAttribute()]
     expected: FAIL
 
   [html.tabIndex: setAttribute() to object "3" followed by IDL get]
     expected: FAIL
 
   [script.tabIndex: setAttribute() to object "3" followed by getAttribute()]
--- a/testing/web-platform/meta/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/not-in-shadow-tree.html.ini
+++ b/testing/web-platform/meta/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/not-in-shadow-tree.html.ini
@@ -1,2 +1,2 @@
 [not-in-shadow-tree.html]
-  prefs: [dom.webcomponents.enabled:true]
+  prefs: [dom.webcomponents.shadowdom.enabled:true]
--- a/testing/web-platform/meta/html/semantics/forms/the-form-element/form-elements-filter.html.ini
+++ b/testing/web-platform/meta/html/semantics/forms/the-form-element/form-elements-filter.html.ini
@@ -1,2 +1,2 @@
 [form-elements-filter.html]
-  prefs: [dom.webcomponents.enabled:true]
+  prefs: [dom.webcomponents.shadowdom.enabled:true]
--- a/testing/web-platform/meta/html/semantics/forms/the-label-element/label-attributes.html.ini
+++ b/testing/web-platform/meta/html/semantics/forms/the-label-element/label-attributes.html.ini
@@ -1,2 +1,2 @@
 [label-attributes.html]
-  prefs: [dom.webcomponents.enabled:true]
+  prefs: [dom.webcomponents.shadowdom.enabled:true]
--- a/testing/web-platform/meta/html/semantics/interfaces.html.ini
+++ b/testing/web-platform/meta/html/semantics/interfaces.html.ini
@@ -1,10 +1,10 @@
 [interfaces.html]
-  prefs: [dom.dialog_element.enabled: true, dom.webcomponents.enabled:true]
+  prefs: [dom.dialog_element.enabled: true, dom.webcomponents.shadowdom.enabled:true]
   [Interfaces for image]
     expected: FAIL
 
   [Interfaces for keygen]
     expected: FAIL
 
   [Interfaces for marquee]
     expected: FAIL
--- a/testing/web-platform/meta/intersection-observer/shadow-content.html.ini
+++ b/testing/web-platform/meta/intersection-observer/shadow-content.html.ini
@@ -1,2 +1,2 @@
 [shadow-content.html]
-  prefs: [dom.webcomponents.enabled:true]
+  prefs: [dom.webcomponents.shadowdom.enabled:true]
--- a/testing/web-platform/meta/payment-request/interfaces.https.html.ini
+++ b/testing/web-platform/meta/payment-request/interfaces.https.html.ini
@@ -1,10 +1,10 @@
 [interfaces.https.html]
-  prefs: [dom.webcomponents.enabled:true]
+  prefs: [dom.webcomponents.shadowdom.enabled:true]
   [PaymentRequest interface: existence and properties of interface object]
     expected: FAIL
 
   [PaymentRequest interface object length]
     expected: FAIL
 
   [PaymentRequest interface object name]
     expected: FAIL
--- a/testing/web-platform/meta/shadow-dom/__dir__.ini
+++ b/testing/web-platform/meta/shadow-dom/__dir__.ini
@@ -1,1 +1,1 @@
-prefs: [dom.webcomponents.enabled:true]
+prefs: [dom.webcomponents.shadowdom.enabled:true]
--- a/testing/web-platform/meta/touch-events/touch-retargeting.html.ini
+++ b/testing/web-platform/meta/touch-events/touch-retargeting.html.ini
@@ -1,5 +1,5 @@
 [touch-retargeting.html]
-  prefs: [dom.webcomponents.enabled:true]
+  prefs: [dom.webcomponents.shadowdom.enabled:true]
   [TouchEvent's touches, targetTouches, and changedTouches should be retargeted.]
     expected: FAIL