Bug 587944. Save and restore the target frame when we dispatch a synth mouse enter/exit event.

This commit is contained in:
Timothy Nikkel 2010-08-26 22:01:43 -05:00
Родитель 22b465bf77
Коммит 717f27a469
1 изменённых файлов: 4 добавлений и 0 удалений

Просмотреть файл

@ -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<nsMouseEvent*>(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;
}