Chromium Code Reviews| Index: third_party/WebKit/Source/core/dom/Fullscreen.cpp |
| diff --git a/third_party/WebKit/Source/core/dom/Fullscreen.cpp b/third_party/WebKit/Source/core/dom/Fullscreen.cpp |
| index 5ead9962ce68a06a27485a7d5403b828ff7ffc93..0cf92bf96f40496afffe83cd9ebb1fe674a30fc6 100644 |
| --- a/third_party/WebKit/Source/core/dom/Fullscreen.cpp |
| +++ b/third_party/WebKit/Source/core/dom/Fullscreen.cpp |
| @@ -50,6 +50,8 @@ |
| #include "platform/ScopedOrientationChangeIndicator.h" |
| #include "platform/UserGestureIndicator.h" |
| +#include "public/platform/Platform.h" |
| + |
| namespace blink { |
| namespace { |
| @@ -126,14 +128,17 @@ bool fullscreenIsSupported(Document& document) { |
| // If FeaturePolicy is enabled, check the fullscreen is not disabled by |
| // policy in the parent frame. |
| if (fullscreenSupported && |
| - parent->securityContext()->getFeaturePolicy()->isFeatureEnabled( |
| - kFullscreenFeature)) { |
| + Platform::current()->isFeatureEnabledByPolicy( |
| + parent->securityContext()->getFeaturePolicy(), |
| + WebFeaturePolicyFeature::Fullscreen, |
| + WebSecurityOrigin(frame->securityContext()->getSecurityOrigin()))) { |
|
raymes
2017/01/19 02:40:57
I think it's orthogonal to this CL but I'm a bit c
iclelland
2017/01/19 05:40:40
It is orthogonal, but: this is a bit of a hack unt
|
| return true; |
| } |
| } |
| // Even if the iframe allowfullscreen attribute is not present, allow |
| // fullscreen to be enabled by feature policy. |
| - else if (isFeatureEnabledInFrame(kFullscreenFeature, frame)) { |
| + else if (isFeatureEnabledInFrame(WebFeaturePolicyFeature::Fullscreen, |
| + frame)) { |
| return true; |
| } |