| 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 | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2013 Apple Inc. All rights |
| 6 * reserved. | 6 * reserved. |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 770 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 781 | 781 |
| 782 void ContainerNode::detachLayoutTree(const AttachContext& context) { | 782 void ContainerNode::detachLayoutTree(const AttachContext& context) { |
| 783 AttachContext childrenContext(context); | 783 AttachContext childrenContext(context); |
| 784 childrenContext.resolvedStyle = nullptr; | 784 childrenContext.resolvedStyle = nullptr; |
| 785 childrenContext.clearInvalidation = true; | 785 childrenContext.clearInvalidation = true; |
| 786 | 786 |
| 787 for (Node* child = firstChild(); child; child = child->nextSibling()) | 787 for (Node* child = firstChild(); child; child = child->nextSibling()) |
| 788 child->detachLayoutTree(childrenContext); | 788 child->detachLayoutTree(childrenContext); |
| 789 | 789 |
| 790 setChildNeedsStyleRecalc(); | 790 setChildNeedsStyleRecalc(); |
| 791 setChildNeedsReattachLayoutTree(); | |
| 792 Node::detachLayoutTree(context); | 791 Node::detachLayoutTree(context); |
| 793 } | 792 } |
| 794 | 793 |
| 795 void ContainerNode::childrenChanged(const ChildrenChange& change) { | 794 void ContainerNode::childrenChanged(const ChildrenChange& change) { |
| 796 document().incDOMTreeVersion(); | 795 document().incDOMTreeVersion(); |
| 797 document().notifyChangeChildren(*this); | 796 document().notifyChangeChildren(*this); |
| 798 invalidateNodeListCachesInAncestors(); | 797 invalidateNodeListCachesInAncestors(); |
| 799 if (change.isChildInsertion()) { | 798 if (change.isChildInsertion()) { |
| 800 if (!childNeedsStyleRecalc()) { | 799 if (!childNeedsStyleRecalc()) { |
| 801 setChildNeedsStyleRecalc(); | 800 setChildNeedsStyleRecalc(); |
| 802 markAncestorsWithChildNeedsStyleRecalc(); | 801 markAncestorsWithChildNeedsStyleRecalc(); |
| 803 } | 802 } |
| 804 if (!childNeedsReattachLayoutTree()) { | |
| 805 setChildNeedsReattachLayoutTree(); | |
| 806 markAncestorsWithChildNeedsReattachLayoutTree(); | |
| 807 } | |
| 808 } | 803 } |
| 809 } | 804 } |
| 810 | 805 |
| 811 void ContainerNode::cloneChildNodes(ContainerNode* clone) { | 806 void ContainerNode::cloneChildNodes(ContainerNode* clone) { |
| 812 DummyExceptionStateForTesting exceptionState; | 807 DummyExceptionStateForTesting exceptionState; |
| 813 for (Node* n = firstChild(); n && !exceptionState.hadException(); | 808 for (Node* n = firstChild(); n && !exceptionState.hadException(); |
| 814 n = n->nextSibling()) | 809 n = n->nextSibling()) |
| 815 clone->appendChild(n->cloneNode(true), exceptionState); | 810 clone->appendChild(n->cloneNode(true), exceptionState); |
| 816 } | 811 } |
| 817 | 812 |
| (...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1506 return true; | 1501 return true; |
| 1507 | 1502 |
| 1508 if (node->isElementNode() && toElement(node)->shadow()) | 1503 if (node->isElementNode() && toElement(node)->shadow()) |
| 1509 return true; | 1504 return true; |
| 1510 | 1505 |
| 1511 return false; | 1506 return false; |
| 1512 } | 1507 } |
| 1513 #endif | 1508 #endif |
| 1514 | 1509 |
| 1515 } // namespace blink | 1510 } // namespace blink |
| OLD | NEW |