| 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 r
ights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r
ights reserved. |
| 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
| 8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
| 9 * Copyright (C) 2013 Google Inc. All rights reserved. | 9 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 10 * | 10 * |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 Element* webkitFullscreenElement() const { return !m_fullScreenElementStack.
isEmpty() ? m_fullScreenElementStack.last().get() : 0; } | 92 Element* webkitFullscreenElement() const { return !m_fullScreenElementStack.
isEmpty() ? m_fullScreenElementStack.last().get() : 0; } |
| 93 void webkitExitFullscreen(); | 93 void webkitExitFullscreen(); |
| 94 | 94 |
| 95 bool webkitIsFullScreen() const { return m_fullScreenElement.get(); } | 95 bool webkitIsFullScreen() const { return m_fullScreenElement.get(); } |
| 96 bool webkitFullScreenKeyboardInputAllowed() const { return m_fullScreenEleme
nt.get() && m_areKeysEnabledInFullScreen; } | 96 bool webkitFullScreenKeyboardInputAllowed() const { return m_fullScreenEleme
nt.get() && m_areKeysEnabledInFullScreen; } |
| 97 Element* webkitCurrentFullScreenElement() const { return m_fullScreenElement
.get(); } | 97 Element* webkitCurrentFullScreenElement() const { return m_fullScreenElement
.get(); } |
| 98 | 98 |
| 99 virtual void documentWasDetached() OVERRIDE; | 99 virtual void documentWasDetached() OVERRIDE; |
| 100 virtual void documentWasDisposed() OVERRIDE; | 100 virtual void documentWasDisposed() OVERRIDE; |
| 101 | 101 |
| 102 virtual void trace(Visitor*) OVERRIDE { } | 102 virtual void trace(Visitor*) OVERRIDE; |
| 103 | 103 |
| 104 private: | 104 private: |
| 105 static FullscreenElementStack* fromIfExistsSlow(Document&); | 105 static FullscreenElementStack* fromIfExistsSlow(Document&); |
| 106 | 106 |
| 107 explicit FullscreenElementStack(Document&); | 107 explicit FullscreenElementStack(Document&); |
| 108 | 108 |
| 109 Document* document(); | 109 Document* document(); |
| 110 void fullScreenChangeDelayTimerFired(Timer<FullscreenElementStack>*); | 110 void fullScreenChangeDelayTimerFired(Timer<FullscreenElementStack>*); |
| 111 | 111 |
| 112 bool m_areKeysEnabledInFullScreen; | 112 bool m_areKeysEnabledInFullScreen; |
| 113 RefPtr<Element> m_fullScreenElement; | 113 RefPtrWillBeMember<Element> m_fullScreenElement; |
| 114 Vector<RefPtr<Element> > m_fullScreenElementStack; | 114 WillBeHeapVector<RefPtrWillBeMember<Element> > m_fullScreenElementStack; |
| 115 RenderFullScreen* m_fullScreenRenderer; | 115 RenderFullScreen* m_fullScreenRenderer; |
| 116 Timer<FullscreenElementStack> m_fullScreenChangeDelayTimer; | 116 Timer<FullscreenElementStack> m_fullScreenChangeDelayTimer; |
| 117 Deque<RefPtr<Node> > m_fullScreenChangeEventTargetQueue; | 117 WillBeHeapDeque<RefPtrWillBeMember<Node> > m_fullScreenChangeEventTargetQueu
e; |
| 118 Deque<RefPtr<Node> > m_fullScreenErrorEventTargetQueue; | 118 WillBeHeapDeque<RefPtrWillBeMember<Node> > m_fullScreenErrorEventTargetQueue
; |
| 119 LayoutRect m_savedPlaceholderFrameRect; | 119 LayoutRect m_savedPlaceholderFrameRect; |
| 120 RefPtr<RenderStyle> m_savedPlaceholderRenderStyle; | 120 RefPtr<RenderStyle> m_savedPlaceholderRenderStyle; |
| 121 }; | 121 }; |
| 122 | 122 |
| 123 inline bool FullscreenElementStack::isActiveFullScreenElement(const Element* ele
ment) | 123 inline bool FullscreenElementStack::isActiveFullScreenElement(const Element* ele
ment) |
| 124 { | 124 { |
| 125 FullscreenElementStack* controller = fromIfExists(element->document()); | 125 FullscreenElementStack* controller = fromIfExists(element->document()); |
| 126 if (!controller) | 126 if (!controller) |
| 127 return false; | 127 return false; |
| 128 return controller->webkitIsFullScreen() && controller->webkitCurrentFullScre
enElement() == element; | 128 return controller->webkitIsFullScreen() && controller->webkitCurrentFullScre
enElement() == element; |
| 129 } | 129 } |
| 130 | 130 |
| 131 inline FullscreenElementStack* FullscreenElementStack::fromIfExists(Document& do
cument) | 131 inline FullscreenElementStack* FullscreenElementStack::fromIfExists(Document& do
cument) |
| 132 { | 132 { |
| 133 if (!document.hasFullscreenElementStack()) | 133 if (!document.hasFullscreenElementStack()) |
| 134 return 0; | 134 return 0; |
| 135 return fromIfExistsSlow(document); | 135 return fromIfExistsSlow(document); |
| 136 } | 136 } |
| 137 | 137 |
| 138 } // namespace WebCore | 138 } // namespace WebCore |
| 139 | 139 |
| 140 #endif // FullscreenElementStack_h | 140 #endif // FullscreenElementStack_h |
| OLD | NEW |