Chromium Code Reviews| 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 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 332 for (Frame* descendant = document()->frame() ? document()->frame()->tree().t raverseNext() : 0; descendant; descendant = descendant->tree().traverseNext()) { | 332 for (Frame* descendant = document()->frame() ? document()->frame()->tree().t raverseNext() : 0; descendant; descendant = descendant->tree().traverseNext()) { |
| 333 if (!descendant->isLocalFrame()) | 333 if (!descendant->isLocalFrame()) |
| 334 continue; | 334 continue; |
| 335 ASSERT(toLocalFrame(descendant)->document()); | 335 ASSERT(toLocalFrame(descendant)->document()); |
| 336 if (fullscreenElementFrom(*toLocalFrame(descendant)->document())) | 336 if (fullscreenElementFrom(*toLocalFrame(descendant)->document())) |
| 337 descendants.prepend(toLocalFrame(descendant)->document()); | 337 descendants.prepend(toLocalFrame(descendant)->document()); |
| 338 } | 338 } |
| 339 | 339 |
| 340 // 4. For each descendant in descendants, empty descendant's fullscreen elem ent stack, and queue a | 340 // 4. For each descendant in descendants, empty descendant's fullscreen elem ent stack, and queue a |
| 341 // task to fire an event named fullscreenchange with its bubbles attribute s et to true on descendant. | 341 // task to fire an event named fullscreenchange with its bubbles attribute s et to true on descendant. |
| 342 for (WillBeHeapDeque<RefPtrWillBeMember<Document> >::iterator i = descendant s.begin(); i != descendants.end(); ++i) { | 342 for (auto descendant : descendants) { |
|
dcheng
2014/12/16 19:52:51
Doesn't this end up ref and unref'ing everything i
| |
| 343 ASSERT(*i); | 343 ASSERT(descendant); |
| 344 RequestType requestType = from(**i).m_fullScreenElementStack.last().seco nd; | 344 RequestType requestType = from(*descendant).m_fullScreenElementStack.las t().second; |
| 345 from(**i).clearFullscreenElementStack(); | 345 from(*descendant).clearFullscreenElementStack(); |
| 346 enqueueChangeEvent(**i, requestType); | 346 enqueueChangeEvent(*descendant, requestType); |
| 347 } | 347 } |
| 348 | 348 |
| 349 // 5. While doc is not null, run these substeps: | 349 // 5. While doc is not null, run these substeps: |
| 350 Element* newTop = 0; | 350 Element* newTop = 0; |
| 351 while (currentDoc) { | 351 while (currentDoc) { |
| 352 RequestType requestType = from(*currentDoc).m_fullScreenElementStack.las t().second; | 352 RequestType requestType = from(*currentDoc).m_fullScreenElementStack.las t().second; |
| 353 | 353 |
| 354 // 1. Pop the top element of doc's fullscreen element stack. | 354 // 1. Pop the top element of doc's fullscreen element stack. |
| 355 from(*currentDoc).popFullscreenElementStack(); | 355 from(*currentDoc).popFullscreenElementStack(); |
| 356 | 356 |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 604 void Fullscreen::trace(Visitor* visitor) | 604 void Fullscreen::trace(Visitor* visitor) |
| 605 { | 605 { |
| 606 visitor->trace(m_fullScreenElement); | 606 visitor->trace(m_fullScreenElement); |
| 607 visitor->trace(m_fullScreenElementStack); | 607 visitor->trace(m_fullScreenElementStack); |
| 608 visitor->trace(m_fullScreenRenderer); | 608 visitor->trace(m_fullScreenRenderer); |
| 609 visitor->trace(m_eventQueue); | 609 visitor->trace(m_eventQueue); |
| 610 DocumentSupplement::trace(visitor); | 610 DocumentSupplement::trace(visitor); |
| 611 } | 611 } |
| 612 | 612 |
| 613 } // namespace blink | 613 } // namespace blink |
| OLD | NEW |