Bug 732016 - Don't call GetFrameFromPoint for non touchstart touch events. r=smaug
authorWes Johnston <wjohnston@mozilla.com>
Tue, 17 Apr 2012 10:08:23 -0700
changeset 91880 d07b72d4865d24d98f0bbab28ec0f44eeb71137a
parent 91879 e4aaf4456c6faba8a53d0dffa0d18bd7170e5455
child 91881 a0ecc336b66d10d65c6648cb43a823dafb9df1cf
push id22480
push useremorley@mozilla.com
push dateWed, 18 Apr 2012 00:48:48 +0000
treeherdermozilla-central@93dfd98900ad [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs732016
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 732016 - Don't call GetFrameFromPoint for non touchstart touch events. r=smaug
layout/base/nsPresShell.cpp
--- a/layout/base/nsPresShell.cpp
+++ b/layout/base/nsPresShell.cpp
@@ -5930,16 +5930,22 @@ PresShell::HandleEvent(nsIFrame        *
         }
       }
       else {
         ClearMouseCapture(nsnull);
         capturingContent = nsnull;
       }
     }
 
+    // all touch events except for touchstart use a captured target
+    if (aEvent->eventStructType == NS_TOUCH_EVENT &&
+        aEvent->message != NS_TOUCH_START) {
+      captureRetarget = true;
+    }
+
     bool 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. 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.