| 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 ffe3260014470a00d13352bcf66e11feafa1e6e2..dd10a296561fc6eb7095566ded5db9273b92d24c 100644
|
| --- a/third_party/WebKit/Source/core/dom/Fullscreen.cpp
|
| +++ b/third_party/WebKit/Source/core/dom/Fullscreen.cpp
|
| @@ -80,35 +80,9 @@ bool allowedToUseFullscreen(const Frame* frame) {
|
| return false;
|
| }
|
|
|
| - // If Feature Policy is enabled, then we need this hack to support it, until
|
| - // we have proper support for <iframe allowfullscreen> in FP:
|
| -
|
| - // 1. If FP, by itself, enables fullscreen in this document, then fullscreen
|
| - // is allowed.
|
| - if (frame->isFeatureEnabled(WebFeaturePolicyFeature::Fullscreen)) {
|
| - return true;
|
| - }
|
| -
|
| - // 2. Otherwise, if the embedding frame's document is allowed to use
|
| - // fullscreen (either through FP or otherwise), and either:
|
| - // a) this is a same-origin embedded document, or
|
| - // b) this document's iframe has the allowfullscreen attribute set,
|
| - // then fullscreen is allowed.
|
| - if (!frame->isMainFrame()) {
|
| - if (allowedToUseFullscreen(frame->tree().parent())) {
|
| - return (frame->owner() && frame->owner()->allowFullscreen()) ||
|
| - frame->tree()
|
| - .parent()
|
| - ->securityContext()
|
| - ->getSecurityOrigin()
|
| - ->isSameSchemeHostPortAndSuborigin(
|
| - frame->securityContext()->getSecurityOrigin());
|
| - }
|
| - }
|
| -
|
| - // Otherwise, fullscreen is not allowed. (If we reach here and this is the
|
| - // main frame, then fullscreen must have been disabled by FP.)
|
| - return false;
|
| + // 2. If Feature Policy is enabled, return the policy for "fullscreen"
|
| + // feature.
|
| + return frame->isFeatureEnabled(WebFeaturePolicyFeature::Fullscreen);
|
| }
|
|
|
| bool allowedToRequestFullscreen(Document& document) {
|
|
|