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

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

Issue 2848793002: Revert of Only do Smart Select if one word is selected. (Closed)
Patch Set: Created 3 years, 8 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 8a8cc8ef08cfe4ae922c58bfafc8fa0cb91751fa..0012b5b1b0150d4da1713f251df91ffd5c2177a9 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
@@ -844,15 +844,7 @@
mSelectionRect.set(left, top, right, bottom);
mHasSelection = true;
mUnselectAllOnDismiss = true;
- // When this event comes as the result of SelectAll, SelectionClient should not
- // change the selection range (http://crbug.com/714106). We assume that two or
- // more selected words means SelectAll.
- // TODO(amaralp): Find a better way to know that SELECTION_HANDLES_SHOWN was
- // caused by SelectAll.
- boolean oneWordSelected =
- !getSelectedText().isEmpty() && !getSelectedText().matches(".*\\s+.*");
- if (!oneWordSelected || mSelectionClient == null
- || !mSelectionClient.sendsSelectionPopupUpdates()) {
+ if (mSelectionClient == null || !mSelectionClient.sendsSelectionPopupUpdates()) {
showActionModeOrClearOnFailure();
} else {
// Rely on |mSelectionClient| sending a classification request and the request
« 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