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

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

Issue 2760233004: Make all setNeedsReattachLayoutTree happen from updateStyle. (Closed)
Patch Set: Included https://codereview.chromium.org/2760953003/ 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/ContainerNode.cpp ('k') | third_party/WebKit/Source/core/dom/Node.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/Element.cpp
diff --git a/third_party/WebKit/Source/core/dom/Element.cpp b/third_party/WebKit/Source/core/dom/Element.cpp
index 8043437642a66ddd4e39c358b0e55fdb7fd1a707..d3cf4d9f7d1cca40f54beb94dbedf1c92e07ceb0 100644
--- a/third_party/WebKit/Source/core/dom/Element.cpp
+++ b/third_party/WebKit/Source/core/dom/Element.cpp
@@ -1882,8 +1882,13 @@ void Element::recalcStyle(StyleRecalcChange change) {
elementAnimations->setAnimationStyleChange(false);
}
}
- if (parentComputedStyle())
+ if (parentComputedStyle()) {
change = recalcOwnStyle(change);
+ } else if (needsAttach()) {
+ setNeedsReattachLayoutTree();
+ change = Reattach;
+ }
+
// Needed because the rebuildLayoutTree code needs to see what the
// styleChangeType() was on reattach roots. See Node::reattachLayoutTree()
// for an example.
« no previous file with comments | « third_party/WebKit/Source/core/dom/ContainerNode.cpp ('k') | third_party/WebKit/Source/core/dom/Node.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698