showModalDialog code runs with “first window” set to wrong window
authordarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 23 Mar 2016 04:16:44 +0000 (04:16 +0000)
committerdarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 23 Mar 2016 04:16:44 +0000 (04:16 +0000)
commit6f3dd37224f9b5acf24d820d19c8b65698768f0e
tree85249a3a19a9b66f4d7a99e22aca2f3de392d0b8
parent5036b5f75cf9b840e14698787b1be84d16c343f8
showModalDialog code runs with “first window” set to wrong window
https://bugs.webkit.org/show_bug.cgi?id=155710

Source/WebCore:

Reviewed by Brent Fulgham.

Test: http/tests/security/cross-origin-modal-dialog-base.html

* page/Chrome.cpp:
(WebCore::Chrome::runModal): Null out entryScope so that the "first window"
checks inside the modal dialog won't run in the context of the original window
that presented the dialog.

LayoutTests:

Test by John Wilander.

Reviewed by Brent Fulgham.

* http/tests/security/cross-origin-modal-dialog-base-expected.txt: Added.
* http/tests/security/cross-origin-modal-dialog-base.html: Added.
* http/tests/security/resources/cross-origin-modal-dialog-base-1.html: Added.
* http/tests/security/resources/cross-origin-modal-dialog-base-2.html: Added.
* platform/wk2/TestExpectations: Skip test until we get better showModalDialog support.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@198575 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/http/tests/security/cross-origin-modal-dialog-base-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/security/cross-origin-modal-dialog-base.html [new file with mode: 0644]
LayoutTests/http/tests/security/resources/cross-origin-modal-dialog-base-1.html [new file with mode: 0644]
LayoutTests/http/tests/security/resources/cross-origin-modal-dialog-base-2.html [new file with mode: 0644]
LayoutTests/platform/wk2/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/page/Chrome.cpp