| Index: third_party/WebKit/Source/platform/feature_policy/FeaturePolicy.cpp
|
| diff --git a/third_party/WebKit/Source/platform/feature_policy/FeaturePolicy.cpp b/third_party/WebKit/Source/platform/feature_policy/FeaturePolicy.cpp
|
| index f89c965b35075a0057e00fe885d3e977f2c26074..4ce9979a2b65ef59e59a304dbb6544df37df2f02 100644
|
| --- a/third_party/WebKit/Source/platform/feature_policy/FeaturePolicy.cpp
|
| +++ b/third_party/WebKit/Source/platform/feature_policy/FeaturePolicy.cpp
|
| @@ -110,9 +110,10 @@ WebParsedFeaturePolicy GetContainerPolicyFromAllowedFeatures(
|
| // "allowpaymentrequest" policies.
|
| if (feature == WebFeaturePolicyFeature::kPayment)
|
| override_payment = true;
|
| - if (feature == WebFeaturePolicyFeature::kFullscreen)
|
| - override_fullscreen = true;
|
| -
|
| + if (RuntimeEnabledFeatures::fullscreenInFeaturePolicyEnabled()) {
|
| + if (feature == WebFeaturePolicyFeature::kFullscreen)
|
| + override_fullscreen = true;
|
| + }
|
| WebParsedFeaturePolicyDeclaration whitelist;
|
| whitelist.feature = feature;
|
| whitelist.origins = Vector<WebSecurityOrigin>(1UL, {origin});
|
| @@ -122,8 +123,10 @@ WebParsedFeaturePolicy GetContainerPolicyFromAllowedFeatures(
|
| // enable the feature for all origins; similarly for allowpaymentrequest.
|
| if (allowpayment && !override_payment)
|
| AddAllowFeatureToList(WebFeaturePolicyFeature::kPayment, whitelists);
|
| - if (allowfullscreen && !override_fullscreen)
|
| - AddAllowFeatureToList(WebFeaturePolicyFeature::kFullscreen, whitelists);
|
| + if (RuntimeEnabledFeatures::fullscreenInFeaturePolicyEnabled()) {
|
| + if (allowfullscreen && !override_fullscreen)
|
| + AddAllowFeatureToList(WebFeaturePolicyFeature::kFullscreen, whitelists);
|
| + }
|
|
|
| return whitelists;
|
| }
|
| @@ -131,9 +134,11 @@ WebParsedFeaturePolicy GetContainerPolicyFromAllowedFeatures(
|
| const FeatureNameMap& GetDefaultFeatureNameMap() {
|
| DEFINE_STATIC_LOCAL(FeatureNameMap, default_feature_name_map, ());
|
| if (default_feature_name_map.IsEmpty()) {
|
| - default_feature_name_map.Set("fullscreen",
|
| - WebFeaturePolicyFeature::kFullscreen);
|
| default_feature_name_map.Set("payment", WebFeaturePolicyFeature::kPayment);
|
| + if (RuntimeEnabledFeatures::fullscreenInFeaturePolicyEnabled()) {
|
| + default_feature_name_map.Set("fullscreen",
|
| + WebFeaturePolicyFeature::kFullscreen);
|
| + }
|
| if (RuntimeEnabledFeatures::featurePolicyExperimentalFeaturesEnabled()) {
|
| default_feature_name_map.Set("vibrate",
|
| WebFeaturePolicyFeature::kVibrate);
|
|
|