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

Side by Side Diff: Source/core/dom/shadow/ShadowRoot.cpp

Issue 16629006: Revert 151996 "Avoid N^2 walk placing renderers when building th..." (Closed) Base URL: svn://svn.chromium.org/blink/
Patch Set: Update to head Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/Text.cpp ('k') | Source/core/html/HTMLInputElement.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Neither the name of Google Inc. nor the names of its 10 * * Neither the name of Google Inc. nor the names of its
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 141
142 // When we're set to lazyAttach we'll have a FullStyleChange and we'll need 142 // When we're set to lazyAttach we'll have a FullStyleChange and we'll need
143 // to promote the change to a Force for all our descendants so they get a 143 // to promote the change to a Force for all our descendants so they get a
144 // recalc and will attach. 144 // recalc and will attach.
145 if (styleChangeType() == FullStyleChange) 145 if (styleChangeType() == FullStyleChange)
146 change = Force; 146 change = Force;
147 147
148 StyleResolver* styleResolver = document()->styleResolver(); 148 StyleResolver* styleResolver = document()->styleResolver();
149 styleResolver->pushParentShadowRoot(this); 149 styleResolver->pushParentShadowRoot(this);
150 150
151 for (Node* child = lastChild(); child; child = child->previousSibling()) { 151 for (Node* child = firstChild(); child; child = child->nextSibling()) {
152 if (child->isElementNode()) 152 if (child->isElementNode())
153 toElement(child)->recalcStyle(change); 153 toElement(child)->recalcStyle(change);
154 else if (child->isTextNode()) 154 else if (child->isTextNode())
155 toText(child)->recalcTextStyle(change); 155 toText(child)->recalcTextStyle(change);
156 } 156 }
157 157
158 styleResolver->popParentShadowRoot(this); 158 styleResolver->popParentShadowRoot(this);
159 clearNeedsStyleRecalc(); 159 clearNeedsStyleRecalc();
160 clearChildNeedsStyleRecalc(); 160 clearChildNeedsStyleRecalc();
161 } 161 }
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 { 277 {
278 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::DOM); 278 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::DOM);
279 DocumentFragment::reportMemoryUsage(memoryObjectInfo); 279 DocumentFragment::reportMemoryUsage(memoryObjectInfo);
280 TreeScope::reportMemoryUsage(memoryObjectInfo); 280 TreeScope::reportMemoryUsage(memoryObjectInfo);
281 info.addMember(m_prev, "prev"); 281 info.addMember(m_prev, "prev");
282 info.addMember(m_next, "next"); 282 info.addMember(m_next, "next");
283 info.addMember(m_scopeDistribution, "scopeDistribution"); 283 info.addMember(m_scopeDistribution, "scopeDistribution");
284 } 284 }
285 285
286 } 286 }
OLDNEW
« no previous file with comments | « Source/core/dom/Text.cpp ('k') | Source/core/html/HTMLInputElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698