| 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, 2013 Apple Inc. All rights
reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2013 Apple Inc. All rights
reserved. |
| 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 724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 735 // of removal when they're not in the Document tree and not in a shadow
root since the virtual | 735 // of removal when they're not in the Document tree and not in a shadow
root since the virtual |
| 736 // call to removedFrom is not needed. | 736 // call to removedFrom is not needed. |
| 737 if (!node.isContainerNode() && !node.isInTreeScope()) | 737 if (!node.isContainerNode() && !node.isInTreeScope()) |
| 738 continue; | 738 continue; |
| 739 node.removedFrom(this); | 739 node.removedFrom(this); |
| 740 for (ShadowRoot* shadowRoot = node.youngestShadowRoot(); shadowRoot; sha
dowRoot = shadowRoot->olderShadowRoot()) | 740 for (ShadowRoot* shadowRoot = node.youngestShadowRoot(); shadowRoot; sha
dowRoot = shadowRoot->olderShadowRoot()) |
| 741 notifyNodeRemoved(*shadowRoot); | 741 notifyNodeRemoved(*shadowRoot); |
| 742 } | 742 } |
| 743 } | 743 } |
| 744 | 744 |
| 745 void ContainerNode::attach(const AttachContext& context) | 745 void ContainerNode::attachLayoutTree(const AttachContext& context) |
| 746 { | 746 { |
| 747 AttachContext childrenContext(context); | 747 AttachContext childrenContext(context); |
| 748 childrenContext.resolvedStyle = nullptr; | 748 childrenContext.resolvedStyle = nullptr; |
| 749 | 749 |
| 750 for (Node* child = firstChild(); child; child = child->nextSibling()) { | 750 for (Node* child = firstChild(); child; child = child->nextSibling()) { |
| 751 #if DCHECK_IS_ON() | 751 #if DCHECK_IS_ON() |
| 752 DCHECK(child->needsAttach() || childAttachedAllowedWhenAttachingChildren
(this)); | 752 DCHECK(child->needsAttach() || childAttachedAllowedWhenAttachingChildren
(this)); |
| 753 #endif | 753 #endif |
| 754 if (child->needsAttach()) | 754 if (child->needsAttach()) |
| 755 child->attach(childrenContext); | 755 child->attachLayoutTree(childrenContext); |
| 756 } | 756 } |
| 757 | 757 |
| 758 clearChildNeedsStyleRecalc(); | 758 clearChildNeedsStyleRecalc(); |
| 759 Node::attach(context); | 759 Node::attachLayoutTree(context); |
| 760 } | 760 } |
| 761 | 761 |
| 762 void ContainerNode::detach(const AttachContext& context) | 762 void ContainerNode::detach(const AttachContext& context) |
| 763 { | 763 { |
| 764 AttachContext childrenContext(context); | 764 AttachContext childrenContext(context); |
| 765 childrenContext.resolvedStyle = nullptr; | 765 childrenContext.resolvedStyle = nullptr; |
| 766 childrenContext.clearInvalidation = true; | 766 childrenContext.clearInvalidation = true; |
| 767 | 767 |
| 768 for (Node* child = firstChild(); child; child = child->nextSibling()) | 768 for (Node* child = firstChild(); child; child = child->nextSibling()) |
| 769 child->detach(childrenContext); | 769 child->detach(childrenContext); |
| (...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1404 return true; | 1404 return true; |
| 1405 | 1405 |
| 1406 if (node->isElementNode() && toElement(node)->shadow()) | 1406 if (node->isElementNode() && toElement(node)->shadow()) |
| 1407 return true; | 1407 return true; |
| 1408 | 1408 |
| 1409 return false; | 1409 return false; |
| 1410 } | 1410 } |
| 1411 #endif | 1411 #endif |
| 1412 | 1412 |
| 1413 } // namespace blink | 1413 } // namespace blink |
| OLD | NEW |