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

Side by Side Diff: third_party/WebKit/Source/core/dom/Fullscreen.cpp

Issue 2864723002: Enable Feature policy without experimental features or fullscreen (Closed)
Patch Set: Update layout test expectations Created 3 years, 7 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All
7 * rights reserved. 7 * rights reserved.
8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
9 * (http://www.torchmobile.com/) 9 * (http://www.torchmobile.com/)
10 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 10 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 56
57 // https://html.spec.whatwg.org/multipage/embedded-content.html#allowed-to-use 57 // https://html.spec.whatwg.org/multipage/embedded-content.html#allowed-to-use
58 bool AllowedToUseFullscreen(const Frame* frame) { 58 bool AllowedToUseFullscreen(const Frame* frame) {
59 // To determine whether a Document object |document| is allowed to use the 59 // To determine whether a Document object |document| is allowed to use the
60 // feature indicated by attribute name |allowattribute|, run these steps: 60 // feature indicated by attribute name |allowattribute|, run these steps:
61 61
62 // 1. If |document| has no browsing context, then return false. 62 // 1. If |document| has no browsing context, then return false.
63 if (!frame) 63 if (!frame)
64 return false; 64 return false;
65 65
66 if (!RuntimeEnabledFeatures::featurePolicyEnabled()) { 66 if (!RuntimeEnabledFeatures::fullscreenInFeaturePolicyEnabled()) {
67 // 2. If |document|'s browsing context is a top-level browsing context, then 67 // 2. If |document|'s browsing context is a top-level browsing context, then
68 // return true. 68 // return true.
69 if (frame->IsMainFrame()) 69 if (frame->IsMainFrame())
70 return true; 70 return true;
71 71
72 // 3. If |document|'s browsing context has a browsing context container that 72 // 3. If |document|'s browsing context has a browsing context container that
73 // is an iframe element with an |allowattribute| attribute specified, and 73 // is an iframe element with an |allowattribute| attribute specified, and
74 // whose node document is allowed to use the feature indicated by 74 // whose node document is allowed to use the feature indicated by
75 // |allowattribute|, then return true. 75 // |allowattribute|, then return true.
76 if (frame->Owner() && frame->Owner()->AllowFullscreen()) 76 if (frame->Owner() && frame->Owner()->AllowFullscreen())
(...skipping 770 matching lines...) Expand 10 before | Expand all | Expand 10 after
847 DEFINE_TRACE(Fullscreen) { 847 DEFINE_TRACE(Fullscreen) {
848 visitor->Trace(pending_fullscreen_element_); 848 visitor->Trace(pending_fullscreen_element_);
849 visitor->Trace(fullscreen_element_stack_); 849 visitor->Trace(fullscreen_element_stack_);
850 visitor->Trace(current_full_screen_element_); 850 visitor->Trace(current_full_screen_element_);
851 visitor->Trace(event_queue_); 851 visitor->Trace(event_queue_);
852 Supplement<Document>::Trace(visitor); 852 Supplement<Document>::Trace(visitor);
853 ContextLifecycleObserver::Trace(visitor); 853 ContextLifecycleObserver::Trace(visitor);
854 } 854 }
855 855
856 } // namespace blink 856 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698