diff --git a/content/xul/content/src/nsXULPopupListener.cpp b/content/xul/content/src/nsXULPopupListener.cpp index 839785f4fc4..1025915fdbc 100644 --- a/content/xul/content/src/nsXULPopupListener.cpp +++ b/content/xul/content/src/nsXULPopupListener.cpp @@ -22,6 +22,7 @@ * Contributor(s): * Dean Tessman * Pierre Phaneuf + * Robert O'Callahan */ /* @@ -321,12 +322,8 @@ XULPopupListenerImpl::MouseOut(nsIDOMEvent* aMouseEvent) mPopupContent = nsnull; // release the popup // clear out the tooltip node on the document - nsCOMPtr eventTarget; - nsCOMPtr eventTargetNode; - aMouseEvent->GetTarget(getter_AddRefs(eventTarget)); - if (eventTarget) eventTargetNode = do_QueryInterface(eventTarget); nsCOMPtr doc; - FindDocumentForNode ( eventTargetNode, getter_AddRefs(doc) ); + FindDocumentForNode ( mElement, getter_AddRefs(doc) ); if ( doc ) doc->SetTooltipNode(nsnull); } diff --git a/rdf/content/src/nsXULPopupListener.cpp b/rdf/content/src/nsXULPopupListener.cpp index 839785f4fc4..1025915fdbc 100644 --- a/rdf/content/src/nsXULPopupListener.cpp +++ b/rdf/content/src/nsXULPopupListener.cpp @@ -22,6 +22,7 @@ * Contributor(s): * Dean Tessman * Pierre Phaneuf + * Robert O'Callahan */ /* @@ -321,12 +322,8 @@ XULPopupListenerImpl::MouseOut(nsIDOMEvent* aMouseEvent) mPopupContent = nsnull; // release the popup // clear out the tooltip node on the document - nsCOMPtr eventTarget; - nsCOMPtr eventTargetNode; - aMouseEvent->GetTarget(getter_AddRefs(eventTarget)); - if (eventTarget) eventTargetNode = do_QueryInterface(eventTarget); nsCOMPtr doc; - FindDocumentForNode ( eventTargetNode, getter_AddRefs(doc) ); + FindDocumentForNode ( mElement, getter_AddRefs(doc) ); if ( doc ) doc->SetTooltipNode(nsnull); }