| 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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 if (allow_fullscreen_ != old_allow_fullscreen) { | 127 if (allow_fullscreen_ != old_allow_fullscreen) { |
| 128 // TODO(iclelland): Remove this use counter when the allowfullscreen | 128 // TODO(iclelland): Remove this use counter when the allowfullscreen |
| 129 // attribute state is snapshotted on document creation. crbug.com/682282 | 129 // attribute state is snapshotted on document creation. crbug.com/682282 |
| 130 if (allow_fullscreen_ && ContentFrame()) { | 130 if (allow_fullscreen_ && ContentFrame()) { |
| 131 UseCounter::Count( | 131 UseCounter::Count( |
| 132 GetDocument(), | 132 GetDocument(), |
| 133 UseCounter:: | 133 UseCounter:: |
| 134 kHTMLIFrameElementAllowfullscreenAttributeSetAfterContentLoad); | 134 kHTMLIFrameElementAllowfullscreenAttributeSetAfterContentLoad); |
| 135 } | 135 } |
| 136 FrameOwnerPropertiesChanged(); | 136 FrameOwnerPropertiesChanged(); |
| 137 UpdateContainerPolicy(); |
| 137 } | 138 } |
| 138 } else if (name == allowpaymentrequestAttr) { | 139 } else if (name == allowpaymentrequestAttr) { |
| 139 bool old_allow_payment_request = allow_payment_request_; | 140 bool old_allow_payment_request = allow_payment_request_; |
| 140 allow_payment_request_ = !value.IsNull(); | 141 allow_payment_request_ = !value.IsNull(); |
| 141 if (allow_payment_request_ != old_allow_payment_request) | 142 if (allow_payment_request_ != old_allow_payment_request) { |
| 142 FrameOwnerPropertiesChanged(); | 143 FrameOwnerPropertiesChanged(); |
| 144 UpdateContainerPolicy(); |
| 145 } |
| 143 } else if (RuntimeEnabledFeatures::embedderCSPEnforcementEnabled() && | 146 } else if (RuntimeEnabledFeatures::embedderCSPEnforcementEnabled() && |
| 144 name == cspAttr) { | 147 name == cspAttr) { |
| 145 // TODO(amalika): add more robust validation of the value | 148 // TODO(amalika): add more robust validation of the value |
| 146 if (!value.GetString().ContainsOnlyASCII()) { | 149 if (!value.GetString().ContainsOnlyASCII()) { |
| 147 csp_ = g_null_atom; | 150 csp_ = g_null_atom; |
| 148 GetDocument().AddConsoleMessage(ConsoleMessage::Create( | 151 GetDocument().AddConsoleMessage(ConsoleMessage::Create( |
| 149 kOtherMessageSource, kErrorMessageLevel, | 152 kOtherMessageSource, kErrorMessageLevel, |
| 150 "'csp' attribute contains non-ASCII characters: " + value)); | 153 "'csp' attribute contains non-ASCII characters: " + value)); |
| 151 return; | 154 return; |
| 152 } | 155 } |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 void HTMLIFrameElement::AllowValueWasSet() { | 210 void HTMLIFrameElement::AllowValueWasSet() { |
| 208 String invalid_tokens; | 211 String invalid_tokens; |
| 209 allowed_features_ = allow_->ParseAllowedFeatureNames(invalid_tokens); | 212 allowed_features_ = allow_->ParseAllowedFeatureNames(invalid_tokens); |
| 210 if (!invalid_tokens.IsNull()) { | 213 if (!invalid_tokens.IsNull()) { |
| 211 GetDocument().AddConsoleMessage(ConsoleMessage::Create( | 214 GetDocument().AddConsoleMessage(ConsoleMessage::Create( |
| 212 kOtherMessageSource, kErrorMessageLevel, | 215 kOtherMessageSource, kErrorMessageLevel, |
| 213 "Error while parsing the 'allow' attribute: " + invalid_tokens)); | 216 "Error while parsing the 'allow' attribute: " + invalid_tokens)); |
| 214 } | 217 } |
| 215 SetSynchronizedLazyAttribute(allowAttr, allow_->value()); | 218 SetSynchronizedLazyAttribute(allowAttr, allow_->value()); |
| 216 FrameOwnerPropertiesChanged(); | 219 FrameOwnerPropertiesChanged(); |
| 220 UpdateContainerPolicy(); |
| 217 } | 221 } |
| 218 | 222 |
| 219 ReferrerPolicy HTMLIFrameElement::ReferrerPolicyAttribute() { | 223 ReferrerPolicy HTMLIFrameElement::ReferrerPolicyAttribute() { |
| 220 return referrer_policy_; | 224 return referrer_policy_; |
| 221 } | 225 } |
| 222 | 226 |
| 223 } // namespace blink | 227 } // namespace blink |
| OLD | NEW |