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

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

Issue 2697713003: Initial Implementation of Iframe Attribute for Feature Policy (Part 2) (Closed)
Patch Set: Update rebase Created 3 years, 10 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 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 : parseSandboxPolicy(m_sandbox->tokens(), invalidTokens)); 224 : parseSandboxPolicy(m_sandbox->tokens(), invalidTokens));
225 if (!invalidTokens.isNull()) 225 if (!invalidTokens.isNull())
226 document().addConsoleMessage(ConsoleMessage::create( 226 document().addConsoleMessage(ConsoleMessage::create(
227 OtherMessageSource, ErrorMessageLevel, 227 OtherMessageSource, ErrorMessageLevel,
228 "Error while parsing the 'sandbox' attribute: " + invalidTokens)); 228 "Error while parsing the 'sandbox' attribute: " + invalidTokens));
229 setSynchronizedLazyAttribute(sandboxAttr, m_sandbox->value()); 229 setSynchronizedLazyAttribute(sandboxAttr, m_sandbox->value());
230 } 230 }
231 231
232 void HTMLIFrameElement::allowValueWasSet() { 232 void HTMLIFrameElement::allowValueWasSet() {
233 String invalidTokens; 233 String invalidTokens;
234 m_allowedFeatureNames = m_allow->parseAllowedFeatureNames(invalidTokens); 234 m_allowedFeatures = m_allow->parseAllowedFeatureNames(invalidTokens);
235 if (!invalidTokens.isNull()) { 235 if (!invalidTokens.isNull()) {
236 document().addConsoleMessage(ConsoleMessage::create( 236 document().addConsoleMessage(ConsoleMessage::create(
237 OtherMessageSource, ErrorMessageLevel, 237 OtherMessageSource, ErrorMessageLevel,
238 "Error while parsing the 'allow' attribute: " + invalidTokens)); 238 "Error while parsing the 'allow' attribute: " + invalidTokens));
239 } 239 }
240 setSynchronizedLazyAttribute(allowAttr, m_allow->value()); 240 setSynchronizedLazyAttribute(allowAttr, m_allow->value());
241 // TODO(lunalu): Once allowedFeatureNames is passed to frame owner, call 241 frameOwnerPropertiesChanged();
242 // frameOwnerPropertiesChanged.
243 } 242 }
244 243
245 ReferrerPolicy HTMLIFrameElement::referrerPolicyAttribute() { 244 ReferrerPolicy HTMLIFrameElement::referrerPolicyAttribute() {
246 return m_referrerPolicy; 245 return m_referrerPolicy;
247 } 246 }
248 247
249 bool HTMLIFrameElement::initializePermissionsAttribute() { 248 bool HTMLIFrameElement::initializePermissionsAttribute() {
250 if (!RuntimeEnabledFeatures::permissionDelegationEnabled()) 249 if (!RuntimeEnabledFeatures::permissionDelegationEnabled())
251 return false; 250 return false;
252 251
253 if (!m_permissions) 252 if (!m_permissions)
254 m_permissions = HTMLIFrameElementPermissions::create(this); 253 m_permissions = HTMLIFrameElementPermissions::create(this);
255 return true; 254 return true;
256 } 255 }
257 256
258 } // namespace blink 257 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLIFrameElement.h ('k') | third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698