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 f0e48fbf779f72f15e131b0357344568cdd7f096..62cae8d20feafce876c9684321e708aa2bd79f7d 100644 |
| --- a/third_party/WebKit/Source/core/dom/Fullscreen.cpp |
| +++ b/third_party/WebKit/Source/core/dom/Fullscreen.cpp |
| @@ -63,6 +63,26 @@ bool AllowedToUseFullscreen(const Frame* frame) { |
| if (!frame) |
| return false; |
| + // TODO(lunalu): Re-enable fullscreen in feature policy once all fullscreen |
|
iclelland
2017/05/09 17:58:45
As mentioned offline, I don't really like this, ev
|
| + // tests have been re-written that "allowfullscreen" / "fullscreen" policy |
| + // cannot be updated dynamically, by replacing the block below by commented |
| + // block below. |
| + // crbug.com/666761 |
| + // 2. If |document|'s browsing context is a top-level browsing context, then |
| + // return true. |
| + if (frame->IsMainFrame()) |
| + return true; |
| + |
| + // 3. If |document|'s browsing context has a browsing context container that |
| + // is an iframe element with an |allowattribute| attribute specified, and |
| + // whose node document is allowed to use the feature indicated by |
| + // |allowattribute|, then return true. |
| + if (frame->Owner() && frame->Owner()->AllowFullscreen()) |
| + return AllowedToUseFullscreen(frame->Tree().Parent()); |
| + |
| + // 4. Return false. |
| + return false; |
| + /* |
| if (!RuntimeEnabledFeatures::featurePolicyEnabled()) { |
| // 2. If |document|'s browsing context is a top-level browsing context, then |
| // return true. |
| @@ -83,6 +103,7 @@ bool AllowedToUseFullscreen(const Frame* frame) { |
| // 2. If Feature Policy is enabled, return the policy for "fullscreen" |
| // feature. |
| return frame->IsFeatureEnabled(WebFeaturePolicyFeature::kFullscreen); |
| + */ |
| } |
| bool AllowedToRequestFullscreen(Document& document) { |