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..39de155eaae4ae3155481f3e6fbe117a2faa6c55 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(); |
+} |
+ |
+void ShadowRoot::rebuildLayoutTree() { |
+ DCHECK(!needsStyleRecalc()); |
+ // ShadowRoot doesn't support custom callbacks. |
+ DCHECK(!hasCustomStyleCallbacks()); |
+ |
+ clearNeedsReattachLayoutTree(); |
+ rebuildDescendantLayoutTrees(); |
clearChildNeedsReattachLayoutTree(); |
} |