Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1199)

Unified Diff: third_party/WebKit/Source/bindings/core/v8/ConditionalFeatures.cpp

Issue 2492623002: Implementation for feature policy - vibrate. (Closed)
Patch Set: Update layout test result Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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();

Powered by Google App Engine
This is Rietveld 408576698