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

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

Issue 2443963003: start action mode even if clipboard is empty (Closed)
Patch Set: Created 4 years, 2 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 | « 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/WebActionModeCallback.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/WebActionModeCallback.java b/content/public/android/java/src/org/chromium/content/browser/WebActionModeCallback.java
index b8907900a21c8cd70a297b8248cbae96d7c2ae2d..088fb3947385417124b3206e489545d009de6e1a 100644
--- a/content/public/android/java/src/org/chromium/content/browser/WebActionModeCallback.java
+++ b/content/public/android/java/src/org/chromium/content/browser/WebActionModeCallback.java
@@ -174,6 +174,10 @@ public class WebActionModeCallback implements ActionMode.Callback {
new MenuInflater(getContext()).inflate(R.menu.select_action_menu, menu);
}
+ if (!mEditable || !canPaste()) {
+ menu.removeItem(R.id.select_action_menu_paste);
+ }
+
if (mIsInsertion) {
menu.removeItem(R.id.select_action_menu_select_all);
menu.removeItem(R.id.select_action_menu_cut);
@@ -183,10 +187,6 @@ public class WebActionModeCallback implements ActionMode.Callback {
return;
}
- if (!mEditable || !canPaste()) {
- menu.removeItem(R.id.select_action_menu_paste);
- }
-
if (!mEditable) {
menu.removeItem(R.id.select_action_menu_cut);
}
« 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