зеркало из https://github.com/mozilla/gecko-dev.git
Bug 405094 Tooltip doesn't disappear anymore when hovering over it r+sr=roc a=beltzner
This commit is contained in:
Родитель
ee48eb1bf9
Коммит
c8fc7a26b4
|
@ -3726,13 +3726,13 @@ nsContentUtils::GetTopLevelWidget(nsIWidget* aWidget)
|
||||||
{
|
{
|
||||||
if (!aWidget) {
|
if (!aWidget) {
|
||||||
return nsnull;
|
return nsnull;
|
||||||
}
|
}
|
||||||
|
|
||||||
nsIWidget* currWidget = aWidget;
|
nsIWidget* currWidget = aWidget;
|
||||||
nsIWidget* parentWidget;
|
nsIWidget* parentWidget;
|
||||||
while ((parentWidget = currWidget->GetParent()) != nsnull) {
|
while ((parentWidget = currWidget->GetParent()) != nsnull) {
|
||||||
currWidget = parentWidget;
|
currWidget = parentWidget;
|
||||||
}
|
}
|
||||||
return currWidget;
|
return currWidget;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2980,13 +2980,6 @@ nsEventStateManager::NotifyMouseOut(nsGUIEvent* aEvent, nsIContent* aMovingInto)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (mLastMouseOverFrame) {
|
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,
|
// if the frame is associated with a subdocument,
|
||||||
// tell the subdocument that we're moving out of it
|
// tell the subdocument that we're moving out of it
|
||||||
nsIFrameFrame* subdocFrame;
|
nsIFrameFrame* subdocFrame;
|
||||||
|
@ -3123,6 +3116,15 @@ nsEventStateManager::GenerateMouseEnterExit(nsGUIEvent* aEvent)
|
||||||
{
|
{
|
||||||
// This is actually the window mouse exit event. We're not moving
|
// This is actually the window mouse exit event. We're not moving
|
||||||
// into any new element.
|
// 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);
|
NotifyMouseOut(aEvent, nsnull);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче