Index: content/public/android/java/src/org/chromium/content/browser/SelectionPopupController.java |
diff --git a/content/public/android/java/src/org/chromium/content/browser/SelectionPopupController.java b/content/public/android/java/src/org/chromium/content/browser/SelectionPopupController.java |
index 9c490279d5e91417e6f40ccc2d2e07efd67872ec..9914337a5acb2fd9a5a2d50e0bb6d145a5fe5948 100644 |
--- a/content/public/android/java/src/org/chromium/content/browser/SelectionPopupController.java |
+++ b/content/public/android/java/src/org/chromium/content/browser/SelectionPopupController.java |
@@ -87,7 +87,6 @@ public class SelectionPopupController extends ActionModeCallbackHelper { |
private View mView; |
private ActionMode mActionMode; |
- private boolean mDraggingSelection; |
// Bit field for mappings from menu item to a flag indicating it is allowed. |
private int mAllowedMenuItems; |
@@ -363,7 +362,7 @@ public class SelectionPopupController extends ActionModeCallbackHelper { |
* side-effects if the underlying ActionMode supports hiding. |
* @param hide whether to hide or show the ActionMode. |
*/ |
- private void hideActionMode(boolean hide) { |
+ void hideActionMode(boolean hide) { |
if (!canHideActionMode()) return; |
if (mHidden == hide) return; |
mHidden = hide; |
@@ -794,17 +793,14 @@ public class SelectionPopupController extends ActionModeCallbackHelper { |
mUnselectAllOnDismiss = false; |
mSelectionRect.setEmpty(); |
finishActionMode(); |
- mDraggingSelection = false; |
break; |
case SelectionEventType.SELECTION_HANDLE_DRAG_STARTED: |
- mDraggingSelection = true; |
- updateActionModeVisibility(touchScrollInProgress); |
+ hideActionMode(true); |
break; |
case SelectionEventType.SELECTION_HANDLE_DRAG_STOPPED: |
- mDraggingSelection = false; |
- updateActionModeVisibility(touchScrollInProgress); |
+ hideActionMode(false); |
break; |
case SelectionEventType.INSERTION_HANDLE_SHOWN: |
@@ -924,13 +920,6 @@ public class SelectionPopupController extends ActionModeCallbackHelper { |
return mHasSelection; |
} |
- void updateActionModeVisibility(boolean touchScrollInProgress) { |
- // The active fling count isn't reliable with WebView, so only use the |
- // active touch scroll signal for hiding. The fling animation movement |
- // will naturally hide the ActionMode by invalidating its content rect. |
- hideActionMode(mDraggingSelection || touchScrollInProgress); |
- } |
- |
@Override |
public String getSelectedText() { |
return mHasSelection ? mLastSelectedText : ""; |