[Android] Impove PopupWindow-based handle visibility
commit4b35311ffe9439dabf2e56f10940481b246a9c05
authorjdduke <jdduke@chromium.org>
Wed, 16 Sep 2015 00:08:44 +0000 (15 17:08 -0700)
committerCommit bot <commit-bot@chromium.org>
Wed, 16 Sep 2015 00:09:25 +0000 (16 00:09 +0000)
treeedb48eec72864d00e2d567bb58a0edf7671ee90a
parent9ee5d296239e3bc21b5c70259242ce6c4cefc96b
[Android] Impove PopupWindow-based handle visibility

WebView embedders can disable fling animation updates by overriding
computeScroll. This in turn makes the fling existence notifications
unreliable, which causes visibility issues with PopupWindow-based
selection handles. Instead of polling for scroll status, hide the
handles when the View is touch scrolling, unfocused or outside the
viewport. Also temporarily hide the handles when a scroll change is
detected, handling the case where a fling is active.

BUG=528365

Review URL: https://codereview.chromium.org/1338513002

Cr-Commit-Position: refs/heads/master@{#349033}
content/browser/android/content_view_core_impl.cc
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
content/public/android/java/src/org/chromium/content/browser/input/PopupTouchHandleDrawable.java
content/public/android/java/src/org/chromium/content_public/browser/GestureStateListener.java