| 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 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 508 // local frames in each process. | 508 // local frames in each process. |
| 509 Document& doc = topmostLocalAncestor(document); | 509 Document& doc = topmostLocalAncestor(document); |
| 510 | 510 |
| 511 // 2. If |doc|'s fullscreen element stack is empty, terminate these steps. | 511 // 2. If |doc|'s fullscreen element stack is empty, terminate these steps. |
| 512 if (!fullscreenElementFrom(doc)) | 512 if (!fullscreenElementFrom(doc)) |
| 513 return; | 513 return; |
| 514 | 514 |
| 515 // 3. Remove elements from |doc|'s fullscreen element stack until only the top | 515 // 3. Remove elements from |doc|'s fullscreen element stack until only the top |
| 516 // element is left. | 516 // element is left. |
| 517 size_t stackSize = from(doc).m_fullscreenElementStack.size(); | 517 size_t stackSize = from(doc).m_fullscreenElementStack.size(); |
| 518 from(doc).m_fullscreenElementStack.remove(0, stackSize - 1); | 518 from(doc).m_fullscreenElementStack.erase(0, stackSize - 1); |
| 519 DCHECK_EQ(from(doc).m_fullscreenElementStack.size(), 1u); | 519 DCHECK_EQ(from(doc).m_fullscreenElementStack.size(), 1u); |
| 520 | 520 |
| 521 // 4. Act as if the exitFullscreen() method was invoked on |doc|. | 521 // 4. Act as if the exitFullscreen() method was invoked on |doc|. |
| 522 exitFullscreen(doc); | 522 exitFullscreen(doc); |
| 523 } | 523 } |
| 524 | 524 |
| 525 // https://fullscreen.spec.whatwg.org/#exit-fullscreen | 525 // https://fullscreen.spec.whatwg.org/#exit-fullscreen |
| 526 void Fullscreen::exitFullscreen(Document& document) { | 526 void Fullscreen::exitFullscreen(Document& document) { |
| 527 // The exitFullscreen() method must run these steps: | 527 // The exitFullscreen() method must run these steps: |
| 528 | 528 |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 822 // stack, act as if the exitFullscreen() method was invoked on that document. | 822 // stack, act as if the exitFullscreen() method was invoked on that document. |
| 823 if (fullscreenElement() == &oldNode) { | 823 if (fullscreenElement() == &oldNode) { |
| 824 exitFullscreen(oldNode.document()); | 824 exitFullscreen(oldNode.document()); |
| 825 return; | 825 return; |
| 826 } | 826 } |
| 827 | 827 |
| 828 // 2. Otherwise, remove |oldNode| from its node document's fullscreen element | 828 // 2. Otherwise, remove |oldNode| from its node document's fullscreen element |
| 829 // stack. | 829 // stack. |
| 830 for (size_t i = 0; i < m_fullscreenElementStack.size(); ++i) { | 830 for (size_t i = 0; i < m_fullscreenElementStack.size(); ++i) { |
| 831 if (m_fullscreenElementStack[i].first.get() == &oldNode) { | 831 if (m_fullscreenElementStack[i].first.get() == &oldNode) { |
| 832 m_fullscreenElementStack.remove(i); | 832 m_fullscreenElementStack.erase(i); |
| 833 return; | 833 return; |
| 834 } | 834 } |
| 835 } | 835 } |
| 836 | 836 |
| 837 // NOTE: |oldNode| was not in the fullscreen element stack. | 837 // NOTE: |oldNode| was not in the fullscreen element stack. |
| 838 } | 838 } |
| 839 | 839 |
| 840 void Fullscreen::clearFullscreenElementStack() { | 840 void Fullscreen::clearFullscreenElementStack() { |
| 841 if (m_fullscreenElementStack.isEmpty()) | 841 if (m_fullscreenElementStack.isEmpty()) |
| 842 return; | 842 return; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 865 DEFINE_TRACE(Fullscreen) { | 865 DEFINE_TRACE(Fullscreen) { |
| 866 visitor->trace(m_pendingFullscreenElement); | 866 visitor->trace(m_pendingFullscreenElement); |
| 867 visitor->trace(m_fullscreenElementStack); | 867 visitor->trace(m_fullscreenElementStack); |
| 868 visitor->trace(m_currentFullScreenElement); | 868 visitor->trace(m_currentFullScreenElement); |
| 869 visitor->trace(m_eventQueue); | 869 visitor->trace(m_eventQueue); |
| 870 Supplement<Document>::trace(visitor); | 870 Supplement<Document>::trace(visitor); |
| 871 ContextLifecycleObserver::trace(visitor); | 871 ContextLifecycleObserver::trace(visitor); |
| 872 } | 872 } |
| 873 | 873 |
| 874 } // namespace blink | 874 } // namespace blink |
| OLD | NEW |