From 649734f59318ff0d14656d3ccb016656c191df2a Mon Sep 17 00:00:00 2001 From: Masayuki Nakano Date: Sun, 12 Aug 2012 10:42:36 +0900 Subject: [PATCH] Bug 719320 part.8-10 Remove the code handling legacy mouse events in layout r=smaug --- layout/base/nsPresShell.cpp | 6 ++---- layout/generic/nsObjectFrame.cpp | 3 ++- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/layout/base/nsPresShell.cpp b/layout/base/nsPresShell.cpp index bf5b05eb310..f9d43b6fd19 100644 --- a/layout/base/nsPresShell.cpp +++ b/layout/base/nsPresShell.cpp @@ -5659,10 +5659,8 @@ PresShell::HandleEvent(nsIFrame *aFrame, NS_TIME_FUNCTION_MIN(1.0); nsIContent* capturingContent = - NS_IS_MOUSE_EVENT(aEvent) || - aEvent->eventStructType == NS_MOUSE_SCROLL_EVENT || - aEvent->eventStructType == NS_WHEEL_EVENT ? - GetCapturingContent() : nullptr; + NS_IS_MOUSE_EVENT(aEvent) || aEvent->eventStructType == NS_WHEEL_EVENT ? + GetCapturingContent() : nullptr; nsCOMPtr retargetEventDoc; if (!aDontRetargetEvents) { diff --git a/layout/generic/nsObjectFrame.cpp b/layout/generic/nsObjectFrame.cpp index 9be7f1e52b1..924fdd72036 100644 --- a/layout/generic/nsObjectFrame.cpp +++ b/layout/generic/nsObjectFrame.cpp @@ -2105,7 +2105,8 @@ nsObjectFrame::HandleEvent(nsPresContext* aPresContext, #ifdef XP_MACOSX // we want to process some native mouse events in the cocoa event model - if ((anEvent->message == NS_MOUSE_ENTER || anEvent->message == NS_MOUSE_SCROLL) && + if ((anEvent->message == NS_MOUSE_ENTER || + anEvent->message == NS_WHEEL_WHEEL) && mInstanceOwner->GetEventModel() == NPEventModelCocoa) { *anEventStatus = mInstanceOwner->ProcessEvent(*anEvent); return rv;