Bug 405094 Tooltip doesn't disappear anymore when hovering over it

r+sr=roc a=beltzner
This commit is contained in:
ginn.chen%sun.com 2007-12-03 05:46:22 +00:00
Родитель 4c6f419e7c
Коммит b0f65647bf
2 изменённых файлов: 11 добавлений и 9 удалений

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

@ -3726,13 +3726,13 @@ nsContentUtils::GetTopLevelWidget(nsIWidget* aWidget)
{
if (!aWidget) {
return nsnull;
}
}
nsIWidget* currWidget = aWidget;
nsIWidget* parentWidget;
while ((parentWidget = currWidget->GetParent()) != nsnull) {
currWidget = parentWidget;
}
}
return currWidget;
}

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

@ -2980,13 +2980,6 @@ nsEventStateManager::NotifyMouseOut(nsGUIEvent* aEvent, nsIContent* aMovingInto)
return;
if (mLastMouseOverFrame) {
if (nsContentUtils::GetTopLevelWidget(aEvent->widget) !=
nsContentUtils::GetTopLevelWidget(mLastMouseOverFrame->GetWindow())) {
// the MouseOut event widget doesn't have same top widget with
// mLastMouseOverFrame, it's a spurious event for mLastMouseOverFrame
return;
}
// if the frame is associated with a subdocument,
// tell the subdocument that we're moving out of it
nsIFrameFrame* subdocFrame;
@ -3123,6 +3116,15 @@ nsEventStateManager::GenerateMouseEnterExit(nsGUIEvent* aEvent)
{
// This is actually the window mouse exit event. We're not moving
// into any new element.
if (mLastMouseOverFrame &&
nsContentUtils::GetTopLevelWidget(aEvent->widget) !=
nsContentUtils::GetTopLevelWidget(mLastMouseOverFrame->GetWindow())) {
// the MouseOut event widget doesn't have same top widget with
// mLastMouseOverFrame, it's a spurious event for mLastMouseOverFrame
break;
}
NotifyMouseOut(aEvent, nsnull);
}
break;