1
0
mirror of https://github.com/roytam1/UXP.git synced 2026-05-26 13:58:49 +00:00

Issue #2490 - Part 20: Remove the stuff that was added temporarily to deal with a mix of WebIDL and non-WebIDL rules.

This commit is contained in:
Moonchild
2024-04-04 20:07:33 +02:00
committed by roytam1
parent 7fb5d53a79
commit 641b556c53
4 changed files with 0 additions and 59 deletions
-26
View File
@@ -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<JSObject*> globalObj(cx, aGlobalObj);
nsCOMPtr<nsIDOMCSSRule> 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)
-23
View File
@@ -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
-1
View File
@@ -265,7 +265,6 @@ DOMInterfaces = {
},
'CSSRule': {
'hasXPConnectImpls': True,
'concrete': False,
'nativeType': 'mozilla::css::Rule'
},
-9
View File
@@ -19,11 +19,6 @@ struct nsRuleData;
template<class T> 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