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

This commit is contained in:
Timothy Nikkel 2010-08-27 18:15:08 -05:00
Родитель 4b85c57ca1
Коммит e8be710d9c
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;
}