Bypass pop-up blocker from cross-origin or sandboxed frame
authordbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 Dec 2016 22:20:25 +0000 (22:20 +0000)
committerdbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 Dec 2016 22:20:25 +0000 (22:20 +0000)
commitec4468437576dbf8c06713749a01dc596f099b62
treee32a58bf1e9c590d32d1916353a9432537fda425
parent5a80748747da2a8dcfe275d120773c3ee9a66ed6
Bypass pop-up blocker from cross-origin or sandboxed frame
https://bugs.webkit.org/show_bug.cgi?id=166290
<rdar://problem/29742039>

Reviewed by Darin Adler.

Source/WebCore:

Tests: fast/events/popup-blocked-from-sandboxed-frame-via-window-open-named-sibling-frame.html
       fast/events/popup-blocked-from-sandboxed-frame-via-window-open-named-sibling-frame2.html
       fast/events/popup-blocked-from-unique-frame-via-window-open-named-sibling-frame.html

* page/DOMWindow.cpp:
(WebCore::DOMWindow::open): Use FrameLoader::findFrameForNavigation() to find the
target frame to navigate with respect to the active document just as we do in WebCore::createWindow().

LayoutTests:

* fast/events/popup-blocked-from-sandboxed-frame-via-window-open-named-sibling-frame-expected.txt: Added.
* fast/events/popup-blocked-from-sandboxed-frame-via-window-open-named-sibling-frame.html: Added.
* fast/events/popup-blocked-from-sandboxed-frame-via-window-open-named-sibling-frame2-expected.txt: Added.
* fast/events/popup-blocked-from-sandboxed-frame-via-window-open-named-sibling-frame2.html: Added.
* fast/events/popup-blocked-from-unique-frame-via-window-open-named-sibling-frame-expected.txt: Added.
* fast/events/popup-blocked-from-unique-frame-via-window-open-named-sibling-frame.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@210112 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/events/popup-blocked-from-sandboxed-frame-via-window-open-named-sibling-frame-expected.txt [new file with mode: 0644]
LayoutTests/fast/events/popup-blocked-from-sandboxed-frame-via-window-open-named-sibling-frame.html [new file with mode: 0644]
LayoutTests/fast/events/popup-blocked-from-sandboxed-frame-via-window-open-named-sibling-frame2-expected.txt [new file with mode: 0644]
LayoutTests/fast/events/popup-blocked-from-sandboxed-frame-via-window-open-named-sibling-frame2.html [new file with mode: 0644]
LayoutTests/fast/events/popup-blocked-from-unique-frame-via-window-open-named-sibling-frame-expected.txt [new file with mode: 0644]
LayoutTests/fast/events/popup-blocked-from-unique-frame-via-window-open-named-sibling-frame.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/page/DOMWindow.cpp