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

Unified Diff: ui/views/selection_controller.cc

Issue 2541313002: RenderTextHarfBuzz: Add support for multi line text selection. (Closed)
Patch Set: Fix test. 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 | « ui/views/examples/label_example.cc ('k') | ui/views/style/platform_style.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/selection_controller.cc
diff --git a/ui/views/selection_controller.cc b/ui/views/selection_controller.cc
index 4692c9c34c04fdc438520cebb556c902dc724a92..9aecd741641e8b825b17651a434375dbfde501de 100644
--- a/ui/views/selection_controller.cc
+++ b/ui/views/selection_controller.cc
@@ -196,18 +196,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();
« no previous file with comments | « ui/views/examples/label_example.cc ('k') | ui/views/style/platform_style.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698