Index: Source/core/dom/Node.cpp |
diff --git a/Source/core/dom/Node.cpp b/Source/core/dom/Node.cpp |
index 2c1dc4c1baf841dd990e8fe7c0838f2d70b72a92..a64525517455bd864871c2485a407edec4b20bec 100644 |
--- a/Source/core/dom/Node.cpp |
+++ b/Source/core/dom/Node.cpp |
@@ -646,6 +646,25 @@ void Node::setIsLink(bool isLink) |
setFlag(isLink && !SVGImage::isInSVGImage(toElement(this)), IsLinkFlag); |
} |
+void Node::markAncestorsWithChildNeedsInvalidation() |
+{ |
+ for (Node* node = this; node && !node->childNeedsDistributionRecalc(); node = node->parentOrShadowHostNode()) |
+ node->setChildNeedsInvalidation(); |
+ if (document().childNeedsInvalidation()) |
+ document().scheduleStyleRecalc(); |
+} |
+ |
+// get rid of this method! |
+void Node::setNeedsInvalidation() |
+{ |
+ markAncestorsWithChildNeedsInvalidation(); |
+} |
+ |
+bool Node::needsInvalidation() const |
+{ |
+ return false; |
+} |
+ |
void Node::markAncestorsWithChildNeedsDistributionRecalc() |
{ |
for (Node* node = this; node && !node->childNeedsDistributionRecalc(); node = node->parentOrShadowHostNode()) |