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

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

Issue 434583002: Prevent repeated taps from resetting insertion handle position (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 708bcc7b8bd6a847aa4b1158b1712543d21dc57e..3bc2850415e3d61d0623480db1f6742bbce1c62a 100644
--- a/content/browser/renderer_host/input/touch_selection_controller.cc
+++ b/content/browser/renderer_host/input/touch_selection_controller.cc
@@ -147,7 +147,8 @@ void TouchSelectionController::OnSelectionEditable(bool editable) {
if (selection_editable_ == editable)
return;
selection_editable_ = editable;
- ResetCachedValues();
+ if (!is_insertion_active_ && !is_selection_active_)
+ ResetCachedValues();
if (!selection_editable_)
DeactivateInsertion();
}
@@ -156,7 +157,8 @@ void TouchSelectionController::OnSelectionEmpty(bool empty) {
if (selection_empty_ == empty)
return;
selection_empty_ = empty;
- ResetCachedValues();
+ if (!is_insertion_active_ && !is_selection_active_)
jdduke (slow) 2014/07/31 12:04:45 Hmm, maybe rename to ResetCachedValuesIfInactive a
+ ResetCachedValues();
}
bool TouchSelectionController::Animate(base::TimeTicks frame_time) {
« 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