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 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
507 m_eventQueue.append(createEvent(EventTypeNames::webkitfullscreenerror, eleme
nt)); | 507 m_eventQueue.append(createEvent(EventTypeNames::webkitfullscreenerror, eleme
nt)); |
508 m_eventQueueTimer.startOneShot(0, FROM_HERE); | 508 m_eventQueueTimer.startOneShot(0, FROM_HERE); |
509 } | 509 } |
510 | 510 |
511 void FullscreenElementStack::eventQueueTimerFired(Timer<FullscreenElementStack>*
) | 511 void FullscreenElementStack::eventQueueTimerFired(Timer<FullscreenElementStack>*
) |
512 { | 512 { |
513 // Since we dispatch events in this function, it's possible that the | 513 // Since we dispatch events in this function, it's possible that the |
514 // document will be detached and GC'd. We protect it here to make sure we | 514 // document will be detached and GC'd. We protect it here to make sure we |
515 // can finish the function successfully. | 515 // can finish the function successfully. |
516 RefPtrWillBeRawPtr<Document> protectDocument(document()); | 516 RefPtrWillBeRawPtr<Document> protectDocument(document()); |
517 WillBeHeapDeque<RefPtrWillBeRawPtr<Event> > eventQueue; | 517 WillBeHeapDeque<RefPtrWillBeMember<Event> > eventQueue; |
518 m_eventQueue.swap(eventQueue); | 518 m_eventQueue.swap(eventQueue); |
519 | 519 |
520 while (!eventQueue.isEmpty()) { | 520 while (!eventQueue.isEmpty()) { |
521 RefPtrWillBeRawPtr<Event> event = eventQueue.takeFirst(); | 521 RefPtrWillBeRawPtr<Event> event = eventQueue.takeFirst(); |
522 Node* target = event->target()->toNode(); | 522 Node* target = event->target()->toNode(); |
523 | 523 |
524 // If the element was removed from our tree, also message the documentEl
ement. | 524 // If the element was removed from our tree, also message the documentEl
ement. |
525 if (!target->inDocument() && document()->documentElement()) | 525 if (!target->inDocument() && document()->documentElement()) |
526 eventQueue.append(createEvent(event->type(), *document()->documentEl
ement())); | 526 eventQueue.append(createEvent(event->type(), *document()->documentEl
ement())); |
527 | 527 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
574 | 574 |
575 void FullscreenElementStack::trace(Visitor* visitor) | 575 void FullscreenElementStack::trace(Visitor* visitor) |
576 { | 576 { |
577 visitor->trace(m_fullScreenElement); | 577 visitor->trace(m_fullScreenElement); |
578 visitor->trace(m_fullScreenElementStack); | 578 visitor->trace(m_fullScreenElementStack); |
579 visitor->trace(m_eventQueue); | 579 visitor->trace(m_eventQueue); |
580 DocumentSupplement::trace(visitor); | 580 DocumentSupplement::trace(visitor); |
581 } | 581 } |
582 | 582 |
583 } // namespace WebCore | 583 } // namespace WebCore |
OLD | NEW |