Chromium Code Reviews
Description[refactor] - Rename and Move WebWidget::CaretOrSelectionRange to WebInputMethodController::GetSelectionOffsets
Reasons for move:
1- This is a frame concept given (the two nontrivial calls are from
render_frame_impl.cc and frame_input_handler_impl.cc).
2- It cleans up WebViewImpl/WebFrameWidgetImpl (and helps with the split)
3- The logic is simply calling the corresponding method on
InputMethodController of the focused LocalFrame.
4- Jumping from RenderFrameImpl to RenderWidget for getting selection is futile
and expecting a focused frame is incorrect. Note that
GestureManager::HandleGestureLongPress first passes the hit test result to
SelectionController and then to MouseEventManager where the former generates
selection updates and the latter updates frame focus. Therefore, right now,
long pressing text on an unfocused OOPIF will lead to an empty selection
update which is incorrect.
Reason for rename:
1- The method calls GetSelectionOffsets on InputMethodController (core) and it
makes sense to make the wrapper variant have the same name.
This CL also adds a small change to TextSelectionControllerClientChildFrame
to use selection range instead of selection bounds (now that the update is
fixed after the refactor).
BUG=629721, 723790
Review-Url: https://codereview.chromium.org/2910223003
Cr-Commit-Position: refs/heads/master@{#488035}
Committed: https://chromium.googlesource.com/chromium/src/+/d503ac6073fad15a95d4eb5d9f1343a315c7a9d7
Patch Set 1 #Patch Set 2 : Fixed a compile error. #Patch Set 3 : Fixed some comments #
Total comments: 3
Patch Set 4 : rebased #Patch Set 5 : Rebase #Messages
Total messages: 35 (24 generated)
|