mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-26 02:17:34 +09:00
Issue #1792 - Part 2: Move GetParentObject() to EventTarget.h for re-use.
This commit is contained in:
parent
d751dbe1a4
commit
dd06472de7
2 changed files with 7 additions and 4 deletions
|
|
@ -146,10 +146,7 @@ public:
|
||||||
void BindToOwner(nsPIDOMWindowInner* aOwner);
|
void BindToOwner(nsPIDOMWindowInner* aOwner);
|
||||||
void BindToOwner(DOMEventTargetHelper* aOther);
|
void BindToOwner(DOMEventTargetHelper* aOther);
|
||||||
virtual void DisconnectFromOwner();
|
virtual void DisconnectFromOwner();
|
||||||
nsIGlobalObject* GetParentObject() const
|
using EventTarget::GetParentObject;
|
||||||
{
|
|
||||||
return GetOwnerGlobal();
|
|
||||||
}
|
|
||||||
virtual nsIGlobalObject* GetOwnerGlobal() const override
|
virtual nsIGlobalObject* GetOwnerGlobal() const override
|
||||||
{
|
{
|
||||||
nsCOMPtr<nsIGlobalObject> parentObject = do_QueryReferent(mParentObject);
|
nsCOMPtr<nsIGlobalObject> parentObject = do_QueryReferent(mParentObject);
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,7 @@ class Event;
|
||||||
class EventListener;
|
class EventListener;
|
||||||
class EventListenerOptionsOrBoolean;
|
class EventListenerOptionsOrBoolean;
|
||||||
class EventHandlerNonNull;
|
class EventHandlerNonNull;
|
||||||
|
class GlobalObject;
|
||||||
|
|
||||||
template <class T> struct Nullable;
|
template <class T> struct Nullable;
|
||||||
|
|
||||||
|
|
@ -55,6 +56,11 @@ public:
|
||||||
ErrorResult& aRv);
|
ErrorResult& aRv);
|
||||||
bool DispatchEvent(JSContext* aCx, Event& aEvent, ErrorResult& aRv);
|
bool DispatchEvent(JSContext* aCx, Event& aEvent, ErrorResult& aRv);
|
||||||
|
|
||||||
|
nsIGlobalObject* GetParentObject() const
|
||||||
|
{
|
||||||
|
return GetOwnerGlobal();
|
||||||
|
}
|
||||||
|
|
||||||
// Note, this takes the type in onfoo form!
|
// Note, this takes the type in onfoo form!
|
||||||
EventHandlerNonNull* GetEventHandler(const nsAString& aType)
|
EventHandlerNonNull* GetEventHandler(const nsAString& aType)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue