From 5f39ff87a0aa76ddc3af7c31a1d1b4be80472d87 Mon Sep 17 00:00:00 2001 From: Moonchild Date: Mar 30 2024 10:27:48 +0000 Subject: Issue #2490 - Part 2: Remove the now-unused GetExistingDOMRule() function. --- diff --git a/layout/style/Rule.h b/layout/style/Rule.h index ac72297..f3a529b 100644 --- a/layout/style/Rule.h +++ b/layout/style/Rule.h @@ -27,8 +27,7 @@ class GroupRule; #define DECL_STYLE_RULE_INHERIT \ DECL_STYLE_RULE_INHERIT_NO_DOMRULE \ - virtual nsIDOMCSSRule* GetDOMRule() override; \ - virtual nsIDOMCSSRule* GetExistingDOMRule() override; + virtual nsIDOMCSSRule* GetDOMRule() override; class Rule : public nsISupports { protected: @@ -116,9 +115,6 @@ public: // supposed to have a DOM rule representation (and our code wouldn't work). virtual nsIDOMCSSRule* GetDOMRule() = 0; - // Like GetDOMRule(), but won't create one if we don't have one yet - virtual nsIDOMCSSRule* GetExistingDOMRule() = 0; - // to implement methods on nsIDOMCSSRule nsresult GetParentRule(nsIDOMCSSRule** aParentRule); nsresult GetParentStyleSheet(nsIDOMCSSStyleSheet** aSheet); diff --git a/layout/style/StyleRule.cpp b/layout/style/StyleRule.cpp index a4b8541..9aae65e 100644 --- a/layout/style/StyleRule.cpp +++ b/layout/style/StyleRule.cpp @@ -1524,12 +1524,6 @@ StyleRule::GetDOMRule() return mDOMRule; } -/* virtual */ nsIDOMCSSRule* -StyleRule::GetExistingDOMRule() -{ - return mDOMRule; -} - void StyleRule::SetDeclaration(Declaration* aDecl) { diff --git a/layout/style/StyleRule.h b/layout/style/StyleRule.h index ef21acc..0287981 100644 --- a/layout/style/StyleRule.h +++ b/layout/style/StyleRule.h @@ -357,8 +357,6 @@ public: virtual nsIDOMCSSRule* GetDOMRule() override; - virtual nsIDOMCSSRule* GetExistingDOMRule() override; - #ifdef DEBUG virtual void List(FILE* out = stdout, int32_t aIndent = 0) const override; #endif diff --git a/layout/style/nsCSSRules.cpp b/layout/style/nsCSSRules.cpp index 53886fc..ba12d7b 100644 --- a/layout/style/nsCSSRules.cpp +++ b/layout/style/nsCSSRules.cpp @@ -44,8 +44,6 @@ using namespace mozilla::dom; #define IMPL_STYLE_RULE_INHERIT_GET_DOM_RULE_WEAK(class_, super_) \ /* virtual */ nsIDOMCSSRule* class_::GetDOMRule() \ - { return this; } \ - /* virtual */ nsIDOMCSSRule* class_::GetExistingDOMRule() \ { return this; } #define IMPL_STYLE_RULE_INHERIT(class_, super_) \ @@ -905,7 +903,6 @@ NS_INTERFACE_MAP_BEGIN(DocumentRule) NS_INTERFACE_MAP_ENTRY(nsIDOMCSSGroupingRule) NS_INTERFACE_MAP_ENTRY(nsIDOMCSSConditionRule) NS_INTERFACE_MAP_ENTRY(nsIDOMCSSMozDocumentRule) - NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, mozilla::css::Rule) NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(CSSMozDocumentRule) NS_INTERFACE_MAP_END_INHERITING(GroupRule) diff --git a/layout/style/nsCSSRules.h b/layout/style/nsCSSRules.h index 57c7079..d219945 100644 --- a/layout/style/nsCSSRules.h +++ b/layout/style/nsCSSRules.h @@ -70,10 +70,6 @@ public: { return this; } - virtual nsIDOMCSSRule* GetExistingDOMRule() override - { - return this; - } // nsIDOMCSSRule interface NS_DECL_NSIDOMCSSRULE @@ -125,10 +121,6 @@ public: { return this; } - virtual nsIDOMCSSRule* GetExistingDOMRule() override - { - return this; - } // nsIDOMCSSRule interface NS_DECL_NSIDOMCSSRULE @@ -459,10 +451,6 @@ public: { return this; } - virtual nsIDOMCSSRule* GetExistingDOMRule() override - { - return this; - } // nsIDOMCSSRule interface NS_DECL_NSIDOMCSSRULE @@ -579,10 +567,6 @@ public: { return this; } - virtual nsIDOMCSSRule* GetExistingDOMRule() override - { - return this; - } NS_DECL_ISUPPORTS_INHERITED