Bug 950832 - Disable double-tap zoom and 300ms tap delay in Metro to fix OSK bugs [r=jimm a=lsblakk]
authorMatt Brubeck <mbrubeck@mozilla.com>
Tue, 17 Dec 2013 12:50:49 -0800
changeset 174420 a380a4c5d8cc6b9892397173450619d7e21e3d99
parent 174419 14d5fa456121d254dbacb0980f92c9c5f68c7a45
child 174421 7a111c6c9aee57e785aa03bdb0d451120683045d
push id3224
push userlsblakk@mozilla.com
push dateTue, 04 Feb 2014 01:06:49 +0000
treeherdermozilla-beta@60c04d0987f1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjimm, lsblakk
bugs950832
milestone28.0a2
Bug 950832 - Disable double-tap zoom and 300ms tap delay in Metro to fix OSK bugs [r=jimm a=lsblakk]
browser/metro/base/tests/mochitest/browser_apzc_basic.js
widget/windows/winrt/APZController.cpp
widget/windows/winrt/MetroInput.cpp
--- a/browser/metro/base/tests/mochitest/browser_apzc_basic.js
+++ b/browser/metro/base/tests/mochitest/browser_apzc_basic.js
@@ -64,16 +64,17 @@ gTests.push({
     yield promise;
     ContextMenuUI.hide();
   },
   tearDown: function () {
     clearNativeTouchSequence();
   }
 });
 
+/* Double-tap is disabled (bug 950832).
 gTests.push({
   desc: "double tap transforms",
   setUp: setUp,
   run: function() {
     let beginPromise = waitForObserver("apzc-transform-begin", kTransformTimeout);
     let endPromise = waitForObserver("apzc-transform-end", kTransformTimeout);
 
     sendNativeDoubleTap(Browser.selectedBrowser.contentDocument.getElementById("second"));
@@ -88,16 +89,17 @@ gTests.push({
 
     yield beginPromise;
     yield endPromise;
   },
   tearDown: function () {
     clearNativeTouchSequence();
   }
 });
+*/
 
 gTests.push({
   desc: "scroll transforms",
   setUp: setUp,
   run: function() {
     let beginPromise = waitForObserver("apzc-transform-begin", kTransformTimeout);
     let endPromise = waitForObserver("apzc-transform-end", kTransformTimeout);
 
--- a/widget/windows/winrt/APZController.cpp
+++ b/widget/windows/winrt/APZController.cpp
@@ -276,29 +276,21 @@ APZController::UpdateScrollOffset(const 
     return;
   }
   sAPZC->UpdateScrollOffset(aScrollLayerId, aScrollOffset);
 }
 
 void
 APZController::HandleDoubleTap(const CSSIntPoint& aPoint, int32_t aModifiers)
 {
-  NS_ConvertASCIItoUTF16 data(
-      nsPrintfCString("{ \"x\": %d, \"y\": %d, \"modifiers\": %d }",
-      (int32_t)aPoint.x, (int32_t)aPoint.y, aModifiers));
-  MetroUtils::FireObserver("Gesture:DoubleTap", data.get());
 }
 
 void
 APZController::HandleSingleTap(const CSSIntPoint& aPoint, int32_t aModifiers)
 {
-  NS_ConvertASCIItoUTF16 data(
-      nsPrintfCString("{ \"x\": %d, \"y\": %d, \"modifiers\": %d }",
-      (int32_t)aPoint.x, (int32_t)aPoint.y, aModifiers));
-  MetroUtils::FireObserver("Gesture:SingleTap", data.get());
 }
 
 void
 APZController::HandleLongTap(const CSSIntPoint& aPoint, int32_t aModifiers)
 {
 }
 
 // requests that we send a mozbrowserasyncscroll domevent. not in use.
--- a/widget/windows/winrt/MetroInput.cpp
+++ b/widget/windows/winrt/MetroInput.cpp
@@ -957,21 +957,17 @@ MetroInput::OnRightTapped(UI::Input::IGe
 void
 MetroInput::HandleTap(const Foundation::Point& aPoint, unsigned int aTapCount)
 {
 #ifdef DEBUG_INPUT
   LogFunction();
 #endif
 
   LayoutDeviceIntPoint refPoint;
-  bool hitTestChrome = TransformRefPoint(aPoint, refPoint);
-  if (!hitTestChrome) {
-    // Let APZC handle tap/doubletap detection for content.
-    return;
-  }
+  TransformRefPoint(aPoint, refPoint);
 
   WidgetMouseEvent* mouseEvent =
     new WidgetMouseEvent(true, NS_MOUSE_MOVE, mWidget.Get(),
                          WidgetMouseEvent::eReal, WidgetMouseEvent::eNormal);
   mouseEvent->refPoint = refPoint;
   mouseEvent->clickCount = aTapCount;
   mouseEvent->inputSource = nsIDOMMouseEvent::MOZ_SOURCE_TOUCH;
   DispatchAsyncEventIgnoreStatus(mouseEvent);