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 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 if (!currentDoc->isActive()) | 284 if (!currentDoc->isActive()) |
285 return; | 285 return; |
286 | 286 |
287 // 2. If doc's fullscreen element stack is empty, terminate these steps. | 287 // 2. If doc's fullscreen element stack is empty, terminate these steps. |
288 if (m_fullScreenElementStack.isEmpty()) | 288 if (m_fullScreenElementStack.isEmpty()) |
289 return; | 289 return; |
290 | 290 |
291 // 3. Let descendants be all the doc's descendant browsing context's documen
ts with a non-empty fullscreen | 291 // 3. Let descendants be all the doc's descendant browsing context's documen
ts with a non-empty fullscreen |
292 // element stack (if any), ordered so that the child of the doc is last and
the document furthest | 292 // element stack (if any), ordered so that the child of the doc is last and
the document furthest |
293 // away from the doc is first. | 293 // away from the doc is first. |
294 Deque<RefPtr<Document> > descendants; | 294 WillBeHeapDeque<RefPtrWillBeMember<Document> > descendants; |
295 for (LocalFrame* descendant = document()->frame() ? document()->frame()->tr
ee().traverseNext() : 0; descendant; descendant = descendant->tree().traverseNex
t()) { | 295 for (LocalFrame* descendant = document()->frame() ? document()->frame()->tr
ee().traverseNext() : 0; descendant; descendant = descendant->tree().traverseNex
t()) { |
296 ASSERT(descendant->document()); | 296 ASSERT(descendant->document()); |
297 if (fullscreenElementFrom(*descendant->document())) | 297 if (fullscreenElementFrom(*descendant->document())) |
298 descendants.prepend(descendant->document()); | 298 descendants.prepend(descendant->document()); |
299 } | 299 } |
300 | 300 |
301 // 4. For each descendant in descendants, empty descendant's fullscreen elem
ent stack, and queue a | 301 // 4. For each descendant in descendants, empty descendant's fullscreen elem
ent stack, and queue a |
302 // task to fire an event named fullscreenchange with its bubbles attribute s
et to true on descendant. | 302 // task to fire an event named fullscreenchange with its bubbles attribute s
et to true on descendant. |
303 for (Deque<RefPtr<Document> >::iterator i = descendants.begin(); i != descen
dants.end(); ++i) { | 303 for (WillBeHeapDeque<RefPtrWillBeMember<Document> >::iterator i = descendant
s.begin(); i != descendants.end(); ++i) { |
304 ASSERT(*i); | 304 ASSERT(*i); |
305 from(**i).clearFullscreenElementStack(); | 305 from(**i).clearFullscreenElementStack(); |
306 addDocumentToFullScreenChangeEventQueue(i->get()); | 306 addDocumentToFullScreenChangeEventQueue(i->get()); |
307 } | 307 } |
308 | 308 |
309 // 5. While doc is not null, run these substeps: | 309 // 5. While doc is not null, run these substeps: |
310 Element* newTop = 0; | 310 Element* newTop = 0; |
311 while (currentDoc) { | 311 while (currentDoc) { |
312 // 1. Pop the top element of doc's fullscreen element stack. | 312 // 1. Pop the top element of doc's fullscreen element stack. |
313 from(*currentDoc).popFullscreenElementStack(); | 313 from(*currentDoc).popFullscreenElementStack(); |
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
578 void FullscreenElementStack::trace(Visitor* visitor) | 578 void FullscreenElementStack::trace(Visitor* visitor) |
579 { | 579 { |
580 visitor->trace(m_fullScreenElement); | 580 visitor->trace(m_fullScreenElement); |
581 visitor->trace(m_fullScreenElementStack); | 581 visitor->trace(m_fullScreenElementStack); |
582 visitor->trace(m_fullScreenChangeEventTargetQueue); | 582 visitor->trace(m_fullScreenChangeEventTargetQueue); |
583 visitor->trace(m_fullScreenErrorEventTargetQueue); | 583 visitor->trace(m_fullScreenErrorEventTargetQueue); |
584 DocumentSupplement::trace(visitor); | 584 DocumentSupplement::trace(visitor); |
585 } | 585 } |
586 | 586 |
587 } // namespace WebCore | 587 } // namespace WebCore |
OLD | NEW |