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

Issue 2910223003: [refactor] - Rename and Move WebWidget::CaretOrSelectionRange to WebInputMethodController::GetSelec… (Closed)

Created:
3 years, 6 months ago by EhsanK
Modified:
3 years, 5 months ago
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, creis+watch_chromium.org, mlamouri+watch-blink_chromium.org, nasko+codewatch_chromium.org, jam, dtapuska+chromiumwatch_chromium.org, blink-reviews-api_chromium.org, dglazkov+blink, darin-cc_chromium.org, dcheng, blink-reviews, blink-reviews-frames_chromium.org, kinuko+watch
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+35 lines, -64 lines) Patch
M content/browser/renderer_host/input/touch_selection_controller_client_child_frame.cc View 1 2 3 1 chunk +4 lines, -13 lines 0 comments Download
M content/renderer/input/frame_input_handler_impl.cc View 1 2 3 3 chunks +7 lines, -4 lines 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 3 4 4 chunks +5 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/core/exported/WebInputMethodControllerImpl.h View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/exported/WebInputMethodControllerImpl.cpp View 1 2 3 2 chunks +9 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/exported/WebViewTest.cpp View 1 2 3 2 chunks +6 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/frame/WebFrameWidgetImpl.h View 1 2 3 4 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/frame/WebFrameWidgetImpl.cpp View 1 2 3 4 1 chunk +0 lines, -14 lines 0 comments Download
M third_party/WebKit/Source/core/frame/WebViewFrameWidget.h View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/frame/WebViewFrameWidget.cpp View 1 2 3 1 chunk +0 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/web/WebViewImpl.h View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/web/WebViewImpl.cpp View 1 2 3 4 1 chunk +0 lines, -14 lines 0 comments Download
M third_party/WebKit/public/web/WebInputMethodController.h View 1 chunk +3 lines, -0 lines 0 comments Download
M third_party/WebKit/public/web/WebView.h View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/public/web/WebWidget.h View 1 2 3 1 chunk +0 lines, -3 lines 0 comments Download

Messages

Total messages: 35 (24 generated)
EhsanK
PTAL.
3 years, 6 months ago (2017-05-31 13:03:22 UTC) #10
EhsanK
On 2017/05/31 13:03:22, EhsanK wrote: > PTAL. Hello Daniel, Friendly ping on this CL. Thanks!
3 years, 6 months ago (2017-06-19 21:37:45 UTC) #11
dcheng
Sorry for the long review latency. https://codereview.chromium.org/2910223003/diff/40001/content/browser/renderer_host/input/touch_selection_controller_client_child_frame.cc File content/browser/renderer_host/input/touch_selection_controller_client_child_frame.cc (right): https://codereview.chromium.org/2910223003/diff/40001/content/browser/renderer_host/input/touch_selection_controller_client_child_frame.cc#newcode130 content/browser/renderer_host/input/touch_selection_controller_client_child_frame.cc:130: rwhv_->GetSelectionRange(&selection_range) && !selection_range.is_empty(); ...
3 years, 6 months ago (2017-06-20 09:05:47 UTC) #12
EhsanK
Thanks Daniel and sorry for the even longer delay (I missed the question). PTAL. https://codereview.chromium.org/2910223003/diff/40001/content/browser/renderer_host/input/touch_selection_controller_client_child_frame.cc ...
3 years, 5 months ago (2017-07-10 15:38:30 UTC) #14
wjmaclean
https://codereview.chromium.org/2910223003/diff/40001/content/browser/renderer_host/input/touch_selection_controller_client_child_frame.cc File content/browser/renderer_host/input/touch_selection_controller_client_child_frame.cc (right): https://codereview.chromium.org/2910223003/diff/40001/content/browser/renderer_host/input/touch_selection_controller_client_child_frame.cc#newcode130 content/browser/renderer_host/input/touch_selection_controller_client_child_frame.cc:130: rwhv_->GetSelectionRange(&selection_range) && !selection_range.is_empty(); On 2017/07/10 15:38:29, EhsanK wrote: > ...
3 years, 5 months ago (2017-07-10 18:36:07 UTC) #15
dcheng
lgtm
3 years, 5 months ago (2017-07-17 19:07:38 UTC) #16
EhsanK
dtapuska@chromium.org: Please review changes in */input/ alexmos@chromium.org: Please review changes in content/ Thanks!
3 years, 5 months ago (2017-07-18 11:50:26 UTC) #22
alexmos
content/ LGTM
3 years, 5 months ago (2017-07-18 16:29:59 UTC) #25
dtapuska
On 2017/07/18 16:29:59, alexmos wrote: > content/ LGTM lgtm
3 years, 5 months ago (2017-07-19 20:45:20 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2910223003/80001
3 years, 5 months ago (2017-07-19 20:52:18 UTC) #31
commit-bot: I haz the power
3 years, 5 months ago (2017-07-19 23:26:55 UTC) #35
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as
https://chromium.googlesource.com/chromium/src/+/d503ac6073fad15a95d4eb5d9f13...

Powered by Google App Engine
This is Rietveld 408576698