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

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

Issue 201443011: Fix markAncestorsWithChildNeedsStyleInvalidation to actually mark only ancestors. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Addressed comments from Ojan. 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/css/invalidation/StyleInvalidator.cpp ('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 59a60dc30368c59a007a4977c004225c0132f7e4..fd21496a66b511e2e28694d47baf1f617357b67b 100644
--- a/Source/core/dom/Node.cpp
+++ b/Source/core/dom/Node.cpp
@@ -648,8 +648,7 @@ void Node::setNeedsStyleInvalidation()
void Node::markAncestorsWithChildNeedsStyleInvalidation()
{
- Node* node = this;
- for (; node && !node->childNeedsStyleInvalidation(); node = node->parentOrShadowHostNode())
+ for (Node* node = parentOrShadowHostNode(); node && !node->childNeedsStyleInvalidation(); node = node->parentOrShadowHostNode())
node->setChildNeedsStyleInvalidation();
if (document().childNeedsStyleInvalidation())
document().scheduleStyleRecalc();
« no previous file with comments | « Source/core/css/invalidation/StyleInvalidator.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698