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