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

Unified Diff: Source/core/dom/Node.cpp

Issue 219993002: Avoid calling markAncestorsWithChildNeedsStyleRecalc() constantly in childrenChanged (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix accessibility test and causing recalcs on removal Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/dom/Document.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Node.cpp
diff --git a/Source/core/dom/Node.cpp b/Source/core/dom/Node.cpp
index d28bed59265c1962b76807d3f69840849f2a0dc2..e2e7961be52671ff16825819f91abf41a4b684f2 100644
--- a/Source/core/dom/Node.cpp
+++ b/Source/core/dom/Node.cpp
@@ -744,6 +744,9 @@ void Node::markAncestorsWithChildNeedsStyleRecalc()
for (ContainerNode* p = parentOrShadowHostNode(); p && !p->childNeedsStyleRecalc(); p = p->parentOrShadowHostNode())
p->setChildNeedsStyleRecalc();
+ if (document().hasPendingStyleRecalc())
ojan 2014/04/03 16:55:04 I think this needs a comment explaining why it's h
+ return;
+
if (document().needsStyleRecalc() || document().childNeedsStyleRecalc())
document().scheduleRenderTreeUpdate();
}
« no previous file with comments | « Source/core/dom/Document.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698