зеркало из https://github.com/mozilla/pjs.git
Changes to fix the bookmarks menu crashing problem.
This commit is contained in:
Родитель
9fcc58babd
Коммит
e61c558de9
|
@ -87,6 +87,15 @@ public:
|
|||
nsIDOMEvent** aDOMEvent,
|
||||
nsEventStatus& aEventStatus) = 0;
|
||||
|
||||
/**
|
||||
* Creates a DOM event that can subsequently be passed into HandleEvent.
|
||||
* (used rarely in the situation where methods on the event need to be
|
||||
* invoked prior to the processing of the event).
|
||||
*/
|
||||
virtual nsresult CreateEvent(nsIPresContext& aPresContext,
|
||||
nsEvent* aEvent,
|
||||
nsIDOMEvent** aDOMEvent) = 0;
|
||||
|
||||
/**
|
||||
* Captures all events designated for descendant objects at the current level.
|
||||
* @param an event listener
|
||||
|
|
|
@ -127,7 +127,12 @@ NS_METHOD nsDOMEvent::GetTarget(nsIDOMNode** aTarget)
|
|||
|
||||
NS_METHOD nsDOMEvent::SetTarget(nsIDOMNode* aTarget)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
if (mTarget != aTarget) {
|
||||
NS_IF_RELEASE(mTarget);
|
||||
NS_IF_ADDREF(aTarget);
|
||||
mTarget = aTarget;
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_METHOD nsDOMEvent::GetScreenX(PRInt32* aScreenX)
|
||||
|
|
|
@ -538,6 +538,17 @@ nsresult nsEventListenerManager::HandleEvent(nsIPresContext& aPresContext,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a DOM event
|
||||
*/
|
||||
|
||||
nsresult nsEventListenerManager::CreateEvent(nsIPresContext& aPresContext,
|
||||
nsEvent* aEvent,
|
||||
nsIDOMEvent** aDOMEvent)
|
||||
{
|
||||
return NS_NewDOMEvent(aDOMEvent, aPresContext, aEvent);
|
||||
}
|
||||
|
||||
/**
|
||||
* Captures all events designated for descendant objects at the current level.
|
||||
* @param an event listener
|
||||
|
|
|
@ -72,6 +72,10 @@ public:
|
|||
nsIDOMEvent** aDOMEvent,
|
||||
nsEventStatus& aEventStatus);
|
||||
|
||||
virtual nsresult CreateEvent(nsIPresContext& aPresContext,
|
||||
nsEvent* aEvent,
|
||||
nsIDOMEvent** aDOMEvent);
|
||||
|
||||
protected:
|
||||
nsresult SetJSEventListener(nsIScriptContext *aContext, JSObject *aObject, REFNSIID aIID);
|
||||
|
||||
|
|
|
@ -87,6 +87,15 @@ public:
|
|||
nsIDOMEvent** aDOMEvent,
|
||||
nsEventStatus& aEventStatus) = 0;
|
||||
|
||||
/**
|
||||
* Creates a DOM event that can subsequently be passed into HandleEvent.
|
||||
* (used rarely in the situation where methods on the event need to be
|
||||
* invoked prior to the processing of the event).
|
||||
*/
|
||||
virtual nsresult CreateEvent(nsIPresContext& aPresContext,
|
||||
nsEvent* aEvent,
|
||||
nsIDOMEvent** aDOMEvent) = 0;
|
||||
|
||||
/**
|
||||
* Captures all events designated for descendant objects at the current level.
|
||||
* @param an event listener
|
||||
|
|
|
@ -127,7 +127,12 @@ NS_METHOD nsDOMEvent::GetTarget(nsIDOMNode** aTarget)
|
|||
|
||||
NS_METHOD nsDOMEvent::SetTarget(nsIDOMNode* aTarget)
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
if (mTarget != aTarget) {
|
||||
NS_IF_RELEASE(mTarget);
|
||||
NS_IF_ADDREF(aTarget);
|
||||
mTarget = aTarget;
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_METHOD nsDOMEvent::GetScreenX(PRInt32* aScreenX)
|
||||
|
|
|
@ -538,6 +538,17 @@ nsresult nsEventListenerManager::HandleEvent(nsIPresContext& aPresContext,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a DOM event
|
||||
*/
|
||||
|
||||
nsresult nsEventListenerManager::CreateEvent(nsIPresContext& aPresContext,
|
||||
nsEvent* aEvent,
|
||||
nsIDOMEvent** aDOMEvent)
|
||||
{
|
||||
return NS_NewDOMEvent(aDOMEvent, aPresContext, aEvent);
|
||||
}
|
||||
|
||||
/**
|
||||
* Captures all events designated for descendant objects at the current level.
|
||||
* @param an event listener
|
||||
|
|
|
@ -72,6 +72,10 @@ public:
|
|||
nsIDOMEvent** aDOMEvent,
|
||||
nsEventStatus& aEventStatus);
|
||||
|
||||
virtual nsresult CreateEvent(nsIPresContext& aPresContext,
|
||||
nsEvent* aEvent,
|
||||
nsIDOMEvent** aDOMEvent);
|
||||
|
||||
protected:
|
||||
nsresult SetJSEventListener(nsIScriptContext *aContext, JSObject *aObject, REFNSIID aIID);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче