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

Unified Diff: Source/core/html/HTMLIFrameElement.cpp

Issue 1328183002: Implement referrerpolicy attr for iframes (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: update webexposed tests Created 5 years, 3 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
« no previous file with comments | « Source/core/html/HTMLIFrameElement.h ('k') | Source/core/html/HTMLIFrameElement.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLIFrameElement.cpp
diff --git a/Source/core/html/HTMLIFrameElement.cpp b/Source/core/html/HTMLIFrameElement.cpp
index ef5413c522711007db13895f5ceceafad5062fee..cc61980c138b3eefd958ec7d4bf52ebafd4a6549 100644
--- a/Source/core/html/HTMLIFrameElement.cpp
+++ b/Source/core/html/HTMLIFrameElement.cpp
@@ -41,6 +41,7 @@ inline HTMLIFrameElement::HTMLIFrameElement(Document& document)
: HTMLFrameElementBase(iframeTag, document)
, m_didLoadNonEmptyDocument(false)
, m_sandbox(DOMSettableTokenList::create(this))
+ , m_referrerPolicy(ReferrerPolicyDefault)
{
}
@@ -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,8 @@ void HTMLIFrameElement::valueChanged()
setSynchronizedLazyAttribute(sandboxAttr, m_sandbox->value());
}
+ReferrerPolicy HTMLIFrameElement::referrerPolicyAttribute()
+{
+ return m_referrerPolicy;
+}
}
« no previous file with comments | « Source/core/html/HTMLIFrameElement.h ('k') | Source/core/html/HTMLIFrameElement.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698