Changes to fix the bookmarks menu crashing problem.

This commit is contained in:
hyatt%netscape.com 1999-03-15 05:39:04 +00:00
Родитель 9fcc58babd
Коммит e61c558de9
8 изменённых файлов: 60 добавлений и 2 удалений

Просмотреть файл

@ -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);