Bug 596600 - Start generating window-level mouse out events at the root EventStateManager. r=smaug

This commit is contained in:
Markus Stange
2011-05-16 15:15:43 +02:00
parent 434a26a23f
commit a84fdfda39
4 changed files with 166 additions and 2 deletions

View File

@@ -6722,10 +6722,15 @@ PresShell::HandleEvent(nsIView *aView,
}
}
PRBool isWindowLevelMouseExit = (aEvent->message == NS_MOUSE_EXIT) &&
(static_cast<nsMouseEvent*>(aEvent)->exit == nsMouseEvent::eTopLevel);
// Get the frame at the event point. However, don't do this if we're
// capturing and retargeting the event because the captured frame will
// be used instead below.
if (!captureRetarget) {
// be used instead below. Also keep using the root frame if we're dealing
// with a window-level mouse exit event since we want to start sending
// mouse out events at the root EventStateManager.
if (!captureRetarget && !isWindowLevelMouseExit) {
nsPoint eventPoint
= nsLayoutUtils::GetEventCoordinatesRelativeTo(aEvent, frame);
{