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

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

Issue 2760233004: Make all setNeedsReattachLayoutTree happen from updateStyle. (Closed)
Patch Set: Corrected DCHECK condition Created 3 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 | « third_party/WebKit/Source/core/dom/Node.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 98b470d9c02d0c16392046c30aaf2d6c6344114c..ec0b25ec392d2827a53f4c1692c021a134f47735 100644
--- a/third_party/WebKit/Source/core/dom/Node.cpp
+++ b/third_party/WebKit/Source/core/dom/Node.cpp
@@ -725,6 +725,8 @@ void Node::markAncestorsWithChildNeedsReattachLayoutTree() {
}
void Node::setNeedsReattachLayoutTree() {
+ DCHECK(document().inStyleRecalc() &&
esprehn 2017/03/21 20:59:56 Can we use two DCHECKs so it's clear which side fa
rune 2017/03/21 22:25:15 Done.
+ !document().childNeedsDistributionRecalc());
setFlag(NeedsReattachLayoutTree);
markAncestorsWithChildNeedsReattachLayoutTree();
}
@@ -932,7 +934,6 @@ void Node::detachLayoutTree(const AttachContext& context) {
layoutObject()->destroyAndCleanupAnonymousWrappers();
setLayoutObject(nullptr);
setStyleChange(NeedsReattachStyleChange);
- setFlag(NeedsReattachLayoutTree);
clearChildNeedsStyleInvalidation();
}
« no previous file with comments | « 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