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

Issue 2674253004: [refactor] Remove WebWidget::applyReplacementRange (Closed)

Created:
3 years, 10 months ago by EhsanK
Modified:
3 years, 10 months ago
CC:
blink-reviews, blink-reviews-api_chromium.org, chromium-reviews, darin-cc_chromium.org, dcheng, dglazkov+blink, jam, kinuko+watch, mlamouri+watch-content_chromium.org, mlamouri+watch-blink_chromium.org, aelias_OOO_until_Jul13
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Remove WebWidget::applyReplacementRange The method WebWidget::applyReplacementRange was added to accomodate the support for IME in OOPIFs. Before, the IME logic in content/renderer used to live in RenderViewImpl which has access to the frame tree on the renderer side. To accomodate this transition, some methods were added to the blink public API. Specifically, applyReplacement range selects a range to be later replaceed by the next call to set or commit composition. This simple task could be part of the implementation of those methods to the newly added WebInputMethodController instead. Moreover, the method does not do anything special to be used outside the scope of handling the IME events so it should not be part of the public API. Specifically, this CL will: 1- Remove WebWidget::applyReplacementRange which will also remove it from WebFrameWidgetImpl, WebViewFrameWidget, WebViewImpl. 2- Adds a new argument, replacementRange to WebInputMethodController::setComposition and WebInputMethodController::commitText. The benefits of this change are: 1- Removing a layering violation inside applyReplacementRange. 2- Further deduplicate the IME code inside WebFrameWidgetImpl and WebViewImpl. 2- Help with the separation of WebWidget and WebViewImpl. 3- Reducing some lines of code. BUG=639320, 629721 Review-Url: https://codereview.chromium.org/2674253004 Cr-Commit-Position: refs/heads/master@{#449339} Committed: https://chromium.googlesource.com/chromium/src/+/ce32ef9fc7230bbba732162c60cdc90f18fbbbc0

Patch Set 1 : more refactoring #

Total comments: 4

Patch Set 2 : Fixing the error #

Patch Set 3 : Rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+115 lines, -106 lines) Patch
M components/test_runner/text_input_controller.cc View 3 chunks +5 lines, -3 lines 0 comments Download
M content/renderer/render_widget.cc View 1 3 chunks +13 lines, -20 lines 0 comments Download
M content/renderer/render_widget_browsertest.cc View 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/web/WebFrameWidgetImpl.h View 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp View 1 1 chunk +0 lines, -10 lines 0 comments Download
M third_party/WebKit/Source/web/WebInputMethodControllerImpl.h View 2 chunks +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/WebInputMethodControllerImpl.cpp View 4 chunks +10 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/WebViewFrameWidget.h View 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/web/WebViewFrameWidget.cpp View 1 chunk +0 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/web/WebViewImpl.h View 1 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/web/WebViewImpl.cpp View 1 1 chunk +0 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/web/tests/WebViewTest.cpp View 1 37 chunks +68 lines, -46 lines 0 comments Download
M third_party/WebKit/public/web/WebInputMethodController.h View 2 chunks +14 lines, -8 lines 0 comments Download
M third_party/WebKit/public/web/WebWidget.h View 1 chunk +0 lines, -4 lines 0 comments Download

Messages

Total messages: 37 (26 generated)
EhsanK
Please review this change. dglazkov@/dcheng@: Blink changes in general. rbyres@: component/ test file and public ...
3 years, 10 months ago (2017-02-07 07:05:05 UTC) #18
dcheng
https://codereview.chromium.org/2674253004/diff/60001/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp File third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp (left): https://codereview.chromium.org/2674253004/diff/60001/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp#oldcode711 third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp:711: if (LocalFrame* frame = focusedLocalFrameInWidget()) { Is the reason ...
3 years, 10 months ago (2017-02-07 07:58:42 UTC) #19
Avi (use Gerrit)
content lgtm
3 years, 10 months ago (2017-02-07 15:42:00 UTC) #20
dglazkov
LGTM, fingers crossed. https://codereview.chromium.org/2674253004/diff/60001/third_party/WebKit/Source/web/WebInputMethodControllerImpl.h File third_party/WebKit/Source/web/WebInputMethodControllerImpl.h (right): https://codereview.chromium.org/2674253004/diff/60001/third_party/WebKit/Source/web/WebInputMethodControllerImpl.h#newcode34 third_party/WebKit/Source/web/WebInputMethodControllerImpl.h:34: int selectionStart, Would you consider switching ...
3 years, 10 months ago (2017-02-07 16:47:45 UTC) #21
EhsanK
Thanks! PTAL. https://codereview.chromium.org/2674253004/diff/60001/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp File third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp (left): https://codereview.chromium.org/2674253004/diff/60001/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp#oldcode711 third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp:711: if (LocalFrame* frame = focusedLocalFrameInWidget()) { On ...
3 years, 10 months ago (2017-02-07 17:14:48 UTC) #22
dcheng
LGTM
3 years, 10 months ago (2017-02-07 18:51:55 UTC) #23
Rick Byers
test_runner LGTM
3 years, 10 months ago (2017-02-09 01:50:12 UTC) #24
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/2674253004/60001
3 years, 10 months ago (2017-02-09 05:35:34 UTC) #26
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_asan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/307743) linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, ...
3 years, 10 months ago (2017-02-09 05:55:06 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/2674253004/100001
3 years, 10 months ago (2017-02-09 16:07:38 UTC) #34
commit-bot: I haz the power
3 years, 10 months ago (2017-02-09 17:34:33 UTC) #37
Message was sent while issue was closed.
Committed patchset #3 (id:100001) as
https://chromium.googlesource.com/chromium/src/+/ce32ef9fc7230bbba732162c60cd...

Powered by Google App Engine
This is Rietveld 408576698