Implement Meta referrer
authorjochen@chromium.org <jochen@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 21 Nov 2011 10:29:55 +0000 (10:29 +0000)
committerjochen@chromium.org <jochen@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 21 Nov 2011 10:29:55 +0000 (10:29 +0000)
commit54c6100e1ae1108aa57d5092d3dc50865643c271
tree74c53626b857be9069e4ad099386ee8d758f88b2
parentbc3f5db855e82558c8690298acb98a3cd83a8d5a
Implement Meta referrer
https://bugs.webkit.org/show_bug.cgi?id=72674

Reviewed by Adam Barth.

Source/WebCore:

http://wiki.whatwg.org/wiki/Meta_referrer

Tests: http/tests/security/referrer-policy-always.html
       http/tests/security/referrer-policy-default.html
       http/tests/security/referrer-policy-https-always.html
       http/tests/security/referrer-policy-https-default.html
       http/tests/security/referrer-policy-https-never.html
       http/tests/security/referrer-policy-https-origin.html
       http/tests/security/referrer-policy-never.html
       http/tests/security/referrer-policy-origin.html
       http/tests/security/referrer-policy-redirect.html
       http/tests/security/referrer-policy-rel-noreferrer.html

* WebCore.exp.in: updated
* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::processReferrerPolicy):
* dom/Document.h:
(WebCore::Document::referrerPolicy):
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::handleClick):
* html/HTMLMetaElement.cpp:
(WebCore::HTMLMetaElement::process):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadFrameRequest):
(WebCore::FrameLoader::loadResourceSynchronously):
* loader/PingLoader.cpp:
(WebCore::PingLoader::loadImage):
(WebCore::PingLoader::sendPing):
(WebCore::PingLoader::reportContentSecurityPolicyViolation):
* loader/SubframeLoader.cpp:
(WebCore::SubframeLoader::loadSubframe):
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::create):
* page/SecurityPolicy.cpp:
(WebCore::SecurityPolicy::generateReferrerHeader):
* page/SecurityPolicy.h:

Source/WebKit/chromium:

* WebKit.gyp:
* public/WebFrame.h:
* public/WebReferrerPolicy.h: Added.
* public/WebSecurityPolicy.h:
* src/AssertMatchingEnums.cpp:
* src/WebFrameImpl.cpp:
(WebKit::WebFrameImpl::referrerPolicy):
(WebKit::WebFrameImpl::setReferrerForRequest):
* src/WebFrameImpl.h:
* src/WebSecurityPolicy.cpp:
(WebKit::WebSecurityPolicy::generateReferrerHeader):

Source/WebKit/mac:

* Plugins/Hosted/HostedNetscapePluginStream.mm:
(WebKit::HostedNetscapePluginStream::HostedNetscapePluginStream):
* Plugins/WebNetscapePluginStream.mm:
(WebNetscapePluginStream::WebNetscapePluginStream):

Source/WebKit2:

* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::loadURL):

LayoutTests:

* http/tests/security/referrer-policy-always-expected.txt: Added.
* http/tests/security/referrer-policy-always.html: Added.
* http/tests/security/referrer-policy-default-expected.txt: Added.
* http/tests/security/referrer-policy-default.html: Added.
* http/tests/security/referrer-policy-https-always-expected.txt: Added.
* http/tests/security/referrer-policy-https-always.html: Added.
* http/tests/security/referrer-policy-https-default-expected.txt: Added.
* http/tests/security/referrer-policy-https-default.html: Added.
* http/tests/security/referrer-policy-https-never-expected.txt: Added.
* http/tests/security/referrer-policy-https-never.html: Added.
* http/tests/security/referrer-policy-https-origin-expected.txt: Added.
* http/tests/security/referrer-policy-https-origin.html: Added.
* http/tests/security/referrer-policy-never-expected.txt: Added.
* http/tests/security/referrer-policy-never.html: Added.
* http/tests/security/referrer-policy-origin-expected.txt: Added.
* http/tests/security/referrer-policy-origin.html: Added.
* http/tests/security/referrer-policy-redirect-expected.txt: Added.
* http/tests/security/referrer-policy-redirect.html: Added.
* http/tests/security/referrer-policy-rel-noreferrer-expected.txt: Added.
* http/tests/security/referrer-policy-rel-noreferrer.html: Added.
* http/tests/security/resources/referrer-policy-log.php: Added.
* http/tests/security/resources/referrer-policy-redirect.html: Added.
* http/tests/security/resources/referrer-policy-start.html: Added.
* http/tests/security/resources/rel-noreferrer.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@100895 268f45cc-cd09-0410-ab3c-d52691b4dbfc
51 files changed:
LayoutTests/ChangeLog
LayoutTests/http/tests/security/referrer-policy-always-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/security/referrer-policy-always.html [new file with mode: 0644]
LayoutTests/http/tests/security/referrer-policy-default-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/security/referrer-policy-default.html [new file with mode: 0644]
LayoutTests/http/tests/security/referrer-policy-https-always-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/security/referrer-policy-https-always.html [new file with mode: 0644]
LayoutTests/http/tests/security/referrer-policy-https-default-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/security/referrer-policy-https-default.html [new file with mode: 0644]
LayoutTests/http/tests/security/referrer-policy-https-never-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/security/referrer-policy-https-never.html [new file with mode: 0644]
LayoutTests/http/tests/security/referrer-policy-https-origin-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/security/referrer-policy-https-origin.html [new file with mode: 0644]
LayoutTests/http/tests/security/referrer-policy-never-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/security/referrer-policy-never.html [new file with mode: 0644]
LayoutTests/http/tests/security/referrer-policy-origin-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/security/referrer-policy-origin.html [new file with mode: 0644]
LayoutTests/http/tests/security/referrer-policy-redirect-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/security/referrer-policy-redirect.html [new file with mode: 0644]
LayoutTests/http/tests/security/referrer-policy-rel-noreferrer-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/security/referrer-policy-rel-noreferrer.html [new file with mode: 0644]
LayoutTests/http/tests/security/resources/referrer-policy-log.php [new file with mode: 0644]
LayoutTests/http/tests/security/resources/referrer-policy-redirect.html [new file with mode: 0644]
LayoutTests/http/tests/security/resources/referrer-policy-start.html [new file with mode: 0644]
LayoutTests/http/tests/security/resources/rel-noreferrer.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/Document.h
Source/WebCore/html/HTMLAnchorElement.cpp
Source/WebCore/html/HTMLMetaElement.cpp
Source/WebCore/loader/FrameLoader.cpp
Source/WebCore/loader/PingLoader.cpp
Source/WebCore/loader/SubframeLoader.cpp
Source/WebCore/loader/SubresourceLoader.cpp
Source/WebCore/page/SecurityPolicy.cpp
Source/WebCore/page/SecurityPolicy.h
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/WebKit.gyp
Source/WebKit/chromium/public/WebFrame.h
Source/WebKit/chromium/public/WebReferrerPolicy.h [new file with mode: 0644]
Source/WebKit/chromium/public/WebSecurityPolicy.h
Source/WebKit/chromium/src/AssertMatchingEnums.cpp
Source/WebKit/chromium/src/WebFrameImpl.cpp
Source/WebKit/chromium/src/WebFrameImpl.h
Source/WebKit/chromium/src/WebSecurityPolicy.cpp
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/Plugins/Hosted/HostedNetscapePluginStream.mm
Source/WebKit/mac/Plugins/WebNetscapePluginStream.mm
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/Plugins/PluginView.cpp