Bug 745266 - Operator precedence is wrong in nsEventStateManager::PreHandleEvent. r=smaug
authorDavid Humphrey (:humph) <david.humphrey@senecacollege.ca>
Mon, 16 Apr 2012 14:29:14 -0700
changeset 95189 bb0ab2ceb0316f2cdb148bd9655913188886781c
parent 95188 328b56d0b34c1a66427111df96a2f98d45e71f5b
child 95190 165ec2dea41242b60bfa9cb25680960b82cb6163
push id886
push userlsblakk@mozilla.com
push dateMon, 04 Jun 2012 19:57:52 +0000
treeherdermozilla-beta@bbd8d5efd6d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs745266
milestone14.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 745266 - Operator precedence is wrong in nsEventStateManager::PreHandleEvent. r=smaug
content/events/src/nsEventStateManager.cpp
--- a/content/events/src/nsEventStateManager.cpp
+++ b/content/events/src/nsEventStateManager.cpp
@@ -1062,19 +1062,19 @@ nsEventStateManager::PreHandleEvent(nsPr
   if (NS_IS_DRAG_EVENT(aEvent) && sIsPointerLocked) {
     NS_ASSERTION(sIsPointerLocked,
       "sIsPointerLocked is true. Drag events should be suppressed when the pointer is locked.");
   }
 #endif
   // Store last known screenPoint and clientPoint so pointer lock
   // can use these values as constants.
   if (NS_IS_TRUSTED_EVENT(aEvent) &&
-      (NS_IS_MOUSE_EVENT_STRUCT(aEvent) &&
+      ((NS_IS_MOUSE_EVENT_STRUCT(aEvent) &&
        IsMouseEventReal(aEvent)) ||
-       aEvent->eventStructType == NS_MOUSE_SCROLL_EVENT) {
+       aEvent->eventStructType == NS_MOUSE_SCROLL_EVENT)) {
     if (!sIsPointerLocked) {
       sLastScreenPoint = nsDOMUIEvent::CalculateScreenPoint(aPresContext, aEvent);
       sLastClientPoint = nsDOMUIEvent::CalculateClientPoint(aPresContext, aEvent, nsnull);
     }
   }
 
   // Do not take account NS_MOUSE_ENTER/EXIT so that loading a page
   // when user is not active doesn't change the state to active.