Chromium Code Reviews| Index: third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.cpp |
| diff --git a/third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.cpp b/third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.cpp |
| index 58d0410c0f97819b2c4f5a41663ef0ce7e2d2921..59e66aba8ca5defd684fdae021883ee691a1bd07 100644 |
| --- a/third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.cpp |
| +++ b/third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.cpp |
| @@ -233,10 +233,21 @@ void HTMLFrameOwnerElement::DisposeFrameOrPluginSoon( |
| } |
| } |
| +Vector<WebParsedFeaturePolicyDeclaration> |
| +HTMLFrameOwnerElement::ConstructContainerPolicy() const { |
| + RefPtr<SecurityOrigin> origin = GetOriginForFeaturePolicy(); |
| + Vector<WebParsedFeaturePolicyDeclaration> whitelists; |
| + for (const WebFeaturePolicyFeature feature : AllowedFeatures()) { |
| + WebParsedFeaturePolicyDeclaration whitelist; |
| + whitelist.feature = feature; |
| + whitelist.origins = Vector<WebSecurityOrigin>(1UL, {origin}); |
| + whitelists.push_back(whitelist); |
| + } |
| + return whitelists; |
| +} |
|
raymes
2017/06/07 23:54:38
Is this actually needed or can this be a pure virt
iclelland
2017/06/12 17:32:17
i had expected that it would be common code to han
|
| + |
| void HTMLFrameOwnerElement::UpdateContainerPolicy() { |
| - container_policy_ = GetContainerPolicyFromAllowedFeatures( |
| - AllowedFeatures(), AllowFullscreen(), AllowPaymentRequest(), |
| - GetOriginForFeaturePolicy()); |
| + container_policy_ = ConstructContainerPolicy(); |
| // Don't notify about updates if ContentFrame() is null, for example when |
| // the subframe hasn't been created yet. |
| if (ContentFrame()) { |