Bug 1427419 - Part 28: Remove inIDOMUtils. r?bz draft
authorCameron McCormack <cam@mcc.id.au>
Fri, 05 Jan 2018 15:06:16 +0800
changeset 716133 6ef3fc72873505a38b8fd067c8b27bb2c7fb9c9f
parent 716132 0fbb2e2c9d747c84c92373cbd4d18d0c206a1627
child 744962 39bfb85214ecd067abe72e81704af0a3773a60b3
push id94342
push userbmo:cam@mcc.id.au
push dateFri, 05 Jan 2018 07:39:40 +0000
reviewersbz
bugs1427419
milestone59.0a1
Bug 1427419 - Part 28: Remove inIDOMUtils. r?bz And rename inDOMUtils.cpp to InspectorUtils.cpp. MozReview-Commit-ID: KfZKw980JgG
devtools/client/shared/widgets/FilterWidget.js
devtools/shared/css/generated/mach_commands.py
layout/build/nsLayoutModule.cpp
layout/inspector/InspectorUtils.cpp
layout/inspector/inDOMUtils.cpp
layout/inspector/inDOMUtils.h
layout/inspector/inDOMView.cpp
layout/inspector/inDOMView.h
layout/inspector/inDeepTreeWalker.cpp
layout/inspector/inDeepTreeWalker.h
layout/inspector/inIDOMUtils.idl
layout/inspector/moz.build
layout/style/test/chrome/test_bug1371453.html
layout/style/test/chrome/test_stylesheet_clone_import_rule.html
mobile/android/chrome/content/browser.js
xpcom/build/ServiceList.h
xpcom/build/Services.cpp
--- a/devtools/client/shared/widgets/FilterWidget.js
+++ b/devtools/client/shared/widgets/FilterWidget.js
@@ -5,31 +5,26 @@
 "use strict";
 
 /**
   * This is a CSS Filter Editor widget used
   * for Rule View's filter swatches
   */
 
 const EventEmitter = require("devtools/shared/old-event-emitter");
-const { Cc, Ci } = require("chrome");
 const XHTML_NS = "http://www.w3.org/1999/xhtml";
 
 const { LocalizationHelper } = require("devtools/shared/l10n");
 const STRINGS_URI = "devtools/client/locales/filterwidget.properties";
 const L10N = new LocalizationHelper(STRINGS_URI);
 
 const {cssTokenizer} = require("devtools/shared/css/parsing-utils");
 
 const asyncStorage = require("devtools/shared/async-storage");
 
-loader.lazyGetter(this, "DOMUtils", () => {
-  return Cc["@mozilla.org/inspector/dom-utils;1"].getService(Ci.inIDOMUtils);
-});
-
 const DEFAULT_FILTER_TYPE = "length";
 const UNIT_MAPPING = {
   percentage: "%",
   length: "px",
   angle: "deg",
   string: ""
 };
 
--- a/devtools/shared/css/generated/mach_commands.py
+++ b/devtools/shared/css/generated/mach_commands.py
@@ -1,16 +1,16 @@
 # 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/.
 
 """
-This script implements the `mach devtools-css-db` command. It runs an xpcshell script
-that uses inIDOMUtils to query the CSS properties used by the browser. This information
-is used to generate the properties-db.js file.
+This script implements the `mach devtools-css-db` command. It runs an xpcshell
+script that uses InspectorUtils to query the CSS properties used by the browser.
+This information is used to generate the properties-db.js file.
 """
 
 import json
 import os
 import sys
 import string
 import subprocess
 from mozbuild import shellutil
--- a/layout/build/nsLayoutModule.cpp
+++ b/layout/build/nsLayoutModule.cpp
@@ -141,17 +141,16 @@ class nsIDocumentLoaderFactory;
 #include "nsIBoxObject.h"
 
 #ifdef MOZ_XUL
 #include "inDOMView.h"
 #endif /* MOZ_XUL */
 
 #include "inDeepTreeWalker.h"
 #include "inCSSValueSearch.h"
-#include "inDOMUtils.h"
 
 #ifdef MOZ_XUL
 #include "nsIXULDocument.h"
 #include "nsIXULSortService.h"
 #endif
 
 static void Shutdown();
 
@@ -420,17 +419,16 @@ MAKE_CTOR(CreateNewTreeBoxObject,       
 MAKE_CTOR(CreateNewContainerBoxObject,  nsIBoxObject,           NS_NewContainerBoxObject)
 #endif // MOZ_XUL
 
 #ifdef MOZ_XUL
 NS_GENERIC_FACTORY_CONSTRUCTOR(inDOMView)
 #endif
 NS_GENERIC_FACTORY_CONSTRUCTOR(inDeepTreeWalker)
 NS_GENERIC_FACTORY_CONSTRUCTOR(inCSSValueSearch)
-NS_GENERIC_FACTORY_CONSTRUCTOR(inDOMUtils)
 
 MAKE_CTOR2(CreateContentViewer,           nsIContentViewer,            NS_NewContentViewer)
 MAKE_CTOR(CreateHTMLDocument,             nsIDocument,                 NS_NewHTMLDocument)
 MAKE_CTOR(CreateXMLDocument,              nsIDocument,                 NS_NewXMLDocument)
 MAKE_CTOR(CreateSVGDocument,              nsIDocument,                 NS_NewSVGDocument)
 MAKE_CTOR(CreateImageDocument,            nsIDocument,                 NS_NewImageDocument)
 MAKE_CTOR(CreateDOMSelection,             nsISelection,                NS_NewDomSelection)
 MAKE_CTOR2(CreateContentIterator,         nsIContentIterator,          NS_NewContentIterator)
@@ -570,17 +568,16 @@ NS_DEFINE_NAMED_CID(NS_CONTAINERBOXOBJEC
 NS_DEFINE_NAMED_CID(NS_SCROLLBOXOBJECT_CID);
 NS_DEFINE_NAMED_CID(NS_TREEBOXOBJECT_CID);
 #endif // MOZ_XUL
 #ifdef MOZ_XUL
 NS_DEFINE_NAMED_CID(IN_DOMVIEW_CID);
 #endif
 NS_DEFINE_NAMED_CID(IN_DEEPTREEWALKER_CID);
 NS_DEFINE_NAMED_CID(IN_CSSVALUESEARCH_CID);
-NS_DEFINE_NAMED_CID(IN_DOMUTILS_CID);
 NS_DEFINE_NAMED_CID(NS_CONTENT_VIEWER_CID);
 NS_DEFINE_NAMED_CID(NS_HTMLDOCUMENT_CID);
 NS_DEFINE_NAMED_CID(NS_XMLDOCUMENT_CID);
 NS_DEFINE_NAMED_CID(NS_SVGDOCUMENT_CID);
 NS_DEFINE_NAMED_CID(NS_IMAGEDOCUMENT_CID);
 NS_DEFINE_NAMED_CID(NS_DOMSELECTION_CID);
 NS_DEFINE_NAMED_CID(NS_CONTENTITERATOR_CID);
 NS_DEFINE_NAMED_CID(NS_PRECONTENTITERATOR_CID);
@@ -826,17 +823,16 @@ static const mozilla::Module::CIDEntry k
   { &kNS_SCROLLBOXOBJECT_CID, false, nullptr, CreateNewScrollBoxObject },
   { &kNS_TREEBOXOBJECT_CID, false, nullptr, CreateNewTreeBoxObject },
 #endif // MOZ_XUL
 #ifdef MOZ_XUL
   { &kIN_DOMVIEW_CID, false, nullptr, inDOMViewConstructor },
 #endif
   { &kIN_DEEPTREEWALKER_CID, false, nullptr, inDeepTreeWalkerConstructor },
   { &kIN_CSSVALUESEARCH_CID, false, nullptr, inCSSValueSearchConstructor },
-  { &kIN_DOMUTILS_CID, false, nullptr, inDOMUtilsConstructor },
   { &kNS_CONTENT_VIEWER_CID, false, nullptr, CreateContentViewer },
   { &kNS_HTMLDOCUMENT_CID, false, nullptr, CreateHTMLDocument },
   { &kNS_XMLDOCUMENT_CID, false, nullptr, CreateXMLDocument },
   { &kNS_SVGDOCUMENT_CID, false, nullptr, CreateSVGDocument },
   { &kNS_IMAGEDOCUMENT_CID, false, nullptr, CreateImageDocument },
   { &kNS_DOMSELECTION_CID, false, nullptr, CreateDOMSelection },
   { &kNS_CONTENTITERATOR_CID, false, nullptr, CreateContentIterator },
   { &kNS_PRECONTENTITERATOR_CID, false, nullptr, CreatePreContentIterator },
@@ -949,17 +945,16 @@ static const mozilla::Module::ContractID
   { "@mozilla.org/layout/xul-boxobject-scrollbox;1", &kNS_SCROLLBOXOBJECT_CID },
   { "@mozilla.org/layout/xul-boxobject-tree;1", &kNS_TREEBOXOBJECT_CID },
 #endif // MOZ_XUL
 #ifdef MOZ_XUL
   { "@mozilla.org/inspector/dom-view;1", &kIN_DOMVIEW_CID },
 #endif
   { "@mozilla.org/inspector/deep-tree-walker;1", &kIN_DEEPTREEWALKER_CID },
   { "@mozilla.org/inspector/search;1?type=cssvalue", &kIN_CSSVALUESEARCH_CID },
-  { IN_DOMUTILS_CONTRACTID, &kIN_DOMUTILS_CID },
   { "@mozilla.org/xml/xml-document;1", &kNS_XMLDOCUMENT_CID },
   { "@mozilla.org/svg/svg-document;1", &kNS_SVGDOCUMENT_CID },
   { "@mozilla.org/content/dom-selection;1", &kNS_DOMSELECTION_CID },
   { "@mozilla.org/content/post-content-iterator;1", &kNS_CONTENTITERATOR_CID },
   { "@mozilla.org/content/pre-content-iterator;1", &kNS_PRECONTENTITERATOR_CID },
   { "@mozilla.org/content/subtree-content-iterator;1", &kNS_SUBTREEITERATOR_CID },
   { "@mozilla.org/content/canvas-rendering-context;1?id=webgl", &kNS_CANVASRENDERINGCONTEXTWEBGL_CID },
   { NS_DOC_ENCODER_CONTRACTID_BASE "text/xml", &kNS_TEXT_ENCODER_CID },
rename from layout/inspector/inDOMUtils.cpp
rename to layout/inspector/InspectorUtils.cpp
--- a/layout/inspector/inDOMUtils.cpp
+++ b/layout/inspector/InspectorUtils.cpp
@@ -2,17 +2,16 @@
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* 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/. */
 
 #include "mozilla/ArrayUtils.h"
 #include "mozilla/EventStates.h"
 
-#include "inDOMUtils.h"
 #include "inLayoutUtils.h"
 
 #include "nsArray.h"
 #include "nsAutoPtr.h"
 #include "nsIServiceManager.h"
 #include "nsString.h"
 #include "nsIStyleSheetLinkingElement.h"
 #include "nsIContentInlines.h"
@@ -58,31 +57,16 @@
 #include "mozilla/dom/InspectorFontFace.h"
 
 using namespace mozilla;
 using namespace mozilla::css;
 using namespace mozilla::dom;
 
 extern const char* const kCSSRawProperties[];
 
-///////////////////////////////////////////////////////////////////////////////
-
-inDOMUtils::inDOMUtils()
-{
-}
-
-inDOMUtils::~inDOMUtils()
-{
-}
-
-NS_IMPL_ISUPPORTS(inDOMUtils, inIDOMUtils)
-
-///////////////////////////////////////////////////////////////////////////////
-// inIDOMUtils
-
 namespace mozilla {
 namespace dom {
 
 /* static */ void
 InspectorUtils::GetAllStyleSheets(GlobalObject& aGlobalObject,
                                   nsIDocument& aDocument,
                                   nsTArray<RefPtr<StyleSheet>>& aResult)
 {
@@ -390,19 +374,16 @@ InspectorUtils::GetCSSPropertyNames(Glob
     for (prop = eCSSProperty_COUNT; prop < eCSSProperty_COUNT_with_aliases; ++prop) {
       DO_PROP(prop);
     }
   }
 
 #undef DO_PROP
 }
 
-} // namespace dom
-} // namespace mozilla
-
 static void InsertNoDuplicates(nsTArray<nsString>& aArray,
                                const nsAString& aString)
 {
   size_t i = aArray.IndexOfFirstElementGt(aString);
   if (i > 0 && aArray[i-1].Equals(aString)) {
     return;
   }
   aArray.InsertElementAt(i, aString);
@@ -494,19 +475,16 @@ static void GetOtherValuesForProperty(co
     InsertNoDuplicates(aArray, NS_LITERAL_STRING("repeating-radial-gradient"));
     InsertNoDuplicates(aArray, NS_LITERAL_STRING("-moz-linear-gradient"));
     InsertNoDuplicates(aArray, NS_LITERAL_STRING("-moz-radial-gradient"));
     InsertNoDuplicates(aArray, NS_LITERAL_STRING("-moz-repeating-linear-gradient"));
     InsertNoDuplicates(aArray, NS_LITERAL_STRING("-moz-repeating-radial-gradient"));
   }
 }
 
-namespace mozilla {
-namespace dom {
-
 /* static */ void
 InspectorUtils::GetSubpropertiesForCSSProperty(GlobalObject& aGlobal,
                                                const nsAString& aProperty,
                                                nsTArray<nsString>& aResult,
                                                ErrorResult& aRv)
 {
   nsCSSPropertyID propertyID =
     nsCSSProps::LookupProperty(aProperty, CSSEnabledState::eForAllContent);
@@ -933,19 +911,16 @@ InspectorUtils::GetUsedFontFaces(GlobalO
                                  ErrorResult& aRv)
 {
   nsresult rv = aRange.GetUsedFontFaces(aResult);
   if (NS_FAILED(rv)) {
     aRv.Throw(rv);
   }
 }
 
-} // namespace dom
-} // namespace mozilla
-
 static EventStates
 GetStatesForPseudoClass(const nsAString& aStatePseudo)
 {
   // An array of the states that are relevant for various pseudoclasses.
   // XXXbz this duplicates code in nsCSSRuleProcessor
   static const EventStates sPseudoClassStates[] = {
 #define CSS_PSEUDO_CLASS(_name, _value, _flags, _pref) \
     EventStates(),
@@ -974,19 +949,16 @@ GetStatesForPseudoClass(const nsAString&
       type == CSSPseudoClassType::mozAnyLink) {
     return EventStates();
   }
   // Our array above is long enough that indexing into it with
   // NotPseudo is ok.
   return sPseudoClassStates[static_cast<CSSPseudoClassTypeBase>(type)];
 }
 
-namespace mozilla {
-namespace dom {
-
 /* static */ void
 InspectorUtils::GetCSSPseudoElementNames(GlobalObject& aGlobalObject,
                                          nsTArray<nsString>& aResult)
 {
   const CSSPseudoElementTypeBase pseudoCount =
     static_cast<CSSPseudoElementTypeBase>(CSSPseudoElementType::Count);
   for (CSSPseudoElementTypeBase i = 0; i < pseudoCount; ++i) {
     CSSPseudoElementType type = static_cast<CSSPseudoElementType>(i);
deleted file mode 100644
--- a/layout/inspector/inDOMUtils.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* 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/. */
-
-#ifndef __inDOMUtils_h__
-#define __inDOMUtils_h__
-
-#include "inIDOMUtils.h"
-
-class nsRuleNode;
-class nsStyleContext;
-class nsAtom;
-
-namespace mozilla {
-namespace dom {
-class Element;
-} // namespace dom
-} // namespace mozilla
-
-class inDOMUtils final : public inIDOMUtils
-{
-public:
-  NS_DECL_ISUPPORTS
-  NS_DECL_INIDOMUTILS
-
-  inDOMUtils();
-
-private:
-  virtual ~inDOMUtils();
-};
-
-// {0a499822-a287-4089-ad3f-9ffcd4f40263}
-#define IN_DOMUTILS_CID \
-  {0x0a499822, 0xa287, 0x4089, {0xad, 0x3f, 0x9f, 0xfc, 0xd4, 0xf4, 0x02, 0x63}}
-
-#endif // __inDOMUtils_h__
--- a/layout/inspector/inDOMView.cpp
+++ b/layout/inspector/inDOMView.cpp
@@ -790,22 +790,16 @@ void
 inDOMView::ContentInserted(nsIDocument *aDocument, nsIContent* aContainer,
                            nsIContent* aChild)
 {
   if (!mTree)
     return;
 
   nsresult rv;
   nsCOMPtr<nsIDOMNode> childDOMNode(do_QueryInterface(aChild));
-  if (!mDOMUtils) {
-    mDOMUtils = services::GetInDOMUtils();
-    if (!mDOMUtils) {
-      return;
-    }
-  }
   nsCOMPtr<nsIDOMNode> parent = GetParentForNode(aChild, mShowAnonymous);
 
   // find the inDOMViewNode for the parent of the inserted content
   int32_t parentRow = 0;
   if (NS_FAILED(rv = NodeToRow(parent, &parentRow)))
     return;
   inDOMViewNode* parentNode = nullptr;
   if (NS_FAILED(rv = RowToNode(parentRow, &parentNode)))
--- a/layout/inspector/inDOMView.h
+++ b/layout/inspector/inDOMView.h
@@ -3,17 +3,16 @@
 /* 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/. */
 
 #ifndef __inDOMView_h__
 #define __inDOMView_h__
 
 #include "inIDOMView.h"
-#include "inIDOMUtils.h"
 
 #include "nsITreeView.h"
 #include "nsITreeSelection.h"
 #include "nsStubMutationObserver.h"
 #include "nsIDOMNode.h"
 #include "nsIDOMDocument.h"
 #include "nsTArray.h"
 #include "nsCOMArray.h"
@@ -40,17 +39,16 @@ public:
   NS_DECL_NSIMUTATIONOBSERVER_CONTENTREMOVED
   NS_DECL_NSIMUTATIONOBSERVER_NODEWILLBEDESTROYED
 
 protected:
   virtual ~inDOMView();
 
   nsCOMPtr<nsITreeBoxObject> mTree;
   nsCOMPtr<nsITreeSelection> mSelection;
-  nsCOMPtr<inIDOMUtils> mDOMUtils;
 
   bool mShowAnonymous;
   bool mShowSubDocuments;
   bool mShowWhitespaceNodes;
   bool mShowAccessibleNodes;
   uint32_t mWhatToShow;
 
   nsCOMPtr<nsIDOMNode> mRootNode;
--- a/layout/inspector/inDeepTreeWalker.cpp
+++ b/layout/inspector/inDeepTreeWalker.cpp
@@ -7,17 +7,16 @@
 #include "inDeepTreeWalker.h"
 #include "inLayoutUtils.h"
 
 #include "nsString.h"
 #include "nsIDOMDocument.h"
 #include "nsIDOMNodeFilter.h"
 #include "nsIDOMNodeList.h"
 #include "nsServiceManagerUtils.h"
-#include "inIDOMUtils.h"
 #include "nsIContent.h"
 #include "ChildIterator.h"
 #include "mozilla/dom/Element.h"
 #include "mozilla/dom/InspectorUtils.h"
 
 /*****************************************************************************
  * This implementation does not currently operaate according to the W3C spec.
  * In particular it does NOT handle DOM mutations during the walk.  It also
@@ -92,18 +91,17 @@ inDeepTreeWalker::Init(nsIDOMNode* aRoot
   if (!aRoot) {
     return NS_ERROR_INVALID_ARG;
   }
 
   mRoot = aRoot;
   mCurrentNode = aRoot;
   mWhatToShow = aWhatToShow;
 
-  mDOMUtils = do_GetService("@mozilla.org/inspector/dom-utils;1");
-  return mDOMUtils ? NS_OK : NS_ERROR_UNEXPECTED;
+  return NS_OK;
 }
 
 ////////////////////////////////////////////////////
 // nsIDOMTreeWalker
 
 NS_IMETHODIMP
 inDeepTreeWalker::GetRoot(nsIDOMNode** aRoot)
 {
--- a/layout/inspector/inDeepTreeWalker.h
+++ b/layout/inspector/inDeepTreeWalker.h
@@ -9,17 +9,16 @@
 
 #include "inIDeepTreeWalker.h"
 
 #include "nsCOMPtr.h"
 #include "nsIDOMNode.h"
 #include "nsTArray.h"
 
 class nsINodeList;
-class inIDOMUtils;
 
 class inDeepTreeWalker final : public inIDeepTreeWalker
 {
 public:
   NS_DECL_ISUPPORTS
   NS_DECL_INIDEEPTREEWALKER
 
   inDeepTreeWalker();
@@ -35,17 +34,16 @@ protected:
   bool mShowAnonymousContent;
   bool mShowSubDocuments;
   bool mShowDocumentsAsNodes;
 
   // The root node. previousNode and parentNode will return
   // null from here.
   nsCOMPtr<nsIDOMNode> mRoot;
   nsCOMPtr<nsIDOMNode> mCurrentNode;
-  nsCOMPtr<inIDOMUtils> mDOMUtils;
 
   // We cache the siblings of mCurrentNode as a list of nodes.
   // Notes: normally siblings are all the children of the parent
   // of mCurrentNode (that are interesting for use for the walk)
   // and mCurrentIndex is the index of mCurrentNode in that list
   // But if mCurrentNode is a (sub) document then instead of
   // storing a list that has only one element (the document)
   // and setting mCurrentIndex to null, we set mSibilings to null.
deleted file mode 100644
--- a/layout/inspector/inIDOMUtils.idl
+++ /dev/null
@@ -1,27 +0,0 @@
-/* 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/. */
-
-#include "nsISupports.idl"
-
-interface nsIArray;
-interface nsIArrayExtensions;
-interface nsIDOMCharacterData;
-interface nsIDOMElement;
-interface nsIDOMDocument;
-interface nsIDOMCSSRule;
-interface nsIDOMCSSStyleRule;
-interface nsIDOMNode;
-interface nsIDOMNodeList;
-interface nsIDOMFontFaceList;
-interface nsIDOMRange;
-interface nsIDOMCSSStyleSheet;
-
-[scriptable, uuid(362e98c3-82c2-4ad8-8dcb-00e8e4eab497)]
-interface inIDOMUtils : nsISupports
-{
-};
-
-%{ C++
-#define IN_DOMUTILS_CONTRACTID "@mozilla.org/inspector/dom-utils;1"
-%}
--- a/layout/inspector/moz.build
+++ b/layout/inspector/moz.build
@@ -6,17 +6,16 @@
 
 if CONFIG['ENABLE_TESTS']:
     MOCHITEST_CHROME_MANIFESTS += ['tests/chrome/chrome.ini']
     MOCHITEST_MANIFESTS += ['tests/mochitest.ini']
 
 XPIDL_SOURCES += [
     'inICSSValueSearch.idl',
     'inIDeepTreeWalker.idl',
-    'inIDOMUtils.idl',
     'inIDOMView.idl',
     'inISearchObserver.idl',
     'inISearchProcess.idl',
 ]
 
 XPIDL_MODULE = 'inspector'
 
 EXPORTS.mozilla += [
@@ -26,19 +25,19 @@ EXPORTS.mozilla += [
 EXPORTS.mozilla.dom += [
     'InspectorFontFace.h',
     'InspectorUtils.h',
 ]
 
 UNIFIED_SOURCES += [
     'inCSSValueSearch.cpp',
     'inDeepTreeWalker.cpp',
-    'inDOMUtils.cpp',
     'inLayoutUtils.cpp',
     'InspectorFontFace.cpp',
+    'InspectorUtils.cpp',
     'ServoStyleRuleMap.cpp',
 ]
 
 if CONFIG['MOZ_XUL']:
     UNIFIED_SOURCES += [
         'inDOMView.cpp',
     ]
 
--- a/layout/style/test/chrome/test_bug1371453.html
+++ b/layout/style/test/chrome/test_bug1371453.html
@@ -4,18 +4,16 @@
 <title>Test for Bug 1371453</title>
 <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
 <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
 <link rel="stylesheet" href="data:text/css,{}">
 <body>
 <script>
 SimpleTest.waitForExplicitFinish();
 
-let DOMUtils = SpecialPowers.Cc["@mozilla.org/inspector/dom-utils;1"]
-               .getService(SpecialPowers.Ci.inIDOMUtils);
 const Cu = SpecialPowers.Components.utils;
 const { ContentTaskUtils } = Cu.import("resource://testing-common/ContentTaskUtils.jsm", {});
 document.styleSheetChangeEventsEnabled = true;
 
 runTest();
 
 async function runTest() {
   document.getElementsByTagName("link")[1].sheet.insertRule('@import url("blahblah")', 0);
--- a/layout/style/test/chrome/test_stylesheet_clone_import_rule.html
+++ b/layout/style/test/chrome/test_stylesheet_clone_import_rule.html
@@ -7,18 +7,16 @@
 
 <link id="theOnlyLink" rel="stylesheet" type="text/css" href="import_useless1.css">
 
 <div id="theOnlyDiv">This text will change colors several times.</div>
 
 <script>
   SimpleTest.waitForExplicitFinish();
 
-  let DOMUtils = SpecialPowers.Cc["@mozilla.org/inspector/dom-utils;1"]
-                 .getService(SpecialPowers.Ci.inIDOMUtils);
   const Cu = SpecialPowers.Components.utils;
   const { ContentTaskUtils } = Cu.import("resource://testing-common/ContentTaskUtils.jsm", {});
 
   document.styleSheetChangeEventsEnabled = true;
 
   let theOnlyDiv = document.getElementById("theOnlyDiv");
   let stylesheet = document.getElementById("theOnlyLink").sheet;
 
--- a/mobile/android/chrome/content/browser.js
+++ b/mobile/android/chrome/content/browser.js
@@ -256,19 +256,16 @@ lazilyLoadedObserverScripts.forEach(func
 });
 
 XPCOMUtils.defineLazyServiceGetter(this, "Haptic",
   "@mozilla.org/widget/hapticfeedback;1", "nsIHapticFeedback");
 
 XPCOMUtils.defineLazyServiceGetter(this, "ParentalControls",
   "@mozilla.org/parental-controls-service;1", "nsIParentalControlsService");
 
-XPCOMUtils.defineLazyServiceGetter(this, "DOMUtils",
-  "@mozilla.org/inspector/dom-utils;1", "inIDOMUtils");
-
 XPCOMUtils.defineLazyModuleGetter(this, "Log",
   "resource://gre/modules/AndroidLog.jsm", "AndroidLog");
 
 // Define the "dump" function as a binding of the Log.d function so it specifies
 // the "debug" priority and a log tag.
 function dump(msg) {
   Log.d("Browser", msg);
 }
--- a/xpcom/build/ServiceList.h
+++ b/xpcom/build/ServiceList.h
@@ -16,18 +16,16 @@ MOZ_SERVICE(XULOverlayProviderService, n
 MOZ_SERVICE(IOService, nsIIOService,
             "@mozilla.org/network/io-service;1")
 MOZ_SERVICE(ObserverService, nsIObserverService,
             "@mozilla.org/observer-service;1")
 MOZ_SERVICE(StringBundleService, nsIStringBundleService,
             "@mozilla.org/intl/stringbundle;1")
 MOZ_SERVICE(XPConnect, nsIXPConnect,
             "@mozilla.org/js/xpc/XPConnect;1")
-MOZ_SERVICE(InDOMUtils, inIDOMUtils,
-            "@mozilla.org/inspector/dom-utils;1")
 MOZ_SERVICE(PermissionManager, nsIPermissionManager,
             "@mozilla.org/permissionmanager;1");
 MOZ_SERVICE(ServiceWorkerManager, nsIServiceWorkerManager,
             "@mozilla.org/serviceworkers/manager;1");
 MOZ_SERVICE(AsyncShutdown, nsIAsyncShutdownService,
             "@mozilla.org/async-shutdown-service;1")
 MOZ_SERVICE(UUIDGenerator, nsIUUIDGenerator,
             "@mozilla.org/uuid-generator;1");
--- a/xpcom/build/Services.cpp
+++ b/xpcom/build/Services.cpp
@@ -14,17 +14,16 @@
 #include "nsIIOService.h"
 #include "nsIDirectoryService.h"
 #include "nsIChromeRegistry.h"
 #include "nsIStringBundle.h"
 #include "nsIToolkitChromeRegistry.h"
 #include "nsIXULOverlayProvider.h"
 #include "IHistory.h"
 #include "nsIXPConnect.h"
-#include "inIDOMUtils.h"
 #include "nsIPermissionManager.h"
 #include "nsIServiceWorkerManager.h"
 #include "nsICacheStorageService.h"
 #include "nsIStreamTransportService.h"
 #include "nsISocketTransportService.h"
 #include "nsIURIClassifier.h"
 #include "nsIHttpActivityObserver.h"
 #include "nsIAsyncShutdown.h"