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

Unified Diff: third_party/WebKit/Source/core/dom/shadow/ShadowRoot.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/shadow/ShadowRoot.cpp
diff --git a/third_party/WebKit/Source/core/dom/shadow/ShadowRoot.cpp b/third_party/WebKit/Source/core/dom/shadow/ShadowRoot.cpp
index d83f657479a485ca74ebbbeae690c675c3dcf2c0..e50b914e789276241ef4e261d75216217f9904bb 100644
--- a/third_party/WebKit/Source/core/dom/shadow/ShadowRoot.cpp
+++ b/third_party/WebKit/Source/core/dom/shadow/ShadowRoot.cpp
@@ -134,6 +134,16 @@ void ShadowRoot::recalcStyle(StyleRecalcChange change) {
recalcDescendantStyles(change);
clearChildNeedsStyleRecalc();
+}
+
+void ShadowRoot::rebuildLayoutTree() {
+ DCHECK(!needsStyleRecalc());
+ DCHECK(!childNeedsStyleRecalc());
+ DCHECK(!needsReattachLayoutTree());
+ // ShadowRoot doesn't support custom callbacks.
+ DCHECK(!hasCustomStyleCallbacks());
+ clearNeedsReattachLayoutTree();
+ rebuildDescendantLayoutTree();
clearChildNeedsReattachLayoutTree();
}

Powered by Google App Engine
This is Rietveld 408576698