Bug 1190988 - Hit testing appears to return incorrect positions when --enable-android-apz is specified. r=kats
authorRandall Barker <rbarker@mozilla.com>
Thu, 06 Aug 2015 12:59:00 +0200
changeset 288418 90d854c1fb68cf9bdf5b07f1c1c8940d3315d93d
parent 288417 6e166fef1a0f7406b73804c9a04c136086dc257e
child 288419 2de6ae32d73b44de63e5360687c502aa79d1159f
push id5067
push userraliiev@mozilla.com
push dateMon, 21 Sep 2015 14:04:52 +0000
treeherdermozilla-beta@14221ffe5b2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskats
bugs1190988
milestone42.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 1190988 - Hit testing appears to return incorrect positions when --enable-android-apz is specified. r=kats The BrowserEventHandler was still being initialized when the C++ APZ is being utilized which was causing event positions to be incorrectly converted in certain cases.
mobile/android/chrome/content/browser.js
toolkit/modules/AppConstants.jsm
--- a/mobile/android/chrome/content/browser.js
+++ b/mobile/android/chrome/content/browser.js
@@ -437,17 +437,22 @@ var BrowserApp = {
   deck: null,
 
   startup: function startup() {
     window.QueryInterface(Ci.nsIDOMChromeWindow).browserDOMWindow = new nsBrowserAccess();
     dump("zerdatime " + Date.now() + " - browser chrome startup finished.");
 
     this.deck = document.getElementById("browsers");
 
-    BrowserEventHandler.init();
+    // This check and BrowserEventHandler should be removed once we have
+    // switched over to the C++ APZ code
+    if (!AppConstants.MOZ_ANDROID_APZ) {
+      BrowserEventHandler.init();
+    }
+
     ViewportHandler.init();
 
     Services.androidBridge.browserApp = this;
 
     Services.obs.addObserver(this, "Locale:OS", false);
     Services.obs.addObserver(this, "Locale:Changed", false);
     Services.obs.addObserver(this, "Tab:Load", false);
     Services.obs.addObserver(this, "Tab:Selected", false);
--- a/toolkit/modules/AppConstants.jsm
+++ b/toolkit/modules/AppConstants.jsm
@@ -161,10 +161,16 @@ this.AppConstants = Object.freeze({
 
   MOZ_APP_NAME: "@MOZ_APP_NAME@",
   MOZ_APP_VERSION: "@MOZ_APP_VERSION@",
   MOZ_APP_VERSION_DISPLAY: "@MOZ_APP_VERSION_DISPLAY@",
   MOZ_BUILD_APP: "@MOZ_BUILD_APP@",
   MOZ_UPDATE_CHANNEL: "@MOZ_UPDATE_CHANNEL@",
   MOZ_WIDGET_TOOLKIT: "@MOZ_WIDGET_TOOLKIT@",
   ANDROID_PACKAGE_NAME: "@ANDROID_PACKAGE_NAME@",
+  MOZ_ANDROID_APZ:
+#ifdef MOZ_ANDROID_APZ
+    true,
+#else
+    false,
+#endif
   DEBUG_JS_MODULES: "@DEBUG_JS_MODULES@"
 });