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

Issue 284015: Swaps renderer processes on links with rel=noreferrer and target=_blank.... (Closed)

Created:
11 years, 2 months ago by Charlie Reis
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com, Nate Chapin
Visibility:
Public.

Description

Swaps renderer processes on links with rel=noreferrer and target=_blank. We now detect these types of navigations in RenderView and allow the browser process to handle them. This allows us to swap process if the navigation is cross-site. Requires exposing suppressOpenerInNewFrame in WebFrame to accurately detect these links. BUG=24447 TEST=RenderViewHostManagerTest.SwapProcessOnRelNoreferrerWithTargetBlank Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=29783

Patch Set 1 #

Total comments: 2

Patch Set 2 : '' #

Total comments: 4

Patch Set 3 : '' #

Patch Set 4 : '' #

Total comments: 2

Patch Set 5 : '' #

Patch Set 6 : '' #

Total comments: 2

Patch Set 7 : '' #

Patch Set 8 : '' #

Total comments: 2

Patch Set 9 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+178 lines, -2 lines) Patch
M chrome/browser/renderer_host/test/render_view_host_manager_browsertest.cc View 1 2 3 2 chunks +91 lines, -1 line 0 comments Download
M chrome/renderer/render_view.h View 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/renderer/render_view.cc View 1 2 3 4 5 6 7 8 5 chunks +36 lines, -1 line 0 comments Download
A chrome/test/data/click-noreferrer-links.html View 1 chunk +37 lines, -0 lines 0 comments Download
M webkit/api/public/WebFrame.h View 6 7 1 chunk +4 lines, -0 lines 0 comments Download
M webkit/glue/webframe_impl.h View 6 7 1 chunk +1 line, -0 lines 0 comments Download
M webkit/glue/webframe_impl.cc View 6 7 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 15 (0 generated)
Charlie Reis
Here's a first cut. The test will fail until Nate's change lands. The test case ...
11 years, 2 months ago (2009-10-16 19:56:16 UTC) #1
darin (slow to review)
no need for GYP changes when adding a .html test file. http://codereview.chromium.org/284015/diff/1/4 File chrome/renderer/render_view.cc (right): ...
11 years, 2 months ago (2009-10-19 19:40:28 UTC) #2
Charlie Reis
http://codereview.chromium.org/284015/diff/1/4 File chrome/renderer/render_view.cc (right): http://codereview.chromium.org/284015/diff/1/4#newcode1885 Line 1885: GURL(frame->url()) == GURL() && On 2009/10/19 19:40:29, darin ...
11 years, 2 months ago (2009-10-19 19:55:47 UTC) #3
Charlie Reis
New changelist uploaded-- I only added an #include in the test to get it to ...
11 years, 2 months ago (2009-10-19 20:51:00 UTC) #4
darin (slow to review)
LGTM http://codereview.chromium.org/284015/diff/6001/5004 File chrome/renderer/render_view.cc (right): http://codereview.chromium.org/284015/diff/6001/5004#newcode1923 Line 1923: GURL(frame->url()) == GURL() && nit: can you ...
11 years, 2 months ago (2009-10-19 21:33:04 UTC) #5
Charlie Reis
Needed to add another condition to the heuristic to make sure this RenderView was created ...
11 years, 2 months ago (2009-10-20 06:43:54 UTC) #6
darin (slow to review)
http://codereview.chromium.org/284015/diff/7002/8005 File chrome/renderer/render_view.cc (right): http://codereview.chromium.org/284015/diff/7002/8005#newcode1914 Line 1914: bool userg = frame->isProcessingUserGesture(); leftover debugging cruft?
11 years, 2 months ago (2009-10-20 07:00:16 UTC) #7
Charlie Reis
http://codereview.chromium.org/284015/diff/7002/8005 File chrome/renderer/render_view.cc (right): http://codereview.chromium.org/284015/diff/7002/8005#newcode1914 Line 1914: bool userg = frame->isProcessingUserGesture(); On 2009/10/20 07:00:16, darin ...
11 years, 2 months ago (2009-10-20 15:14:16 UTC) #8
Charlie Reis
Here's the updated changelist, which depends on Nate's WebKit patch to FrameLoader. I left in ...
11 years, 2 months ago (2009-10-20 18:45:06 UTC) #9
darin (slow to review)
http://codereview.chromium.org/284015/diff/16001/16006 File webkit/api/public/WebFrame.h (right): http://codereview.chromium.org/284015/diff/16001/16006#newcode308 Line 308: virtual bool suppressOpenerInNewFrame() const = 0; this reads ...
11 years, 2 months ago (2009-10-20 19:32:48 UTC) #10
Charlie Reis
http://codereview.chromium.org/284015/diff/16001/16006 File webkit/api/public/WebFrame.h (right): http://codereview.chromium.org/284015/diff/16001/16006#newcode308 Line 308: virtual bool suppressOpenerInNewFrame() const = 0; On 2009/10/20 ...
11 years, 2 months ago (2009-10-20 20:21:00 UTC) #11
Charlie Reis
Renamed to willSuppressOpenerInNewFrame.
11 years, 2 months ago (2009-10-20 21:18:42 UTC) #12
Charlie Reis
Is this good to go? Thanks, Charlie
11 years, 2 months ago (2009-10-21 18:54:50 UTC) #13
darin (slow to review)
LGTM http://codereview.chromium.org/284015/diff/6002/5009 File chrome/renderer/render_view.cc (right): http://codereview.chromium.org/284015/diff/6002/5009#newcode1323 Line 1323: view->opener_suppressed_ = creator->willSuppressOpenerInNewFrame(); nit: I recommend capturing ...
11 years, 2 months ago (2009-10-22 07:00:42 UTC) #14
Charlie Reis
11 years, 2 months ago (2009-10-22 16:58:24 UTC) #15
http://codereview.chromium.org/284015/diff/6002/5009
File chrome/renderer/render_view.cc (right):

http://codereview.chromium.org/284015/diff/6002/5009#newcode1323
Line 1323: view->opener_suppressed_ = creator->willSuppressOpenerInNewFrame();
On 2009/10/22 07:00:42, darin wrote:
> nit: I recommend capturing this value to a local variable up where we call
> isProcessingUserGesture.  the code between there and here could have side
> effects, so it'd probably be better to avoid potential problems (however
> unlikely they may be).

Fixed.  Thanks-- I'll get it landed!

Powered by Google App Engine
This is Rietveld 408576698