Bug 745255 - Operator precedence is wrong in nsEventStateManager::PreHandleEvent. r=smaug
☠☠ backed out by 328b56d0b34c ☠ ☠
authorDavid Humphrey (:humph) <david.humphrey@senecacollege.ca>
Mon, 16 Apr 2012 14:29:14 -0700
changeset 95099 f59dff115daa0729197a091d798f6aafe3bbd8cc
parent 95098 cfcd178b2f5fff1d81445c63fac335f2ec940530
child 95100 a76755f58bbbb03958c20c733605c1f72d64391b
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
bugs745255
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 745255 - 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.