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 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv
ed. | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv
ed. |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
533 if (FullscreenElementStack* fullscreen = FullscreenElementStack::fromIfExist
s(&document())) | 533 if (FullscreenElementStack* fullscreen = FullscreenElementStack::fromIfExist
s(&document())) |
534 fullscreen->removeFullScreenElementOfSubtree(this, true); | 534 fullscreen->removeFullScreenElementOfSubtree(this, true); |
535 | 535 |
536 // Do any prep work needed before actually starting to detach | 536 // Do any prep work needed before actually starting to detach |
537 // and remove... e.g. stop loading frames, fire unload events. | 537 // and remove... e.g. stop loading frames, fire unload events. |
538 willRemoveChildren(*this); | 538 willRemoveChildren(*this); |
539 | 539 |
540 { | 540 { |
541 // Removing focus can cause frames to load, either via events (focusout,
blur) | 541 // Removing focus can cause frames to load, either via events (focusout,
blur) |
542 // or widget updates (e.g., for <embed>). | 542 // or widget updates (e.g., for <embed>). |
543 SubframeLoadingDisabler disabler(this); | 543 SubframeLoadingDisabler disabler(*this); |
544 | 544 |
545 // Exclude this node when looking for removed focusedElement since only | 545 // Exclude this node when looking for removed focusedElement since only |
546 // children will be removed. | 546 // children will be removed. |
547 // This must be later than willRemoveChildren, which might change focus | 547 // This must be later than willRemoveChildren, which might change focus |
548 // state of a child. | 548 // state of a child. |
549 document().removeFocusedElementOfSubtree(this, true); | 549 document().removeFocusedElementOfSubtree(this, true); |
550 | 550 |
551 // Removing a node from a selection can cause widget updates. | 551 // Removing a node from a selection can cause widget updates. |
552 document().nodeChildrenWillBeRemoved(this); | 552 document().nodeChildrenWillBeRemoved(this); |
553 } | 553 } |
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
991 return true; | 991 return true; |
992 | 992 |
993 if (node->isElementNode() && toElement(node)->shadow()) | 993 if (node->isElementNode() && toElement(node)->shadow()) |
994 return true; | 994 return true; |
995 | 995 |
996 return false; | 996 return false; |
997 } | 997 } |
998 #endif | 998 #endif |
999 | 999 |
1000 } // namespace WebCore | 1000 } // namespace WebCore |
OLD | NEW |