Bug 1217196 - (Part 2) Remove touch event handling from BrowserToolbar. r=mcomella a=ritu
authorSebastian Kaspari <s.kaspari@gmail.com>
Thu, 05 Nov 2015 16:11:00 +0100
changeset 305511 a97a3d63fbed4894e7b599e7ce1182c099bc1744
parent 305510 d3e14f59b635713c4a406275873153919d897936
child 305512 57c6a522abc1a9a641979a369227427d570fb6d7
push id1001
push userraliiev@mozilla.com
push dateMon, 18 Jan 2016 19:06:03 +0000
treeherdermozilla-release@8b89261f3ac4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmcomella, ritu
bugs1217196, 1046591
milestone44.0a2
Bug 1217196 - (Part 2) Remove touch event handling from BrowserToolbar. r=mcomella a=ritu This code seems to have handled scroll events that started on the toolbar in the past. But this does not work anymore (for quite some time) and in fact breaks touch event handling (See bug 1046591 for a side-effect of only partially consuming events here).
mobile/android/base/toolbar/BrowserToolbar.java
--- a/mobile/android/base/toolbar/BrowserToolbar.java
+++ b/mobile/android/base/toolbar/BrowserToolbar.java
@@ -369,27 +369,16 @@ public abstract class BrowserToolbar ext
             cancelEdit();
             return true;
         }
 
         return urlDisplayLayout.dismissSiteIdentityPopup();
     }
 
     @Override
-    public boolean onTouchEvent(MotionEvent event) {
-        // If the motion event has occurred below the toolbar (due to the scroll
-        // offset), let it pass through to the page.
-        if (event != null && event.getY() > getHeight() + ViewHelper.getTranslationY(this)) {
-            return false;
-        }
-
-        return super.onTouchEvent(event);
-    }
-
-    @Override
     protected void onSizeChanged(int w, int h, int oldw, int oldh) {
         super.onSizeChanged(w, h, oldw, oldh);
 
         if (h != oldh) {
             // Post this to happen outside of onSizeChanged, as this may cause
             // a layout change and relayouts within a layout change don't work.
             post(new Runnable() {
                 @Override