mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-03 23:30:46 +00:00
Events weren't bubbling into the document. They do this now.
This commit is contained in:
parent
5002ac1bb1
commit
d054927d19
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user