| 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 11 matching lines...) Expand all Loading... |
| 22 * | 22 * |
| 23 * You should have received a copy of the GNU Library General Public License | 23 * You should have received a copy of the GNU Library General Public License |
| 24 * along with this library; see the file COPYING.LIB. If not, write to | 24 * along with this library; see the file COPYING.LIB. If not, write to |
| 25 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 25 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 26 * Boston, MA 02110-1301, USA. | 26 * Boston, MA 02110-1301, USA. |
| 27 * | 27 * |
| 28 */ | 28 */ |
| 29 | 29 |
| 30 #include "core/dom/Fullscreen.h" | 30 #include "core/dom/Fullscreen.h" |
| 31 | 31 |
| 32 #include "bindings/core/v8/ConditionalFeaturesForCore.h" | |
| 33 #include "core/dom/Document.h" | 32 #include "core/dom/Document.h" |
| 34 #include "core/dom/ElementTraversal.h" | 33 #include "core/dom/ElementTraversal.h" |
| 35 #include "core/dom/StyleEngine.h" | 34 #include "core/dom/StyleEngine.h" |
| 36 #include "core/dom/TaskRunnerHelper.h" | 35 #include "core/dom/TaskRunnerHelper.h" |
| 37 #include "core/events/Event.h" | 36 #include "core/events/Event.h" |
| 38 #include "core/frame/FrameView.h" | 37 #include "core/frame/FrameView.h" |
| 39 #include "core/frame/HostsUsingFeatures.h" | 38 #include "core/frame/HostsUsingFeatures.h" |
| 40 #include "core/frame/LocalFrame.h" | 39 #include "core/frame/LocalFrame.h" |
| 41 #include "core/frame/Settings.h" | 40 #include "core/frame/Settings.h" |
| 42 #include "core/frame/UseCounter.h" | 41 #include "core/frame/UseCounter.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 | 78 |
| 80 // 4. Return false. | 79 // 4. Return false. |
| 81 return false; | 80 return false; |
| 82 } | 81 } |
| 83 | 82 |
| 84 // If Feature Policy is enabled, then we need this hack to support it, until | 83 // If Feature Policy is enabled, then we need this hack to support it, until |
| 85 // we have proper support for <iframe allowfullscreen> in FP: | 84 // we have proper support for <iframe allowfullscreen> in FP: |
| 86 | 85 |
| 87 // 1. If FP, by itself, enables fullscreen in this document, then fullscreen | 86 // 1. If FP, by itself, enables fullscreen in this document, then fullscreen |
| 88 // is allowed. | 87 // is allowed. |
| 89 if (isFeatureEnabledInFrame(WebFeaturePolicyFeature::Fullscreen, frame)) { | 88 if (frame->isFeatureEnabled(WebFeaturePolicyFeature::Fullscreen)) { |
| 90 return true; | 89 return true; |
| 91 } | 90 } |
| 92 | 91 |
| 93 // 2. Otherwise, if the embedding frame's document is allowed to use | 92 // 2. Otherwise, if the embedding frame's document is allowed to use |
| 94 // fullscreen (either through FP or otherwise), and either: | 93 // fullscreen (either through FP or otherwise), and either: |
| 95 // a) this is a same-origin embedded document, or | 94 // a) this is a same-origin embedded document, or |
| 96 // b) this document's iframe has the allowfullscreen attribute set, | 95 // b) this document's iframe has the allowfullscreen attribute set, |
| 97 // then fullscreen is allowed. | 96 // then fullscreen is allowed. |
| 98 if (!frame->isMainFrame()) { | 97 if (!frame->isMainFrame()) { |
| 99 if (allowedToUseFullscreen(frame->tree().parent())) { | 98 if (allowedToUseFullscreen(frame->tree().parent())) { |
| (...skipping 766 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 866 DEFINE_TRACE(Fullscreen) { | 865 DEFINE_TRACE(Fullscreen) { |
| 867 visitor->trace(m_pendingFullscreenElement); | 866 visitor->trace(m_pendingFullscreenElement); |
| 868 visitor->trace(m_fullscreenElementStack); | 867 visitor->trace(m_fullscreenElementStack); |
| 869 visitor->trace(m_currentFullScreenElement); | 868 visitor->trace(m_currentFullScreenElement); |
| 870 visitor->trace(m_eventQueue); | 869 visitor->trace(m_eventQueue); |
| 871 Supplement<Document>::trace(visitor); | 870 Supplement<Document>::trace(visitor); |
| 872 ContextLifecycleObserver::trace(visitor); | 871 ContextLifecycleObserver::trace(visitor); |
| 873 } | 872 } |
| 874 | 873 |
| 875 } // namespace blink | 874 } // namespace blink |
| OLD | NEW |