OLD | NEW |
---|---|
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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
114 SecurityPolicy::referrerPolicyFromStringWithLegacyKeywords(value, &m _referrerPolicy); | 114 SecurityPolicy::referrerPolicyFromStringWithLegacyKeywords(value, &m _referrerPolicy); |
115 } else if (name == allowfullscreenAttr) { | 115 } else if (name == allowfullscreenAttr) { |
116 bool oldAllowFullscreen = m_allowFullscreen; | 116 bool oldAllowFullscreen = m_allowFullscreen; |
117 m_allowFullscreen = !value.isNull(); | 117 m_allowFullscreen = !value.isNull(); |
118 if (m_allowFullscreen != oldAllowFullscreen) | 118 if (m_allowFullscreen != oldAllowFullscreen) |
119 frameOwnerPropertiesChanged(); | 119 frameOwnerPropertiesChanged(); |
120 } else if (name == permissionsAttr) { | 120 } else if (name == permissionsAttr) { |
121 if (initializePermissionsAttribute()) | 121 if (initializePermissionsAttribute()) |
122 m_permissions->setValue(value); | 122 m_permissions->setValue(value); |
123 } else if (RuntimeEnabledFeatures::embedderCSPEnforcementEnabled() && name = = cspAttr) { | 123 } else if (RuntimeEnabledFeatures::embedderCSPEnforcementEnabled() && name = = cspAttr) { |
124 for (size_t i = 0; i < value.length(); ++i) { | |
Mike West
2016/09/29 13:33:13
You can replace this loop with `value.containsOnly
| |
125 if (!isASCII(value[i])) { | |
126 document().addConsoleMessage(ConsoleMessage::create(OtherMessage Source, ErrorMessageLevel, "'csp' attribute contains non-ASCII characters: " + v alue)); | |
127 return; | |
128 } | |
129 } | |
124 AtomicString oldCSP = m_csp; | 130 AtomicString oldCSP = m_csp; |
125 m_csp = value; | 131 m_csp = value; |
126 if (m_csp != oldCSP) | 132 if (m_csp != oldCSP) |
127 frameOwnerPropertiesChanged(); | 133 frameOwnerPropertiesChanged(); |
128 } else { | 134 } else { |
129 if (name == srcAttr) | 135 if (name == srcAttr) |
130 logUpdateAttributeIfIsolatedWorldAndInDocument("iframe", srcAttr, ol dValue, value); | 136 logUpdateAttributeIfIsolatedWorldAndInDocument("iframe", srcAttr, ol dValue, value); |
131 HTMLFrameElementBase::parseAttribute(name, oldValue, value); | 137 HTMLFrameElementBase::parseAttribute(name, oldValue, value); |
132 } | 138 } |
133 } | 139 } |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
194 { | 200 { |
195 if (!RuntimeEnabledFeatures::permissionDelegationEnabled()) | 201 if (!RuntimeEnabledFeatures::permissionDelegationEnabled()) |
196 return false; | 202 return false; |
197 | 203 |
198 if (!m_permissions) | 204 if (!m_permissions) |
199 m_permissions = HTMLIFrameElementPermissions::create(this); | 205 m_permissions = HTMLIFrameElementPermissions::create(this); |
200 return true; | 206 return true; |
201 } | 207 } |
202 | 208 |
203 } // namespace blink | 209 } // namespace blink |
OLD | NEW |