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 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
483 node = document()->documentElement(); | 483 node = document()->documentElement(); |
484 // The dispatchEvent below may have blown away our documentElement. | 484 // The dispatchEvent below may have blown away our documentElement. |
485 if (!node) | 485 if (!node) |
486 continue; | 486 continue; |
487 | 487 |
488 // If the element was removed from our tree, also message the documentEl
ement. Since we may | 488 // If the element was removed from our tree, also message the documentEl
ement. Since we may |
489 // have a document hierarchy, check that node isn't in another document. | 489 // have a document hierarchy, check that node isn't in another document. |
490 if (!document()->contains(node.get()) && !node->inDocument()) | 490 if (!document()->contains(node.get()) && !node->inDocument()) |
491 changeQueue.append(document()->documentElement()); | 491 changeQueue.append(document()->documentElement()); |
492 | 492 |
493 node->dispatchEvent(Event::create(eventNames().webkitfullscreenchangeEve
nt, true, false)); | 493 node->dispatchEvent(Event::createBubble(eventNames().webkitfullscreencha
ngeEvent)); |
494 } | 494 } |
495 | 495 |
496 while (!errorQueue.isEmpty()) { | 496 while (!errorQueue.isEmpty()) { |
497 RefPtr<Node> node = errorQueue.takeFirst(); | 497 RefPtr<Node> node = errorQueue.takeFirst(); |
498 if (!node) | 498 if (!node) |
499 node = document()->documentElement(); | 499 node = document()->documentElement(); |
500 // The dispatchEvent below may have blown away our documentElement. | 500 // The dispatchEvent below may have blown away our documentElement. |
501 if (!node) | 501 if (!node) |
502 continue; | 502 continue; |
503 | 503 |
504 // If the element was removed from our tree, also message the documentEl
ement. Since we may | 504 // If the element was removed from our tree, also message the documentEl
ement. Since we may |
505 // have a document hierarchy, check that node isn't in another document. | 505 // have a document hierarchy, check that node isn't in another document. |
506 if (!document()->contains(node.get()) && !node->inDocument()) | 506 if (!document()->contains(node.get()) && !node->inDocument()) |
507 errorQueue.append(document()->documentElement()); | 507 errorQueue.append(document()->documentElement()); |
508 | 508 |
509 node->dispatchEvent(Event::create(eventNames().webkitfullscreenerrorEven
t, true, false)); | 509 node->dispatchEvent(Event::createBubble(eventNames().webkitfullscreenerr
orEvent)); |
510 } | 510 } |
511 } | 511 } |
512 | 512 |
513 void FullscreenElementStack::fullScreenElementRemoved() | 513 void FullscreenElementStack::fullScreenElementRemoved() |
514 { | 514 { |
515 m_fullScreenElement->setContainsFullScreenElementOnAncestorsCrossingFrameBou
ndaries(false); | 515 m_fullScreenElement->setContainsFullScreenElementOnAncestorsCrossingFrameBou
ndaries(false); |
516 webkitCancelFullScreen(); | 516 webkitCancelFullScreen(); |
517 } | 517 } |
518 | 518 |
519 void FullscreenElementStack::removeFullScreenElementOfSubtree(Node* node, bool a
mongChildrenOnly) | 519 void FullscreenElementStack::removeFullScreenElementOfSubtree(Node* node, bool a
mongChildrenOnly) |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
559 if (!target) | 559 if (!target) |
560 target = fullscreen->webkitCurrentFullScreenElement(); | 560 target = fullscreen->webkitCurrentFullScreenElement(); |
561 } | 561 } |
562 | 562 |
563 if (!target) | 563 if (!target) |
564 target = doc; | 564 target = doc; |
565 m_fullScreenChangeEventTargetQueue.append(target); | 565 m_fullScreenChangeEventTargetQueue.append(target); |
566 } | 566 } |
567 | 567 |
568 } // namespace WebCore | 568 } // namespace WebCore |
OLD | NEW |