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

Issue 2029423003: OOPIF IME: Renderer Side Changes (Closed)

Created:
4 years, 6 months ago by EhsanK
Modified:
4 years, 5 months ago
Reviewers:
kenrb, Charlie Reis, dcheng, lfg
CC:
dcheng, blink-reviews, blink-reviews-api_chromium.org, chromium-reviews, creis+watch_chromium.org, darin-cc_chromium.org, dglazkov+blink, jam, kinuko+watch, mkwst+moarreviews-renderer_chromium.org, mlamouri+watch-blink_chromium.org, mlamouri+watch-content_chromium.org, nasko+codewatch_chromium.org, site-isolation-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

OOPIF IME: Renderer Side Changes Currently, all IME-related IPC are handled at the RenderViewImpl first before calling the base class methods on RenderWidget (ImeSetComposition and ImeConfirmComposition). Further, to query IME-related state, e.g., GetTextInputType(), RenderViewImpl overrides the method from RenderWidget so that it can access the state from pepper plugin. These overrides are needed to either: 1- Access focused PepperPluginInstacneImpl to set/get IME-related state. 2- Use focused frame to set/get IME-related state. This CL removes all those methods from RenderViewImpl and handles them in RenderWidget. To this end, a reference to the focused plugin is kept in RenderWidget and updated by its owning RenderFrame (to get IME-related state). Also, new API is added to blink to enable RenderWidget handle IME tasks related to focusedFrame. In line with the separation of WebViewImpl from WebWidget, as well as avoiding potential race conditions between mutiple Widgets on the same process, most of the IME- related WebWidget methods are now specifically implemented for WebFrameWidgetImpl. Finally, a new private API is added to WebFrameWidgetImpl to help the widget distinguish between in process frames which do or do not belong to widget's local root. BUG=578168, 618774, 626746 Committed: https://crrev.com/2a46d63b3c442f1f0d26cd1484c25eb766a064bc Cr-Commit-Position: refs/heads/master@{#406263}

Patch Set 1 #

Patch Set 2 : Fixed Initialization Order #

Patch Set 3 : Implemented WebViewImpl::getCompositionCharacterBounds #

Total comments: 11

Patch Set 4 : Rebase #

Patch Set 5 : Implementing Methods in both WebViewImpl and WebFrameWidgetImpl #

Patch Set 6 : Undid Changes to render_frame_impl.h #

Total comments: 12

Patch Set 7 : Addressing kenrb@'s comments #

Total comments: 4

Patch Set 8 : Rebase and Small Changes #

Patch Set 9 : Addressing kenrb@'s comments #

Patch Set 10 : Rebase #

Total comments: 19

Patch Set 11 : Addressing lfg@'s comments. #

Total comments: 10

Patch Set 12 : More verifications of the focused frame being the right one. #

Patch Set 13 : Rebased #

Total comments: 2

Patch Set 14 : Changed Implementation of WebFrameWidgetImpl::setFocus to mimic that of WebViewImpl #

Total comments: 2

Patch Set 15 : Fixed an Error #

Total comments: 12

Patch Set 16 : Addressing comments #

Patch Set 17 : Checking for focusedLocalFrameInWidget() in more methods #

Patch Set 18 : Using focusedCoreFrame() instead of focusController().focusedFrame() in WebViewImpl #

Unified diffs Side-by-side diffs Delta from patch set Stats (+557 lines, -208 lines) Patch
M content/renderer/render_frame_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +2 lines, -0 lines 0 comments Download
M content/renderer/render_view_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +4 lines, -15 lines 0 comments Download
M content/renderer/render_view_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +0 lines, -136 lines 0 comments Download
M content/renderer/render_widget.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +9 lines, -0 lines 0 comments Download
M content/renderer/render_widget.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 7 chunks +67 lines, -1 line 0 comments Download
M third_party/WebKit/Source/web/WebFrameWidgetImpl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +21 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 12 chunks +366 lines, -29 lines 0 comments Download
M third_party/WebKit/Source/web/WebViewImpl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/WebViewImpl.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 12 chunks +75 lines, -27 lines 0 comments Download
M third_party/WebKit/public/web/WebWidget.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +8 lines, -0 lines 0 comments Download

Messages

Total messages: 65 (32 generated)
EhsanK
Hello Ken, Daniel, Could you please take a look? I think it is much easier ...
4 years, 6 months ago (2016-06-03 02:38:54 UTC) #7
kenrb
Thanks for putting this up. Sorry it took a while for me to get to ...
4 years, 6 months ago (2016-06-07 20:18:13 UTC) #8
dcheng
https://codereview.chromium.org/2029423003/diff/40001/third_party/WebKit/Source/web/WebViewImpl.h File third_party/WebKit/Source/web/WebViewImpl.h (right): https://codereview.chromium.org/2029423003/diff/40001/third_party/WebKit/Source/web/WebViewImpl.h#newcode161 third_party/WebKit/Source/web/WebViewImpl.h:161: bool getCompositionCharacterBounds(WebVector<WebRect>& bounds) override; On 2016/06/07 at 20:18:13, kenrb ...
4 years, 6 months ago (2016-06-08 04:39:44 UTC) #9
kenrb
https://codereview.chromium.org/2029423003/diff/40001/third_party/WebKit/Source/web/WebViewImpl.h File third_party/WebKit/Source/web/WebViewImpl.h (right): https://codereview.chromium.org/2029423003/diff/40001/third_party/WebKit/Source/web/WebViewImpl.h#newcode161 third_party/WebKit/Source/web/WebViewImpl.h:161: bool getCompositionCharacterBounds(WebVector<WebRect>& bounds) override; On 2016/06/08 04:39:43, dcheng wrote: ...
4 years, 6 months ago (2016-06-08 15:26:04 UTC) #10
EhsanK
PTAL. https://codereview.chromium.org/2029423003/diff/40001/content/renderer/render_widget.cc File content/renderer/render_widget.cc (right): https://codereview.chromium.org/2029423003/diff/40001/content/renderer/render_widget.cc#newcode1490 content/renderer/render_widget.cc:1490: OnImeSetComposition(this, text, underlines, replacement_range, On 2016/06/07 20:18:13, kenrb ...
4 years, 6 months ago (2016-06-09 03:24:27 UTC) #11
EhsanK
+lfg@ who is also working on the separation of widget and view.
4 years, 6 months ago (2016-06-09 03:25:23 UTC) #13
kenrb
https://codereview.chromium.org/2029423003/diff/100001/content/renderer/render_widget.h File content/renderer/render_widget.h (right): https://codereview.chromium.org/2029423003/diff/100001/content/renderer/render_widget.h#newcode466 content/renderer/render_widget.h:466: Nit: new line not needed. https://codereview.chromium.org/2029423003/diff/100001/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp File third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp (right): ...
4 years, 6 months ago (2016-06-10 20:52:04 UTC) #14
EhsanK
PTAL. https://codereview.chromium.org/2029423003/diff/100001/content/renderer/render_widget.h File content/renderer/render_widget.h (right): https://codereview.chromium.org/2029423003/diff/100001/content/renderer/render_widget.h#newcode466 content/renderer/render_widget.h:466: On 2016/06/10 20:52:03, kenrb wrote: > Nit: new ...
4 years, 5 months ago (2016-06-27 21:14:50 UTC) #18
kenrb
lgtm, although we need to figure out if you should land this before or after ...
4 years, 5 months ago (2016-06-28 20:55:57 UTC) #19
EhsanK
Thanks for the reviews! PTAL. https://codereview.chromium.org/2029423003/diff/120001/third_party/WebKit/Source/web/WebFrameWidgetImpl.h File third_party/WebKit/Source/web/WebFrameWidgetImpl.h (right): https://codereview.chromium.org/2029423003/diff/120001/third_party/WebKit/Source/web/WebFrameWidgetImpl.h#newcode200 third_party/WebKit/Source/web/WebFrameWidgetImpl.h:200: // to this widget. ...
4 years, 5 months ago (2016-06-29 14:04:19 UTC) #20
lfg
Sorry for the delay, added some comments. https://codereview.chromium.org/2029423003/diff/180001/content/renderer/render_view_impl.cc File content/renderer/render_view_impl.cc (right): https://codereview.chromium.org/2029423003/diff/180001/content/renderer/render_view_impl.cc#newcode3119 content/renderer/render_view_impl.cc:3119: PepperPluginInstanceImpl* RenderViewImpl::GetFocusedPepperPlugin() ...
4 years, 5 months ago (2016-07-05 18:30:46 UTC) #21
EhsanK
Unfortunately I have ended up rebasing and making changes to address comments in the same ...
4 years, 5 months ago (2016-07-07 14:40:47 UTC) #26
lfg
https://codereview.chromium.org/2029423003/diff/180001/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp File third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp (right): https://codereview.chromium.org/2029423003/diff/180001/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp#newcode675 third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp:675: if (!frame) On 2016/07/07 14:40:47, EhsanK wrote: > On ...
4 years, 5 months ago (2016-07-07 15:13:31 UTC) #27
kenrb
https://codereview.chromium.org/2029423003/diff/180001/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp File third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp (right): https://codereview.chromium.org/2029423003/diff/180001/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp#newcode474 third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp:474: return view()->setComposition(text, underlines, selectionStart, selectionEnd); On 2016/07/07 14:40:47, EhsanK ...
4 years, 5 months ago (2016-07-07 15:30:39 UTC) #28
EhsanK
PTAL. https://codereview.chromium.org/2029423003/diff/180001/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp File third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp (right): https://codereview.chromium.org/2029423003/diff/180001/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp#newcode474 third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp:474: return view()->setComposition(text, underlines, selectionStart, selectionEnd); On 2016/07/07 15:30:38, ...
4 years, 5 months ago (2016-07-07 20:25:08 UTC) #29
lfg
https://codereview.chromium.org/2029423003/diff/180001/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp File third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp (right): https://codereview.chromium.org/2029423003/diff/180001/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp#newcode675 third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp:675: if (!frame) On 2016/07/07 20:25:07, EhsanK wrote: > On ...
4 years, 5 months ago (2016-07-07 20:58:27 UTC) #30
EhsanK
Thank you Lucas for the reviews! Please take another look. https://codereview.chromium.org/2029423003/diff/240001/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp File third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp (right): https://codereview.chromium.org/2029423003/diff/240001/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp#newcode449 ...
4 years, 5 months ago (2016-07-11 20:29:54 UTC) #32
lfg
Thanks for fixing the WebFrameWidgetImpl implementation of confirmComposition. https://codereview.chromium.org/2029423003/diff/280001/third_party/WebKit/Source/web/WebViewImpl.cpp File third_party/WebKit/Source/web/WebViewImpl.cpp (right): https://codereview.chromium.org/2029423003/diff/280001/third_party/WebKit/Source/web/WebViewImpl.cpp#newcode2307 third_party/WebKit/Source/web/WebViewImpl.cpp:2307: focusedFrame->inputMethodController().confirmComposition(); ...
4 years, 5 months ago (2016-07-11 20:55:51 UTC) #33
EhsanK
Thank you Lucas for reviews and thanks for catching that error. Please take another look. ...
4 years, 5 months ago (2016-07-11 21:06:09 UTC) #34
EhsanK
Adding creis@ as the content/ owner reviewer.
4 years, 5 months ago (2016-07-11 21:09:15 UTC) #36
lfg
Thanks. lgtm
4 years, 5 months ago (2016-07-11 21:09:23 UTC) #37
Charlie Reis
Rubber stamp LGTM for content/, as I'm mostly deferring to Ken and Lucas. https://codereview.chromium.org/2029423003/diff/320001/content/renderer/render_view_impl.h File ...
4 years, 5 months ago (2016-07-12 00:00:12 UTC) #38
dcheng
As a general question, can you help me understand the overall direction that we're taking ...
4 years, 5 months ago (2016-07-12 14:43:22 UTC) #39
EhsanK
Thanks for the reviews. PTAL. Daniel: The direction I had in mind was to move ...
4 years, 5 months ago (2016-07-12 15:13:25 UTC) #40
kenrb
On 2016/07/12 14:43:22, dcheng wrote: > As a general question, can you help me understand ...
4 years, 5 months ago (2016-07-12 15:14:11 UTC) #41
dcheng
On 2016/07/12 15:14:11, kenrb wrote: > On 2016/07/12 14:43:22, dcheng wrote: > > As a ...
4 years, 5 months ago (2016-07-18 16:38:33 UTC) #42
EhsanK
Daniel, PTAL. Thanks! Some notes: I used the focusedLocalFrameInWidget() (now added to WebViewImpl as well) ...
4 years, 5 months ago (2016-07-19 05:37:33 UTC) #49
dcheng
still lgtm. let's try to dedupe this (I have a change which adds a WebFrameWidgetBase ...
4 years, 5 months ago (2016-07-19 09:14:59 UTC) #52
EhsanK
On 2016/07/19 09:14:59, dcheng wrote: > still lgtm. let's try to dedupe this (I have ...
4 years, 5 months ago (2016-07-19 12:49:38 UTC) #53
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/2029423003/380001
4 years, 5 months ago (2016-07-19 13:28:25 UTC) #60
commit-bot: I haz the power
Committed patchset #18 (id:380001)
4 years, 5 months ago (2016-07-19 13:33:24 UTC) #62
commit-bot: I haz the power
CQ bit was unchecked.
4 years, 5 months ago (2016-07-19 13:33:38 UTC) #63
commit-bot: I haz the power
4 years, 5 months ago (2016-07-19 13:34:58 UTC) #65
Message was sent while issue was closed.
Patchset 18 (id:??) landed as
https://crrev.com/2a46d63b3c442f1f0d26cd1484c25eb766a064bc
Cr-Commit-Position: refs/heads/master@{#406263}

Powered by Google App Engine
This is Rietveld 408576698