Bug 1248254 - Firefox/Android with paired/external mouse has wrong hit calculation for enter/over/leave/out r=snorp
authorRandall Barker <rbarker@mozilla.com>
Thu, 25 Feb 2016 08:37:43 -0800
changeset 321969 525acdb20f3ae457cd7d05e2a4c4fafa63dab73d
parent 321968 8fc40777e0aaa781847a4d8de225dbd951d68dbd
child 321970 b0da28952e5ba757afd5c7098d633e09ce929b60
push id5913
push userjlund@mozilla.com
push dateMon, 25 Apr 2016 16:57:49 +0000
treeherdermozilla-beta@dcaf0a6fa115 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssnorp
bugs1248254
milestone47.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 1248254 - Firefox/Android with paired/external mouse has wrong hit calculation for enter/over/leave/out r=snorp
mobile/android/base/java/org/mozilla/gecko/gfx/LayerView.java
--- a/mobile/android/base/java/org/mozilla/gecko/gfx/LayerView.java
+++ b/mobile/android/base/java/org/mozilla/gecko/gfx/LayerView.java
@@ -242,21 +242,25 @@ public class LayerView extends ScrollVie
     public boolean onHoverEvent(MotionEvent event) {
         // If we get a touchscreen hover event, and accessibility is not enabled,
         // don't send it to gecko.
         if (event.getSource() == InputDevice.SOURCE_TOUCHSCREEN &&
             !GeckoAccessibility.isEnabled()) {
             return false;
         }
 
+        event.offsetLocation(0, -mSurfaceTranslation);
+
         return sendEventToGecko(event);
     }
 
     @Override
     public boolean onGenericMotionEvent(MotionEvent event) {
+        event.offsetLocation(0, -mSurfaceTranslation);
+
         if (AndroidGamepadManager.handleMotionEvent(event)) {
             return true;
         }
         if (AppConstants.MOZ_ANDROID_APZ && !mLayerClient.isGeckoReady()) {
             // If gecko isn't loaded yet, don't try sending events to the
             // native code because it's just going to crash
             return true;
         }