Block popups from content extensions.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 8 Apr 2015 00:38:11 +0000 (00:38 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 8 Apr 2015 00:38:11 +0000 (00:38 +0000)
commit18be39a8d1442f9296fb38cc7424790a6f6a25fb
treeee31020dbf99c0ba857931ab8a577581223f79da
parent56887728d9548824ac9e86f55939c3d7cc9781d2
Block popups from content extensions.
https://bugs.webkit.org/show_bug.cgi?id=143497

Patch by Alex Christensen <achristensen@webkit.org> on 2015-04-07
Reviewed by Brady Eidson.

Source/WebCore:

Test: http/tests/contentextensions/popups.html

* loader/ResourceLoadInfo.cpp:
(WebCore::readResourceType):
* loader/ResourceLoadInfo.h:
* page/DOMWindow.cpp:
(WebCore::DOMWindow::open):
* page/UserContentController.cpp:
(WebCore::UserContentController::actionsForResourceLoad):
* page/UserContentController.h:
Check content extensions before opening a window.

Tools:

* TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:
(TestWebKitAPI::TEST_F):
Added popup test.

LayoutTests:

* http/tests/contentextensions/popups-expected.txt: Added.
* http/tests/contentextensions/popups.html: Added.
* http/tests/contentextensions/popups.html.json: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@182511 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
LayoutTests/ChangeLog
LayoutTests/http/tests/contentextensions/popups-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/contentextensions/popups.html [new file with mode: 0644]
LayoutTests/http/tests/contentextensions/popups.html.json [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/loader/ResourceLoadInfo.cpp
Source/WebCore/loader/ResourceLoadInfo.h
Source/WebCore/page/DOMWindow.cpp
Source/WebCore/page/UserContentController.cpp
Source/WebCore/page/UserContentController.h
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp