Fix crash when mouseovering things that disappear (bug 196012), r=peterl@netscape.com, sr=bryner@netscape.com, a=asa

This commit is contained in:
jkeiser%netscape.com 2003-05-06 00:03:15 +00:00
Родитель 30bd0e55ed
Коммит 687d4c8391
1 изменённых файлов: 5 добавлений и 0 удалений

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

@ -2604,6 +2604,8 @@ nsEventStateManager::GenerateMouseEnterExit(nsIPresContext* aPresContext, nsGUIE
DispatchMouseEvent(aPresContext, aEvent, NS_MOUSE_EXIT_SYNTH,
mLastMouseOverElement, mLastMouseOverFrame,
targetElement);
// frame may have changed during the call; make sure bit is set
SetFrameExternalReference(mLastMouseOverFrame);
// Turn off recursion protection
mFirstMouseOutEventElement = nsnull;
@ -2633,6 +2635,9 @@ nsEventStateManager::GenerateMouseEnterExit(nsIPresContext* aPresContext, nsGUIE
targetElement, targetFrame, mLastMouseOverElement);
mLastMouseOverFrame = targetFrame;
// This may be a different frame than the one we started with, so we
// need to ensure it has its external reference bit set.
SetFrameExternalReference(mLastMouseOverFrame);
mLastMouseOverElement = targetElement;
// Turn recursion protection back off