Chromium Code Reviews| Index: third_party/WebKit/Source/bindings/core/v8/ConditionalFeatures.cpp |
| diff --git a/third_party/WebKit/Source/bindings/core/v8/ConditionalFeatures.cpp b/third_party/WebKit/Source/bindings/core/v8/ConditionalFeatures.cpp |
| index 15f48e5afd5ec2757d81be17321ede497e063f1e..1db0c829f80fd89a4039ca1c868477edd0b31b9b 100644 |
| --- a/third_party/WebKit/Source/bindings/core/v8/ConditionalFeatures.cpp |
| +++ b/third_party/WebKit/Source/bindings/core/v8/ConditionalFeatures.cpp |
| @@ -76,7 +76,9 @@ bool isFeatureEnabledInFrame(const FeaturePolicy::Feature& feature, |
| const LocalFrame* frame) { |
| // If there is no frame, or if feature policy is disabled, use defaults. |
| bool enabledByDefault = |
| - (feature.defaultPolicy != FeaturePolicy::FeatureDefault::DisableForAll); |
| + (feature.defaultPolicy == FeaturePolicy::FeatureDefault::EnableForAll || |
| + (feature.defaultPolicy == FeaturePolicy::FeatureDefault::EnableForSelf && |
| + !frame->isCrossOriginSubframe())); |
|
ojan
2017/01/19 01:34:29
Just to complicate things, it looks like we'll be
|
| if (!RuntimeEnabledFeatures::featurePolicyEnabled() || !frame) |
| return enabledByDefault; |
| FeaturePolicy* featurePolicy = frame->securityContext()->getFeaturePolicy(); |