| 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 // TODO(foolip): The fullscreen element stack is modified synchronously in | 85 // TODO(foolip): The fullscreen element stack is modified synchronously in |
| 86 // requestFullscreen(), which is not per spec and means that | 86 // requestFullscreen(), which is not per spec and means that |
| 87 // |fullscreenElement()| is not always the same as | 87 // |fullscreenElement()| is not always the same as |
| 88 // |currentFullScreenElement()|, see https://crbug.com/402421. | 88 // |currentFullScreenElement()|, see https://crbug.com/402421. |
| 89 Element* fullscreenElement() const { | 89 Element* fullscreenElement() const { |
| 90 return !m_fullscreenElementStack.isEmpty() | 90 return !m_fullscreenElementStack.isEmpty() |
| 91 ? m_fullscreenElementStack.back().first.get() | 91 ? m_fullscreenElementStack.back().first.get() |
| 92 : nullptr; | 92 : nullptr; |
| 93 } | 93 } |
| 94 | 94 |
| 95 void didEnterFullscreenForElement(Element*); | |
| 96 void didExitFullscreen(); | 95 void didExitFullscreen(); |
| 97 | 96 |
| 98 void setFullScreenLayoutObject(LayoutFullScreen*); | 97 void setFullScreenLayoutObject(LayoutFullScreen*); |
| 99 LayoutFullScreen* fullScreenLayoutObject() const { | 98 LayoutFullScreen* fullScreenLayoutObject() const { |
| 100 return m_fullScreenLayoutObject; | 99 return m_fullScreenLayoutObject; |
| 101 } | 100 } |
| 102 void fullScreenLayoutObjectDestroyed(); | 101 void fullScreenLayoutObjectDestroyed(); |
| 103 | 102 |
| 104 void elementRemoved(Element&); | 103 void elementRemoved(Element&); |
| 105 | 104 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 116 Element* currentFullScreenElement() const { | 115 Element* currentFullScreenElement() const { |
| 117 return m_currentFullScreenElement.get(); | 116 return m_currentFullScreenElement.get(); |
| 118 } | 117 } |
| 119 | 118 |
| 120 // ContextLifecycleObserver: | 119 // ContextLifecycleObserver: |
| 121 void contextDestroyed() override; | 120 void contextDestroyed() override; |
| 122 | 121 |
| 123 DECLARE_VIRTUAL_TRACE(); | 122 DECLARE_VIRTUAL_TRACE(); |
| 124 | 123 |
| 125 private: | 124 private: |
| 125 friend class RequestFullscreenCallbacks; |
| 126 |
| 126 static Fullscreen* fromIfExistsSlow(Document&); | 127 static Fullscreen* fromIfExistsSlow(Document&); |
| 127 | 128 |
| 128 explicit Fullscreen(Document&); | 129 explicit Fullscreen(Document&); |
| 129 | 130 |
| 130 Document* document(); | 131 Document* document(); |
| 131 | 132 |
| 133 void didEnterFullscreen(Element&); |
| 134 |
| 132 void clearFullscreenElementStack(); | 135 void clearFullscreenElementStack(); |
| 133 void popFullscreenElementStack(); | 136 void popFullscreenElementStack(); |
| 134 void pushFullscreenElementStack(Element&, RequestType); | 137 void pushFullscreenElementStack(Element&, RequestType); |
| 135 | 138 |
| 136 void enqueueChangeEvent(Document&, RequestType); | 139 void enqueueChangeEvent(Document&, RequestType); |
| 137 void enqueueErrorEvent(Element&, RequestType); | 140 void enqueueErrorEvent(Element&, RequestType); |
| 138 void eventQueueTimerFired(TimerBase*); | 141 void eventQueueTimerFired(TimerBase*); |
| 139 | 142 |
| 140 HeapVector<std::pair<Member<Element>, RequestType>> m_fullscreenElementStack; | 143 HeapVector<std::pair<Member<Element>, RequestType>> m_fullscreenElementStack; |
| 141 Member<Element> m_currentFullScreenElement; | 144 Member<Element> m_currentFullScreenElement; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 165 | 168 |
| 166 inline bool Fullscreen::isCurrentFullScreenElement(const Element& element) { | 169 inline bool Fullscreen::isCurrentFullScreenElement(const Element& element) { |
| 167 if (Fullscreen* found = fromIfExists(element.document())) | 170 if (Fullscreen* found = fromIfExists(element.document())) |
| 168 return found->currentFullScreenElement() == &element; | 171 return found->currentFullScreenElement() == &element; |
| 169 return false; | 172 return false; |
| 170 } | 173 } |
| 171 | 174 |
| 172 } // namespace blink | 175 } // namespace blink |
| 173 | 176 |
| 174 #endif // Fullscreen_h | 177 #endif // Fullscreen_h |
| OLD | NEW |