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(); |
} |