Bug 1427512 - Part 5: Remove nsIDOMCSSGroupingRule. r=xidorn draft
authorCameron McCormack <cam@mcc.id.au>
Mon, 01 Jan 2018 18:23:17 +1100
changeset 717706 fb0b0f5cd1f71b35426ece0a00c6e15b407da675
parent 717705 7e7f2b4e77cbe1efdc35d38031c483b7b57f9e82
child 717707 9c74262ba79a88d640cbd9d8f78c0443cb45cf8a
push id94746
push userbmo:cam@mcc.id.au
push dateTue, 09 Jan 2018 10:21:54 +0000
reviewersxidorn
bugs1427512
milestone59.0a1
Bug 1427512 - Part 5: Remove nsIDOMCSSGroupingRule. r=xidorn MozReview-Commit-ID: 11PItkyQOCz
dom/interfaces/css/moz.build
dom/interfaces/css/nsIDOMCSSGroupingRule.idl
layout/style/CSSMediaRule.cpp
layout/style/CSSMediaRule.h
layout/style/CSSMozDocumentRule.cpp
layout/style/CSSMozDocumentRule.h
layout/style/CSSSupportsRule.cpp
layout/style/CSSSupportsRule.h
layout/style/nsCSSRules.h
--- a/dom/interfaces/css/moz.build
+++ b/dom/interfaces/css/moz.build
@@ -7,17 +7,16 @@
 with Files("**"):
     BUG_COMPONENT = ("Core", "DOM: CSS Object Model")
 
 XPIDL_SOURCES += [
     'nsIDOMCounter.idl',
     'nsIDOMCSSCounterStyleRule.idl',
     'nsIDOMCSSFontFaceRule.idl',
     'nsIDOMCSSFontFeatureValuesRule.idl',
-    'nsIDOMCSSGroupingRule.idl',
     'nsIDOMCSSImportRule.idl',
     'nsIDOMCSSKeyframeRule.idl',
     'nsIDOMCSSKeyframesRule.idl',
     'nsIDOMCSSPageRule.idl',
     'nsIDOMCSSPrimitiveValue.idl',
     'nsIDOMCSSRule.idl',
     'nsIDOMCSSRuleList.idl',
     'nsIDOMCSSStyleDeclaration.idl',
deleted file mode 100644
--- a/dom/interfaces/css/nsIDOMCSSGroupingRule.idl
+++ /dev/null
@@ -1,23 +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 "nsISupports.idl"
-
-interface nsIDOMCSSRuleList;
-
-/**
- * Interface for at-rules that have child rules in the CSS OM.
- */
-[scriptable, uuid(a0e3324a-f911-4baf-9591-5322c76cbb0d)]
-interface nsIDOMCSSGroupingRule : nsISupports
-{
-  readonly attribute nsIDOMCSSRuleList cssRules;
-
-  unsigned long      insertRule(in DOMString rule,
-                                in unsigned long index)
-                                        raises(DOMException);
-  void               deleteRule(in unsigned long index)
-                                        raises(DOMException);
-};
--- a/layout/style/CSSMediaRule.cpp
+++ b/layout/style/CSSMediaRule.cpp
@@ -7,44 +7,16 @@
 #include "mozilla/dom/CSSMediaRule.h"
 
 #include "mozilla/dom/CSSMediaRuleBinding.h"
 #include "mozilla/dom/MediaList.h"
 
 namespace mozilla {
 namespace dom {
 
-NS_IMPL_ADDREF_INHERITED(CSSMediaRule, css::ConditionRule)
-NS_IMPL_RELEASE_INHERITED(CSSMediaRule, css::ConditionRule)
-
-// QueryInterface implementation for CSSMediaRule
-NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(CSSMediaRule)
-  NS_INTERFACE_MAP_ENTRY(nsIDOMCSSGroupingRule)
-NS_INTERFACE_MAP_END_INHERITING(css::ConditionRule)
-
-// nsIDOMCSSGroupingRule methods
-NS_IMETHODIMP
-CSSMediaRule::GetCssRules(nsIDOMCSSRuleList** aRuleList)
-{
-  return GroupRule::GetCssRules(aRuleList);
-}
-
-NS_IMETHODIMP
-CSSMediaRule::InsertRule(const nsAString& aRule,
-                         uint32_t aIndex, uint32_t* _retval)
-{
-  return GroupRule::InsertRule(aRule, aIndex, _retval);
-}
-
-NS_IMETHODIMP
-CSSMediaRule::DeleteRule(uint32_t aIndex)
-{
-  return GroupRule::DeleteRule(aIndex);
-}
-
 /* virtual */ JSObject*
 CSSMediaRule::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
 {
   return CSSMediaRuleBinding::Wrap(aCx, this, aGivenProto);
 }
 
 } // namespace dom
 } // namespace mozilla
--- a/layout/style/CSSMediaRule.h
+++ b/layout/style/CSSMediaRule.h
@@ -3,39 +3,32 @@
 /* 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 mozilla_dom_CSSMediaRule_h
 #define mozilla_dom_CSSMediaRule_h
 
 #include "mozilla/css/GroupRule.h"
-#include "nsIDOMCSSGroupingRule.h"
 
 namespace mozilla {
 namespace dom {
 
 class CSSMediaRule : public css::ConditionRule
-                   , public nsIDOMCSSGroupingRule
 {
 protected:
   using ConditionRule::ConditionRule;
   virtual ~CSSMediaRule() {}
 
 public:
-  NS_DECL_ISUPPORTS_INHERITED
-
   int32_t GetType() const override { return css::Rule::MEDIA_RULE; }
 
   // XPCOM interface
   using Rule::GetType;
 
-  // nsIDOMCSSGroupingRule interface
-  NS_DECL_NSIDOMCSSGROUPINGRULE
-
   // WebIDL interface
   uint16_t Type() const override { return nsIDOMCSSRule::MEDIA_RULE; }
   virtual MediaList* Media() = 0;
 
   JSObject* WrapObject(JSContext* aCx,
                        JS::Handle<JSObject*> aGivenProto) override;
 };
 
--- a/layout/style/CSSMozDocumentRule.cpp
+++ b/layout/style/CSSMozDocumentRule.cpp
@@ -7,44 +7,16 @@
 #include "mozilla/dom/CSSMozDocumentRule.h"
 #include "mozilla/dom/CSSMozDocumentRuleBinding.h"
 
 namespace mozilla {
 namespace dom {
 
 using namespace mozilla::css;
 
-NS_IMPL_ADDREF_INHERITED(CSSMozDocumentRule, css::ConditionRule)
-NS_IMPL_RELEASE_INHERITED(CSSMozDocumentRule, css::ConditionRule)
-
-// QueryInterface implementation for CSSMozDocumentRule
-NS_INTERFACE_MAP_BEGIN(CSSMozDocumentRule)
-  NS_INTERFACE_MAP_ENTRY(nsIDOMCSSGroupingRule)
-NS_INTERFACE_MAP_END_INHERITING(ConditionRule)
-
-// nsIDOMCSSGroupingRule methods
-NS_IMETHODIMP
-CSSMozDocumentRule::GetCssRules(nsIDOMCSSRuleList** aRuleList)
-{
-  return GroupRule::GetCssRules(aRuleList);
-}
-
-NS_IMETHODIMP
-CSSMozDocumentRule::InsertRule(const nsAString & aRule,
-                               uint32_t aIndex, uint32_t* _retval)
-{
-  return GroupRule::InsertRule(aRule, aIndex, _retval);
-}
-
-NS_IMETHODIMP
-CSSMozDocumentRule::DeleteRule(uint32_t aIndex)
-{
-  return GroupRule::DeleteRule(aIndex);
-}
-
 /* virtual */ JSObject*
 CSSMozDocumentRule::WrapObject(JSContext* aCx,
                                JS::Handle<JSObject*> aGivenProto)
 {
   return CSSMozDocumentRuleBinding::Wrap(aCx, this, aGivenProto);
 }
 
 bool
--- a/layout/style/CSSMozDocumentRule.h
+++ b/layout/style/CSSMozDocumentRule.h
@@ -9,37 +9,31 @@
 
 #include "mozilla/css/GroupRule.h"
 #include "mozilla/css/URLMatchingFunction.h"
 
 namespace mozilla {
 namespace dom {
 
 class CSSMozDocumentRule : public css::ConditionRule
-                         , public nsIDOMCSSGroupingRule
 {
 protected:
   using ConditionRule::ConditionRule;
   virtual ~CSSMozDocumentRule() {}
 
 public:
-  NS_DECL_ISUPPORTS_INHERITED
-
   int32_t GetType() const final override { return css::Rule::DOCUMENT_RULE; }
   using Rule::GetType;
 
   static bool Match(nsIDocument* aDoc,
                     nsIURI* aDocURI,
                     const nsACString& aDocURISpec,
                     const nsACString& aPattern,
                     css::URLMatchingFunction aUrlMatchingFunction);
 
-  // nsIDOMCSSGroupingRule interface
-  NS_DECL_NSIDOMCSSGROUPINGRULE
-
   // WebIDL interface
   uint16_t Type() const final override {
     return nsIDOMCSSRule::DOCUMENT_RULE;
   }
 
   JSObject* WrapObject(JSContext* aCx,
                        JS::Handle<JSObject*> aGivenProto) override;
 };
--- a/layout/style/CSSSupportsRule.cpp
+++ b/layout/style/CSSSupportsRule.cpp
@@ -8,43 +8,16 @@
 
 #include "mozilla/dom/CSSSupportsRuleBinding.h"
 
 using namespace mozilla::css;
 
 namespace mozilla {
 namespace dom {
 
-NS_IMPL_ADDREF_INHERITED(mozilla::dom::CSSSupportsRule, css::ConditionRule)
-NS_IMPL_RELEASE_INHERITED(mozilla::dom::CSSSupportsRule, css::ConditionRule)
-
-// QueryInterface implementation for CSSSupportsRule
-NS_INTERFACE_MAP_BEGIN(CSSSupportsRule)
-  NS_INTERFACE_MAP_ENTRY(nsIDOMCSSGroupingRule)
-NS_INTERFACE_MAP_END_INHERITING(ConditionRule)
-
-// nsIDOMCSSGroupingRule methods
-NS_IMETHODIMP
-CSSSupportsRule::GetCssRules(nsIDOMCSSRuleList** aRuleList)
-{
-  return GroupRule::GetCssRules(aRuleList);
-}
-
-NS_IMETHODIMP
-CSSSupportsRule::InsertRule(const nsAString & aRule, uint32_t aIndex, uint32_t* _retval)
-{
-  return GroupRule::InsertRule(aRule, aIndex, _retval);
-}
-
-NS_IMETHODIMP
-CSSSupportsRule::DeleteRule(uint32_t aIndex)
-{
-  return GroupRule::DeleteRule(aIndex);
-}
-
 /* virtual */ JSObject*
 CSSSupportsRule::WrapObject(JSContext* aCx,
                             JS::Handle<JSObject*> aGivenProto)
 {
   return CSSSupportsRuleBinding::Wrap(aCx, this, aGivenProto);
 }
 
 } // namespace dom
--- a/layout/style/CSSSupportsRule.h
+++ b/layout/style/CSSSupportsRule.h
@@ -3,37 +3,30 @@
 /* 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 mozilla_dom_CSSSupportsRule_h
 #define mozilla_dom_CSSSupportsRule_h
 
 #include "mozilla/css/GroupRule.h"
-#include "nsIDOMCSSGroupingRule.h"
 
 namespace mozilla {
 namespace dom {
 
 class CSSSupportsRule : public css::ConditionRule
-                      , public nsIDOMCSSGroupingRule
 {
 protected:
   using ConditionRule::ConditionRule;
   virtual ~CSSSupportsRule() {}
 
 public:
-  NS_DECL_ISUPPORTS_INHERITED
-
   int32_t GetType() const override { return css::Rule::SUPPORTS_RULE; }
   using Rule::GetType;
 
-  // nsIDOMCSSGroupingRule interface
-  NS_DECL_NSIDOMCSSGROUPINGRULE
-
   // WebIDL interface
   uint16_t Type() const override { return nsIDOMCSSRule::SUPPORTS_RULE; }
 
   JSObject* WrapObject(JSContext* aCx,
                        JS::Handle<JSObject*> aGivenProto) override;
 };
 
 } // namespace dom
--- a/layout/style/nsCSSRules.h
+++ b/layout/style/nsCSSRules.h
@@ -25,17 +25,16 @@
 #include "mozilla/dom/CSSPageRule.h"
 #include "mozilla/dom/CSSSupportsRule.h"
 #include "mozilla/dom/CSSMozDocumentRule.h"
 #include "nsAutoPtr.h"
 #include "nsCSSPropertyID.h"
 #include "nsCSSValue.h"
 #include "nsDOMCSSDeclaration.h"
 #include "nsIDOMCSSFontFeatureValuesRule.h"
-#include "nsIDOMCSSGroupingRule.h"
 #include "nsTArray.h"
 
 class nsMediaList;
 
 namespace mozilla {
 
 class ErrorResult;