Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1839)

Unified Diff: Source/web/ChromeClientImpl.cpp

Issue 1148603002: Anchor element's referrer attribute implementation for Referrer Policy Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove debug logging. Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/web/ChromeClientImpl.cpp
diff --git a/Source/web/ChromeClientImpl.cpp b/Source/web/ChromeClientImpl.cpp
index 86d552f88f64cdf7c7a659522ff6f3e19e71dda4..e72f71f9f51a977b5356f5d473608ca95370d76d 100644
--- a/Source/web/ChromeClientImpl.cpp
+++ b/Source/web/ChromeClientImpl.cpp
@@ -205,7 +205,7 @@ void ChromeClientImpl::focusedFrameChanged(LocalFrame* frame)
}
Page* ChromeClientImpl::createWindow(LocalFrame* frame, const FrameLoadRequest& r, const WindowFeatures& features,
- NavigationPolicy navigationPolicy, ShouldSendReferrer shouldSendReferrer)
+ NavigationPolicy navigationPolicy, ReferrerPolicy referrerPolicy)
{
if (!m_webView->client())
return nullptr;
@@ -219,10 +219,14 @@ Page* ChromeClientImpl::createWindow(LocalFrame* frame, const FrameLoadRequest&
ASSERT(frame->document());
Fullscreen::fullyExitFullscreen(*frame->document());
+ // TODO(burnik): This part seems wrong. Depending on the policy itself, we should suppress the opener.
+ bool supressOpener = (referrerPolicy == ReferrerPolicyNever);
WebViewImpl* newView = toWebViewImpl(
- m_webView->client()->createView(WebLocalFrameImpl::fromFrame(frame), WrappedResourceRequest(r.resourceRequest()), features, r.frameName(), policy, shouldSendReferrer == NeverSendReferrer));
+ m_webView->client()->createView(WebLocalFrameImpl::fromFrame(frame), WrappedResourceRequest(r.resourceRequest()), features, r.frameName(), policy, supressOpener));
+
if (!newView)
return nullptr;
+
return newView->page();
}
« Source/platform/weborigin/ReferrerPolicy.cpp ('K') | « Source/web/ChromeClientImpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698