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

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

Issue 2767183002: Removed SelectionPopupController.invalidateActionMode() (Closed)
Patch Set: destroy old action mode Created 3 years, 9 months 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 | « no previous file | 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 8d9c66e4913e7dbcb70f356c1bf969a0af14d8e1..679523249b08b25c8a1cf50a9441352dc7952ea9 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
@@ -194,11 +194,7 @@ public class SelectionPopupController extends ActionModeCallbackHelper {
public boolean showActionMode() {
if (isEmpty()) return false;
- // Just refreshes the view if it is already showing.
- if (isActionModeValid()) {
- invalidateActionMode();
- return true;
- }
+ destroyActionModeAndKeepSelection();
if (mView.getParent() != null) {
// On ICS, startActionMode throws an NPE when getParent() is null.
@@ -297,28 +293,6 @@ public class SelectionPopupController extends ActionModeCallbackHelper {
}
/**
- * @see ActionMode#invalidate()
- * Note that invalidation will also reset visibility state. The caller
- * should account for this when making subsequent visibility updates.
- */
- private void invalidateActionMode() {
- if (!isActionModeValid()) return;
- if (mHidden) {
- assert canHideActionMode();
- mHidden = false;
- mView.removeCallbacks(mRepeatingHideRunnable);
- mPendingInvalidateContentRect = false;
- }
-
- // Try/catch necessary for framework bug, crbug.com/446717.
- try {
- mActionMode.invalidate();
- } catch (NullPointerException e) {
- Log.w(TAG, "Ignoring NPE from ActionMode.invalidate() as workaround for L", e);
- }
- }
-
- /**
* @see ActionMode#invalidateContentRect()
*/
public void invalidateContentRect() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698