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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 RefPtr<ComputedStyle> m_savedPlaceholderComputedStyle; | 131 RefPtr<ComputedStyle> m_savedPlaceholderComputedStyle; |
132 | 132 |
133 // TODO(alexmos, dcheng): Currently, this assumes that if fullscreen was | 133 // TODO(alexmos, dcheng): Currently, this assumes that if fullscreen was |
134 // entered for an element in an out-of-process iframe, then it's not | 134 // entered for an element in an out-of-process iframe, then it's not |
135 // possible to re-enter fullscreen for a different element in this | 135 // possible to re-enter fullscreen for a different element in this |
136 // document, since that requires a user gesture, which can't be obtained | 136 // document, since that requires a user gesture, which can't be obtained |
137 // since nothing in this document is visible, and since user gestures can't | 137 // since nothing in this document is visible, and since user gestures can't |
138 // be forwarded across processes. However, the latter assumption could | 138 // be forwarded across processes. However, the latter assumption could |
139 // change if https://crbug.com/161068 is fixed so that cross-process | 139 // change if https://crbug.com/161068 is fixed so that cross-process |
140 // postMessage can carry user gestures. If that happens, this should be | 140 // postMessage can carry user gestures. If that happens, this should be |
141 // moved to be part of |m_fullScreenElementStack|. | 141 // moved to be part of |m_fullscreenElementStack|. |
142 bool m_forCrossProcessDescendant; | 142 bool m_forCrossProcessDescendant; |
143 }; | 143 }; |
144 | 144 |
145 inline Fullscreen* Fullscreen::fromIfExists(Document& document) | 145 inline Fullscreen* Fullscreen::fromIfExists(Document& document) |
146 { | 146 { |
147 if (!document.hasFullscreenSupplement()) | 147 if (!document.hasFullscreenSupplement()) |
148 return nullptr; | 148 return nullptr; |
149 return fromIfExistsSlow(document); | 149 return fromIfExistsSlow(document); |
150 } | 150 } |
151 | 151 |
152 inline bool Fullscreen::isCurrentFullScreenElement(const Element& element) | 152 inline bool Fullscreen::isCurrentFullScreenElement(const Element& element) |
153 { | 153 { |
154 if (Fullscreen* found = fromIfExists(element.document())) | 154 if (Fullscreen* found = fromIfExists(element.document())) |
155 return found->currentFullScreenElement() == &element; | 155 return found->currentFullScreenElement() == &element; |
156 return false; | 156 return false; |
157 } | 157 } |
158 | 158 |
159 } // namespace blink | 159 } // namespace blink |
160 | 160 |
161 #endif // Fullscreen_h | 161 #endif // Fullscreen_h |
OLD | NEW |