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

Unified Diff: ui/views/selection_controller.cc

Issue 2541313002: RenderTextHarfBuzz: Add support for multi line text selection. (Closed)
Patch Set: --- 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
Index: ui/views/selection_controller.cc
diff --git a/ui/views/selection_controller.cc b/ui/views/selection_controller.cc
index 38ba6ed0a842bd6379753f00bac3ced72c3dae42..ac3c61cf01213f890bbe61984dad8dc2e4df7abb 100644
--- a/ui/views/selection_controller.cc
+++ b/ui/views/selection_controller.cc
@@ -181,18 +181,7 @@ void SelectionController::SelectThroughLastDragLocation() {
delegate_->OnBeforePointerAction();
- // TODO(karandeepb): See if this can be handled at the RenderText level.
- const bool drags_to_end = PlatformStyle::kTextDragVerticallyDragsToEnd;
- if (drags_to_end && last_drag_location_.y() < 0) {
- render_text->MoveCursor(gfx::LINE_BREAK, gfx::CURSOR_LEFT,
- gfx::SELECTION_RETAIN);
- } else if (drags_to_end &&
- last_drag_location_.y() > delegate_->GetViewHeight()) {
- render_text->MoveCursor(gfx::LINE_BREAK, gfx::CURSOR_RIGHT,
- gfx::SELECTION_RETAIN);
- } else {
- render_text->MoveCursorTo(last_drag_location_, true);
- }
+ render_text->MoveCursorTo(last_drag_location_, true);
if (aggregated_clicks_ == 1) {
render_text->SelectWord();

Powered by Google App Engine
This is Rietveld 408576698