Bug 1427512 - Part 22: Remove nsIDOMStyleSheet. r=xidorn,bz draft
authorCameron McCormack <cam@mcc.id.au>
Tue, 02 Jan 2018 18:23:13 +1100
changeset 717723 82e05be9dd3995205ea5543ccb8d4e92b9d1817f
parent 717722 d5ad69ea64556feed84cbb22e42175ae3fa95b66
child 717724 576601ef0861b2f6f8bf2cdda992ae0b9768f527
push id94746
push userbmo:cam@mcc.id.au
push dateTue, 09 Jan 2018 10:21:54 +0000
reviewersxidorn, bz
bugs1427512
milestone59.0a1
Bug 1427512 - Part 22: Remove nsIDOMStyleSheet. r=xidorn,bz MozReview-Commit-ID: KO2mWX4P8lI
browser/installer/package-manifest.in
dom/base/nsDOMWindowUtils.cpp
dom/base/nsDocument.cpp
dom/base/nsStyleLinkElement.cpp
dom/html/HTMLLinkElement.cpp
dom/html/HTMLStyleElement.cpp
dom/interfaces/base/domstubs.idl
dom/interfaces/stylesheets/moz.build
dom/interfaces/stylesheets/nsIDOMStyleSheet.idl
dom/moz.build
dom/webidl/StyleSheet.webidl
editor/libeditor/HTMLEditor.cpp
layout/style/CSSStyleSheet.cpp
layout/style/Loader.cpp
layout/style/ServoImportRule.cpp
layout/style/ServoStyleSheet.cpp
layout/style/StyleSheet.cpp
layout/style/StyleSheet.h
layout/style/StyleSheetInlines.h
mobile/android/installer/package-manifest.in
xpcom/reflect/xptinfo/ShimInterfaceInfo.cpp
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
@@ -210,17 +210,16 @@
 @RESPATH@/components/dom_payments.xpt
 @RESPATH@/components/dom_power.xpt
 @RESPATH@/components/dom_push.xpt
 @RESPATH@/components/dom_quota.xpt
 @RESPATH@/components/dom_range.xpt
 @RESPATH@/components/dom_security.xpt
 @RESPATH@/components/dom_sidebar.xpt
 @RESPATH@/components/dom_storage.xpt
-@RESPATH@/components/dom_stylesheets.xpt
 @RESPATH@/components/dom_traversal.xpt
 #ifdef MOZ_WEBSPEECH
 @RESPATH@/components/dom_webspeechrecognition.xpt
 #endif
 @RESPATH@/components/dom_workers.xpt
 @RESPATH@/components/dom_xbl.xpt
 @RESPATH@/components/dom_xhr.xpt
 @RESPATH@/components/dom_xpath.xpt
--- a/dom/base/nsDOMWindowUtils.cpp
+++ b/dom/base/nsDOMWindowUtils.cpp
@@ -93,17 +93,16 @@
 #include "nsDisplayList.h"
 #include "nsROCSSPrimitiveValue.h"
 #include "nsIBaseWindow.h"
 #include "nsIDocShellTreeOwner.h"
 #include "nsIInterfaceRequestorUtils.h"
 #include "GeckoProfiler.h"
 #include "mozilla/Preferences.h"
 #include "nsIContentIterator.h"
-#include "nsIDOMStyleSheet.h"
 #include "nsIStyleSheetService.h"
 #include "nsContentPermissionHelper.h"
 #include "nsCSSPseudoElements.h"            // for CSSPseudoElementType
 #include "nsNetUtil.h"
 #include "nsDocument.h"
 #include "HTMLImageElement.h"
 #include "HTMLCanvasElement.h"
 #include "mozilla/css/ImageLoader.h"
--- a/dom/base/nsDocument.cpp
+++ b/dom/base/nsDocument.cpp
@@ -53,17 +53,16 @@
 #include "ChildIterator.h"
 
 #include "mozilla/AsyncEventDispatcher.h"
 #include "mozilla/BasicEvents.h"
 #include "mozilla/EventListenerManager.h"
 #include "mozilla/EventStateManager.h"
 #include "nsIDOMNodeFilter.h"
 
-#include "nsIDOMStyleSheet.h"
 #include "mozilla/dom/Attr.h"
 #include "mozilla/dom/BindingDeclarations.h"
 #include "nsIDOMDOMImplementation.h"
 #include "nsIDOMDocumentXBL.h"
 #include "mozilla/dom/Element.h"
 #include "mozilla/dom/FramingChecker.h"
 #include "nsGenericHTMLElement.h"
 #include "mozilla/dom/CDATASection.h"
--- a/dom/base/nsStyleLinkElement.cpp
+++ b/dom/base/nsStyleLinkElement.cpp
@@ -20,17 +20,16 @@
 #include "mozilla/dom/HTMLLinkElement.h"
 #include "mozilla/dom/ShadowRoot.h"
 #include "mozilla/dom/SRILogHelper.h"
 #include "mozilla/Preferences.h"
 #include "nsIContent.h"
 #include "nsIDocument.h"
 #include "nsIDOMComment.h"
 #include "nsIDOMNode.h"
-#include "nsIDOMStyleSheet.h"
 #include "nsUnicharUtils.h"
 #include "nsCRT.h"
 #include "nsXPCOMCIDInternal.h"
 #include "nsUnicharInputStream.h"
 #include "nsContentUtils.h"
 #include "nsStyleUtil.h"
 #include "nsQueryObject.h"
 #include "nsIContentPolicy.h"
--- a/dom/html/HTMLLinkElement.cpp
+++ b/dom/html/HTMLLinkElement.cpp
@@ -15,17 +15,16 @@
 #include "mozilla/dom/HTMLLinkElementBinding.h"
 #include "nsContentUtils.h"
 #include "nsGenericHTMLElement.h"
 #include "nsGkAtoms.h"
 #include "nsDOMTokenList.h"
 #include "nsIContentInlines.h"
 #include "nsIDocument.h"
 #include "nsIDOMEvent.h"
-#include "nsIDOMStyleSheet.h"
 #include "nsINode.h"
 #include "nsIStyleSheetLinkingElement.h"
 #include "nsIURL.h"
 #include "nsPIDOMWindow.h"
 #include "nsReadableUtils.h"
 #include "nsStyleConsts.h"
 #include "nsStyleLinkElement.h"
 #include "nsUnicharUtils.h"
--- a/dom/html/HTMLStyleElement.cpp
+++ b/dom/html/HTMLStyleElement.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/dom/HTMLStyleElement.h"
 #include "mozilla/dom/HTMLStyleElementBinding.h"
 #include "nsGkAtoms.h"
 #include "nsStyleConsts.h"
-#include "nsIDOMStyleSheet.h"
 #include "nsIDocument.h"
 #include "nsUnicharUtils.h"
 #include "nsThreadUtils.h"
 #include "nsContentUtils.h"
 #include "nsStubMutationObserver.h"
 
 NS_IMPL_NS_NEW_HTML_ELEMENT(Style)
 
--- a/dom/interfaces/base/domstubs.idl
+++ b/dom/interfaces/base/domstubs.idl
@@ -35,19 +35,16 @@ interface nsIDOMClientRectList;
 %{C++
 namespace mozilla {
 namespace dom {
 class DOMException;
 }
 }
 %}
 
-// Style Sheets
-interface nsIDOMStyleSheet;
-
 // Base
 interface nsIDOMWindow;
 interface nsIDOMWindowCollection;
 interface nsIDOMNavigator;
 interface nsIDOMScreen;
 
 // Events
 interface nsIDOMEvent;
deleted file mode 100644
--- a/dom/interfaces/stylesheets/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 += [
-    'nsIDOMStyleSheet.idl',
-]
-
-XPIDL_MODULE = 'dom_stylesheets'
-
deleted file mode 100644
--- a/dom/interfaces/stylesheets/nsIDOMStyleSheet.idl
+++ /dev/null
@@ -1,25 +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 nsIDOMStyleSheet interface is a datatype for a style sheet in
- * the Document Object Model.
- *
- * For more information on this interface please see
- * http://www.w3.org/TR/DOM-Level-2-Style
- */
-
-[uuid(a6cf9080-15b3-11d2-932e-00805f8add32)]
-interface nsIDOMStyleSheet : nsISupports
-{
-  readonly attribute DOMString        type;
-           attribute boolean          disabled;
-  readonly attribute nsIDOMNode       ownerNode;
-  readonly attribute nsIDOMStyleSheet parentStyleSheet;
-  readonly attribute DOMString        href;
-  readonly attribute DOMString        title;
-};
--- a/dom/moz.build
+++ b/dom/moz.build
@@ -14,17 +14,16 @@ with Files("plugins/**"):
 JAR_MANIFESTS += ['jar.mn']
 
 interfaces = [
     'base',
     'canvas',
     'core',
     'html',
     'events',
-    'stylesheets',
     'sidebar',
     'css',
     'traversal',
     'range',
     'xbl',
     'xpath',
     'xul',
     'security',
--- a/dom/webidl/StyleSheet.webidl
+++ b/dom/webidl/StyleSheet.webidl
@@ -5,17 +5,17 @@
  *
  * The origin of this IDL file is
  * http://dev.w3.org/csswg/cssom/
  */
 
 interface StyleSheet {
   [Constant]
   readonly attribute DOMString type;
-  [Constant]
+  [Constant, Throws]
   readonly attribute DOMString? href;
   // Spec says "Node", but it can go null when the node gets a new
   // sheet.  That's also why it's not [Constant]
   [Pure]
   readonly attribute Node? ownerNode;
   [Pure]
   readonly attribute StyleSheet? parentStyleSheet;
   [Pure]
--- a/editor/libeditor/HTMLEditor.cpp
+++ b/editor/libeditor/HTMLEditor.cpp
@@ -27,17 +27,16 @@
 #include "nsIDOMEventTarget.h"
 #include "nsIDOMMouseEvent.h"
 #include "nsISelectionController.h"
 #include "nsIDOMHTMLDocument.h"
 #include "nsILinkHandler.h"
 #include "nsIInlineSpellChecker.h"
 
 #include "mozilla/css/Loader.h"
-#include "nsIDOMStyleSheet.h"
 
 #include "nsIContent.h"
 #include "nsIContentIterator.h"
 #include "nsIMutableArray.h"
 #include "nsContentUtils.h"
 #include "nsIDocumentEncoder.h"
 #include "nsIPresShell.h"
 #include "nsPresContext.h"
@@ -2889,17 +2888,18 @@ HTMLEditor::EnableStyleSheet(const nsASt
 {
   RefPtr<StyleSheet> sheet = GetStyleSheetForURL(aURL);
   NS_ENSURE_TRUE(sheet, NS_OK); // Don't fail if sheet not found
 
   // Ensure the style sheet is owned by our document.
   nsCOMPtr<nsIDocument> document = GetDocument();
   sheet->SetAssociatedDocument(document, StyleSheet::NotOwnedByDocument);
 
-  return sheet->SetDisabled(!aEnable);
+  sheet->SetDisabled(!aEnable);
+  return NS_OK;
 }
 
 bool
 HTMLEditor::EnableExistingStyleSheet(const nsAString& aURL)
 {
   RefPtr<StyleSheet> sheet = GetStyleSheetForURL(aURL);
 
   // Enable sheet if already loaded.
--- a/layout/style/CSSStyleSheet.cpp
+++ b/layout/style/CSSStyleSheet.cpp
@@ -428,17 +428,16 @@ CSSStyleSheet::TraverseInner(nsCycleColl
     }
   }
 
   StyleSheet::TraverseInner(cb);
 }
 
 // QueryInterface implementation for CSSStyleSheet
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(CSSStyleSheet)
-  NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIDOMStyleSheet)
   if (aIID.Equals(NS_GET_IID(CSSStyleSheet)))
     foundInterface = reinterpret_cast<nsISupports*>(this);
   else
 NS_INTERFACE_MAP_END_INHERITING(StyleSheet)
 
 NS_IMPL_ADDREF_INHERITED(CSSStyleSheet, StyleSheet)
 NS_IMPL_RELEASE_INHERITED(CSSStyleSheet, StyleSheet)
 
--- a/layout/style/Loader.cpp
+++ b/layout/style/Loader.cpp
@@ -56,17 +56,16 @@
 #include "mozilla/ConsoleReportCollector.h"
 #include "mozilla/ServoUtils.h"
 #include "mozilla/css/StreamLoader.h"
 
 #ifdef MOZ_XUL
 #include "nsXULPrototypeCache.h"
 #endif
 
-#include "nsIDOMStyleSheet.h"
 #include "nsError.h"
 
 #include "nsIContentSecurityPolicy.h"
 #include "mozilla/dom/SRICheck.h"
 
 #include "mozilla/Encoding.h"
 
 using namespace mozilla::dom;
@@ -2595,17 +2594,17 @@ Loader::StartAlternateLoads()
 NS_IMPL_CYCLE_COLLECTION_CLASS(Loader)
 
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(Loader)
   if (tmp->mSheets) {
     for (auto iter = tmp->mSheets->mCompleteSheets.Iter();
          !iter.Done();
          iter.Next()) {
       NS_CYCLE_COLLECTION_NOTE_EDGE_NAME(cb, "Sheet cache nsCSSLoader");
-      cb.NoteXPCOMChild(NS_ISUPPORTS_CAST(nsIDOMStyleSheet*, iter.UserData()));
+      cb.NoteXPCOMChild(iter.UserData());
     }
   }
   nsTObserverArray<nsCOMPtr<nsICSSLoaderObserver>>::ForwardIterator
     it(tmp->mObservers);
   while (it.HasMore()) {
     ImplCycleCollectionTraverse(cb, it.GetNext(),
                                 "mozilla::css::Loader.mObservers");
   }
--- a/layout/style/ServoImportRule.cpp
+++ b/layout/style/ServoImportRule.cpp
@@ -40,20 +40,20 @@ NS_IMPL_CYCLE_COLLECTION_CLASS(ServoImpo
 NS_IMPL_ADDREF_INHERITED(ServoImportRule, dom::CSSImportRule)
 NS_IMPL_RELEASE_INHERITED(ServoImportRule, dom::CSSImportRule)
 
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(ServoImportRule,
                                                   dom::CSSImportRule)
   // Note the child sheet twice, since the Servo rule also holds a strong
   // reference to it.
   NS_CYCLE_COLLECTION_NOTE_EDGE_NAME(cb, "mChildSheet");
-  cb.NoteXPCOMChild(static_cast<nsIDOMStyleSheet*>(tmp->mChildSheet));
+  cb.NoteXPCOMChild(tmp->mChildSheet);
   MOZ_ASSERT_IF(tmp->mRawRule,
                 Servo_ImportRule_GetSheet(tmp->mRawRule) == tmp->mChildSheet);
-  cb.NoteXPCOMChild(static_cast<nsIDOMStyleSheet*>(tmp->mChildSheet));
+  cb.NoteXPCOMChild(tmp->mChildSheet);
   NS_CYCLE_COLLECTION_NOTE_EDGE_NAME(cb, "mRawRule.stylesheet");
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
 
 NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(ServoImportRule)
   if (tmp->mChildSheet) {
     tmp->mChildSheet->SetOwnerRule(nullptr);
     tmp->mChildSheet = nullptr;
   }
--- a/layout/style/ServoStyleSheet.cpp
+++ b/layout/style/ServoStyleSheet.cpp
@@ -167,17 +167,16 @@ ServoStyleSheet::~ServoStyleSheet()
 void
 ServoStyleSheet::LastRelease()
 {
   DropRuleList();
 }
 
 // QueryInterface implementation for ServoStyleSheet
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(ServoStyleSheet)
-  NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIDOMStyleSheet)
   if (aIID.Equals(NS_GET_IID(ServoStyleSheet)))
     foundInterface = reinterpret_cast<nsISupports*>(this);
   else
 NS_INTERFACE_MAP_END_INHERITING(StyleSheet)
 
 NS_IMPL_ADDREF_INHERITED(ServoStyleSheet, StyleSheet)
 NS_IMPL_RELEASE_INHERITED(ServoStyleSheet, StyleSheet)
 
--- a/layout/style/StyleSheet.cpp
+++ b/layout/style/StyleSheet.cpp
@@ -131,26 +131,26 @@ StyleSheet::TraverseInner(nsCycleCollect
   // because otherwise there are no JS wrappers for anything in the inner.
   if (mInner->mSheets.Length() != 1) {
     return;
   }
 
   StyleSheet* childSheet = GetFirstChild();
   while (childSheet) {
     NS_CYCLE_COLLECTION_NOTE_EDGE_NAME(cb, "child sheet");
-    cb.NoteXPCOMChild(NS_ISUPPORTS_CAST(nsIDOMStyleSheet*, childSheet));
+    cb.NoteXPCOMChild(childSheet);
     childSheet = childSheet->mNext;
   }
 }
 
 // QueryInterface implementation for StyleSheet
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(StyleSheet)
   NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
   NS_INTERFACE_MAP_ENTRY(nsICSSLoaderObserver)
-  NS_INTERFACE_MAP_ENTRY(nsIDOMStyleSheet)
+  NS_INTERFACE_MAP_ENTRY(nsISupports)
 NS_INTERFACE_MAP_END
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(StyleSheet)
 // We want to disconnect from our inner as soon as our refcount drops to zero,
 // without waiting for async deletion by the cycle collector.  Otherwise we
 // might end up cloning the inner if someone mutates another sheet that shares
 // it with us, even though there is only one such sheet and we're about to go
 // away.  This situation arises easily with sheet preloading.
@@ -308,78 +308,50 @@ StyleSheet::ChildSheetListBuilder::Repar
 {
   for (StyleSheet *child = aFirstChild; child; child = child->mNext) {
     child->mParent = aPrimarySheet;
     child->SetAssociatedDocument(aPrimarySheet->mDocument,
                                  aPrimarySheet->mDocumentAssociationMode);
   }
 }
 
-// nsIDOMStyleSheet interface
-
-NS_IMETHODIMP
+void
 StyleSheet::GetType(nsAString& aType)
 {
   aType.AssignLiteral("text/css");
-  return NS_OK;
 }
 
-NS_IMETHODIMP
-StyleSheet::GetDisabled(bool* aDisabled)
-{
-  *aDisabled = Disabled();
-  return NS_OK;
-}
-
-NS_IMETHODIMP
+void
 StyleSheet::SetDisabled(bool aDisabled)
 {
   // DOM method, so handle BeginUpdate/EndUpdate
   MOZ_AUTO_DOC_UPDATE(mDocument, UPDATE_STYLE, true);
   SetEnabled(!aDisabled);
-  return NS_OK;
 }
 
-NS_IMETHODIMP
-StyleSheet::GetOwnerNode(nsIDOMNode** aOwnerNode)
-{
-  nsCOMPtr<nsIDOMNode> ownerNode = do_QueryInterface(GetOwnerNode());
-  ownerNode.forget(aOwnerNode);
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-StyleSheet::GetHref(nsAString& aHref)
+void
+StyleSheet::GetHref(nsAString& aHref, ErrorResult& aRv)
 {
   if (nsIURI* sheetURI = SheetInfo().mOriginalSheetURI) {
     nsAutoCString str;
     nsresult rv = sheetURI->GetSpec(str);
-    NS_ENSURE_SUCCESS(rv, rv);
+    if (NS_FAILED(rv)) {
+      aRv.Throw(rv);
+      return;
+    }
     CopyUTF8toUTF16(str, aHref);
   } else {
     SetDOMStringToNull(aHref);
   }
-  return NS_OK;
 }
 
-NS_IMETHODIMP
+void
 StyleSheet::GetTitle(nsAString& aTitle)
 {
   aTitle.Assign(mTitle);
-  return NS_OK;
-}
-
-// nsIDOMStyleSheet interface
-
-NS_IMETHODIMP
-StyleSheet::GetParentStyleSheet(nsIDOMStyleSheet** aParentStyleSheet)
-{
-  NS_ENSURE_ARG_POINTER(aParentStyleSheet);
-  NS_IF_ADDREF(*aParentStyleSheet = GetParentStyleSheet());
-  return NS_OK;
 }
 
 void
 StyleSheet::WillDirty()
 {
   if (mInner->mComplete) {
     EnsureUniqueInner();
   }
--- a/layout/style/StyleSheet.h
+++ b/layout/style/StyleSheet.h
@@ -9,17 +9,16 @@
 
 #include "mozilla/css/SheetParsingMode.h"
 #include "mozilla/dom/CSSStyleSheetBinding.h"
 #include "mozilla/net/ReferrerPolicy.h"
 #include "mozilla/StyleBackendType.h"
 #include "mozilla/CORSMode.h"
 #include "mozilla/ServoUtils.h"
 #include "nsICSSLoaderObserver.h"
-#include "nsIDOMStyleSheet.h"
 #include "nsWrapperCache.h"
 
 class nsIDocument;
 class nsINode;
 class nsIPrincipal;
 class nsCSSRuleProcessor;
 
 namespace mozilla {
@@ -40,33 +39,31 @@ class SRIMetadata;
 namespace css {
 class GroupRule;
 class Rule;
 }
 
 /**
  * Superclass for data common to CSSStyleSheet and ServoStyleSheet.
  */
-class StyleSheet : public nsIDOMStyleSheet
-                 , public nsICSSLoaderObserver
+class StyleSheet : public nsICSSLoaderObserver
                  , public nsWrapperCache
 {
 protected:
   StyleSheet(StyleBackendType aType, css::SheetParsingMode aParsingMode);
   StyleSheet(const StyleSheet& aCopy,
              StyleSheet* aParentToUse,
              dom::CSSImportRule* aOwnerRuleToUse,
              nsIDocument* aDocumentToUse,
              nsINode* aOwningNodeToUse);
   virtual ~StyleSheet();
 
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
-  NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_AMBIGUOUS(StyleSheet,
-                                                         nsIDOMStyleSheet)
+  NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(StyleSheet)
 
   /**
    * The different changes that a stylesheet may go through.
    *
    * Used by the StyleSets in order to handle more efficiently some kinds of
    * changes.
    */
   enum class ChangeType {
@@ -94,17 +91,17 @@ public:
 
   /**
    * Set the stylesheet to be enabled.  This may or may not make it
    * applicable.  Note that this WILL inform the sheet's document of
    * its new applicable state if the state changes but WILL NOT call
    * BeginUpdate() or EndUpdate() on the document -- calling those is
    * the caller's responsibility.  This allows use of SetEnabled when
    * batched updates are desired.  If you want updates handled for
-   * you, see nsIDOMStyleSheet::SetDisabled().
+   * you, see SetDisabled().
    */
   void SetEnabled(bool aEnabled);
 
   MOZ_DECL_STYLO_METHODS(CSSStyleSheet, ServoStyleSheet)
 
   // Whether the sheet is for an inline <style> element.
   inline bool IsInline() const;
 
@@ -200,24 +197,24 @@ public:
   inline void GetIntegrity(dom::SRIMetadata& aResult) const;
 
   virtual size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const;
 #ifdef DEBUG
   virtual void List(FILE* aOut = stdout, int32_t aIndex = 0) const;
 #endif
 
   // WebIDL StyleSheet API
-  // The XPCOM GetType is fine for WebIDL.
-  // The XPCOM GetHref is fine for WebIDL
+  void GetType(nsAString& aType);
+  void GetHref(nsAString& aHref, ErrorResult& aRv);
   // GetOwnerNode is defined above.
   inline StyleSheet* GetParentStyleSheet() const;
-  // The XPCOM GetTitle is fine for WebIDL.
+  void GetTitle(nsAString& aTitle);
   dom::MediaList* Media();
   bool Disabled() const { return mDisabled; }
-  // The XPCOM SetDisabled is fine for WebIDL.
+  void SetDisabled(bool aDisabled);
   void GetSourceMapURL(nsAString& aTitle);
   void SetSourceMapURL(const nsAString& aSourceMapURL);
   void SetSourceMapURLFromComment(const nsAString& aSourceMapURLFromComment);
   void GetSourceURL(nsAString& aSourceURL);
   void SetSourceURL(const nsAString& aSourceURL);
 
   // WebIDL CSSStyleSheet API
   // Can't be inline because we can't include ImportRule here.  And can't be
@@ -232,25 +229,16 @@ public:
   void DeleteRule(uint32_t aIndex,
                   nsIPrincipal& aSubjectPrincipal,
                   ErrorResult& aRv);
 
   // WebIDL miscellaneous bits
   inline dom::ParentObject GetParentObject() const;
   JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) final;
 
-  // nsIDOMStyleSheet interface
-  NS_IMETHOD GetType(nsAString& aType) final;
-  NS_IMETHOD GetDisabled(bool* aDisabled) final;
-  NS_IMETHOD SetDisabled(bool aDisabled) final;
-  NS_IMETHOD GetOwnerNode(nsIDOMNode** aOwnerNode) final;
-  NS_IMETHOD GetParentStyleSheet(nsIDOMStyleSheet** aParentStyleSheet) final;
-  NS_IMETHOD GetHref(nsAString& aHref) final;
-  NS_IMETHOD GetTitle(nsAString& aTitle) final;
-
   // Changes to sheets should be inside of a WillDirty-DidDirty pair.
   // However, the calls do not need to be matched; it's ok to call
   // WillDirty and then make no change and skip the DidDirty call.
   void WillDirty();
   virtual void DidDirty() {}
 
   // Called when a rule changes from CSSOM.
   //
--- a/layout/style/StyleSheetInlines.h
+++ b/layout/style/StyleSheetInlines.h
@@ -84,17 +84,17 @@ StyleSheet::GetParentStyleSheet() const
 }
 
 dom::ParentObject
 StyleSheet::GetParentObject() const
 {
   if (mOwningNode) {
     return dom::ParentObject(mOwningNode);
   }
-  return dom::ParentObject(static_cast<nsIDOMStyleSheet*>(mParent), mParent);
+  return dom::ParentObject(mParent);
 }
 
 nsIPrincipal*
 StyleSheet::Principal() const
 {
   return SheetInfo().mPrincipal;
 }
 
--- a/mobile/android/installer/package-manifest.in
+++ b/mobile/android/installer/package-manifest.in
@@ -140,17 +140,16 @@
 @BINPATH@/components/dom_push.xpt
 #endif
 @BINPATH@/components/dom_quota.xpt
 @BINPATH@/components/dom_range.xpt
 @BINPATH@/components/dom_security.xpt
 @BINPATH@/components/dom_sidebar.xpt
 @BINPATH@/components/dom_mobilemessage.xpt
 @BINPATH@/components/dom_storage.xpt
-@BINPATH@/components/dom_stylesheets.xpt
 @BINPATH@/components/dom_system.xpt
 @BINPATH@/components/dom_traversal.xpt
 @BINPATH@/components/dom_tv.xpt
 #ifdef MOZ_WEBSPEECH
 @BINPATH@/components/dom_webspeechrecognition.xpt
 #endif
 @BINPATH@/components/dom_xbl.xpt
 @BINPATH@/components/dom_xhr.xpt
--- a/xpcom/reflect/xptinfo/ShimInterfaceInfo.cpp
+++ b/xpcom/reflect/xptinfo/ShimInterfaceInfo.cpp
@@ -64,17 +64,16 @@
 #include "nsIDOMParser.h"
 #include "nsIDOMProcessingInstruction.h"
 #include "nsIDOMRange.h"
 #include "nsIDOMRect.h"
 #include "nsIDOMScreen.h"
 #include "nsIDOMScrollAreaEvent.h"
 #include "nsIDOMSerializer.h"
 #include "nsIDOMSimpleGestureEvent.h"
-#include "nsIDOMStyleSheet.h"
 #include "nsIDOMSVGElement.h"
 #include "nsIDOMSVGLength.h"
 #include "nsIDOMText.h"
 #include "nsIDOMTimeEvent.h"
 #include "nsIDOMTimeRanges.h"
 #include "nsIDOMTransitionEvent.h"
 #include "nsIDOMTreeWalker.h"
 #include "nsIDOMUIEvent.h"
@@ -309,17 +308,16 @@ const ComponentsInterfaceShimEntry kComp
   DEFINE_SHIM(ProcessingInstruction),
   DEFINE_SHIM(Range),
   DEFINE_SHIM(Rect),
   DEFINE_SHIM(Screen),
   DEFINE_SHIM(ScrollAreaEvent),
   DEFINE_SHIM_WITH_CUSTOM_INTERFACE(nsIScrollBoxObject, ScrollBoxObject),
   DEFINE_SHIM_WITH_CUSTOM_INTERFACE(nsIDOMSerializer, XMLSerializer),
   DEFINE_SHIM(SimpleGestureEvent),
-  DEFINE_SHIM(StyleSheet),
   DEFINE_SHIM(SVGElement),
   DEFINE_SHIM(SVGLength),
   DEFINE_SHIM(Text),
   DEFINE_SHIM(TimeEvent),
   DEFINE_SHIM(TimeRanges),
   DEFINE_SHIM(TransitionEvent),
   DEFINE_SHIM_WITH_CUSTOM_INTERFACE(nsITreeBoxObject, TreeBoxObject),
   DEFINE_SHIM(TreeWalker),