| Index: Source/core/html/HTMLFrameOwnerElement.cpp
|
| diff --git a/Source/core/html/HTMLFrameOwnerElement.cpp b/Source/core/html/HTMLFrameOwnerElement.cpp
|
| index 1833cc61cb2a899e2bb4319a450b82f0a8fdb14b..c5e86452bda6fdf90a35d11a7361475580564615 100644
|
| --- a/Source/core/html/HTMLFrameOwnerElement.cpp
|
| +++ b/Source/core/html/HTMLFrameOwnerElement.cpp
|
| @@ -34,6 +34,7 @@
|
| #include "core/loader/FrameLoader.h"
|
| #include "core/loader/FrameLoaderClient.h"
|
| #include "core/plugins/PluginView.h"
|
| +#include "platform/RuntimeEnabledFeatures.h"
|
| #include "platform/weborigin/SecurityOrigin.h"
|
|
|
| namespace blink {
|
| @@ -261,7 +262,15 @@ bool HTMLFrameOwnerElement::loadOrRedirectSubframe(const KURL& url, const Atomic
|
| if (document().frame()->host()->subframeCount() >= FrameHost::maxNumberOfFrames)
|
| return false;
|
|
|
| - return parentFrame->loader().client()->createFrame(FrameLoadRequest(&document(), url, "_self", CheckContentSecurityPolicy), frameName, this);
|
| + FrameLoadRequest frameLoadRequest(&document(), url, "_self", CheckContentSecurityPolicy);
|
| +
|
| + if (RuntimeEnabledFeatures::referrerPolicyAttributeEnabled()) {
|
| + ReferrerPolicy policy = referrerPolicyAttribute();
|
| + if (policy != ReferrerPolicyDefault)
|
| + frameLoadRequest.resourceRequest().setHTTPReferrer(SecurityPolicy::generateReferrer(policy, url, document().outgoingReferrer()));
|
| + }
|
| +
|
| + return parentFrame->loader().client()->createFrame(frameLoadRequest, frameName, this);
|
| }
|
|
|
| DEFINE_TRACE(HTMLFrameOwnerElement)
|
|
|