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

Issue 2571583008: Support tracking focused element for OOPIFs. (Closed)

Created:
4 years ago by EhsanK
Modified:
4 years ago
Reviewers:
ncarter (slow), nasko
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, creis+watch_chromium.org, yusukes+watch_chromium.org, shuchen+watch_chromium.org, nasko+codewatch_chromium.org, jam, jbauman+watch_chromium.org, nona+watch_chromium.org, darin-cc_chromium.org, piman+watch_chromium.org, kalyank, danakj+watch_chromium.org, James Su, site-isolation-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Support tracking focused node element for OOPIFs. Focused elements are tracked by RenderViewHostImpl. Upon a change in focused element, RenderViewImpl sends ViewHostMsg_FocusedNodeChanged to the browser. With --site-per-process, RenderViewImpl corresponding to OOPIFs is swapped out and cannot send the IPC. Even by allowing sending such IPCs in swapped out state, the RenderViewHost cannot properly handle them when there are multiple RenderWidgetHosts (same process) on the page. This is now causing regressions with OSK for windows tablets. This CL will move the logic from RenderViewImpl to RenderFrameImpl. When focus moves from one WebNode to another, the corresponding frames are already getting notified by RenderViewImpl. This CL relieves RenderViewImpl from sending the IPC, and reuses the RenderFrameImpl::FocusNodeChanged() for sending the update to RenderFrameHostImpl, which then stores the state and notifies its delegate (WebContentsImpl) about the change. For similar reasons, the logic to update FocusedNodeTouched is removed from RenderViewImpl to RenderWidget and is now handled by RenderWidgetHostImpl. The public API methods in RenderViewHost are unchanged but they are now handled through RenderViewHostDelegate (WebContentsImpl), which will query the information or send the command through the focused frame. BUG=613326 TBR=creis@chromium.org CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation Committed: https://crrev.com/a110f64a89bad15abb5322be8e720fae40a0f7f1 Cr-Commit-Position: refs/heads/master@{#440185}

Patch Set 1 #

Patch Set 2 : Fixed some compile errors #

Total comments: 20

Patch Set 3 : Rebased #

Patch Set 4 : Addressing comments #

Patch Set 5 : Fix missing from previous patch #

Total comments: 1

Patch Set 6 : Addressing comment + Added bug number to TODO #

Total comments: 6

Patch Set 7 : Addressed nasko@'s comments #

Patch Set 8 : Do not call ScrollFocusedEditableNodeIntoRect for OOPIFs. #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+311 lines, -112 lines) Patch
M chrome/browser/renderer_host/site_per_process_text_input_browsertest.cc View 3 chunks +106 lines, -1 line 0 comments Download
M content/browser/frame_host/render_frame_host_delegate.h View 1 2 3 2 chunks +12 lines, -0 lines 0 comments Download
M content/browser/frame_host/render_frame_host_impl.h View 1 2 3 3 chunks +11 lines, -0 lines 0 comments Download
M content/browser/frame_host/render_frame_host_impl.cc View 1 2 3 4 5 6 7 4 chunks +21 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_view_host_delegate.h View 1 2 3 1 chunk +8 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_view_host_delegate.cc View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_view_host_impl.h View 2 chunks +0 lines, -6 lines 0 comments Download
M content/browser/renderer_host/render_view_host_impl.cc View 1 2 3 7 chunks +7 lines, -53 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_delegate.h View 1 chunk +5 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_impl.h View 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_impl.cc View 1 2 3 2 chunks +6 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura.cc View 1 2 3 4 5 6 7 2 chunks +3 lines, -1 line 4 comments Download
M content/browser/web_contents/web_contents_impl.h View 1 2 3 chunks +6 lines, -0 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.cc View 1 2 3 4 5 6 7 5 chunks +58 lines, -0 lines 0 comments Download
M content/common/frame_messages.h View 1 2 3 4 5 6 2 chunks +12 lines, -0 lines 0 comments Download
M content/common/view_messages.h View 2 chunks +0 lines, -11 lines 0 comments Download
M content/public/test/text_input_test_utils.h View 2 chunks +4 lines, -0 lines 0 comments Download
M content/public/test/text_input_test_utils.cc View 2 chunks +6 lines, -0 lines 0 comments Download
M content/renderer/render_frame_impl.h View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 3 4 5 6 7 3 chunks +20 lines, -0 lines 0 comments Download
M content/renderer/render_view_browsertest.cc View 1 2 3 4 5 6 7 1 chunk +7 lines, -7 lines 0 comments Download
M content/renderer/render_view_impl.h View 1 chunk +0 lines, -1 line 0 comments Download
M content/renderer/render_view_impl.cc View 1 2 4 chunks +0 lines, -32 lines 0 comments Download
M content/renderer/render_widget.cc View 1 chunk +13 lines, -0 lines 0 comments Download

Messages

Total messages: 58 (42 generated)
EhsanK
Hello Charlie, Could you please review this CL (and/or suggest other reviewers)? Thanks! PS: Tested ...
4 years ago (2016-12-15 00:09:32 UTC) #18
Charlie Reis
I'm a bit overloaded with reviews at the moment. Nick, would you be able to ...
4 years ago (2016-12-15 00:13:35 UTC) #20
ncarter (slow)
Yes, I can review this.
4 years ago (2016-12-15 00:37:47 UTC) #24
ncarter (slow)
https://codereview.chromium.org/2571583008/diff/60001/content/browser/frame_host/render_frame_host_delegate.h File content/browser/frame_host/render_frame_host_delegate.h (right): https://codereview.chromium.org/2571583008/diff/60001/content/browser/frame_host/render_frame_host_delegate.h#newcode221 content/browser/frame_host/render_frame_host_delegate.h:221: // element. |bounds_in_frame_widget| is the rectangle containing the element ...
4 years ago (2016-12-16 19:17:21 UTC) #29
EhsanK
Thanks Nick! PTAL. So far, the only outstanding issue seems to be scrolling the editable ...
4 years ago (2016-12-20 16:39:11 UTC) #30
ncarter (slow)
lgtm https://codereview.chromium.org/2571583008/diff/60001/content/browser/web_contents/web_contents_impl.cc File content/browser/web_contents/web_contents_impl.cc (right): https://codereview.chromium.org/2571583008/diff/60001/content/browser/web_contents/web_contents_impl.cc#newcode4736 content/browser/web_contents/web_contents_impl.cc:4736: // changes to public API. On 2016/12/20 16:39:11, ...
4 years ago (2016-12-20 22:37:45 UTC) #33
EhsanK
Thanks Nick! Adding creis@ again for the missing permission on the test file (apparently only ...
4 years ago (2016-12-20 23:03:25 UTC) #35
EhsanK
On 2016/12/20 23:03:25, EhsanK wrote: > Thanks Nick! > > Adding creis@ again for the ...
4 years ago (2016-12-21 16:08:38 UTC) #38
nasko
LGTM with some nits. https://codereview.chromium.org/2571583008/diff/140001/content/common/frame_messages.h File content/common/frame_messages.h (right): https://codereview.chromium.org/2571583008/diff/140001/content/common/frame_messages.h#newcode1122 content/common/frame_messages.h:1122: // The second parameter is ...
4 years ago (2016-12-21 16:28:36 UTC) #40
EhsanK
Thanks nasko@! I will try to CQ now. Also -kenrb@ since nasko@ reviewed as security ...
4 years ago (2016-12-21 16:37:06 UTC) #42
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/2571583008/180001
4 years ago (2016-12-21 18:37:45 UTC) #50
ncarter (slow)
lgtm https://codereview.chromium.org/2571583008/diff/180001/content/browser/renderer_host/render_widget_host_view_aura.cc File content/browser/renderer_host/render_widget_host_view_aura.cc (right): https://codereview.chromium.org/2571583008/diff/180001/content/browser/renderer_host/render_widget_host_view_aura.cc#newcode186 content/browser/renderer_host/render_widget_host_view_aura.cc:186: // inside an OOPIF (https://crbug.com/676037). As we discussed ...
4 years ago (2016-12-21 18:46:09 UTC) #51
EhsanK
Thanks Nick! I will try to fix the scrolling issue in a followup CL. https://codereview.chromium.org/2571583008/diff/180001/content/browser/renderer_host/render_widget_host_view_aura.cc ...
4 years ago (2016-12-21 18:49:58 UTC) #52
EhsanK
On 2016/12/21 18:49:58, EhsanK wrote: > Thanks Nick! I will try to fix the scrolling ...
4 years ago (2016-12-21 18:50:47 UTC) #53
commit-bot: I haz the power
Committed patchset #8 (id:180001)
4 years ago (2016-12-21 19:48:02 UTC) #56
commit-bot: I haz the power
4 years ago (2016-12-21 19:51:46 UTC) #58
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/a110f64a89bad15abb5322be8e720fae40a0f7f1
Cr-Commit-Position: refs/heads/master@{#440185}

Powered by Google App Engine
This is Rietveld 408576698