Chromium Code Reviews| 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) { |