From db39eafddac52c8f592094a2047ecdb7c1f47678 Mon Sep 17 00:00:00 2001 From: Ting-Yu Lin Date: Thu, 7 Aug 2014 01:26:00 -0400 Subject: [PATCH] Bug 1046732 - Part 1: Fix incorrect event message used in TouchCaret.cpp. r=ehsan NS_WHEEL_EVENT_START isn't a specific event message for compairing in the switch case. Since we would like to hide touch caret whenever receving wheel events, all the wheel event types are added. --- layout/base/TouchCaret.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/layout/base/TouchCaret.cpp b/layout/base/TouchCaret.cpp index acc7d1967ac1..efe87aecdd6a 100644 --- a/layout/base/TouchCaret.cpp +++ b/layout/base/TouchCaret.cpp @@ -569,7 +569,7 @@ TouchCaret::HandleEvent(WidgetEvent* aEvent) case NS_TOUCH_END: status = HandleTouchUpEvent(aEvent->AsTouchEvent()); break; - case NS_MOUSE_BUTTON_UP: + case NS_MOUSE_BUTTON_UP: status = HandleMouseUpEvent(aEvent->AsMouseEvent()); break; case NS_TOUCH_MOVE: @@ -586,9 +586,11 @@ TouchCaret::HandleEvent(WidgetEvent* aEvent) case NS_KEY_UP: case NS_KEY_DOWN: case NS_KEY_PRESS: - case NS_WHEEL_EVENT_START: + case NS_WHEEL_WHEEL: + case NS_WHEEL_START: + case NS_WHEEL_STOP: // Disable touch caret while key/wheel event is received. - TOUCHCARET_LOG("Receive key/wheel event"); + TOUCHCARET_LOG("Receive key/wheel event %d", aEvent->message); SetVisibility(false); break; default: