| 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 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 463 if (fullscreenElementFrom(*toLocalFrame(descendant)->document())) | 463 if (fullscreenElementFrom(*toLocalFrame(descendant)->document())) |
| 464 descendants.prepend(toLocalFrame(descendant)->document()); | 464 descendants.prepend(toLocalFrame(descendant)->document()); |
| 465 } | 465 } |
| 466 | 466 |
| 467 // 4. For each descendant in descendants, empty descendant's fullscreen | 467 // 4. For each descendant in descendants, empty descendant's fullscreen |
| 468 // element stack, and queue a task to fire an event named fullscreenchange | 468 // element stack, and queue a task to fire an event named fullscreenchange |
| 469 // with its bubbles attribute set to true on descendant. | 469 // with its bubbles attribute set to true on descendant. |
| 470 for (auto& descendant : descendants) { | 470 for (auto& descendant : descendants) { |
| 471 DCHECK(descendant); | 471 DCHECK(descendant); |
| 472 RequestType requestType = | 472 RequestType requestType = |
| 473 from(*descendant).m_fullscreenElementStack.last().second; | 473 from(*descendant).m_fullscreenElementStack.back().second; |
| 474 from(*descendant).clearFullscreenElementStack(); | 474 from(*descendant).clearFullscreenElementStack(); |
| 475 from(document).enqueueChangeEvent(*descendant, requestType); | 475 from(document).enqueueChangeEvent(*descendant, requestType); |
| 476 } | 476 } |
| 477 | 477 |
| 478 // 5. While doc is not null, run these substeps: | 478 // 5. While doc is not null, run these substeps: |
| 479 Element* newTop = nullptr; | 479 Element* newTop = nullptr; |
| 480 for (Document* currentDoc = &document; currentDoc;) { | 480 for (Document* currentDoc = &document; currentDoc;) { |
| 481 RequestType requestType = | 481 RequestType requestType = |
| 482 from(*currentDoc).m_fullscreenElementStack.last().second; | 482 from(*currentDoc).m_fullscreenElementStack.back().second; |
| 483 | 483 |
| 484 // 1. Pop the top element of doc's fullscreen element stack. | 484 // 1. Pop the top element of doc's fullscreen element stack. |
| 485 from(*currentDoc).popFullscreenElementStack(); | 485 from(*currentDoc).popFullscreenElementStack(); |
| 486 | 486 |
| 487 // If doc's fullscreen element stack is non-empty and the element now at | 487 // If doc's fullscreen element stack is non-empty and the element now at |
| 488 // the top is either not in a document or its node document is not doc, | 488 // the top is either not in a document or its node document is not doc, |
| 489 // repeat this substep. | 489 // repeat this substep. |
| 490 newTop = fullscreenElementFrom(*currentDoc); | 490 newTop = fullscreenElementFrom(*currentDoc); |
| 491 if (newTop && (!newTop->isConnected() || newTop->document() != currentDoc)) | 491 if (newTop && (!newTop->isConnected() || newTop->document() != currentDoc)) |
| 492 continue; | 492 continue; |
| (...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 762 | 762 |
| 763 DEFINE_TRACE(Fullscreen) { | 763 DEFINE_TRACE(Fullscreen) { |
| 764 visitor->trace(m_currentFullScreenElement); | 764 visitor->trace(m_currentFullScreenElement); |
| 765 visitor->trace(m_fullscreenElementStack); | 765 visitor->trace(m_fullscreenElementStack); |
| 766 visitor->trace(m_eventQueue); | 766 visitor->trace(m_eventQueue); |
| 767 Supplement<Document>::trace(visitor); | 767 Supplement<Document>::trace(visitor); |
| 768 ContextLifecycleObserver::trace(visitor); | 768 ContextLifecycleObserver::trace(visitor); |
| 769 } | 769 } |
| 770 | 770 |
| 771 } // namespace blink | 771 } // namespace blink |
| OLD | NEW |