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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLIFrameElement.cpp

Issue 1755803002: Ship `referrerpolicy` attribute (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update webexposed layout tests Created 4 years, 9 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Simon Hausmann (hausmann@kde.org) 4 * (C) 2000 Simon Hausmann (hausmann@kde.org)
5 * (C) 2001 Dirk Mueller (mueller@kde.org) 5 * (C) 2001 Dirk Mueller (mueller@kde.org)
6 * Copyright (C) 2004, 2006, 2008, 2009 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2006, 2008, 2009 Apple Inc. All rights reserved.
7 * Copyright (C) 2009 Ericsson AB. All rights reserved. 7 * Copyright (C) 2009 Ericsson AB. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 if (name == nameAttr) { 96 if (name == nameAttr) {
97 if (inDocument() && document().isHTMLDocument() && !isInShadowTree()) { 97 if (inDocument() && document().isHTMLDocument() && !isInShadowTree()) {
98 HTMLDocument& document = toHTMLDocument(this->document()); 98 HTMLDocument& document = toHTMLDocument(this->document());
99 document.removeExtraNamedItem(m_name); 99 document.removeExtraNamedItem(m_name);
100 document.addExtraNamedItem(value); 100 document.addExtraNamedItem(value);
101 } 101 }
102 m_name = value; 102 m_name = value;
103 } else if (name == sandboxAttr) { 103 } else if (name == sandboxAttr) {
104 m_sandbox->setValue(value); 104 m_sandbox->setValue(value);
105 UseCounter::count(document(), UseCounter::SandboxViaIFrame); 105 UseCounter::count(document(), UseCounter::SandboxViaIFrame);
106 } else if (RuntimeEnabledFeatures::referrerPolicyAttributeEnabled() && name == referrerpolicyAttr) { 106 } else if (name == referrerpolicyAttr) {
107 m_referrerPolicy = ReferrerPolicyDefault; 107 m_referrerPolicy = ReferrerPolicyDefault;
108 if (!value.isNull()) 108 if (!value.isNull())
109 SecurityPolicy::referrerPolicyFromString(value, &m_referrerPolicy); 109 SecurityPolicy::referrerPolicyFromString(value, &m_referrerPolicy);
110 } else { 110 } else {
111 if (name == srcAttr) 111 if (name == srcAttr)
112 logUpdateAttributeIfIsolatedWorldAndInDocument("iframe", srcAttr, ol dValue, value); 112 logUpdateAttributeIfIsolatedWorldAndInDocument("iframe", srcAttr, ol dValue, value);
113 HTMLFrameElementBase::parseAttribute(name, oldValue, value); 113 HTMLFrameElementBase::parseAttribute(name, oldValue, value);
114 } 114 }
115 } 115 }
116 116
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 if (!invalidTokens.isNull()) 152 if (!invalidTokens.isNull())
153 document().addConsoleMessage(ConsoleMessage::create(OtherMessageSource, ErrorMessageLevel, "Error while parsing the 'sandbox' attribute: " + invalidToke ns)); 153 document().addConsoleMessage(ConsoleMessage::create(OtherMessageSource, ErrorMessageLevel, "Error while parsing the 'sandbox' attribute: " + invalidToke ns));
154 setSynchronizedLazyAttribute(sandboxAttr, m_sandbox->value()); 154 setSynchronizedLazyAttribute(sandboxAttr, m_sandbox->value());
155 } 155 }
156 156
157 ReferrerPolicy HTMLIFrameElement::referrerPolicyAttribute() 157 ReferrerPolicy HTMLIFrameElement::referrerPolicyAttribute()
158 { 158 {
159 return m_referrerPolicy; 159 return m_referrerPolicy;
160 } 160 }
161 } // namespace blink 161 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698