Bug 1427512 - Part 29: Remove nsIDOMCSSDeclaration. r=xidorn,jryans,bz draft
authorCameron McCormack <cam@mcc.id.au>
Sun, 07 Jan 2018 18:16:53 +0800
changeset 717730 6b8a3e9e6a974f247ee0a46e2527ba86b1e7473d
parent 717729 a34ac261971850c655e585f0a73b8c57ff922290
child 717731 296b2834fa4ee3cea75d8201caca04b6843aa21d
push id94746
push userbmo:cam@mcc.id.au
push dateTue, 09 Jan 2018 10:21:54 +0000
reviewersxidorn, jryans, bz
bugs1427512
milestone59.0a1
Bug 1427512 - Part 29: Remove nsIDOMCSSDeclaration. r=xidorn,jryans,bz This removes the .style attribute from nsIDOMSVGElement, but there shouldn't be any users of that. MozReview-Commit-ID: LOBSFo85Utn
accessible/windows/msaa/nsWinUtils.cpp
accessible/windows/msaa/nsWinUtils.h
accessible/windows/sdn/sdnAccessible.cpp
browser/installer/package-manifest.in
devtools/server/actors/object.js
dom/base/Element.cpp
dom/base/FragmentOrElement.cpp
dom/base/nsDOMWindowUtils.cpp
dom/base/nsGlobalWindowInner.cpp
dom/base/nsGlobalWindowInner.h
dom/base/nsGlobalWindowOuter.cpp
dom/interfaces/base/domstubs.idl
dom/interfaces/css/moz.build
dom/interfaces/css/nsIDOMCSSStyleDeclaration.idl
dom/interfaces/svg/nsIDOMSVGElement.idl
dom/moz.build
dom/svg/nsSVGElement.cpp
dom/xul/nsXULElement.cpp
editor/libeditor/CSSEditUtils.cpp
editor/libeditor/CSSEditUtils.h
editor/libeditor/HTMLAbsPositionEditor.cpp
extensions/spellcheck/src/mozInlineSpellWordUtil.cpp
layout/generic/ScrollbarActivity.cpp
layout/style/CSSFontFeatureValuesRule.h
layout/style/CSSPageRule.h
layout/style/StyleRule.cpp
layout/style/nsCSSFontFaceRule.cpp
layout/style/nsComputedDOMStyle.cpp
layout/style/nsDOMCSSDeclaration.cpp
layout/style/nsICSSDeclaration.h
layout/xul/nsResizerFrame.cpp
mobile/android/installer/package-manifest.in
xpcom/reflect/xptinfo/ShimInterfaceInfo.cpp
xpfe/appshell/nsXULWindow.cpp
--- a/accessible/windows/msaa/nsWinUtils.cpp
+++ b/accessible/windows/msaa/nsWinUtils.cpp
@@ -34,35 +34,34 @@ const wchar_t* kPropNameTabContent = L"A
 /**
  * WindowProc to process WM_GETOBJECT messages, used in windows emulation mode.
  */
 static LRESULT CALLBACK WindowProc(HWND hWnd, UINT msg,
                                    WPARAM wParam, LPARAM lParam);
 
 bool nsWinUtils::sWindowEmulationStarted = false;
 
-already_AddRefed<nsIDOMCSSStyleDeclaration>
+already_AddRefed<nsICSSDeclaration>
 nsWinUtils::GetComputedStyleDeclaration(nsIContent* aContent)
 {
   nsIContent* elm = nsCoreUtils::GetDOMElementFor(aContent);
   if (!elm)
     return nullptr;
 
   // Returns number of items in style declaration
   nsCOMPtr<nsPIDOMWindowInner> window = elm->OwnerDoc()->GetInnerWindow();
   if (!window)
     return nullptr;
 
   ErrorResult dummy;
-  nsCOMPtr<nsICSSDeclaration> cssDecl;
   nsCOMPtr<Element> domElement(do_QueryInterface(elm));
-  cssDecl = window->GetComputedStyle(*domElement, EmptyString(), dummy);
-  nsCOMPtr<nsIDOMCSSStyleDeclaration> domDecl = do_QueryInterface(cssDecl);
+  nsCOMPtr<nsICSSDeclaration> cssDecl =
+     window->GetComputedStyle(*domElement, EmptyString(), dummy);
   dummy.SuppressException();
-  return domDecl.forget();
+  return cssDecl.forget();
 }
 
 bool
 nsWinUtils::MaybeStartWindowEmulation()
 {
   // Register window class that'll be used for document accessibles associated
   // with tabs.
   if (IPCAccessibilityActive())
--- a/accessible/windows/msaa/nsWinUtils.h
+++ b/accessible/windows/msaa/nsWinUtils.h
@@ -6,17 +6,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef nsWinUtils_h_
 #define nsWinUtils_h_
 
 #include <functional>
 #include <windows.h>
 
-#include "nsIDOMCSSStyleDeclaration.h"
+#include "nsICSSDeclaration.h"
 #include "nsCOMPtr.h"
 
 class nsIContent;
 
 namespace mozilla {
 namespace a11y {
 
 class DocAccessible;
@@ -30,17 +30,17 @@ class nsWinUtils
 {
 public:
   /**
    * Return computed styles declaration for the given node.
    *
    * @note Please use it carefully since it can shutdown the accessible tree
    *       you operate on.
    */
-  static already_AddRefed<nsIDOMCSSStyleDeclaration>
+  static already_AddRefed<nsICSSDeclaration>
     GetComputedStyleDeclaration(nsIContent* aContent);
 
   /**
    * Start window emulation if presence of specific AT is detected.
    */
   static bool MaybeStartWindowEmulation();
 
   /**
--- a/accessible/windows/sdn/sdnAccessible.cpp
+++ b/accessible/windows/sdn/sdnAccessible.cpp
@@ -226,17 +226,17 @@ sdnAccessible::get_computedStyle(unsigne
   if (IsDefunct())
     return CO_E_OBJNOTCONNECTED;
 
   *aNumStyleProperties = 0;
 
   if (mNode->IsNodeOfType(nsINode::eDOCUMENT))
     return S_FALSE;
 
-  nsCOMPtr<nsIDOMCSSStyleDeclaration> cssDecl =
+  nsCOMPtr<nsICSSDeclaration> cssDecl =
     nsWinUtils::GetComputedStyleDeclaration(mNode->AsContent());
   NS_ENSURE_TRUE(cssDecl, E_FAIL);
 
   uint32_t length = 0;
   cssDecl->GetLength(&length);
 
   uint32_t index = 0, realIndex = 0;
   for (index = realIndex = 0; index < length && realIndex < aMaxStyleProperties;
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
@@ -194,17 +194,16 @@
 @RESPATH@/components/dom_bindings.xpt
 #ifdef MOZ_DEBUG
 @RESPATH@/components/dom_bindings_test.xpt
 #endif
 @RESPATH@/components/dom_file.xpt
 @RESPATH@/components/dom_system.xpt
 @RESPATH@/components/dom_canvas.xpt
 @RESPATH@/components/dom_core.xpt
-@RESPATH@/components/dom_css.xpt
 @RESPATH@/components/dom_events.xpt
 @RESPATH@/components/dom_geolocation.xpt
 @RESPATH@/components/dom_media.xpt
 @RESPATH@/components/dom_network.xpt
 @RESPATH@/components/dom_notification.xpt
 @RESPATH@/components/dom_html.xpt
 @RESPATH@/components/dom_offline.xpt
 @RESPATH@/components/dom_payments.xpt
--- a/devtools/server/actors/object.js
+++ b/devtools/server/actors/object.js
@@ -1797,17 +1797,18 @@ DebuggerServer.ObjectActorPreviewers.Obj
       items.push(hooks.createValueGrip(value));
     }
 
     return true;
   },
 
   function CSSStyleDeclaration({obj, hooks}, grip, rawObj) {
     if (isWorker || !rawObj ||
-        !(rawObj instanceof Ci.nsIDOMCSSStyleDeclaration)) {
+        (obj.class != "CSSStyleDeclaration" &&
+         obj.class != "CSS2Properties")) {
       return false;
     }
 
     grip.preview = {
       kind: "MapLike",
       size: rawObj.length,
     };
 
--- a/dom/base/Element.cpp
+++ b/dom/base/Element.cpp
@@ -39,17 +39,16 @@
 #include "nsIPresShell.h"
 #include "nsPresContext.h"
 #include "nsStyleConsts.h"
 #include "nsString.h"
 #include "nsUnicharUtils.h"
 #include "nsIDOMEvent.h"
 #include "nsDOMCID.h"
 #include "nsIServiceManager.h"
-#include "nsIDOMCSSStyleDeclaration.h"
 #include "nsDOMCSSAttrDeclaration.h"
 #include "nsNameSpaceManager.h"
 #include "nsContentList.h"
 #include "nsVariant.h"
 #include "nsDOMTokenList.h"
 #include "nsXBLPrototypeBinding.h"
 #include "nsError.h"
 #include "nsDOMString.h"
--- a/dom/base/FragmentOrElement.cpp
+++ b/dom/base/FragmentOrElement.cpp
@@ -46,17 +46,16 @@
 #include "nsIPresShell.h"
 #include "nsPresContext.h"
 #include "nsStyleConsts.h"
 #include "nsString.h"
 #include "nsUnicharUtils.h"
 #include "nsIDOMEvent.h"
 #include "nsDOMCID.h"
 #include "nsIServiceManager.h"
-#include "nsIDOMCSSStyleDeclaration.h"
 #include "nsDOMCSSAttrDeclaration.h"
 #include "nsNameSpaceManager.h"
 #include "nsContentList.h"
 #include "nsDOMTokenList.h"
 #include "nsXBLPrototypeBinding.h"
 #include "nsError.h"
 #include "nsDOMString.h"
 #include "nsIScriptSecurityManager.h"
--- a/dom/base/nsDOMWindowUtils.cpp
+++ b/dom/base/nsDOMWindowUtils.cpp
@@ -2173,17 +2173,17 @@ nsDOMWindowUtils::GetVisitedDependentCom
   aResult.Truncate();
 
   nsCOMPtr<nsPIDOMWindowOuter> window = do_QueryReferent(mWindow);
   nsCOMPtr<Element> element = do_QueryInterface(aElement);
   NS_ENSURE_STATE(window && element);
   nsCOMPtr<nsPIDOMWindowInner> innerWindow = window->GetCurrentInnerWindow();
   NS_ENSURE_STATE(window);
 
-  nsCOMPtr<nsIDOMCSSStyleDeclaration> decl;
+  nsCOMPtr<nsICSSDeclaration> decl;
   {
     ErrorResult rv;
     decl = innerWindow->GetComputedStyle(*element, aPseudoElement, rv);
     ENSURE_SUCCESS(rv, rv.StealNSResult());
   }
 
   static_cast<nsComputedDOMStyle*>(decl.get())->SetExposeVisitedStyle(true);
   nsresult rv = decl->GetPropertyValue(aPropertyName, aResult);
--- a/dom/base/nsGlobalWindowInner.cpp
+++ b/dom/base/nsGlobalWindowInner.cpp
@@ -129,17 +129,16 @@
 #include "nsIPromptService.h"
 #include "nsIPromptFactory.h"
 #include "nsIAddonPolicyService.h"
 #include "nsIWritablePropertyBag2.h"
 #include "nsIWebNavigation.h"
 #include "nsIWebBrowserChrome.h"
 #include "nsIWebBrowserFind.h"  // For window.find()
 #include "nsIWindowMediator.h"  // For window.find()
-#include "nsComputedDOMStyle.h"
 #include "nsDOMCID.h"
 #include "nsDOMWindowUtils.h"
 #include "nsIWindowWatcher.h"
 #include "nsPIWindowWatcher.h"
 #include "nsIContentViewer.h"
 #include "nsIScriptError.h"
 #include "nsIControllers.h"
 #include "nsIControllerContext.h"
@@ -164,16 +163,17 @@
 #ifdef MOZ_XUL
 #include "nsIDOMXULControlElement.h"
 #include "nsMenuPopupFrame.h"
 #endif
 #include "mozilla/dom/CustomEvent.h"
 #include "nsIJARChannel.h"
 #include "nsIScreenManager.h"
 #include "nsIEffectiveTLDService.h"
+#include "nsICSSDeclaration.h"
 
 #include "xpcprivate.h"
 
 #ifdef NS_PRINTING
 #include "nsIPrintSettings.h"
 #include "nsIPrintSettingsService.h"
 #include "nsIWebBrowserPrint.h"
 #endif
@@ -4900,30 +4900,30 @@ nsGlobalWindowInner::GetDefaultComputedS
 {
   return GetComputedStyleHelper(aElt, aPseudoElt, true, aError);
 }
 
 nsresult
 nsGlobalWindowInner::GetComputedStyleHelper(nsIDOMElement* aElt,
                                             const nsAString& aPseudoElt,
                                             bool aDefaultStylesOnly,
-                                            nsIDOMCSSStyleDeclaration** aReturn)
+                                            nsICSSDeclaration** aReturn)
 {
   NS_ENSURE_ARG_POINTER(aReturn);
   *aReturn = nullptr;
 
   nsCOMPtr<dom::Element> element = do_QueryInterface(aElt);
   if (!element) {
     return NS_ERROR_DOM_NOT_SUPPORTED_ERR;
   }
 
   ErrorResult rv;
-  nsCOMPtr<nsIDOMCSSStyleDeclaration> declaration =
+  nsCOMPtr<nsICSSDeclaration> cs =
     GetComputedStyleHelper(*element, aPseudoElt, aDefaultStylesOnly, rv);
-  declaration.forget(aReturn);
+  cs.forget(aReturn);
 
   return rv.StealNSResult();
 }
 
 already_AddRefed<nsICSSDeclaration>
 nsGlobalWindowInner::GetComputedStyleHelper(Element& aElt,
                                             const nsAString& aPseudoElt,
                                             bool aDefaultStylesOnly,
--- a/dom/base/nsGlobalWindowInner.h
+++ b/dom/base/nsGlobalWindowInner.h
@@ -1236,17 +1236,17 @@ protected:
   already_AddRefed<nsICSSDeclaration>
     GetComputedStyleHelper(mozilla::dom::Element& aElt,
                            const nsAString& aPseudoElt,
                            bool aDefaultStylesOnly,
                            mozilla::ErrorResult& aError);
   nsresult GetComputedStyleHelper(nsIDOMElement* aElt,
                                   const nsAString& aPseudoElt,
                                   bool aDefaultStylesOnly,
-                                  nsIDOMCSSStyleDeclaration** aReturn);
+                                  nsICSSDeclaration** aReturn);
 
   nsGlobalWindowInner* InnerForSetTimeoutOrInterval(mozilla::ErrorResult& aError);
 
   void PostMessageMoz(JSContext* aCx, JS::Handle<JS::Value> aMessage,
                       const nsAString& aTargetOrigin,
                       JS::Handle<JS::Value> aTransfer,
                       nsIPrincipal& aSubjectPrincipal,
                       mozilla::ErrorResult& aError);
--- a/dom/base/nsGlobalWindowOuter.cpp
+++ b/dom/base/nsGlobalWindowOuter.cpp
@@ -6888,17 +6888,17 @@ nsGlobalWindowOuter::GetComputedStyleHel
     }
 
     presShell = mDocShell->GetPresShell();
     if (!presShell) {
       return nullptr;
     }
   }
 
-  RefPtr<nsComputedDOMStyle> compStyle =
+  RefPtr<nsICSSDeclaration> compStyle =
     NS_NewComputedDOMStyle(&aElt, aPseudoElt, presShell,
                            aDefaultStylesOnly ? nsComputedDOMStyle::eDefaultOnly :
                                                 nsComputedDOMStyle::eAll);
 
   return compStyle.forget();
 }
 
 //*****************************************************************************
--- a/dom/interfaces/base/domstubs.idl
+++ b/dom/interfaces/base/domstubs.idl
@@ -51,16 +51,13 @@ interface nsIDOMEvent;
 interface nsIDOMEventTarget;
 interface nsIDOMEventListener;
 
 // HTML
 interface nsIDOMHTMLElement;
 interface nsIDOMHTMLFormElement;
 interface nsIDOMHTMLHeadElement;
 
-// CSS
-interface nsIDOMCSSStyleDeclaration;
-
 // Range
 interface nsIDOMRange;
 
 // Crypto
 interface nsIDOMCrypto;
deleted file mode 100644
--- a/dom/interfaces/css/moz.build
+++ /dev/null
@@ -1,15 +0,0 @@
-# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
-# vim: set filetype=python:
-# 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/.
-
-with Files("**"):
-    BUG_COMPONENT = ("Core", "DOM: CSS Object Model")
-
-XPIDL_SOURCES += [
-    'nsIDOMCSSStyleDeclaration.idl',
-]
-
-XPIDL_MODULE = 'dom_css'
-
deleted file mode 100644
--- a/dom/interfaces/css/nsIDOMCSSStyleDeclaration.idl
+++ /dev/null
@@ -1,42 +0,0 @@
-/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* 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 "domstubs.idl"
-
-/**
- * The nsIDOMCSSStyleDeclaration interface is a datatype for a CSS
- * style declaration in the Document Object Model.
- *
- * For more information on this interface please see
- * http://www.w3.org/TR/DOM-Level-2-Style
- */
-
-interface nsIPrincipal;
-
-[uuid(a6cf90be-15b3-11d2-932e-00805f8add32)]
-interface nsIDOMCSSStyleDeclaration : nsISupports
-{
-  // We declare these in C++, so that we can declare default argument values,
-  // since those are unsupported by XPIDL and this is not a scriptable
-  // interface.
-  %{C++
-  NS_IMETHOD GetCssText(nsAString& aCssText) = 0;
-  NS_IMETHOD SetCssText(const nsAString& aCssText,
-                        nsIPrincipal* aSubjectPrincipal = nullptr) = 0;
-
-  NS_IMETHOD SetProperty(const nsAString& aPropertyName,
-                         const nsAString& aValue,
-                         const nsAString& aPriority,
-                         nsIPrincipal* aSubjectPrincipal = nullptr) = 0;
-  %}
-
-  DOMString          getPropertyValue(in DOMString propertyName);
-  DOMString          removeProperty(in DOMString propertyName)
-                                        raises(DOMException);
-  DOMString          getPropertyPriority(in DOMString propertyName);
-
-  readonly attribute unsigned long    length;
-  DOMString          item(in unsigned long index);
-};
--- a/dom/interfaces/svg/nsIDOMSVGElement.idl
+++ b/dom/interfaces/svg/nsIDOMSVGElement.idl
@@ -1,20 +1,17 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* 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 "nsIDOMElement.idl"
 
-interface nsIDOMCSSStyleDeclaration;
-
 [uuid(c63517c5-8bab-4cd1-8694-bccafc32a195)]
 interface nsIDOMSVGElement : nsIDOMElement
 {
             // raises DOMException on setting
   readonly attribute nsIDOMSVGElement    ownerSVGElement;
   readonly attribute nsIDOMSVGElement    viewportElement;
 
   [binaryname(SVGClassName)]
   readonly attribute nsISupports   className;
-  readonly attribute nsIDOMCSSStyleDeclaration style;
 };
--- a/dom/moz.build
+++ b/dom/moz.build
@@ -15,17 +15,16 @@ JAR_MANIFESTS += ['jar.mn']
 
 interfaces = [
     'base',
     'canvas',
     'core',
     'html',
     'events',
     'sidebar',
-    'css',
     'traversal',
     'range',
     'xbl',
     'xpath',
     'xul',
     'security',
     'storage',
     'offline',
--- a/dom/svg/nsSVGElement.cpp
+++ b/dom/svg/nsSVGElement.cpp
@@ -111,23 +111,16 @@ nsSVGElement::WrapNode(JSContext *aCx, J
 
 NS_IMETHODIMP
 nsSVGElement::GetSVGClassName(nsISupports** aClassName)
 {
   *aClassName = ClassName().take();
   return NS_OK;
 }
 
-NS_IMETHODIMP
-nsSVGElement::GetStyle(nsIDOMCSSStyleDeclaration** aStyle)
-{
-  NS_ADDREF(*aStyle = Style());
-  return NS_OK;
-}
-
 //----------------------------------------------------------------------
 // nsSVGElement methods
 
 void
 nsSVGElement::DidAnimateClass()
 {
   // For Servo, snapshot the element before we change it.
   nsIPresShell* shell = OwnerDoc()->GetShell();
--- a/dom/xul/nsXULElement.cpp
+++ b/dom/xul/nsXULElement.cpp
@@ -48,17 +48,16 @@
 #include "nsStyleConsts.h"
 #include "nsString.h"
 #include "nsXULControllers.h"
 #include "nsIBoxObject.h"
 #include "nsPIBoxObject.h"
 #include "XULDocument.h"
 #include "nsXULPopupListener.h"
 #include "nsRuleWalker.h"
-#include "nsIDOMCSSStyleDeclaration.h"
 #include "nsCSSParser.h"
 #include "ListBoxObject.h"
 #include "nsContentUtils.h"
 #include "nsContentList.h"
 #include "mozilla/InternalMutationEvent.h"
 #include "mozilla/MouseEvents.h"
 #include "nsIDOMMutationEvent.h"
 #include "nsPIDOMWindow.h"
--- a/editor/libeditor/CSSEditUtils.cpp
+++ b/editor/libeditor/CSSEditUtils.cpp
@@ -18,17 +18,17 @@
 #include "nsColor.h"
 #include "nsComputedDOMStyle.h"
 #include "nsDebug.h"
 #include "nsDependentSubstring.h"
 #include "nsError.h"
 #include "nsGkAtoms.h"
 #include "nsAtom.h"
 #include "nsIContent.h"
-#include "nsIDOMCSSStyleDeclaration.h"
+#include "nsICSSDeclaration.h"
 #include "nsIDOMNode.h"
 #include "nsIDOMWindow.h"
 #include "nsIDocument.h"
 #include "nsIEditor.h"
 #include "nsINode.h"
 #include "nsISupportsImpl.h"
 #include "nsISupportsUtils.h"
 #include "nsLiteralString.h"
@@ -1263,17 +1263,17 @@ CSSEditUtils::ElementsSameStyle(Element*
       // need to discuss this issue before any modification.
       return false;
     }
   } else if (isFirstClassSet || isSecondClassSet) {
     // one span only carries a class, early way out
     return false;
   }
 
-  nsCOMPtr<nsIDOMCSSStyleDeclaration> firstCSSDecl, secondCSSDecl;
+  nsCOMPtr<nsICSSDeclaration> firstCSSDecl, secondCSSDecl;
   uint32_t firstLength, secondLength;
   nsresult rv = GetInlineStyles(aFirstElement,  getter_AddRefs(firstCSSDecl),  &firstLength);
   if (NS_FAILED(rv) || !firstCSSDecl) {
     return false;
   }
   rv = GetInlineStyles(aSecondElement, getter_AddRefs(secondCSSDecl), &secondLength);
   if (NS_FAILED(rv) || !secondCSSDecl) {
     return false;
@@ -1308,26 +1308,25 @@ CSSEditUtils::ElementsSameStyle(Element*
     }
   }
 
   return true;
 }
 
 nsresult
 CSSEditUtils::GetInlineStyles(Element* aElement,
-                              nsIDOMCSSStyleDeclaration** aCssDecl,
+                              nsICSSDeclaration** aCssDecl,
                               uint32_t* aLength)
 {
   NS_ENSURE_TRUE(aElement && aLength, NS_ERROR_NULL_POINTER);
   *aLength = 0;
   nsCOMPtr<nsStyledElement> inlineStyles = do_QueryInterface(aElement);
   NS_ENSURE_TRUE(inlineStyles, NS_ERROR_NULL_POINTER);
 
-  nsCOMPtr<nsIDOMCSSStyleDeclaration> cssDecl =
-    do_QueryInterface(inlineStyles->Style());
+  nsCOMPtr<nsICSSDeclaration> cssDecl = inlineStyles->Style();
   MOZ_ASSERT(cssDecl);
 
   cssDecl.forget(aCssDecl);
   (*aCssDecl)->GetLength(aLength);
   return NS_OK;
 }
 
 Element*
--- a/editor/libeditor/CSSEditUtils.h
+++ b/editor/libeditor/CSSEditUtils.h
@@ -10,17 +10,17 @@
 #include "nsCOMPtr.h"               // for already_AddRefed
 #include "nsStringFwd.h"
 #include "nsTArray.h"               // for nsTArray
 #include "nscore.h"                 // for nsAString, nsresult, nullptr
 
 class nsComputedDOMStyle;
 class nsAtom;
 class nsIContent;
-class nsIDOMCSSStyleDeclaration;
+class nsICSSDeclaration;
 class nsIDOMNode;
 class nsINode;
 
 namespace mozilla {
 
 class HTMLEditor;
 namespace dom {
 class Element;
@@ -319,17 +319,17 @@ public:
    * Get the specified inline styles (style attribute) for an element.
    *
    * @param aElement        [IN] The element node.
    * @param aCssDecl        [OUT] The CSS declaration corresponding to the
    *                              style attribute.
    * @param aLength         [OUT] The number of declarations in aCssDecl.
    */
   nsresult GetInlineStyles(dom::Element* aElement,
-                           nsIDOMCSSStyleDeclaration** aCssDecl,
+                           nsICSSDeclaration** aCssDecl,
                            uint32_t* aLength);
 
 public:
   /**
    * Returns aNode itself if it is an element node, or the first ancestors
    * being an element node if aNode is not one itself.
    *
    * @param aNode           [IN] A node
--- a/editor/libeditor/HTMLAbsPositionEditor.cpp
+++ b/editor/libeditor/HTMLAbsPositionEditor.cpp
@@ -21,17 +21,16 @@
 #include "nsAlgorithm.h"
 #include "nsCOMPtr.h"
 #include "nsComputedDOMStyle.h"
 #include "nsDebug.h"
 #include "nsError.h"
 #include "nsGkAtoms.h"
 #include "nsIContent.h"
 #include "nsROCSSPrimitiveValue.h"
-#include "nsIDOMCSSStyleDeclaration.h"
 #include "nsIDOMElement.h"
 #include "nsIDOMEventListener.h"
 #include "nsIDOMEventTarget.h"
 #include "nsIDOMNode.h"
 #include "nsDOMCSSRGBColor.h"
 #include "nsIDOMWindow.h"
 #include "nsIHTMLObjectResizer.h"
 #include "nsINode.h"
--- a/extensions/spellcheck/src/mozInlineSpellWordUtil.cpp
+++ b/extensions/spellcheck/src/mozInlineSpellWordUtil.cpp
@@ -7,17 +7,16 @@
 
 #include "mozilla/BinarySearch.h"
 #include "mozilla/TextEditor.h"
 #include "mozilla/dom/Element.h"
 
 #include "nsDebug.h"
 #include "nsAtom.h"
 #include "nsComponentManagerUtils.h"
-#include "nsIDOMCSSStyleDeclaration.h"
 #include "nsIDOMElement.h"
 #include "nsIDOMRange.h"
 #include "nsIEditor.h"
 #include "nsIDOMNode.h"
 #include "nsUnicodeProperties.h"
 #include "nsServiceManagerUtils.h"
 #include "nsIContent.h"
 #include "nsTextFragment.h"
--- a/layout/generic/ScrollbarActivity.cpp
+++ b/layout/generic/ScrollbarActivity.cpp
@@ -4,17 +4,16 @@
  * 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 "ScrollbarActivity.h"
 #include "nsIScrollbarMediator.h"
 #include "nsIContent.h"
 #include "nsICSSDeclaration.h"
 #include "nsIDOMEvent.h"
-#include "nsIDOMCSSStyleDeclaration.h"
 #include "nsIFrame.h"
 #include "nsContentUtils.h"
 #include "nsAString.h"
 #include "nsQueryFrame.h"
 #include "nsComponentManagerUtils.h"
 #include "nsStyledElement.h"
 #include "mozilla/dom/Element.h"
 #include "mozilla/LookAndFeel.h"
--- a/layout/style/CSSFontFeatureValuesRule.h
+++ b/layout/style/CSSFontFeatureValuesRule.h
@@ -5,17 +5,16 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_dom_CSSFontFeatureValuesRule_h
 #define mozilla_dom_CSSFontFeatureValuesRule_h
 
 #include "mozilla/css/Rule.h"
 
 #include "nsICSSDeclaration.h"
-#include "nsIDOMCSSStyleDeclaration.h"
 
 namespace mozilla {
 namespace dom {
 
 class CSSFontFeatureValuesRule : public css::Rule
 {
 public:
   virtual bool IsCCLeaf() const override;
--- a/layout/style/CSSPageRule.h
+++ b/layout/style/CSSPageRule.h
@@ -5,17 +5,16 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_dom_CSSPageRule_h
 #define mozilla_dom_CSSPageRule_h
 
 #include "mozilla/css/Rule.h"
 
 #include "nsICSSDeclaration.h"
-#include "nsIDOMCSSStyleDeclaration.h"
 
 namespace mozilla {
 namespace dom {
 
 class CSSPageRule : public css::Rule
 {
 protected:
   using Rule::Rule;
--- a/layout/style/StyleRule.cpp
+++ b/layout/style/StyleRule.cpp
@@ -28,18 +28,16 @@
 #include "nsCSSPseudoClasses.h"
 #include "nsCSSAnonBoxes.h"
 #include "nsTArray.h"
 #include "nsContentUtils.h"
 #include "nsError.h"
 #include "mozAutoDocUpdate.h"
 #include "nsRuleProcessorData.h"
 
-class nsIDOMCSSStyleDeclaration;
-
 using namespace mozilla;
 
 #define NS_IF_CLONE(member_)                                                  \
   PR_BEGIN_MACRO                                                              \
     if (member_) {                                                            \
       result->member_ = member_->Clone();                                     \
       if (!result->member_) {                                                 \
         delete result;                                                        \
--- a/layout/style/nsCSSFontFaceRule.cpp
+++ b/layout/style/nsCSSFontFaceRule.cpp
@@ -40,17 +40,16 @@ CSSFontFaceDescriptors::Get(nsCSSFontDes
   MOZ_ASSERT(aFontDescID > eCSSFontDesc_UNKNOWN &&
              aFontDescID < eCSSFontDesc_COUNT);
   return this->*CSSFontFaceDescriptors::Fields[aFontDescID];
 }
 
 // QueryInterface implementation for nsCSSFontFaceStyleDecl
 NS_INTERFACE_MAP_BEGIN(nsCSSFontFaceStyleDecl)
   NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
-  NS_INTERFACE_MAP_ENTRY(nsIDOMCSSStyleDeclaration)
   NS_INTERFACE_MAP_ENTRY(nsICSSDeclaration)
   NS_INTERFACE_MAP_ENTRY(nsISupports)
   // We forward the cycle collection interfaces to ContainingRule(), which is
   // never null (in fact, we're part of that object!)
   if (aIID.Equals(NS_GET_IID(nsCycleCollectionISupports)) ||
       aIID.Equals(NS_GET_IID(nsXPCOMCycleCollectionParticipant))) {
     return ContainingRule()->QueryInterface(aIID, aInstancePtr);
   }
@@ -236,27 +235,16 @@ nsCSSFontFaceStyleDecl::GetLength(uint32
        id = nsCSSFontDesc(id + 1))
     if (mDescriptors.Get(id).GetUnit() != eCSSUnit_Null)
       len++;
 
   *aLength = len;
   return NS_OK;
 }
 
-NS_IMETHODIMP
-nsCSSFontFaceStyleDecl::Item(uint32_t aIndex, nsAString& aReturn)
-{
-  bool found;
-  IndexedGetter(aIndex, found, aReturn);
-  if (!found) {
-    aReturn.Truncate();
-  }
-  return NS_OK;
-}
-
 void
 nsCSSFontFaceStyleDecl::IndexedGetter(uint32_t index, bool& aFound, nsAString & aResult)
 {
   int32_t nset = -1;
   for (nsCSSFontDesc id = nsCSSFontDesc(eCSSFontDesc_UNKNOWN + 1);
        id < eCSSFontDesc_COUNT;
        id = nsCSSFontDesc(id + 1)) {
     if (mDescriptors.Get(id).GetUnit() != eCSSUnit_Null) {
--- a/layout/style/nsComputedDOMStyle.cpp
+++ b/layout/style/nsComputedDOMStyle.cpp
@@ -1211,22 +1211,16 @@ NS_IMETHODIMP
 nsComputedDOMStyle::SetProperty(const nsAString& aPropertyName,
                                 const nsAString& aValue,
                                 const nsAString& aPriority,
                                 nsIPrincipal* aSubjectPrincipal)
 {
   return NS_ERROR_DOM_NO_MODIFICATION_ALLOWED_ERR;
 }
 
-NS_IMETHODIMP
-nsComputedDOMStyle::Item(uint32_t aIndex, nsAString& aReturn)
-{
-  return nsDOMCSSDeclaration::Item(aIndex, aReturn);
-}
-
 void
 nsComputedDOMStyle::IndexedGetter(uint32_t   aIndex,
                                   bool&      aFound,
                                   nsAString& aPropName)
 {
   nsComputedStyleMap* map = GetComputedStyleMap();
   uint32_t length = map->Length();
 
--- a/layout/style/nsDOMCSSDeclaration.cpp
+++ b/layout/style/nsDOMCSSDeclaration.cpp
@@ -30,18 +30,17 @@ nsDOMCSSDeclaration::~nsDOMCSSDeclaratio
 
 /* virtual */ JSObject*
 nsDOMCSSDeclaration::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
 {
   return dom::CSS2PropertiesBinding::Wrap(aCx, this, aGivenProto);
 }
 
 NS_IMPL_QUERY_INTERFACE(nsDOMCSSDeclaration,
-                        nsICSSDeclaration,
-                        nsIDOMCSSStyleDeclaration)
+                        nsICSSDeclaration)
 
 NS_IMETHODIMP
 nsDOMCSSDeclaration::GetPropertyValue(const nsCSSPropertyID aPropID,
                                       nsAString& aValue)
 {
   NS_PRECONDITION(aPropID != eCSSProperty_UNKNOWN,
                   "Should never pass eCSSProperty_UNKNOWN around");
 
--- a/layout/style/nsICSSDeclaration.h
+++ b/layout/style/nsICSSDeclaration.h
@@ -1,32 +1,29 @@
 /* -*- 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/. */
 
 /*
- * faster version of nsIDOMCSSStyleDeclaration using enums instead of
- * strings, for internal use
+ * interface for accessing style declarations using enums instead of strings,
+ * for internal use
  */
 
 #ifndef nsICSSDeclaration_h__
 #define nsICSSDeclaration_h__
 
 /**
  * This interface provides access to methods analogous to those of
- * nsIDOMCSSStyleDeclaration; the difference is that these use
- * nsCSSPropertyID enums for the prop names instead of using strings.
- * This is meant for use in performance-sensitive code only!  Most
- * consumers should continue to use nsIDOMCSSStyleDeclaration.
+ * CSSStyleDeclaration; the difference is that these use nsCSSPropertyID
+ * enums for the prop names instead of using strings.
  */
 
 #include "mozilla/Attributes.h"
-#include "nsIDOMCSSStyleDeclaration.h"
 #include "nsCSSPropertyID.h"
 #include "mozilla/dom/CSSValue.h"
 #include "nsWrapperCache.h"
 #include "nsString.h"
 #include "mozilla/ErrorResult.h"
 #include "nsCOMPtr.h"
 
 class nsINode;
@@ -40,68 +37,65 @@ class DocGroup;
 } // namespace dom
 } // namespace mozilla
 
 // dbeabbfa-6cb3-4f5c-aec2-dd558d9d681f
 #define NS_ICSSDECLARATION_IID \
 { 0xdbeabbfa, 0x6cb3, 0x4f5c, \
  { 0xae, 0xc2, 0xdd, 0x55, 0x8d, 0x9d, 0x68, 0x1f } }
 
-class nsICSSDeclaration : public nsIDOMCSSStyleDeclaration,
-                          public nsWrapperCache
+class nsICSSDeclaration : public nsISupports
+                        , public nsWrapperCache
 {
 public:
   NS_DECLARE_STATIC_IID_ACCESSOR(NS_ICSSDECLARATION_IID)
 
   /**
-   * Method analogous to nsIDOMCSSStyleDeclaration::GetPropertyValue,
+   * Method analogous to CSSStyleDeclaration::GetPropertyValue,
    * which obeys all the same restrictions.
    */
   NS_IMETHOD GetPropertyValue(const nsCSSPropertyID aPropID,
                               nsAString& aValue) = 0;
 
   /**
-   * Method analogous to nsIDOMCSSStyleDeclaration::SetProperty.  This
+   * Method analogous to CSSStyleDeclaration::SetProperty.  This
    * method does NOT allow setting a priority (the priority will
    * always be set to default priority).
    */
   NS_IMETHOD SetPropertyValue(const nsCSSPropertyID aPropID,
                               const nsAString& aValue,
                               nsIPrincipal* aSubjectPrincipal = nullptr) = 0;
 
   virtual nsINode *GetParentObject() = 0;
   virtual mozilla::dom::DocGroup* GetDocGroup() const = 0;
 
-  // Also have to declare all the nsIDOMCSSStyleDeclaration methods,
-  // since we want to be able to call them from the WebIDL versions.
-  NS_IMETHOD GetCssText(nsAString& aCssText) override = 0;
+  NS_IMETHOD GetCssText(nsAString& aCssText) = 0;
   NS_IMETHOD SetCssText(const nsAString& aCssText,
-                        nsIPrincipal* aSubjectPrincipal = nullptr) override = 0;
+                        nsIPrincipal* aSubjectPrincipal = nullptr) = 0;
   NS_IMETHOD GetPropertyValue(const nsAString& aPropName,
-                              nsAString& aValue) override = 0;
+                              nsAString& aValue) = 0;
   virtual already_AddRefed<mozilla::dom::CSSValue>
     GetPropertyCSSValue(const nsAString& aPropertyName,
                         mozilla::ErrorResult& aRv) = 0;
   NS_IMETHOD RemoveProperty(const nsAString& aPropertyName,
-                            nsAString& aReturn) override = 0;
+                            nsAString& aReturn) = 0;
   NS_IMETHOD GetPropertyPriority(const nsAString& aPropertyName,
-                                 nsAString& aReturn) override = 0;
+                                 nsAString& aReturn) = 0;
   NS_IMETHOD SetProperty(const nsAString& aPropertyName,
                          const nsAString& aValue,
                          const nsAString& aPriority,
-                         nsIPrincipal* aSubjectPrincipal = nullptr) override = 0;
-  NS_IMETHOD GetLength(uint32_t* aLength) override = 0;
-  NS_IMETHOD Item(uint32_t aIndex, nsAString& aReturn) override
+                         nsIPrincipal* aSubjectPrincipal = nullptr) = 0;
+  NS_IMETHOD GetLength(uint32_t* aLength) = 0;
+  void Item(uint32_t aIndex, nsAString& aReturn)
   {
     bool found;
     IndexedGetter(aIndex, found, aReturn);
     if (!found) {
       aReturn.Truncate();
     }
-    return NS_OK;
   }
 
   // WebIDL interface for CSSStyleDeclaration
   void SetCssText(const nsAString& aString, nsIPrincipal* aSubjectPrincipal,
                   mozilla::ErrorResult& rv) {
     rv = SetCssText(aString, aSubjectPrincipal);
   }
   void GetCssText(nsString& aString) {
@@ -156,12 +150,11 @@ NS_DEFINE_STATIC_IID_ACCESSOR(nsICSSDecl
   NS_IMETHOD GetPropertyValue(const nsAString & propertyName, nsAString & _retval) override; \
   NS_IMETHOD RemoveProperty(const nsAString & propertyName, nsAString & _retval) override; \
   NS_IMETHOD GetPropertyPriority(const nsAString & propertyName, nsAString & _retval) override; \
   NS_IMETHOD SetProperty(const nsAString& propertyName,                       \
                          const nsAString& value,                              \
                          const nsAString& priority,                           \
                          nsIPrincipal* aSubjectPrincipal = nullptr) override; \
   NS_IMETHOD GetLength(uint32_t *aLength) override; \
-  NS_IMETHOD Item(uint32_t index, nsAString & _retval) override; \
   mozilla::css::Rule* GetParentRule() override;
 
 #endif // nsICSSDeclaration_h__
--- a/layout/xul/nsResizerFrame.cpp
+++ b/layout/xul/nsResizerFrame.cpp
@@ -8,17 +8,16 @@
 #include "nsCOMPtr.h"
 #include "nsIServiceManager.h"
 #include "nsResizerFrame.h"
 #include "nsIContent.h"
 #include "nsIDocument.h"
 #include "nsIDOMNodeList.h"
 #include "nsGkAtoms.h"
 #include "nsNameSpaceManager.h"
-#include "nsIDOMCSSStyleDeclaration.h"
 
 #include "nsPresContext.h"
 #include "nsFrameManager.h"
 #include "nsIDocShell.h"
 #include "nsIDocShellTreeOwner.h"
 #include "nsIBaseWindow.h"
 #include "nsPIDOMWindow.h"
 #include "mozilla/MouseEvents.h"
--- a/mobile/android/installer/package-manifest.in
+++ b/mobile/android/installer/package-manifest.in
@@ -120,17 +120,16 @@
 @BINPATH@/components/dom.xpt
 @BINPATH@/components/dom_base.xpt
 @BINPATH@/components/dom_bindings.xpt
 #ifdef MOZ_DEBUG
 @BINPATH@/components/dom_bindings_test.xpt
 #endif
 @BINPATH@/components/dom_canvas.xpt
 @BINPATH@/components/dom_core.xpt
-@BINPATH@/components/dom_css.xpt
 @BINPATH@/components/dom_events.xpt
 @BINPATH@/components/dom_file.xpt
 @BINPATH@/components/dom_geolocation.xpt
 @BINPATH@/components/dom_media.xpt
 @BINPATH@/components/dom_network.xpt
 @BINPATH@/components/dom_notification.xpt
 @BINPATH@/components/dom_html.xpt
 @BINPATH@/components/dom_offline.xpt
--- a/xpcom/reflect/xptinfo/ShimInterfaceInfo.cpp
+++ b/xpcom/reflect/xptinfo/ShimInterfaceInfo.cpp
@@ -14,17 +14,16 @@
 #include "nsIDOMCanvasRenderingContext2D.h"
 #include "nsIDOMCDATASection.h"
 #include "nsIDOMCharacterData.h"
 #include "nsIDOMClientRect.h"
 #include "nsIDOMClientRectList.h"
 #include "nsIDOMClipboardEvent.h"
 #include "nsIDOMCommandEvent.h"
 #include "nsIDOMComment.h"
-#include "nsIDOMCSSStyleDeclaration.h"
 #include "nsIDOMCustomEvent.h"
 #ifdef MOZ_WEBRTC
 #include "nsIDOMDataChannel.h"
 #endif
 #include "nsIDOMDataTransfer.h"
 #include "nsIDOMDOMCursor.h"
 #include "nsIDOMDOMException.h"
 #include "nsIDOMDOMRequest.h"
@@ -250,17 +249,16 @@ const ComponentsInterfaceShimEntry kComp
   DEFINE_SHIM(CDATASection),
   DEFINE_SHIM(CharacterData),
   DEFINE_SHIM_WITH_CUSTOM_INTERFACE(nsIDOMClientRect, DOMRectReadOnly),
   DEFINE_SHIM_WITH_CUSTOM_INTERFACE(nsIDOMClientRectList, DOMRectList),
   DEFINE_SHIM(ClipboardEvent),
   DEFINE_SHIM(CommandEvent),
   DEFINE_SHIM(Comment),
   DEFINE_SHIM_WITH_CUSTOM_INTERFACE(nsIContainerBoxObject, ContainerBoxObject),
-  DEFINE_SHIM(CSSStyleDeclaration),
   DEFINE_SHIM(CustomEvent),
 #ifdef MOZ_WEBRTC
   DEFINE_SHIM(DataChannel),
 #endif
   DEFINE_SHIM(DataTransfer),
   DEFINE_SHIM(DOMCursor),
   DEFINE_SHIM(DOMException),
   DEFINE_SHIM(DOMRequest),
--- a/xpfe/appshell/nsXULWindow.cpp
+++ b/xpfe/appshell/nsXULWindow.cpp
@@ -39,17 +39,16 @@
 #include "nsIObserverService.h"
 #include "nsIWindowMediator.h"
 #include "nsIScreenManager.h"
 #include "nsIScreen.h"
 #include "nsIScrollable.h"
 #include "nsIScriptSecurityManager.h"
 #include "nsIWindowWatcher.h"
 #include "nsIURI.h"
-#include "nsIDOMCSSStyleDeclaration.h"
 #include "nsAppShellCID.h"
 #include "nsReadableUtils.h"
 #include "nsStyleConsts.h"
 #include "nsPresContext.h"
 #include "nsContentUtils.h"
 #include "nsWebShellWindow.h" // get rid of this one, too...
 #include "nsGlobalWindow.h"