From e8be710d9cb6a58ad3a08355aaafe86a151c909e Mon Sep 17 00:00:00 2001 From: Timothy Nikkel Date: Fri, 27 Aug 2010 18:15:08 -0500 Subject: [PATCH] Bug 587944. Save and restore the target frame when we dispatch a synth mouse enter/exit event. r=smaug --- content/events/src/nsEventStateManager.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/content/events/src/nsEventStateManager.cpp b/content/events/src/nsEventStateManager.cpp index b0125f01f5ab..2b02207a374e 100644 --- a/content/events/src/nsEventStateManager.cpp +++ b/content/events/src/nsEventStateManager.cpp @@ -3294,6 +3294,7 @@ nsEventStateManager::PostHandleEvent(nsPresContext* aPresContext, //Reset target frame to null to avoid mistargeting after reentrant event mCurrentTarget = nsnull; + mCurrentTargetContent = nsnull; return ret; } @@ -3612,6 +3613,8 @@ nsEventStateManager::DispatchMouseEvent(nsGUIEvent* aEvent, PRUint32 aMessage, event.relatedTarget = aRelatedContent; event.inputSource = static_cast(aEvent)->inputSource; + nsWeakFrame previousTarget = mCurrentTarget; + mCurrentTargetContent = aTargetContent; nsIFrame* targetFrame = nsnull; @@ -3629,6 +3632,7 @@ nsEventStateManager::DispatchMouseEvent(nsGUIEvent* aEvent, PRUint32 aMessage, } mCurrentTargetContent = nsnull; + mCurrentTarget = previousTarget; return targetFrame; }