Bug 1076692 - Account for statusbar height when tint is enabled (r=mfinkle)
--- a/mobile/android/base/BrowserApp.java
+++ b/mobile/android/base/BrowserApp.java
@@ -2371,16 +2371,21 @@ public class BrowserApp extends GeckoApp
// We need to account for scroll state for the touched view otherwise
// tapping on an "empty" part of the view will still be considered a
// valid touch event.
if (view.getScrollX() != 0 || view.getScrollY() != 0) {
view.getHitRect(mTempRect);
mTempRect.offset(-view.getScrollX(), -view.getScrollY());
+ if (mTintManager != null) {
+ SystemBarTintManager.SystemBarConfig config = mTintManager.getConfig();
+ mTempRect.offset(0, -config.getPixelInsetTop(false));
+ }
+
int[] viewCoords = new int[2];
view.getLocationOnScreen(viewCoords);
int x = (int) event.getRawX() - viewCoords[0];
int y = (int) event.getRawY() - viewCoords[1];
if (!mTempRect.contains(x, y))
return false;