Chromium Code Reviews| 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
|
| } |