Bug 1125422 - Correctly determine whether a touch event was prevent-defaulted in the chrome process. r=kats
authorBotond Ballo <botond@mozilla.com>
Tue, 10 Feb 2015 16:28:07 -0500
changeset 255593 22ab837efb3450a6311a0b600e0724caade046f1
parent 255592 f17a80ddf9fd942b4d120602d0f8fbbb290e22ce
child 255594 d0a1dd3fbf766de545e920dbccb6c19e95b4b200
push id4610
push userjlund@mozilla.com
push dateMon, 30 Mar 2015 18:32:55 +0000
treeherdermozilla-beta@4df54044d9ef [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskats
bugs1125422
milestone38.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 1125422 - Correctly determine whether a touch event was prevent-defaulted in the chrome process. r=kats
widget/nsBaseWidget.cpp
--- a/widget/nsBaseWidget.cpp
+++ b/widget/nsBaseWidget.cpp
@@ -945,19 +945,22 @@ nsBaseWidget::DispatchEventForAPZ(Widget
     // and EventStateManager did not route the event into the child process.
     // It's safe to communicate to APZ that the event has been processed.
 
     // need a local var to disambiguate between the SetTargetAPZC overloads.
     void (APZCTreeManager::*setTargetApzcFunc)(uint64_t, const ScrollableLayerGuid&)
         = &APZCTreeManager::SetTargetAPZC;
     APZThreadUtils::RunOnControllerThread(NewRunnableMethod(
         mAPZC.get(), setTargetApzcFunc, aInputBlockId, aGuid));
+    bool defaultPrevented = aEvent->AsTouchEvent()
+      ? (nsIPresShell::gPreventMouseEvents || aEvent->mFlags.mMultipleActionsPrevented)
+      : aEvent->mFlags.mDefaultPrevented;
     APZThreadUtils::RunOnControllerThread(NewRunnableMethod(
         mAPZC.get(), &APZCTreeManager::ContentReceivedInputBlock, aInputBlockId,
-        aEvent->mFlags.mDefaultPrevented));
+        defaultPrevented));
   }
 
   return status;
 }
 
 void
 nsBaseWidget::GetPreferredCompositorBackends(nsTArray<LayersBackend>& aHints)
 {