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

Issue 1949163002: SendPageMessage() should not send to a WebView guest's embedder. (Closed)

Created:
4 years, 7 months ago by wjmaclean
Modified:
4 years, 7 months ago
Reviewers:
nasko, lfg
CC:
chromium-reviews, darin-cc_chromium.org, nasko+codewatch_chromium.org, jam, creis+watch_chromium.org, lazyboy
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

SendPageMessage() should not send to a WebView guest's embedder. The test failure in the bug listed below is due to SendPageMessage(), when initiated from the guest's WebContentsImpl(), inadvertently sending messages to the embedder. For zoom messages this is inappropriate, and for all messages seems to run counter to the notion of the 'page' being the frames owned by the WebContents. BUG=607978 CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_site_isolation Committed: https://crrev.com/a767092b45f7eafcc57c704f536d05bdf953c773 Cr-Commit-Position: refs/heads/master@{#392081}

Patch Set 1 #

Total comments: 6

Patch Set 2 : Revise to use site instances. #

Total comments: 4

Patch Set 3 : Address suggestions. #

Patch Set 4 : Use GetProxyToOuterDelegate() to filter page messages. #

Total comments: 1

Patch Set 5 : Revise comment. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+9 lines, -9 lines) Patch
M chrome/browser/apps/guest_view/web_view_browsertest.cc View 1 1 chunk +1 line, -7 lines 0 comments Download
M content/browser/frame_host/render_frame_host_manager.cc View 1 2 3 4 1 chunk +8 lines, -2 lines 0 comments Download

Messages

Total messages: 39 (16 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1949163002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1949163002/1
4 years, 7 months ago (2016-05-04 19:34:05 UTC) #3
wjmaclean
Small change, please take a look? lfg@ - I uploaded this before our discussion about ...
4 years, 7 months ago (2016-05-04 20:57:22 UTC) #8
nasko
https://codereview.chromium.org/1949163002/diff/1/chrome/browser/apps/guest_view/web_view_browsertest.cc File chrome/browser/apps/guest_view/web_view_browsertest.cc (right): https://codereview.chromium.org/1949163002/diff/1/chrome/browser/apps/guest_view/web_view_browsertest.cc#newcode2432 chrome/browser/apps/guest_view/web_view_browsertest.cc:2432: TestHelper("testZoomAPI", "web_view/shim", NO_TEST_SERVER); Need to fix indent after removal ...
4 years, 7 months ago (2016-05-04 21:58:59 UTC) #9
lfg
On 2016/05/04 20:57:22, wjmaclean wrote: > Small change, please take a look? > > lfg@ ...
4 years, 7 months ago (2016-05-04 22:05:32 UTC) #10
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-05-04 22:19:02 UTC) #12
wjmaclean
I've revised this to use a comparison of the outer-delegate's site instance (I'm assuming it's ...
4 years, 7 months ago (2016-05-05 15:40:56 UTC) #13
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1949163002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1949163002/20001
4 years, 7 months ago (2016-05-05 15:41:34 UTC) #15
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-05-05 16:41:36 UTC) #17
lfg
https://codereview.chromium.org/1949163002/diff/20001/content/browser/frame_host/render_frame_host_manager.cc File content/browser/frame_host/render_frame_host_manager.cc (right): https://codereview.chromium.org/1949163002/diff/20001/content/browser/frame_host/render_frame_host_manager.cc#newcode2510 content/browser/frame_host/render_frame_host_manager.cc:2510: ? GetOuterDelegateNode()->current_frame_host()->GetSiteInstance() I think we probably want to look ...
4 years, 7 months ago (2016-05-05 17:27:11 UTC) #18
wjmaclean
PTAL https://codereview.chromium.org/1949163002/diff/20001/content/browser/frame_host/render_frame_host_manager.cc File content/browser/frame_host/render_frame_host_manager.cc (right): https://codereview.chromium.org/1949163002/diff/20001/content/browser/frame_host/render_frame_host_manager.cc#newcode2510 content/browser/frame_host/render_frame_host_manager.cc:2510: ? GetOuterDelegateNode()->current_frame_host()->GetSiteInstance() On 2016/05/05 17:27:11, lfg wrote: > ...
4 years, 7 months ago (2016-05-05 17:39:07 UTC) #19
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1949163002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1949163002/40001
4 years, 7 months ago (2016-05-05 17:39:47 UTC) #21
wjmaclean
https://codereview.chromium.org/1949163002/diff/20001/content/browser/frame_host/render_frame_host_manager.cc File content/browser/frame_host/render_frame_host_manager.cc (right): https://codereview.chromium.org/1949163002/diff/20001/content/browser/frame_host/render_frame_host_manager.cc#newcode2510 content/browser/frame_host/render_frame_host_manager.cc:2510: ? GetOuterDelegateNode()->current_frame_host()->GetSiteInstance() On 2016/05/05 17:27:11, lfg wrote: > I ...
4 years, 7 months ago (2016-05-05 18:53:49 UTC) #22
lfg
https://codereview.chromium.org/1949163002/diff/20001/content/browser/frame_host/render_frame_host_manager.cc File content/browser/frame_host/render_frame_host_manager.cc (right): https://codereview.chromium.org/1949163002/diff/20001/content/browser/frame_host/render_frame_host_manager.cc#newcode2510 content/browser/frame_host/render_frame_host_manager.cc:2510: ? GetOuterDelegateNode()->current_frame_host()->GetSiteInstance() On 2016/05/05 18:53:49, wjmaclean wrote: > On ...
4 years, 7 months ago (2016-05-05 19:01:00 UTC) #23
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1949163002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1949163002/60001
4 years, 7 months ago (2016-05-05 19:02:49 UTC) #25
wjmaclean
On 2016/05/05 19:01:00, lfg wrote: > https://codereview.chromium.org/1949163002/diff/20001/content/browser/frame_host/render_frame_host_manager.cc > File content/browser/frame_host/render_frame_host_manager.cc (right): > > https://codereview.chromium.org/1949163002/diff/20001/content/browser/frame_host/render_frame_host_manager.cc#newcode2510 > ...
4 years, 7 months ago (2016-05-05 19:03:19 UTC) #26
wjmaclean
nasko@ lfg@ I'm ok with using either of the approaches in PS#3 or PS#4 (slight ...
4 years, 7 months ago (2016-05-05 20:23:59 UTC) #27
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-05-05 20:36:11 UTC) #29
nasko
content/ LGTM in PS4. https://codereview.chromium.org/1949163002/diff/60001/content/browser/frame_host/render_frame_host_manager.cc File content/browser/frame_host/render_frame_host_manager.cc (right): https://codereview.chromium.org/1949163002/diff/60001/content/browser/frame_host/render_frame_host_manager.cc#newcode2507 content/browser/frame_host/render_frame_host_manager.cc:2507: // send it to the ...
4 years, 7 months ago (2016-05-06 15:35:27 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1949163002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1949163002/80001
4 years, 7 months ago (2016-05-06 16:00:56 UTC) #33
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 7 months ago (2016-05-06 17:06:33 UTC) #35
commit-bot: I haz the power
Patchset 5 (id:??) landed as https://crrev.com/a767092b45f7eafcc57c704f536d05bdf953c773 Cr-Commit-Position: refs/heads/master@{#392081}
4 years, 7 months ago (2016-05-06 17:08:02 UTC) #37
lfg
On 2016/05/05 19:03:19, wjmaclean wrote: > > The RFH is owned by the RFHM, which ...
4 years, 7 months ago (2016-05-06 17:21:05 UTC) #38
wjmaclean
4 years, 7 months ago (2016-05-06 17:51:09 UTC) #39
Message was sent while issue was closed.
On 2016/05/06 17:21:05, lfg wrote:
> On 2016/05/05 19:03:19, wjmaclean wrote:
> > > The RFH is owned by the RFHM, which comes with every FTN. When we create
an
> > > inner WebContents, we swap the RenderFrame in the outer WebContents
renderer
> > > with a RenderFrameProxy, and that RFPH lives in the inner WebContents FTN.
> > Since
> > > we still want to keep the FTN in the outer WebContents tree (as a
connection
> > > point between the two trees), we end up with a RFH that does not have a
live
> > RF.
> > 
> > Does this explanation live in the code somewhere as a comment? Or in a link
to
> a
> > design doc? :-)
> 
> I don't think this is well documented, and it would be a good idea to write a
> document explaining some of those differences with outer/inner WebContents and
> regular OOPIFs. I think it's also a great way to learn about interactions with
> the FrameTree on OOPIF-based webview (maybe you could look at doing it? ;)).

Yes, I need to dig through this code and learn it anyways, so I'll generate some
docs for it :-)

Powered by Google App Engine
This is Rietveld 408576698