diff --git a/dom/base/nsDOMClassInfo.cpp b/dom/base/nsDOMClassInfo.cpp index bc3a6fefaa..1ea93ed4ce 100644 --- a/dom/base/nsDOMClassInfo.cpp +++ b/dom/base/nsDOMClassInfo.cpp @@ -67,7 +67,6 @@ #include "nsIDOMEventTarget.h" // CSS related includes -#include "nsCSSRules.h" #include "nsIDOMCSSRule.h" #include "nsMemory.h" @@ -1890,31 +1889,6 @@ nsEventTargetSH::PreserveWrapper(nsISupports *aNative) target->PreserveWrapper(aNative); } -// CSS rule helper -NS_IMETHODIMP -nsCSSRuleSH::PreCreate(nsISupports *nativeObj, JSContext *cx, - JSObject *aGlobalObj, JSObject **parentObj) -{ - JS::Rooted globalObj(cx, aGlobalObj); - nsCOMPtr rule = do_QueryInterface(nativeObj); - if (!rule) { - return NS_ERROR_UNEXPECTED; - } - css::Rule* cssRule = rule->GetCSSRule(); - nsIDocument* doc = cssRule->GetDocument(); - if (!doc) { - *parentObj = globalObj; - return NS_OK; - } - - nsIGlobalObject* global = doc->GetScopeObject(); - if (!global) { - return NS_ERROR_UNEXPECTED; - } - *parentObj = global->GetGlobalJSObject(); - return *parentObj ? NS_OK : NS_ERROR_FAILURE; -} - // nsIDOMEventListener::HandleEvent() 'this' converter helper NS_INTERFACE_MAP_BEGIN(nsEventListenerThisTranslator) diff --git a/dom/base/nsDOMClassInfo.h b/dom/base/nsDOMClassInfo.h index 0d70b040bc..48f4966f0f 100644 --- a/dom/base/nsDOMClassInfo.h +++ b/dom/base/nsDOMClassInfo.h @@ -172,29 +172,6 @@ public: } }; - -// Makes sure that we always create our wrapper in the right global, so we won't -// cache one from the wrong global. -class nsCSSRuleSH : public nsDOMGenericSH -{ -protected: - explicit nsCSSRuleSH(nsDOMClassInfoData* aData) : nsDOMGenericSH(aData) - { - } - - virtual ~nsCSSRuleSH() - { - } -public: - NS_IMETHOD PreCreate(nsISupports *nativeObj, JSContext *cx, - JSObject *globalObj, JSObject **parentObj) override; - - static nsIClassInfo *doCreate(nsDOMClassInfoData* aData) - { - return new nsCSSRuleSH(aData); - } -}; - // A place to hang some static methods that we should really consider // moving to be nsGlobalWindow member methods. See bug 1062418. class nsWindowSH diff --git a/dom/bindings/Bindings.conf b/dom/bindings/Bindings.conf index ffb4edbf5d..f484c59e53 100644 --- a/dom/bindings/Bindings.conf +++ b/dom/bindings/Bindings.conf @@ -265,7 +265,6 @@ DOMInterfaces = { }, 'CSSRule': { - 'hasXPConnectImpls': True, 'concrete': False, 'nativeType': 'mozilla::css::Rule' }, diff --git a/layout/style/Rule.h b/layout/style/Rule.h index 3537bad449..9586edffd4 100644 --- a/layout/style/Rule.h +++ b/layout/style/Rule.h @@ -19,11 +19,6 @@ struct nsRuleData; template struct already_AddRefed; class nsHTMLCSSStyleSheet; -// Temporary IID for the nsIDOMCSSRule interface {ebb427f1-a935-480b-bd9b-bb0e3bd387a9} -#define NS_IDOM_CSSRULE_IID \ -{ 0xebb427f1, 0xa935, 0x480b, \ - { 0xbd, 0x9b, 0xbb, 0x0e, 0x3b, 0xd3, 0x87, 0xa9 } } - namespace mozilla { namespace css { class GroupRule; @@ -51,8 +46,6 @@ protected: virtual ~Rule() {} public: - NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDOM_CSSRULE_IID) - NS_DECL_CYCLE_COLLECTING_ISUPPORTS NS_DECL_CYCLE_COLLECTION_SKIPPABLE_SCRIPT_HOLDER_CLASS(Rule) // Return true if this rule is known to be a cycle collection leaf, in the @@ -145,8 +138,6 @@ protected: uint32_t mColumnNumber; }; -NS_DEFINE_STATIC_IID_ACCESSOR(Rule, NS_IDOM_CSSRULE_IID) - } // namespace css } // namespace mozilla