Block popups from content extensions.
authorachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 8 Apr 2015 20:26:41 +0000 (20:26 +0000)
committerachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 8 Apr 2015 20:26:41 +0000 (20:26 +0000)
commit4729f13a0a05a6ae00e9e438e5e28df834e25a21
tree1319f42e408121be0df471ceb8aaed6379df0506
parentbe5b71117af267d528108ec9c5bf586e17333991
Block popups from content extensions.
https://bugs.webkit.org/show_bug.cgi?id=143497

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@182564 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