diff --git a/layout/inspector/InspectorUtils.cpp b/layout/inspector/InspectorUtils.cpp index b0ea469d91dc..5acd5dbf67ac 100644 --- a/layout/inspector/InspectorUtils.cpp +++ b/layout/inspector/InspectorUtils.cpp @@ -24,7 +24,6 @@ #include "nsRuleNode.h" #include "nsIStyleRule.h" #include "mozilla/css/StyleRule.h" -#include "nsICSSStyleRuleDOMWrapper.h" #include "nsIDOMWindow.h" #include "nsXBLBinding.h" #include "nsXBLPrototypeBinding.h" diff --git a/layout/style/ServoStyleRule.cpp b/layout/style/ServoStyleRule.cpp index 29b1607227e2..6bb3390bf9cf 100644 --- a/layout/style/ServoStyleRule.cpp +++ b/layout/style/ServoStyleRule.cpp @@ -125,13 +125,7 @@ ServoStyleRule::ServoStyleRule(already_AddRefed aRawRule, { } -// QueryInterface implementation for ServoStyleRule -NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(ServoStyleRule) - NS_INTERFACE_MAP_ENTRY(nsICSSStyleRuleDOMWrapper) -NS_INTERFACE_MAP_END_INHERITING(css::Rule) - -NS_IMPL_ADDREF_INHERITED(ServoStyleRule, css::Rule) -NS_IMPL_RELEASE_INHERITED(ServoStyleRule, css::Rule) +NS_IMPL_ISUPPORTS_CYCLE_COLLECTION_INHERITED_0(ServoStyleRule, css::Rule) NS_IMPL_CYCLE_COLLECTION_CLASS(ServoStyleRule) @@ -203,15 +197,6 @@ ServoStyleRule::List(FILE* out, int32_t aIndent) const } #endif -/* nsICSSStyleRuleDOMWrapper implementation */ - -NS_IMETHODIMP -ServoStyleRule::GetCSSStyleRule(BindingStyleRule **aResult) -{ - NS_ADDREF(*aResult = this); - return NS_OK; -} - /* CSSRule implementation */ uint16_t diff --git a/layout/style/ServoStyleRule.h b/layout/style/ServoStyleRule.h index 4e50df49028e..7046334d0ce4 100644 --- a/layout/style/ServoStyleRule.h +++ b/layout/style/ServoStyleRule.h @@ -13,8 +13,6 @@ #include "mozilla/ServoBindingTypes.h" #include "mozilla/WeakPtr.h" -#include "nsICSSStyleRuleDOMWrapper.h" -#include "nsICSSStyleRuleDOMWrapper.h" #include "nsDOMCSSDeclaration.h" namespace mozilla { @@ -59,7 +57,6 @@ private: }; class ServoStyleRule final : public BindingStyleRule - , public nsICSSStyleRuleDOMWrapper , public SupportsWeakPtr { public: @@ -73,9 +70,6 @@ public: MOZ_DECLARE_WEAKREFERENCE_TYPENAME(ServoStyleRule) - // nsICSSStyleRuleDOMWrapper - NS_IMETHOD GetCSSStyleRule(BindingStyleRule **aResult) override; - uint32_t GetSelectorCount() override; nsresult GetSelectorText(uint32_t aSelectorIndex, nsAString& aText) override; diff --git a/layout/style/StyleRule.cpp b/layout/style/StyleRule.cpp index a13417b56b14..5915458f59f8 100644 --- a/layout/style/StyleRule.cpp +++ b/layout/style/StyleRule.cpp @@ -1194,14 +1194,6 @@ StyleRule::Style() return mDOMDeclaration.get(); } -NS_IMETHODIMP -StyleRule::GetCSSStyleRule(BindingStyleRule **aResult) -{ - *aResult = this; - NS_ADDREF(*aResult); - return NS_OK; -} - StyleRule::StyleRule(nsCSSSelectorList* aSelector, Declaration* aDeclaration, uint32_t aLineNumber, @@ -1247,7 +1239,6 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(StyleRule) return NS_OK; } else - NS_INTERFACE_MAP_ENTRY(nsICSSStyleRuleDOMWrapper) NS_INTERFACE_MAP_END_INHERITING(Rule) NS_IMPL_ADDREF_INHERITED(StyleRule, Rule) diff --git a/layout/style/StyleRule.h b/layout/style/StyleRule.h index 0b1086ce5271..fb2e7650a954 100644 --- a/layout/style/StyleRule.h +++ b/layout/style/StyleRule.h @@ -22,7 +22,6 @@ #include "nsCOMPtr.h" #include "nsCSSPseudoElements.h" #include "nsIStyleRule.h" -#include "nsICSSStyleRuleDOMWrapper.h" class nsAtom; struct nsCSSSelectorList; @@ -318,7 +317,6 @@ namespace css { class Declaration; class StyleRule final : public BindingStyleRule - , public nsICSSStyleRuleDOMWrapper { public: StyleRule(nsCSSSelectorList* aSelector, @@ -334,9 +332,6 @@ public: NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_INHERITED(StyleRule, Rule) bool IsCCLeaf() const override; - // nsICSSStyleRuleDOMWrapper - NS_IMETHOD GetCSSStyleRule(BindingStyleRule **aResult) override; - uint32_t GetSelectorCount() override; nsresult GetSelectorText(uint32_t aSelectorIndex, nsAString& aText) override; diff --git a/layout/style/moz.build b/layout/style/moz.build index 923c3b3e1d17..2fa93702653b 100644 --- a/layout/style/moz.build +++ b/layout/style/moz.build @@ -55,7 +55,6 @@ EXPORTS += [ 'nsDOMCSSRGBColor.h', 'nsICSSDeclaration.h', 'nsICSSLoaderObserver.h', - 'nsICSSStyleRuleDOMWrapper.h', 'nsIStyleRule.h', 'nsIStyleRuleProcessor.h', 'nsLayoutStylesheetCache.h', diff --git a/layout/style/nsICSSStyleRuleDOMWrapper.h b/layout/style/nsICSSStyleRuleDOMWrapper.h deleted file mode 100644 index b063ce927c0a..000000000000 --- a/layout/style/nsICSSStyleRuleDOMWrapper.h +++ /dev/null @@ -1,34 +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/. */ - -/* - * interface to provide DOM inspector with access to internal interfaces - * via DOM interface - */ - -#ifndef nsICSSStyleRuleDOMWrapper_h_ -#define nsICSSStyleRuleDOMWrapper_h_ - -// IID for the nsICSSStyleRuleDOMWrapper interface -// {cee1bbb6-0a32-4cf3-8d42-ba3938e9ecaa} -#define NS_ICSS_STYLE_RULE_DOM_WRAPPER_IID \ -{0xcee1bbb6, 0x0a32, 0x4cf3, {0x8d, 0x42, 0xba, 0x39, 0x38, 0xe9, 0xec, 0xaa}} - -namespace mozilla { -class BindingStyleRule; -} // namespace mozilla - -class nsICSSStyleRuleDOMWrapper : public nsISupports { -public: - NS_DECLARE_STATIC_IID_ACCESSOR(NS_ICSS_STYLE_RULE_DOM_WRAPPER_IID) - - NS_IMETHOD GetCSSStyleRule(mozilla::BindingStyleRule** aResult) = 0; -}; - -NS_DEFINE_STATIC_IID_ACCESSOR(nsICSSStyleRuleDOMWrapper, - NS_ICSS_STYLE_RULE_DOM_WRAPPER_IID) - -#endif /* !defined(nsICSSStyleRuleDOMWrapper_h_) */