Commit 8d97e8fc authored by Pedro Amaral's avatar Pedro Amaral Committed by Commit Bot

Use top browser controller height directly

Doing |getHeight() - getHeightMinusBrowserControls()| for the top toolbar
height does not work when the bottom toolbar is present since
|getHeightMinusBrowserControls()| takes into account the bottom toolbar.
The correct way to get the top toolbar height is through
|getTopBrowserControlsHeight()|.

Change-Id: I93ec1e43b8246c4babfa8a427bd9122c0a8fb39f
Reviewed-on: https://chromium-review.googlesource.com/1041218Reviewed-by: default avatarMatthew Jones <mdjones@chromium.org>
Commit-Queue: Pedro Amaral <amaralp@chromium.org>
Cr-Commit-Position: refs/heads/master@{#555877}
parent c721c6d4
......@@ -2457,7 +2457,7 @@ public class Stack {
public void swipeUpdated(long time, float x, float y, float dx, float dy, float tx, float ty) {
if (!mInSwipe) return;
final float toolbarSize = mLayout.getHeight() - mLayout.getHeightMinusBrowserControls();
final float toolbarSize = mLayout.getTopBrowserControlsHeight();
if (ty > toolbarSize) mSwipeCanScroll = true;
if (!mSwipeCanScroll) return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment