New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 599941 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Aug 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

frame_name is lost when opening a blocked popup window

Project Member Reported by bjohn...@brave.com, Apr 1 2016

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_2) AppleWebKit/601.3.9 (KHTML, like Gecko) Version/9.0.2 Safari/601.3.9

Example URL:

Steps to reproduce the problem:
1. Create a page that opens a non-user initiated popup window with a frame name
2. From the blocked popup notification, click on the link to open the window
3. the frame name property is lost
If the popup is added to the allow list and the page is opened again (without the block notification), the frame name property is not lost

What is the expected behavior?
the popup window should open with the correct frame name

What went wrong?
frame_name is not passed to the BlockedWindowParams in ChromeContentBrowserClient::CanCreateWindow
https://github.com/atom/libchromiumcontent/commit/d41c1e48f428257d99abcf29fd9f26928e9fc53e
shows part of the fix. BlockedWindowParams should also have frame_name so it can be set correctly if the window is opened

Does it occur on multiple sites: N/A

Is it a problem with a plugin? N/A 

Did this work before? N/A 

Does this work in other browsers? N/A 

Chrome version: 49.0.2623.110  Channel: stable
OS Version: OS X 10.11.2
Flash Version:
 
Cc: rnimmagadda@chromium.org
Labels: Needs-Feedback
@bjohnson: Could you please provide us the sample file along with the screen-recording of this issue for better understanding, which would help us in triaging it further.

Thank you.

Comment 2 by bjohn...@brave.com, Apr 4 2016

1. Open test.html
2. Click on "Popup blocked"
3. Under "the following popups were blocked", click on http://google.com to open the blocked popup
4. Click "Link" on the original page
The link (wikipedia.org) should open in the popup window because the target is the popup frame name.

Now create an exception to allow the popup by default and repeat the steps above. The link from the original page opens in the popup window as expected.
test.html
164 bytes View Download
Status: Untriaged (was: Unconfirmed)
Labels: -Needs-Feedback
Components: UI>Browser>PopupBlocker
Cc: marja@chromium.org
Labels: -Type-Compat M-52 OS-Linux OS-Windows Type-Bug
Owner: jochen@chromium.org
Status: Assigned (was: Untriaged)
====================================

Good Build:

30.0.1549.0    Base Position: 208819


Bad Build:

31.0.1600.0    Base Position: 217417

=====================================

Able to repro this issue on Windows 7, MAC (10.11.5) & Ubuntu Trusty (14.04) for the Google Chrome Stable Version - 52.0.2743.82

This is a regression issue broken in M31, below mentioned is the bisect info:

CHANGELOG URL: https://chromium.googlesource.com/chromium/src/+log/bba8e31f390b9e408d07920803a202d6659e3664..f950d729ff042fe7d2d513768c0a4f3951773b3f

Suspecting Commit: 5b826c25f6a69dcb8bca0d7ba2aab42915f97ee4

Review URL: https://codereview.chromium.org/20209004

@jochen: Could you please look into the issue, and if it has nothing to do with your changes and if possible please do assign it to the concerned owner.

Thank you.

Comment 7 by jochen@chromium.org, Jul 21 2016

Status: WontFix (was: Assigned)
We're nowadays actually blocking popups as opposed to just hiding them. You can still open the URL, but it's not possible to make it behave as if it wasn't blocked in the first place.

Sites should avoid getting blocked

Comment 8 by bjohn...@brave.com, Jul 21 2016

@jochen please take a closer look at the information I provided above. It is in fact very possible to make it behave as if it wasn't blocked in the first place and it currently does that with the exception of frame_name. 

Comment 9 by jochen@chromium.org, Jul 21 2016

Setting the frame name should not be enough to get you the behavior you want: the blocked window.open() call will return undefined, and the renderer won't have a reference to the popup.

Later opening it won't create that reference either, so even if the new frame (that will be hosted in a different process) has the right name, it won't be findable.

Comment 10 by bjohn...@brave.com, Jul 21 2016

The expected behavior is defined in comment 2 and adding the frame name will fix the issue. Accessing it from the return value of window.open was not part of this bug.
is there a complete patch in addition to the commit you referenced above that demos this?

Comment 12 by bjohn...@brave.com, Jul 21 2016

No, but the rest is pretty straightforward. Basically just passing it through the chain in BlockedWindowParams like the others.
Labels: -OS-Linux -OS-Windows -Pri-2 -M-52 -OS-Mac OS-All Pri-3
Status: Assigned (was: WontFix)
I doublechecked the code, and we put the popup in the same browsing context, so I guess this would indeed work.
Project Member

Comment 14 by bugdroid1@chromium.org, Aug 3 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/67b271b2cbac7d0af1c0fb25c273b04d948a0e89

commit 67b271b2cbac7d0af1c0fb25c273b04d948a0e89
Author: jochen <jochen@chromium.org>
Date: Wed Aug 03 13:50:21 2016

Plumb the frame name through the popup blocker

BUG= 599941 
R=bauerb@chromium.org
TBR=torne@chromium.org,alokp@chromium.org
TEST=browser_tests:PopupBlockerBrowserTest.CorrectFrameName

Review-Url: https://codereview.chromium.org/2206963002
Cr-Commit-Position: refs/heads/master@{#409503}

[modify] https://crrev.com/67b271b2cbac7d0af1c0fb25c273b04d948a0e89/android_webview/browser/aw_content_browser_client.cc
[modify] https://crrev.com/67b271b2cbac7d0af1c0fb25c273b04d948a0e89/android_webview/browser/aw_content_browser_client.h
[modify] https://crrev.com/67b271b2cbac7d0af1c0fb25c273b04d948a0e89/chrome/browser/chrome_content_browser_client.cc
[modify] https://crrev.com/67b271b2cbac7d0af1c0fb25c273b04d948a0e89/chrome/browser/chrome_content_browser_client.h
[modify] https://crrev.com/67b271b2cbac7d0af1c0fb25c273b04d948a0e89/chrome/browser/ui/blocked_content/blocked_window_params.cc
[modify] https://crrev.com/67b271b2cbac7d0af1c0fb25c273b04d948a0e89/chrome/browser/ui/blocked_content/blocked_window_params.h
[modify] https://crrev.com/67b271b2cbac7d0af1c0fb25c273b04d948a0e89/chrome/browser/ui/blocked_content/popup_blocker_browsertest.cc
[modify] https://crrev.com/67b271b2cbac7d0af1c0fb25c273b04d948a0e89/chrome/browser/ui/browser_navigator.cc
[modify] https://crrev.com/67b271b2cbac7d0af1c0fb25c273b04d948a0e89/chrome/browser/ui/browser_navigator_params.h
[add] https://crrev.com/67b271b2cbac7d0af1c0fb25c273b04d948a0e89/chrome/test/data/popup_blocker/check-framename.html
[add] https://crrev.com/67b271b2cbac7d0af1c0fb25c273b04d948a0e89/chrome/test/data/popup_blocker/popup-framename.html
[modify] https://crrev.com/67b271b2cbac7d0af1c0fb25c273b04d948a0e89/chromecast/browser/cast_content_browser_client.cc
[modify] https://crrev.com/67b271b2cbac7d0af1c0fb25c273b04d948a0e89/chromecast/browser/cast_content_browser_client.h
[modify] https://crrev.com/67b271b2cbac7d0af1c0fb25c273b04d948a0e89/content/browser/renderer_host/render_message_filter.cc
[modify] https://crrev.com/67b271b2cbac7d0af1c0fb25c273b04d948a0e89/content/public/browser/content_browser_client.cc
[modify] https://crrev.com/67b271b2cbac7d0af1c0fb25c273b04d948a0e89/content/public/browser/content_browser_client.h

Status: Fixed (was: Assigned)

Sign in to add a comment