Implementing document and window capture in the XUL DOM.

This commit is contained in:
hyatt%netscape.com 1999-05-27 21:03:59 +00:00
Родитель 531f981465
Коммит 989a98a5b9
5 изменённых файлов: 30 добавлений и 9 удалений

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

@ -2254,7 +2254,12 @@ RDFElementImpl::HandleDOMEvent(nsIPresContext& aPresContext,
//Capturing stage
// XXX Needs to be implemented. Copy from nsGenericElement at some point.
// Talk to joki@netscape.com for help.
// For now at least handle document capture.
if ((NS_EVENT_FLAG_BUBBLE != aFlags) && (mDocument != nsnull)) {
ret = mDocument->HandleDOMEvent(aPresContext, aEvent, aDOMEvent,
NS_EVENT_FLAG_CAPTURE, aEventStatus);
}
//Local handling stage
if (nsnull != mListenerManager) {
mListenerManager->HandleEvent(aPresContext, aEvent, aDOMEvent, aFlags, aEventStatus);

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

@ -2319,9 +2319,12 @@ XULDocumentImpl::HandleDOMEvent(nsIPresContext& aPresContext,
}
//Capturing stage
if (NS_EVENT_FLAG_BUBBLE != aFlags) {
// XXX Check back with nsGenericDocument.cpp later to find out if this
// has been implemented.
if (NS_EVENT_FLAG_BUBBLE != aFlags && nsnull != mScriptContextOwner) {
nsIScriptGlobalObject* global;
if (NS_OK == mScriptContextOwner->GetScriptGlobalObject(&global)) {
global->HandleDOMEvent(aPresContext, aEvent, aDOMEvent, NS_EVENT_FLAG_CAPTURE, aEventStatus);
NS_RELEASE(global);
}
}
//Local handling stage

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

@ -2254,7 +2254,12 @@ RDFElementImpl::HandleDOMEvent(nsIPresContext& aPresContext,
//Capturing stage
// XXX Needs to be implemented. Copy from nsGenericElement at some point.
// Talk to joki@netscape.com for help.
// For now at least handle document capture.
if ((NS_EVENT_FLAG_BUBBLE != aFlags) && (mDocument != nsnull)) {
ret = mDocument->HandleDOMEvent(aPresContext, aEvent, aDOMEvent,
NS_EVENT_FLAG_CAPTURE, aEventStatus);
}
//Local handling stage
if (nsnull != mListenerManager) {
mListenerManager->HandleEvent(aPresContext, aEvent, aDOMEvent, aFlags, aEventStatus);

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

@ -2319,9 +2319,12 @@ XULDocumentImpl::HandleDOMEvent(nsIPresContext& aPresContext,
}
//Capturing stage
if (NS_EVENT_FLAG_BUBBLE != aFlags) {
// XXX Check back with nsGenericDocument.cpp later to find out if this
// has been implemented.
if (NS_EVENT_FLAG_BUBBLE != aFlags && nsnull != mScriptContextOwner) {
nsIScriptGlobalObject* global;
if (NS_OK == mScriptContextOwner->GetScriptGlobalObject(&global)) {
global->HandleDOMEvent(aPresContext, aEvent, aDOMEvent, NS_EVENT_FLAG_CAPTURE, aEventStatus);
NS_RELEASE(global);
}
}
//Local handling stage

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

@ -2254,7 +2254,12 @@ RDFElementImpl::HandleDOMEvent(nsIPresContext& aPresContext,
//Capturing stage
// XXX Needs to be implemented. Copy from nsGenericElement at some point.
// Talk to joki@netscape.com for help.
// For now at least handle document capture.
if ((NS_EVENT_FLAG_BUBBLE != aFlags) && (mDocument != nsnull)) {
ret = mDocument->HandleDOMEvent(aPresContext, aEvent, aDOMEvent,
NS_EVENT_FLAG_CAPTURE, aEventStatus);
}
//Local handling stage
if (nsnull != mListenerManager) {
mListenerManager->HandleEvent(aPresContext, aEvent, aDOMEvent, aFlags, aEventStatus);