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

Issue 20924002: Try to restore window.opener when opening blocked popups (Closed)

Created:
7 years, 4 months ago by jochen (gone - plz use gerrit)
Modified:
5 years, 7 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org
Visibility:
Public.

Description

Try to restore window.opener when opening blocked popups When we block a popup, and later open it again, we try to set the opener. It works if the popup ends up being hosted in the same process. Also added a test that session storage is not cloned. BUG=38458 R=ajwong@chromium.org, bauerb@chromium.org, creis@chromium.org TEST=BetterPopupBlockerTest.* Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=215122

Patch Set 1 #

Patch Set 2 : sessionStorage+opener #

Total comments: 19

Patch Set 3 : rebase #

Patch Set 4 : updaets #

Patch Set 5 : updates #

Patch Set 6 : rebase #

Total comments: 18

Patch Set 7 : updates #

Total comments: 3

Patch Set 8 : updates #

Total comments: 10

Patch Set 9 : rebase #

Patch Set 10 : update #

Total comments: 2

Patch Set 11 : updates #

Unified diffs Side-by-side diffs Delta from patch set Stats (+150 lines, -94 lines) Patch
M chrome/browser/ui/blocked_content/popup_blocker_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +71 lines, -79 lines 0 comments Download
M chrome/browser/ui/blocked_content/popup_blocker_tab_helper.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/browser_navigator.h View 1 2 3 4 5 6 7 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/ui/browser_navigator.cc View 1 2 3 4 5 6 7 8 9 5 chunks +10 lines, -4 lines 0 comments Download
A + chrome/test/data/popup_blocker/check-opener.html View 1 2 1 chunk +4 lines, -4 lines 0 comments Download
A + chrome/test/data/popup_blocker/check-openersuppressed.html View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
A + chrome/test/data/popup_blocker/check-sessionstorage.html View 1 2 3 4 5 6 7 8 9 1 chunk +5 lines, -3 lines 0 comments Download
A chrome/test/data/popup_blocker/popup-opener.html View 1 2 1 chunk +15 lines, -0 lines 0 comments Download
A chrome/test/data/popup_blocker/popup-openersuppressed.html View 1 2 3 4 5 6 1 chunk +16 lines, -0 lines 0 comments Download
A chrome/test/data/popup_blocker/popup-sessionstorage.html View 1 2 3 4 5 6 7 8 9 10 1 chunk +16 lines, -0 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.cc View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -1 line 0 comments Download
M content/public/browser/web_contents.h View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M content/public/browser/web_contents.cc View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -0 lines 0 comments Download

Messages

Total messages: 24 (0 generated)
jochen (gone - plz use gerrit)
plz review John, //content Bernhard, everything
7 years, 4 months ago (2013-07-27 21:17:48 UTC) #1
jochen (gone - plz use gerrit)
I've updated the CL to include handling of the opener. John, can you please review ...
7 years, 4 months ago (2013-07-29 16:03:07 UTC) #2
jochen (gone - plz use gerrit)
I discovered that I also don't have a way to force the site instance for ...
7 years, 4 months ago (2013-07-29 19:49:06 UTC) #3
Charlie Reis
Thanks for taking the session storage namespace into account and finding the corner case with ...
7 years, 4 months ago (2013-07-30 01:26:29 UTC) #4
Bernhard Bauer
https://codereview.chromium.org/20924002/diff/17001/chrome/browser/ui/browser_navigator.cc File chrome/browser/ui/browser_navigator.cc (right): https://codereview.chromium.org/20924002/diff/17001/chrome/browser/ui/browser_navigator.cc#newcode347 chrome/browser/ui/browser_navigator.cc:347: DCHECK(!params.should_set_opener || Wait, you have here if (a || ...
7 years, 4 months ago (2013-07-30 08:34:50 UTC) #5
jochen (gone - plz use gerrit)
https://codereview.chromium.org/20924002/diff/17001/chrome/browser/ui/browser_navigator.cc File chrome/browser/ui/browser_navigator.cc (right): https://codereview.chromium.org/20924002/diff/17001/chrome/browser/ui/browser_navigator.cc#newcode322 chrome/browser/ui/browser_navigator.cc:322: // If we want to set the opener, we ...
7 years, 4 months ago (2013-07-30 14:50:39 UTC) #6
jochen (gone - plz use gerrit)
Addressed all other comments. PTAL This still doesn't work if the site and the popup ...
7 years, 4 months ago (2013-07-30 15:56:55 UTC) #7
jochen (gone - plz use gerrit)
also added the LoadURLParams change. PTAL
7 years, 4 months ago (2013-07-30 19:25:59 UTC) #8
Bernhard Bauer
lgtm
7 years, 4 months ago (2013-07-31 08:01:04 UTC) #9
jam
are you waiting for me? i defer to creis, looks fine to me
7 years, 4 months ago (2013-07-31 15:10:37 UTC) #10
Charlie Reis
This change doesn't seem right to me. We seem to have different understandings of how ...
7 years, 4 months ago (2013-07-31 17:16:16 UTC) #11
jochen (gone - plz use gerrit)
+ajwong Albert, can you please review the StoragePartition / SessionStorageNamespace bits? Basically, the situation is ...
7 years, 4 months ago (2013-07-31 18:30:52 UTC) #12
awong
You're gonna hate my answer...but I think we should actually remove SessionStorageNamespaceMap first. https://codereview.chromium.org/20924002/diff/84001/chrome/browser/ui/browser_navigator.cc File ...
7 years, 4 months ago (2013-07-31 18:58:59 UTC) #13
jochen (gone - plz use gerrit)
As discussed, here's a CL that doesn't muck with session storage at all and does ...
7 years, 4 months ago (2013-07-31 20:18:38 UTC) #14
jochen (gone - plz use gerrit)
(I'll also update the CL description)
7 years, 4 months ago (2013-07-31 20:18:58 UTC) #15
awong
https://codereview.chromium.org/20924002/diff/89002/chrome/test/data/popup_blocker/check-sessionstorage.html File chrome/test/data/popup_blocker/check-sessionstorage.html (right): https://codereview.chromium.org/20924002/diff/89002/chrome/test/data/popup_blocker/check-sessionstorage.html#newcode4 chrome/test/data/popup_blocker/check-sessionstorage.html:4: <title>Check that the session storage namespace is correct</title> is ...
7 years, 4 months ago (2013-07-31 20:21:41 UTC) #16
jochen (gone - plz use gerrit)
https://codereview.chromium.org/20924002/diff/89002/content/public/browser/web_contents.h File content/public/browser/web_contents.h (right): https://codereview.chromium.org/20924002/diff/89002/content/public/browser/web_contents.h#newcode97 content/public/browser/web_contents.h:97: WebContents* opener = NULL); On 2013/07/31 20:21:42, awong wrote: ...
7 years, 4 months ago (2013-07-31 20:23:43 UTC) #17
awong
session storage bits (which are mostly gone) LGTM As for default args, here's the style ...
7 years, 4 months ago (2013-07-31 20:27:06 UTC) #18
Charlie Reis
Much simpler-- I like it. I think this approach (not trying to guarantee that the ...
7 years, 4 months ago (2013-08-01 18:13:33 UTC) #19
jochen (gone - plz use gerrit)
PTAL https://codereview.chromium.org/20924002/diff/89002/chrome/browser/ui/blocked_content/popup_blocker_tab_helper.cc File chrome/browser/ui/blocked_content/popup_blocker_tab_helper.cc (right): https://codereview.chromium.org/20924002/diff/89002/chrome/browser/ui/blocked_content/popup_blocker_tab_helper.cc#newcode112 chrome/browser/ui/blocked_content/popup_blocker_tab_helper.cc:112: nav_params.should_set_opener = !opener_suppressed; On 2013/08/01 18:13:34, creis wrote: ...
7 years, 4 months ago (2013-08-01 19:48:51 UTC) #20
Charlie Reis
Thanks. LGTM. https://codereview.chromium.org/20924002/diff/104001/chrome/browser/ui/blocked_content/popup_blocker_browsertest.cc File chrome/browser/ui/blocked_content/popup_blocker_browsertest.cc (right): https://codereview.chromium.org/20924002/diff/104001/chrome/browser/ui/blocked_content/popup_blocker_browsertest.cc#newcode245 chrome/browser/ui/blocked_content/popup_blocker_browsertest.cc:245: // If the popup blocker blocked the ...
7 years, 4 months ago (2013-08-01 20:23:08 UTC) #21
jochen (gone - plz use gerrit)
done
7 years, 4 months ago (2013-08-01 20:31:53 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jochen@chromium.org/20924002/120001
7 years, 4 months ago (2013-08-01 20:32:07 UTC) #23
jochen (gone - plz use gerrit)
7 years, 4 months ago (2013-08-01 21:49:22 UTC) #24
Message was sent while issue was closed.
Committed patchset #11 manually as r215122 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698