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

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

Issue 2642263006: Allow vibrate in cross-origin iframes with user gesture. (Closed)
Patch Set: Created 3 years, 11 months 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 6b28b52df4953a008dc110c22f6ab41c6b32a6e6..c47a54c0f8db487bfd4ad655a9496f11a53f1c5f 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ConditionalFeatures.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/ConditionalFeatures.cpp
@@ -93,7 +93,7 @@ bool isFeatureEnabledInFrame(const FeaturePolicy::Feature& feature,
bool enabledByDefault =
(feature.defaultPolicy == FeaturePolicy::FeatureDefault::EnableForAll ||
(feature.defaultPolicy == FeaturePolicy::FeatureDefault::EnableForSelf &&
- !frame->isCrossOriginSubframe()));
+ (!frame->isCrossOriginSubframe() || frame->hasReceivedUserGesture())));
ojan 2017/01/22 23:02:54 I don't think you want this here. This is the gene
if (!RuntimeEnabledFeatures::featurePolicyEnabled() || !frame)
return enabledByDefault;
FeaturePolicy* featurePolicy = frame->securityContext()->getFeaturePolicy();

Powered by Google App Engine
This is Rietveld 408576698