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

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

Issue 2473743003: Call Element::rebuildLayoutTree from Document::updateStyle directly (Closed)
Patch Set: Created 4 years, 1 month 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 8983f821c4c68e0a9ee2ade29d6467b4f949a659..308d7258e8e3ede67bdf34079f177d693a81c09e 100644
--- a/third_party/WebKit/Source/core/dom/Node.cpp
+++ b/third_party/WebKit/Source/core/dom/Node.cpp
@@ -892,6 +892,8 @@ Node* Node::commonAncestor(const Node& other,
}
void Node::reattachLayoutTree(const AttachContext& context) {
+ DCHECK(!needsStyleRecalc());
+ DCHECK(!childNeedsStyleRecalc());
AttachContext reattachContext(context);
reattachContext.performingReattach = true;
@@ -910,6 +912,9 @@ void Node::attachLayoutTree(const AttachContext&) {
(layoutObject()->style() &&
(layoutObject()->parent() || layoutObject()->isLayoutView())));
+ // Only doing this to cater to the comment in
+ // Document::updateStyleAndLayoutTree() right above the call to
+ // Document::updateStyle().
clearNeedsStyleRecalc();
clearNeedsReattachLayoutTree();

Powered by Google App Engine
This is Rietveld 408576698