Events weren't bubbling into the document. They do this now.

This commit is contained in:
hyatt%netscape.com 1999-05-16 06:58:56 +00:00
parent 5002ac1bb1
commit d054927d19
3 changed files with 27 additions and 3 deletions

View File

@ -2243,7 +2243,8 @@ RDFElementImpl::HandleDOMEvent(nsIPresContext& aPresContext,
}
//Capturing stage
//XXX Nees impl. Talk to joki@netscape.com for help.
// XXX Needs to be implemented. Copy from nsGenericElement at some point.
// Talk to joki@netscape.com for help.
//Local handling stage
if (nsnull != mListenerManager) {
@ -2252,9 +2253,16 @@ RDFElementImpl::HandleDOMEvent(nsIPresContext& aPresContext,
//Bubbling stage
if ((NS_EVENT_FLAG_CAPTURE != aFlags) && (mParent != nsnull)) {
// We have a parent. Let them field the event.
ret = mParent->HandleDOMEvent(aPresContext, aEvent, aDOMEvent,
NS_EVENT_FLAG_BUBBLE, aEventStatus);
}
else if ((NS_EVENT_FLAG_CAPTURE != aFlags) && (mDocument != nsnull)) {
// We must be the document root. The event should bubble to the
// document.
ret = mDocument->HandleDOMEvent(aPresContext, aEvent, aDOMEvent,
NS_EVENT_FLAG_BUBBLE, aEventStatus);
}
if (NS_EVENT_FLAG_INIT == aFlags) {
// We're leaving the DOM event loop so if we created a DOM event,

View File

@ -2243,7 +2243,8 @@ RDFElementImpl::HandleDOMEvent(nsIPresContext& aPresContext,
}
//Capturing stage
//XXX Nees impl. Talk to joki@netscape.com for help.
// XXX Needs to be implemented. Copy from nsGenericElement at some point.
// Talk to joki@netscape.com for help.
//Local handling stage
if (nsnull != mListenerManager) {
@ -2252,9 +2253,16 @@ RDFElementImpl::HandleDOMEvent(nsIPresContext& aPresContext,
//Bubbling stage
if ((NS_EVENT_FLAG_CAPTURE != aFlags) && (mParent != nsnull)) {
// We have a parent. Let them field the event.
ret = mParent->HandleDOMEvent(aPresContext, aEvent, aDOMEvent,
NS_EVENT_FLAG_BUBBLE, aEventStatus);
}
else if ((NS_EVENT_FLAG_CAPTURE != aFlags) && (mDocument != nsnull)) {
// We must be the document root. The event should bubble to the
// document.
ret = mDocument->HandleDOMEvent(aPresContext, aEvent, aDOMEvent,
NS_EVENT_FLAG_BUBBLE, aEventStatus);
}
if (NS_EVENT_FLAG_INIT == aFlags) {
// We're leaving the DOM event loop so if we created a DOM event,

View File

@ -2243,7 +2243,8 @@ RDFElementImpl::HandleDOMEvent(nsIPresContext& aPresContext,
}
//Capturing stage
//XXX Nees impl. Talk to joki@netscape.com for help.
// XXX Needs to be implemented. Copy from nsGenericElement at some point.
// Talk to joki@netscape.com for help.
//Local handling stage
if (nsnull != mListenerManager) {
@ -2252,9 +2253,16 @@ RDFElementImpl::HandleDOMEvent(nsIPresContext& aPresContext,
//Bubbling stage
if ((NS_EVENT_FLAG_CAPTURE != aFlags) && (mParent != nsnull)) {
// We have a parent. Let them field the event.
ret = mParent->HandleDOMEvent(aPresContext, aEvent, aDOMEvent,
NS_EVENT_FLAG_BUBBLE, aEventStatus);
}
else if ((NS_EVENT_FLAG_CAPTURE != aFlags) && (mDocument != nsnull)) {
// We must be the document root. The event should bubble to the
// document.
ret = mDocument->HandleDOMEvent(aPresContext, aEvent, aDOMEvent,
NS_EVENT_FLAG_BUBBLE, aEventStatus);
}
if (NS_EVENT_FLAG_INIT == aFlags) {
// We're leaving the DOM event loop so if we created a DOM event,