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

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

Issue 2375293002: Set NeedsReattachLayoutTree and ChildNeedsReattachLayoutTree flags on Node (Closed)
Patch Set: Add comment back Created 4 years, 3 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: third_party/WebKit/Source/core/dom/Node.cpp
diff --git a/third_party/WebKit/Source/core/dom/Node.cpp b/third_party/WebKit/Source/core/dom/Node.cpp
index cf0b32333f04e8690a92d6bdf98790d80c79184c..ef877ff0ab359e3f1364473c8d681fb350f0a670 100644
--- a/third_party/WebKit/Source/core/dom/Node.cpp
+++ b/third_party/WebKit/Source/core/dom/Node.cpp
@@ -692,9 +692,18 @@ void Node::markAncestorsWithChildNeedsStyleRecalc()
{
for (ContainerNode* p = parentOrShadowHostNode(); p && !p->childNeedsStyleRecalc(); p = p->parentOrShadowHostNode())
p->setChildNeedsStyleRecalc();
+ // TODO(nainar): Move this to Node::markAncestorsWithChildNeedsReattachLayoutTree()
document().scheduleLayoutTreeUpdateIfNeeded();
}
+void Node::markNodeAndAncestorsWithChildNeedsReattachLayoutTree()
Bugs Nash 2016/09/29 03:15:24 This name implies that you're marking the current
nainar 2016/09/29 04:05:15 Done.
+{
+ setNeedsReattachLayoutTree();
+ for (ContainerNode* p = parentOrShadowHostNode(); p && !p->childNeedsReattachLayoutTree(); p = p->parentOrShadowHostNode())
+ p->setChildNeedsReattachLayoutTree();
+}
+
+
void Node::setNeedsStyleRecalc(StyleChangeType changeType, const StyleChangeReasonForTracing& reason)
{
DCHECK(changeType != NoStyleChange);
« third_party/WebKit/Source/core/dom/Element.cpp ('K') | « third_party/WebKit/Source/core/dom/Node.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698