Chromium Code Reviews| Index: Source/core/html/HTMLIFrameElement.cpp |
| diff --git a/Source/core/html/HTMLIFrameElement.cpp b/Source/core/html/HTMLIFrameElement.cpp |
| index ef5413c522711007db13895f5ceceafad5062fee..38bbfc892ae4ab978a58a2aea49c1853fb3d6073 100644 |
| --- a/Source/core/html/HTMLIFrameElement.cpp |
| +++ b/Source/core/html/HTMLIFrameElement.cpp |
| @@ -32,6 +32,7 @@ |
| #include "core/html/HTMLDocument.h" |
| #include "core/inspector/ConsoleMessage.h" |
| #include "core/layout/LayoutIFrame.h" |
| +#include "platform/RuntimeEnabledFeatures.h" |
| namespace blink { |
| @@ -120,6 +121,10 @@ void HTMLIFrameElement::parseAttribute(const QualifiedName& name, const AtomicSt |
| } else if (name == sandboxAttr) { |
| m_sandbox->setValue(value); |
| UseCounter::count(document(), UseCounter::SandboxViaIFrame); |
| + } else if (RuntimeEnabledFeatures::referrerPolicyAttributeEnabled() && name == referrerpolicyAttr) { |
| + m_referrerPolicy = ReferrerPolicyDefault; |
| + if (!value.isNull()) |
| + SecurityPolicy::referrerPolicyFromString(value, &m_referrerPolicy); |
| } else { |
| HTMLFrameElementBase::parseAttribute(name, value); |
| } |
| @@ -173,4 +178,12 @@ void HTMLIFrameElement::valueChanged() |
| setSynchronizedLazyAttribute(sandboxAttr, m_sandbox->value()); |
| } |
| +bool HTMLIFrameElement::referrerPolicyAttribute(ReferrerPolicy* policy) |
|
Yoav Weiss
2015/09/08 09:55:08
Like I wrote at the caller site, it'd be better to
estark
2015/09/08 14:40:34
Done.
estark
2015/09/08 14:40:34
Done.
|
| +{ |
| + if (!RuntimeEnabledFeatures::referrerPolicyAttributeEnabled()) |
| + return false; |
| + |
| + *policy = m_referrerPolicy; |
| + return true; |
| +} |
| } |