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

Issue 2680353005: WebContents created via ctrl-click should be in a new process (target=_blank). (Closed)

Created:
3 years, 10 months ago by Łukasz Anforowicz
Modified:
3 years, 8 months ago
CC:
chromium-reviews, blink-reviews, alexmos, Nate Chapin, site-isolation-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

WebContents created via ctrl-click should be in a new process (target=_blank). Previous CL (https://crrev.com/2686943002) started putting WebContents created via ctrl-click into a new process. One case that was still broken is target="_blank" (or target="non-existant-name"). At first glance, it might seem arbitrary to decide which directive (ctrl-click VS target=_blank) wins and influences 1) process allocation behavior and 2) window.opener / browsing instance behavior. In reality, ctrl-click should win because: 1. This is the behavior desired by users (e.g. see https://crbug.com/23815). 2. This is the behavior of other browsers (e.g. see https://crbug.com/658386#c9). Before this CL, FrameLoader::load would ignore ctrl-click / NavigationPolicyNewForegroundTab and go through createWindowForRequest path if the named target frame didn't exist when the navigation is initiated. After this CL, ctrl-click "wins". This CL has to tweak 2 layout tests affected by the change. In both cases, the test expectation that a background-tab-navigation is handled by createView is no longer correct - now the navigation goes through OpenURL path rather than through CreateWindowForRequest. Accomodating the 2 tests also required adding support for handling WindowOpenDisposition::NEW_BACKGROUND_TAB in content::Shell::OpenURLFromTab. NOPRESUBMIT usage has been discussed in https://crrev.com/2680353005/#msg50 BUG=23815, 658386 NOPRESUBMIT=true Review-Url: https://codereview.chromium.org/2680353005 Cr-Commit-Position: refs/heads/master@{#466843} Committed: https://chromium.googlesource.com/chromium/src/+/be2f0da0b064edc7e59d08129538a09d3b2f30c1

Patch Set 1 #

Patch Set 2 : Rebasing... #

Patch Set 3 : Rebasing... #

Patch Set 4 : Change layout test expectations to match product code changes. #

Total comments: 6

Patch Set 5 : Explicitly reusing code instead of using parametrized tests (in response to CR feedback). #

Patch Set 6 : Rebasing... #

Patch Set 7 : Rebasing on top of changes in the CL we depend on. #

Patch Set 8 : The new field needs to be initialized in all constructor overrides. #

Patch Set 9 : Fixing test expectations for middle-click-target-blank.html layout test. #

Patch Set 10 : Rebasing... #

Total comments: 2

Patch Set 11 : Rebasing... #

Patch Set 12 : Rebasing updating LayoutTest/FlagExpectations to account for test name change. #

Messages

Total messages: 65 (57 generated)
Łukasz Anforowicz
Charlie, can you PTAL? https://codereview.chromium.org/2680353005/diff/60001/third_party/WebKit/LayoutTests/fast/events/isolated-worlds-override-keystate-expected.txt File third_party/WebKit/LayoutTests/fast/events/isolated-worlds-override-keystate-expected.txt (right): https://codereview.chromium.org/2680353005/diff/60001/third_party/WebKit/LayoutTests/fast/events/isolated-worlds-override-keystate-expected.txt#newcode2 third_party/WebKit/LayoutTests/fast/events/isolated-worlds-override-keystate-expected.txt:2: Default policy for navigation to ...
3 years, 8 months ago (2017-04-14 19:29:10 UTC) #19
Charlie Reis
LGTM, but let's get Nate's thoughts on the Blink parts as well. https://codereview.chromium.org/2680353005/diff/60001/chrome/browser/chrome_navigation_browsertest.cc File chrome/browser/chrome_navigation_browsertest.cc ...
3 years, 8 months ago (2017-04-14 22:39:28 UTC) #21
Łukasz Anforowicz
Thanks Charlie. Nate - can you PTAL? https://codereview.chromium.org/2680353005/diff/60001/chrome/browser/chrome_navigation_browsertest.cc File chrome/browser/chrome_navigation_browsertest.cc (right): https://codereview.chromium.org/2680353005/diff/60001/chrome/browser/chrome_navigation_browsertest.cc#newcode194 chrome/browser/chrome_navigation_browsertest.cc:194: public ::testing::WithParamInterface<const ...
3 years, 8 months ago (2017-04-20 01:15:14 UTC) #40
Nate Chapin
lgtm
3 years, 8 months ago (2017-04-21 18:19:12 UTC) #47
Łukasz Anforowicz
lanwei@, could you please help me figure out what I should do about the presubmit ...
3 years, 8 months ago (2017-04-24 19:09:36 UTC) #49
lanwei
On 2017/04/24 19:09:36, Łukasz A. wrote: > lanwei@, could you please help me figure out ...
3 years, 8 months ago (2017-04-24 19:31:19 UTC) #50
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/2680353005/220001
3 years, 8 months ago (2017-04-25 00:02:22 UTC) #62
commit-bot: I haz the power
3 years, 8 months ago (2017-04-25 00:43:41 UTC) #65
Message was sent while issue was closed.
Committed patchset #12 (id:220001) as
https://chromium.googlesource.com/chromium/src/+/be2f0da0b064edc7e59d08129538...

Powered by Google App Engine
This is Rietveld 408576698