From 5356344529e4b26d63ab2f786867a0668cb1d3a7 Mon Sep 17 00:00:00 2001 From: "hyatt%netscape.com" Date: Mon, 23 Aug 1999 07:26:57 +0000 Subject: [PATCH] Implemented element-level capturing in the XUL DOM. --- content/xul/content/src/nsXULElement.cpp | 8 ++++---- rdf/content/src/nsRDFElement.cpp | 8 ++++---- rdf/content/src/nsXULElement.cpp | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/content/xul/content/src/nsXULElement.cpp b/content/xul/content/src/nsXULElement.cpp index fd7785a8a26..f538c040392 100644 --- a/content/xul/content/src/nsXULElement.cpp +++ b/content/xul/content/src/nsXULElement.cpp @@ -2709,10 +2709,10 @@ RDFElementImpl::HandleDOMEvent(nsIPresContext& aPresContext, } // Node capturing stage - // XXX Needs to be implemented. Copy from nsGenericElement at some point. - // Talk to joki@netscape.com for help. - if (NS_EVENT_FLAG_BUBBLE != aFlags) { - // Help! + if (NS_EVENT_FLAG_BUBBLE != aFlags && mParent) { + // Pass off to our parent. + mParent->HandleDOMEvent(aPresContext, aEvent, aDOMEvent, + NS_EVENT_FLAG_CAPTURE, aEventStatus); } //Local handling stage diff --git a/rdf/content/src/nsRDFElement.cpp b/rdf/content/src/nsRDFElement.cpp index fd7785a8a26..f538c040392 100644 --- a/rdf/content/src/nsRDFElement.cpp +++ b/rdf/content/src/nsRDFElement.cpp @@ -2709,10 +2709,10 @@ RDFElementImpl::HandleDOMEvent(nsIPresContext& aPresContext, } // Node capturing stage - // XXX Needs to be implemented. Copy from nsGenericElement at some point. - // Talk to joki@netscape.com for help. - if (NS_EVENT_FLAG_BUBBLE != aFlags) { - // Help! + if (NS_EVENT_FLAG_BUBBLE != aFlags && mParent) { + // Pass off to our parent. + mParent->HandleDOMEvent(aPresContext, aEvent, aDOMEvent, + NS_EVENT_FLAG_CAPTURE, aEventStatus); } //Local handling stage diff --git a/rdf/content/src/nsXULElement.cpp b/rdf/content/src/nsXULElement.cpp index fd7785a8a26..f538c040392 100644 --- a/rdf/content/src/nsXULElement.cpp +++ b/rdf/content/src/nsXULElement.cpp @@ -2709,10 +2709,10 @@ RDFElementImpl::HandleDOMEvent(nsIPresContext& aPresContext, } // Node capturing stage - // XXX Needs to be implemented. Copy from nsGenericElement at some point. - // Talk to joki@netscape.com for help. - if (NS_EVENT_FLAG_BUBBLE != aFlags) { - // Help! + if (NS_EVENT_FLAG_BUBBLE != aFlags && mParent) { + // Pass off to our parent. + mParent->HandleDOMEvent(aPresContext, aEvent, aDOMEvent, + NS_EVENT_FLAG_CAPTURE, aEventStatus); } //Local handling stage