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

Unified Diff: content/browser/renderer_host/input/gesture_text_selector.cc

Issue 416383003: Show handles even when dragging from outside selectable region (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: moved TODO Created 6 years, 5 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 | content/browser/renderer_host/input/gesture_text_selector_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/input/gesture_text_selector.cc
diff --git a/content/browser/renderer_host/input/gesture_text_selector.cc b/content/browser/renderer_host/input/gesture_text_selector.cc
index d9fa90d1f5e8d5c074bf7ae1f635812e7d1b82da..59f28cf3245f0288b397ddb2a47117f88531086d 100644
--- a/content/browser/renderer_host/input/gesture_text_selector.cc
+++ b/content/browser/renderer_host/input/gesture_text_selector.cc
@@ -40,15 +40,15 @@ bool GestureTextSelector::OnGestureEvent(const ui::GestureEventData& gesture) {
}
case ui::ET_GESTURE_SCROLL_BEGIN: {
client_->Unselect();
- // TODO(changwan): check if we can show handles on ET_GESTURE_SCROLL_END
- // instead. Currently it is not possible as ShowSelectionHandles should
- // be called before we change the selection.
- client_->ShowSelectionHandlesAutomatically();
anchor_x_ = gesture.x;
anchor_y_ = gesture.y;
break;
}
case ui::ET_GESTURE_SCROLL_UPDATE: {
+ // TODO(changwan): check if we can show handles on ET_GESTURE_SCROLL_END
+ // instead. Currently it is not possible as ShowSelectionHandles should
+ // be called before we change the selection.
+ client_->ShowSelectionHandlesAutomatically();
client_->SelectRange(anchor_x_, anchor_y_, gesture.x, gesture.y);
break;
}
« no previous file with comments | « no previous file | content/browser/renderer_host/input/gesture_text_selector_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698