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 23 matching lines...) Expand all Loading... |
34 #include "platform/Supplementable.h" | 34 #include "platform/Supplementable.h" |
35 #include "platform/Timer.h" | 35 #include "platform/Timer.h" |
36 #include "platform/geometry/LayoutRect.h" | 36 #include "platform/geometry/LayoutRect.h" |
37 #include "wtf/Deque.h" | 37 #include "wtf/Deque.h" |
38 #include "wtf/RefPtr.h" | 38 #include "wtf/RefPtr.h" |
39 #include "wtf/Vector.h" | 39 #include "wtf/Vector.h" |
40 | 40 |
41 namespace blink { | 41 namespace blink { |
42 | 42 |
43 class LayoutFullScreen; | 43 class LayoutFullScreen; |
44 class LayoutStyle; | 44 class ComputedStyle; |
45 | 45 |
46 class Fullscreen final | 46 class Fullscreen final |
47 : public NoBaseWillBeGarbageCollectedFinalized<Fullscreen> | 47 : public NoBaseWillBeGarbageCollectedFinalized<Fullscreen> |
48 , public DocumentSupplement | 48 , public DocumentSupplement |
49 , public DocumentLifecycleObserver { | 49 , public DocumentLifecycleObserver { |
50 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(Fullscreen); | 50 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(Fullscreen); |
51 public: | 51 public: |
52 virtual ~Fullscreen(); | 52 virtual ~Fullscreen(); |
53 static const char* supplementName(); | 53 static const char* supplementName(); |
54 static Fullscreen& from(Document&); | 54 static Fullscreen& from(Document&); |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 void enqueueChangeEvent(Document&, RequestType); | 104 void enqueueChangeEvent(Document&, RequestType); |
105 void enqueueErrorEvent(Element&, RequestType); | 105 void enqueueErrorEvent(Element&, RequestType); |
106 void eventQueueTimerFired(Timer<Fullscreen>*); | 106 void eventQueueTimerFired(Timer<Fullscreen>*); |
107 | 107 |
108 RefPtrWillBeMember<Element> m_fullScreenElement; | 108 RefPtrWillBeMember<Element> m_fullScreenElement; |
109 WillBeHeapVector<std::pair<RefPtrWillBeMember<Element>, RequestType>> m_full
ScreenElementStack; | 109 WillBeHeapVector<std::pair<RefPtrWillBeMember<Element>, RequestType>> m_full
ScreenElementStack; |
110 LayoutFullScreen* m_fullScreenRenderer; | 110 LayoutFullScreen* m_fullScreenRenderer; |
111 Timer<Fullscreen> m_eventQueueTimer; | 111 Timer<Fullscreen> m_eventQueueTimer; |
112 WillBeHeapDeque<RefPtrWillBeMember<Event>> m_eventQueue; | 112 WillBeHeapDeque<RefPtrWillBeMember<Event>> m_eventQueue; |
113 LayoutRect m_savedPlaceholderFrameRect; | 113 LayoutRect m_savedPlaceholderFrameRect; |
114 RefPtr<LayoutStyle> m_savedPlaceholderLayoutStyle; | 114 RefPtr<ComputedStyle> m_savedPlaceholderComputedStyle; |
115 }; | 115 }; |
116 | 116 |
117 inline bool Fullscreen::isActiveFullScreenElement(const Element& element) | 117 inline bool Fullscreen::isActiveFullScreenElement(const Element& element) |
118 { | 118 { |
119 Fullscreen* fullscreen = fromIfExists(element.document()); | 119 Fullscreen* fullscreen = fromIfExists(element.document()); |
120 if (!fullscreen) | 120 if (!fullscreen) |
121 return false; | 121 return false; |
122 return fullscreen->webkitCurrentFullScreenElement() == &element; | 122 return fullscreen->webkitCurrentFullScreenElement() == &element; |
123 } | 123 } |
124 | 124 |
125 inline Fullscreen* Fullscreen::fromIfExists(Document& document) | 125 inline Fullscreen* Fullscreen::fromIfExists(Document& document) |
126 { | 126 { |
127 if (!document.hasFullscreenSupplement()) | 127 if (!document.hasFullscreenSupplement()) |
128 return 0; | 128 return 0; |
129 return fromIfExistsSlow(document); | 129 return fromIfExistsSlow(document); |
130 } | 130 } |
131 | 131 |
132 } // namespace blink | 132 } // namespace blink |
133 | 133 |
134 #endif // Fullscreen_h | 134 #endif // Fullscreen_h |
OLD | NEW |