Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1983)

Unified Diff: content/public/android/java/src/org/chromium/content/browser/SelectionPopupController.java

Issue 2581863002: Removing SelectionPopupController.updateActionModeVisibility() (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 : "";
« no previous file with comments | « content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698