| OLD | NEW |
| 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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 // TODO(lunalu): update the placement of the feature policy code once it is in | 106 // TODO(lunalu): update the placement of the feature policy code once it is in |
| 107 // https://fullscreen.spec.whatwg.org/. | 107 // https://fullscreen.spec.whatwg.org/. |
| 108 bool fullscreenIsSupported(Document& document) { | 108 bool fullscreenIsSupported(Document& document) { |
| 109 LocalFrame* frame = document.frame(); | 109 LocalFrame* frame = document.frame(); |
| 110 if (!frame) | 110 if (!frame) |
| 111 return false; | 111 return false; |
| 112 | 112 |
| 113 // Fullscreen is supported if there is no previously-established user | 113 // Fullscreen is supported if there is no previously-established user |
| 114 // preference, security risk, or platform limitation. | 114 // preference, security risk, or platform limitation. |
| 115 bool fullscreenSupported = | 115 bool fullscreenSupported = |
| 116 !document.settings() || document.settings()->fullscreenSupported(); | 116 !document.settings() || document.settings()->GetFullscreenSupported(); |
| 117 | 117 |
| 118 if (!RuntimeEnabledFeatures::featurePolicyEnabled()) { | 118 if (!RuntimeEnabledFeatures::featurePolicyEnabled()) { |
| 119 return fullscreenSupported; | 119 return fullscreenSupported; |
| 120 } | 120 } |
| 121 | 121 |
| 122 // TODO(lunalu): clean all of this up once iframe attributes are supported | 122 // TODO(lunalu): clean all of this up once iframe attributes are supported |
| 123 // for feature policy. | 123 // for feature policy. |
| 124 if (Frame* parent = frame->tree().parent()) { | 124 if (Frame* parent = frame->tree().parent()) { |
| 125 // If FeaturePolicy is enabled, check the fullscreen is not disabled by | 125 // If FeaturePolicy is enabled, check the fullscreen is not disabled by |
| 126 // policy in the parent frame. | 126 // policy in the parent frame. |
| (...skipping 774 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 901 } | 901 } |
| 902 | 902 |
| 903 DEFINE_TRACE(Fullscreen) { | 903 DEFINE_TRACE(Fullscreen) { |
| 904 visitor->trace(m_pendingRequests); | 904 visitor->trace(m_pendingRequests); |
| 905 visitor->trace(m_fullscreenElementStack); | 905 visitor->trace(m_fullscreenElementStack); |
| 906 Supplement<Document>::trace(visitor); | 906 Supplement<Document>::trace(visitor); |
| 907 ContextLifecycleObserver::trace(visitor); | 907 ContextLifecycleObserver::trace(visitor); |
| 908 } | 908 } |
| 909 | 909 |
| 910 } // namespace blink | 910 } // namespace blink |
| OLD | NEW |