Backed out changeset 27ceedad1d1c (bug 976605)
authorEd Morley <emorley@mozilla.com>
Tue, 15 Apr 2014 17:45:24 +0100
changeset 178673 3f53a4b61ac3dcc1263735819fb96a22515b41b8
parent 178672 d6254d12592d4472d862e6091dca93eba1bf3840
child 178674 db6c57a0a411a464963a0b47ef0d9927b0af7bf3
push idunknown
push userunknown
push dateunknown
bugs976605
milestone31.0a1
backs out27ceedad1d1c0f06f8df7e6cc303b08cc88f1bf4
Backed out changeset 27ceedad1d1c (bug 976605)
layout/build/nsLayoutModule.cpp
layout/inspector/inDOMView.cpp
layout/inspector/inIDOMUtils.idl
xpcom/build/ServiceList.h
xpcom/build/Services.cpp
--- a/layout/build/nsLayoutModule.cpp
+++ b/layout/build/nsLayoutModule.cpp
@@ -1079,17 +1079,17 @@ static const mozilla::Module::ContractID
   { "@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/flasher;1", &kIN_FLASHER_CID },
   { "@mozilla.org/inspector/search;1?type=cssvalue", &kIN_CSSVALUESEARCH_CID },
-  { IN_DOMUTILS_CONTRACTID, &kIN_DOMUTILS_CID },
+  { "@mozilla.org/inspector/dom-utils;1", &kIN_DOMUTILS_CID },
   { "@mozilla.org/xml/xml-document;1", &kNS_XMLDOCUMENT_CID },
   { "@mozilla.org/svg/svg-document;1", &kNS_SVGDOCUMENT_CID },
   { NS_DOMMULTIPARTBLOB_CONTRACTID, &kNS_DOMMULTIPARTBLOB_CID },
   { NS_DOMMULTIPARTFILE_CONTRACTID, &kNS_DOMMULTIPARTFILE_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 },
--- a/layout/inspector/inDOMView.cpp
+++ b/layout/inspector/inDOMView.cpp
@@ -19,17 +19,16 @@
 #include "nsIDOMMutationEvent.h"
 #include "nsBindingManager.h"
 #include "nsNameSpaceManager.h"
 #include "nsIDocument.h"
 #include "nsIServiceManager.h"
 #include "nsITreeColumns.h"
 #include "nsITreeBoxObject.h"
 #include "mozilla/dom/Element.h"
-#include "mozilla/Services.h"
 
 #ifdef ACCESSIBILITY
 #include "nsIAccessible.h"
 #include "nsIAccessibilityService.h"
 #endif
 
 using namespace mozilla;
 
@@ -786,17 +785,17 @@ inDOMView::ContentInserted(nsIDocument *
 {
   if (!mTree)
     return;
 
   nsresult rv;
   nsCOMPtr<nsIDOMNode> childDOMNode(do_QueryInterface(aChild));
   nsCOMPtr<nsIDOMNode> parent;
   if (!mDOMUtils) {
-    mDOMUtils = services::GetInDOMUtils();
+    mDOMUtils = do_GetService("@mozilla.org/inspector/dom-utils;1");
     if (!mDOMUtils) {
       return;
     }
   }
   mDOMUtils->GetParentForNode(childDOMNode, mShowAnonymous,
                               getter_AddRefs(parent));
 
   // find the inDOMViewNode for the parent of the inserted content
@@ -1185,17 +1184,17 @@ inDOMView::GetChildNodesFor(nsIDOMNode* 
         AppendAttrsToArray(attrs, aResult);
       }
     }
   }
 
   if (mWhatToShow & nsIDOMNodeFilter::SHOW_ELEMENT) {
     nsCOMPtr<nsIDOMNodeList> kids;
     if (!mDOMUtils) {
-      mDOMUtils = services::GetInDOMUtils();
+      mDOMUtils = do_GetService("@mozilla.org/inspector/dom-utils;1");
       if (!mDOMUtils) {
         return NS_ERROR_FAILURE;
       }
     }
 
     mDOMUtils->GetChildrenForNode(aNode, mShowAnonymous,
                                   getter_AddRefs(kids));
 
@@ -1230,17 +1229,17 @@ inDOMView::AppendKidsToArray(nsIDOMNodeL
 {
   uint32_t l = 0;
   aKids->GetLength(&l);
   nsCOMPtr<nsIDOMNode> kid;
   uint16_t nodeType = 0;
 
   // Try and get DOM Utils in case we don't have one yet.
   if (!mShowWhitespaceNodes && !mDOMUtils) {
-    mDOMUtils = services::GetInDOMUtils();
+    mDOMUtils = do_CreateInstance("@mozilla.org/inspector/dom-utils;1");
   }
 
   for (uint32_t i = 0; i < l; ++i) {
     aKids->Item(i, getter_AddRefs(kid));
     kid->GetNodeType(&nodeType);
 
     NS_ASSERTION(nodeType && nodeType <= nsIDOMNode::NOTATION_NODE,
                  "Unknown node type. "
--- a/layout/inspector/inIDOMUtils.idl
+++ b/layout/inspector/inIDOMUtils.idl
@@ -99,12 +99,8 @@ interface inIDOMUtils : nsISupports
    * Parse CSS and update the style sheet in place.
    *
    * @param DOMCSSStyleSheet aSheet
    * @param DOMString aInput
    *        The new source string for the style sheet.
    */
   void parseStyleSheet(in nsIDOMCSSStyleSheet aSheet, in DOMString aInput);
 };
-
-%{ C++
-#define IN_DOMUTILS_CONTRACTID "@mozilla.org/inspector/dom-utils;1"
-%}
--- a/xpcom/build/ServiceList.h
+++ b/xpcom/build/ServiceList.h
@@ -9,17 +9,16 @@ MOZ_SERVICE(AccessibilityService, nsIAcc
 MOZ_SERVICE(ChromeRegistryService, nsIChromeRegistry, "@mozilla.org/chrome/chrome-registry;1")
 MOZ_SERVICE(ToolkitChromeRegistryService, nsIToolkitChromeRegistry, "@mozilla.org/chrome/chrome-registry;1")
 MOZ_SERVICE(XULChromeRegistryService, nsIXULChromeRegistry, "@mozilla.org/chrome/chrome-registry;1")
 MOZ_SERVICE(XULOverlayProviderService, nsIXULOverlayProvider, "@mozilla.org/chrome/chrome-registry;1")
 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")
 
 #ifdef MOZ_USE_NAMESPACE
 namespace mozilla
 {
 #endif
 
 MOZ_SERVICE(HistoryService, IHistory, "@mozilla.org/browser/history;1")
 
--- a/xpcom/build/Services.cpp
+++ b/xpcom/build/Services.cpp
@@ -15,17 +15,16 @@
 #include "nsNetCID.h"
 #include "nsObserverService.h"
 #include "nsXPCOMPrivate.h"
 #include "nsIStringBundle.h"
 #include "nsIToolkitChromeRegistry.h"
 #include "nsIXULOverlayProvider.h"
 #include "IHistory.h"
 #include "nsIXPConnect.h"
-#include "inIDOMUtils.h"
 
 using namespace mozilla;
 using namespace mozilla::services;
 
 /*
  * Define a global variable and a getter for every service in ServiceList.
  * eg. gIOService and GetIOService()
  */