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 b9501d6dd842674d51aa2b6b71fbbbf25caae1fb..6c0590a17eef60774116bb35d06414cfb113a1ce 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 || |
|
raymes
2016/11/21 03:58:04
nit: outer brackets not needed
|
| + (feature.defaultPolicy == FeaturePolicy::FeatureDefault::EnableForSelf && |
| + !frame->isCrossOriginSubframe())); |
| if (!RuntimeEnabledFeatures::featurePolicyEnabled() || !frame) |
| return enabledByDefault; |
| FeaturePolicy* featurePolicy = frame->securityContext()->getFeaturePolicy(); |