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

Unified Diff: Source/core/dom/ContainerNode.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
Index: Source/core/dom/ContainerNode.cpp
diff --git a/Source/core/dom/ContainerNode.cpp b/Source/core/dom/ContainerNode.cpp
index 61844795578ee623285e05ca14805c17cc34d2cf..69cc8be79b8865dc4639b3a96b13c38bbd0039fe 100644
--- a/Source/core/dom/ContainerNode.cpp
+++ b/Source/core/dom/ContainerNode.cpp
@@ -654,7 +654,7 @@ void ContainerNode::childrenChanged(bool changedByParser, Node*, Node*, int chil
if (!changedByParser && childCountDelta)
document().updateRangesAfterChildrenChanged(this);
invalidateNodeListCachesInAncestors();
- if (childCountDelta > 0 && inActiveDocument()) {
+ if (childCountDelta > 0 && !childNeedsStyleRecalc()) {
setChildNeedsStyleRecalc();
markAncestorsWithChildNeedsStyleRecalc();
}

Powered by Google App Engine
This is Rietveld 408576698