Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Side by Side Diff: third_party/WebKit/Source/core/dom/ContainerNode.cpp

Issue 2398293003: Move Layout Tree Construction code into Element::rebuildLayoutTree() (Closed)
Patch Set: made @esprehn's changes Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 749 matching lines...) Expand 10 before | Expand all | Expand 10 after
760 for (Node* child = firstChild(); child; child = child->nextSibling()) { 760 for (Node* child = firstChild(); child; child = child->nextSibling()) {
761 #if DCHECK_IS_ON() 761 #if DCHECK_IS_ON()
762 DCHECK(child->needsAttach() || 762 DCHECK(child->needsAttach() ||
763 childAttachedAllowedWhenAttachingChildren(this)); 763 childAttachedAllowedWhenAttachingChildren(this));
764 #endif 764 #endif
765 if (child->needsAttach()) 765 if (child->needsAttach())
766 child->attachLayoutTree(childrenContext); 766 child->attachLayoutTree(childrenContext);
767 } 767 }
768 768
769 clearChildNeedsStyleRecalc(); 769 clearChildNeedsStyleRecalc();
770 clearChildNeedsReattachLayoutTree();
770 Node::attachLayoutTree(context); 771 Node::attachLayoutTree(context);
771 } 772 }
772 773
773 void ContainerNode::detachLayoutTree(const AttachContext& context) { 774 void ContainerNode::detachLayoutTree(const AttachContext& context) {
774 AttachContext childrenContext(context); 775 AttachContext childrenContext(context);
775 childrenContext.resolvedStyle = nullptr; 776 childrenContext.resolvedStyle = nullptr;
776 childrenContext.clearInvalidation = true; 777 childrenContext.clearInvalidation = true;
777 778
778 for (Node* child = firstChild(); child; child = child->nextSibling()) 779 for (Node* child = firstChild(); child; child = child->nextSibling())
779 child->detachLayoutTree(childrenContext); 780 child->detachLayoutTree(childrenContext);
(...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after
1467 return true; 1468 return true;
1468 1469
1469 if (node->isElementNode() && toElement(node)->shadow()) 1470 if (node->isElementNode() && toElement(node)->shadow())
1470 return true; 1471 return true;
1471 1472
1472 return false; 1473 return false;
1473 } 1474 }
1474 #endif 1475 #endif
1475 1476
1476 } // namespace blink 1477 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/Document.cpp » ('j') | third_party/WebKit/Source/core/dom/Element.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698