Index: content/browser/renderer_host/input/touch_selection_controller.cc |
diff --git a/content/browser/renderer_host/input/touch_selection_controller.cc b/content/browser/renderer_host/input/touch_selection_controller.cc |
index 8643910c2dc6b4f0858f0acca1a519932f558d12..8193fb180668397e589d451edf2f107e782af49a 100644 |
--- a/content/browser/renderer_host/input/touch_selection_controller.cc |
+++ b/content/browser/renderer_host/input/touch_selection_controller.cc |
@@ -184,7 +184,7 @@ bool TouchSelectionController::Animate(base::TimeTicks frame_time) { |
void TouchSelectionController::OnHandleDragBegin(const TouchHandle& handle) { |
if (&handle == insertion_handle_.get()) { |
- client_->OnSelectionEvent(INSERTION_DRAG_STARTED, GetStartPosition()); |
+ client_->OnSelectionEvent(INSERTION_DRAG_STARTED, handle.position()); |
return; |
} |
@@ -195,6 +195,7 @@ void TouchSelectionController::OnHandleDragBegin(const TouchHandle& handle) { |
fixed_handle_position_ = start_selection_handle_->position() - |
gfx::Vector2dF(0, GetStartLineHeight() / 2.f); |
} |
+ client_->OnSelectionEvent(SELECTION_DRAG_STARTED, handle.position()); |
} |
void TouchSelectionController::OnHandleDragUpdate(const TouchHandle& handle, |
@@ -213,11 +214,13 @@ void TouchSelectionController::OnHandleDragUpdate(const TouchHandle& handle, |
} |
void TouchSelectionController::OnHandleDragEnd(const TouchHandle& handle) { |
+ if (&handle != insertion_handle_.get()) |
+ client_->OnSelectionEvent(SELECTION_DRAG_STOPPED, handle.position()); |
} |
void TouchSelectionController::OnHandleTapped(const TouchHandle& handle) { |
if (insertion_handle_ && &handle == insertion_handle_.get()) |
- client_->OnSelectionEvent(INSERTION_TAPPED, GetStartPosition()); |
+ client_->OnSelectionEvent(INSERTION_TAPPED, handle.position()); |
} |
void TouchSelectionController::SetNeedsAnimate() { |