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

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

Issue 2584773002: Set fields before calling ActionMode.invalidate() (Closed)
Patch Set: should set fields regardless of action mode status 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 | « 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 9c490279d5e91417e6f40ccc2d2e07efd67872ec..b4251626bb0107b7408c8f48cf57bdbfbdbb5c21 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
@@ -907,13 +907,14 @@ public class SelectionPopupController extends ActionModeCallbackHelper {
void updateSelectionState(boolean editable, boolean isPassword) {
if (!editable) hidePastePopup();
- if (isActionModeValid()
- && (editable != isSelectionEditable() || isPassword != isSelectionPassword())) {
- mActionMode.invalidate();
- mNeedsPrepare = true;
+ if (editable != isSelectionEditable() || isPassword != isSelectionPassword()) {
+ mEditable = editable;
+ mIsPasswordType = isPassword;
+ if (isActionModeValid()) {
+ mNeedsPrepare = true;
+ mActionMode.invalidate();
+ }
}
- mEditable = editable;
- mIsPasswordType = isPassword;
}
/**
« 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