| 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 static void fullyExitFullscreen(Document&); | 81 static void fullyExitFullscreen(Document&); |
| 82 static void exitFullscreen(Document&); | 82 static void exitFullscreen(Document&); |
| 83 | 83 |
| 84 static bool fullscreenEnabled(Document&); | 84 static bool fullscreenEnabled(Document&); |
| 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.last().first.get() | 91 ? m_fullscreenElementStack.back().first.get() |
| 92 : nullptr; | 92 : nullptr; |
| 93 } | 93 } |
| 94 | 94 |
| 95 void didEnterFullscreenForElement(Element*); | 95 void didEnterFullscreenForElement(Element*); |
| 96 void didExitFullscreen(); | 96 void didExitFullscreen(); |
| 97 | 97 |
| 98 void setFullScreenLayoutObject(LayoutFullScreen*); | 98 void setFullScreenLayoutObject(LayoutFullScreen*); |
| 99 LayoutFullScreen* fullScreenLayoutObject() const { | 99 LayoutFullScreen* fullScreenLayoutObject() const { |
| 100 return m_fullScreenLayoutObject; | 100 return m_fullScreenLayoutObject; |
| 101 } | 101 } |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 | 165 |
| 166 inline bool Fullscreen::isCurrentFullScreenElement(const Element& element) { | 166 inline bool Fullscreen::isCurrentFullScreenElement(const Element& element) { |
| 167 if (Fullscreen* found = fromIfExists(element.document())) | 167 if (Fullscreen* found = fromIfExists(element.document())) |
| 168 return found->currentFullScreenElement() == &element; | 168 return found->currentFullScreenElement() == &element; |
| 169 return false; | 169 return false; |
| 170 } | 170 } |
| 171 | 171 |
| 172 } // namespace blink | 172 } // namespace blink |
| 173 | 173 |
| 174 #endif // Fullscreen_h | 174 #endif // Fullscreen_h |
| OLD | NEW |