| 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 27 matching lines...) Expand all Loading... |
| 38 #include "wtf/Deque.h" | 38 #include "wtf/Deque.h" |
| 39 #include "wtf/RefPtr.h" | 39 #include "wtf/RefPtr.h" |
| 40 #include "wtf/Vector.h" | 40 #include "wtf/Vector.h" |
| 41 | 41 |
| 42 namespace blink { | 42 namespace blink { |
| 43 | 43 |
| 44 class LayoutFullScreen; | 44 class LayoutFullScreen; |
| 45 class ComputedStyle; | 45 class ComputedStyle; |
| 46 | 46 |
| 47 class CORE_EXPORT Fullscreen final | 47 class CORE_EXPORT Fullscreen final |
| 48 : public NoBaseWillBeGarbageCollectedFinalized<Fullscreen> | 48 : public GarbageCollectedFinalized<Fullscreen> |
| 49 , public WillBeHeapSupplement<Document> | 49 , public HeapSupplement<Document> |
| 50 , public DocumentLifecycleObserver { | 50 , public DocumentLifecycleObserver { |
| 51 USING_FAST_MALLOC_WILL_BE_REMOVED(Fullscreen); | 51 USING_GARBAGE_COLLECTED_MIXIN(Fullscreen); |
| 52 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(Fullscreen); | |
| 53 public: | 52 public: |
| 54 virtual ~Fullscreen(); | 53 virtual ~Fullscreen(); |
| 55 static const char* supplementName(); | 54 static const char* supplementName(); |
| 56 static Fullscreen& from(Document&); | 55 static Fullscreen& from(Document&); |
| 57 static Fullscreen* fromIfExists(Document&); | 56 static Fullscreen* fromIfExists(Document&); |
| 58 static Element* fullscreenElementFrom(Document&); | 57 static Element* fullscreenElementFrom(Document&); |
| 59 static Element* currentFullScreenElementFrom(Document&); | 58 static Element* currentFullScreenElementFrom(Document&); |
| 60 static bool isFullScreen(Document&); | 59 static bool isFullScreen(Document&); |
| 61 static bool isActiveFullScreenElement(const Element&); | 60 static bool isActiveFullScreenElement(const Element&); |
| 62 | 61 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 Document* document(); | 101 Document* document(); |
| 103 | 102 |
| 104 void clearFullscreenElementStack(); | 103 void clearFullscreenElementStack(); |
| 105 void popFullscreenElementStack(); | 104 void popFullscreenElementStack(); |
| 106 void pushFullscreenElementStack(Element&, RequestType); | 105 void pushFullscreenElementStack(Element&, RequestType); |
| 107 | 106 |
| 108 void enqueueChangeEvent(Document&, RequestType); | 107 void enqueueChangeEvent(Document&, RequestType); |
| 109 void enqueueErrorEvent(Element&, RequestType); | 108 void enqueueErrorEvent(Element&, RequestType); |
| 110 void eventQueueTimerFired(Timer<Fullscreen>*); | 109 void eventQueueTimerFired(Timer<Fullscreen>*); |
| 111 | 110 |
| 112 RefPtrWillBeMember<Element> m_fullScreenElement; | 111 Member<Element> m_fullScreenElement; |
| 113 WillBeHeapVector<std::pair<RefPtrWillBeMember<Element>, RequestType>> m_full
ScreenElementStack; | 112 HeapVector<std::pair<Member<Element>, RequestType>> m_fullScreenElementStack
; |
| 114 LayoutFullScreen* m_fullScreenLayoutObject; | 113 LayoutFullScreen* m_fullScreenLayoutObject; |
| 115 Timer<Fullscreen> m_eventQueueTimer; | 114 Timer<Fullscreen> m_eventQueueTimer; |
| 116 WillBeHeapDeque<RefPtrWillBeMember<Event>> m_eventQueue; | 115 HeapDeque<Member<Event>> m_eventQueue; |
| 117 LayoutRect m_savedPlaceholderFrameRect; | 116 LayoutRect m_savedPlaceholderFrameRect; |
| 118 RefPtr<ComputedStyle> m_savedPlaceholderComputedStyle; | 117 RefPtr<ComputedStyle> m_savedPlaceholderComputedStyle; |
| 119 }; | 118 }; |
| 120 | 119 |
| 121 inline bool Fullscreen::isActiveFullScreenElement(const Element& element) | 120 inline bool Fullscreen::isActiveFullScreenElement(const Element& element) |
| 122 { | 121 { |
| 123 Fullscreen* fullscreen = fromIfExists(element.document()); | 122 Fullscreen* fullscreen = fromIfExists(element.document()); |
| 124 if (!fullscreen) | 123 if (!fullscreen) |
| 125 return false; | 124 return false; |
| 126 return fullscreen->webkitCurrentFullScreenElement() == &element; | 125 return fullscreen->webkitCurrentFullScreenElement() == &element; |
| 127 } | 126 } |
| 128 | 127 |
| 129 inline Fullscreen* Fullscreen::fromIfExists(Document& document) | 128 inline Fullscreen* Fullscreen::fromIfExists(Document& document) |
| 130 { | 129 { |
| 131 if (!document.hasFullscreenSupplement()) | 130 if (!document.hasFullscreenSupplement()) |
| 132 return 0; | 131 return 0; |
| 133 return fromIfExistsSlow(document); | 132 return fromIfExistsSlow(document); |
| 134 } | 133 } |
| 135 | 134 |
| 136 } // namespace blink | 135 } // namespace blink |
| 137 | 136 |
| 138 #endif // Fullscreen_h | 137 #endif // Fullscreen_h |
| OLD | NEW |