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 689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
700 NoEventDispatchAssertion assertNoEventDispatch; | 700 NoEventDispatchAssertion assertNoEventDispatch; |
701 | 701 |
702 Document& document = root.document(); | 702 Document& document = root.document(); |
703 for (Node* node = &root; node; node = NodeTraversal::next(*node, &root)) { | 703 for (Node* node = &root; node; node = NodeTraversal::next(*node, &root)) { |
704 // As an optimization we skip notifying Text nodes and other leaf nodes | 704 // As an optimization we skip notifying Text nodes and other leaf nodes |
705 // of removal when they're not in the Document tree since the virtual | 705 // of removal when they're not in the Document tree since the virtual |
706 // call to removedFrom is not needed. | 706 // call to removedFrom is not needed. |
707 if (!node->inDocument() && !node->isContainerNode()) | 707 if (!node->inDocument() && !node->isContainerNode()) |
708 continue; | 708 continue; |
709 if (document.cssTarget() == node) | 709 if (document.cssTarget() == node) |
710 document.setCSSTarget(0); | 710 document.setCSSTarget(nullptr); |
711 node->removedFrom(this); | 711 node->removedFrom(this); |
712 for (ShadowRoot* shadowRoot = node->youngestShadowRoot(); shadowRoot; sh
adowRoot = shadowRoot->olderShadowRoot()) | 712 for (ShadowRoot* shadowRoot = node->youngestShadowRoot(); shadowRoot; sh
adowRoot = shadowRoot->olderShadowRoot()) |
713 notifyNodeRemoved(*shadowRoot); | 713 notifyNodeRemoved(*shadowRoot); |
714 } | 714 } |
715 } | 715 } |
716 | 716 |
717 void ContainerNode::attach(const AttachContext& context) | 717 void ContainerNode::attach(const AttachContext& context) |
718 { | 718 { |
719 attachChildren(context); | 719 attachChildren(context); |
720 clearChildNeedsStyleRecalc(); | 720 clearChildNeedsStyleRecalc(); |
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1278 return true; | 1278 return true; |
1279 | 1279 |
1280 if (node->isElementNode() && toElement(node)->shadow()) | 1280 if (node->isElementNode() && toElement(node)->shadow()) |
1281 return true; | 1281 return true; |
1282 | 1282 |
1283 return false; | 1283 return false; |
1284 } | 1284 } |
1285 #endif | 1285 #endif |
1286 | 1286 |
1287 } // namespace WebCore | 1287 } // namespace WebCore |
OLD | NEW |