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

Unified Diff: third_party/WebKit/Source/core/dom/shadow/ShadowRoot.cpp

Issue 2473743003: Call Element::rebuildLayoutTree from Document::updateStyle directly (Closed)
Patch Set: Address esprehn's comments Created 4 years 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 fad2a8a0642d040e088ab104eaa8a8e0aeb3a67a..cbb2a96377c5f441800a611749e842eccb468bbe 100644
--- a/third_party/WebKit/Source/core/dom/shadow/ShadowRoot.cpp
+++ b/third_party/WebKit/Source/core/dom/shadow/ShadowRoot.cpp
@@ -129,10 +129,19 @@ void ShadowRoot::recalcStyle(StyleRecalcChange change) {
// There's no style to update so just calling recalcStyle means we're updated.
clearNeedsStyleRecalc();
- clearNeedsReattachLayoutTree();
recalcDescendantStyles(change);
clearChildNeedsStyleRecalc();
+ setNeedsReattachLayoutTree();
esprehn 2016/12/14 04:30:48 Hmm wait this doesn't seem right, why are you forc
nainar 2016/12/14 22:21:54 So in the following test case: <script> onload =
+}
+
+void ShadowRoot::rebuildLayoutTree() {
+ DCHECK(!needsStyleRecalc());
+ // ShadowRoot doesn't support custom callbacks.
+ DCHECK(!hasCustomStyleCallbacks());
+
+ clearNeedsReattachLayoutTree();
+ rebuildChildrenLayoutTrees();
clearChildNeedsReattachLayoutTree();
esprehn 2016/12/14 04:30:48 This bit is cleared inside rebuildChildrenLayoutTr
nainar 2016/12/14 22:21:54 ShadowRoot::rebuildLayoutTree() also gets called b
}

Powered by Google App Engine
This is Rietveld 408576698