Remove moveCursorToSelectionEnd()
moveCursorToSelectionEnd() blocks the IME thread unnecessarily, which causes
back navigation to fail. So this CL removes moveCursorToSelectionEnd() and
replaces with mWebContents.unselect().
In RenderFrameImpl::OnUnselect(), the cursor is deleted entirely, which causes
text boxes to be unfocused as a side effect. To fix that, this CL collapses the
selection to the selection end, and renames the functions to CollapseSelection().
BUG=697756
TEST=run_chrome_public_test_apk --test-filter TabsTest.testTabSwitcherCollapseSelection
Review-Url: https://codereview.chromium.org/2734943005
Cr-Commit-Position: refs/heads/master@{#455963}
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
index d1731be2..763807cf 100644
--- a/content/renderer/render_frame_impl.h
+++ b/content/renderer/render_frame_impl.h
@@ -846,7 +846,7 @@
void OnSelectAll();
void OnSelectRange(const gfx::Point& base, const gfx::Point& extent);
void OnAdjustSelectionByCharacterOffset(int start_adjust, int end_adjust);
- void OnUnselect();
+ void OnCollapseSelection();
void OnMoveRangeSelectionExtent(const gfx::Point& point);
void OnReplace(const base::string16& text);
void OnReplaceMisspelling(const base::string16& text);