Chromium Code Reviews| Index: third_party/WebKit/Source/core/dom/Node.cpp |
| diff --git a/third_party/WebKit/Source/core/dom/Node.cpp b/third_party/WebKit/Source/core/dom/Node.cpp |
| index cf0b32333f04e8690a92d6bdf98790d80c79184c..9511baa4a1b4338d88f6edb3bdace454af6531fc 100644 |
| --- a/third_party/WebKit/Source/core/dom/Node.cpp |
| +++ b/third_party/WebKit/Source/core/dom/Node.cpp |
| @@ -692,9 +692,21 @@ void Node::markAncestorsWithChildNeedsStyleRecalc() |
| { |
| for (ContainerNode* p = parentOrShadowHostNode(); p && !p->childNeedsStyleRecalc(); p = p->parentOrShadowHostNode()) |
| p->setChildNeedsStyleRecalc(); |
| + // TODO(nainar): Move this to Node::markAncestorsWithChildNeedsReattachLayoutTree() |
|
esprehn
2016/09/29 04:32:47
Hmm, why do you want to move this?
|
| document().scheduleLayoutTreeUpdateIfNeeded(); |
| } |
| +void Node::markAncestorsWithChildNeedsReattachLayoutTree() |
| +{ |
| + for (ContainerNode* p = parentOrShadowHostNode(); p && !p->childNeedsReattachLayoutTree(); p = p->parentOrShadowHostNode()) |
| + p->setChildNeedsReattachLayoutTree(); |
| +} |
| +void Node::setNeedsReattachLayoutTree() |
| +{ |
| + setFlag(NeedsReattachLayoutTree); |
| + markAncestorsWithChildNeedsReattachLayoutTree(); |
| +} |
| + |
| void Node::setNeedsStyleRecalc(StyleChangeType changeType, const StyleChangeReasonForTracing& reason) |
| { |
| DCHECK(changeType != NoStyleChange); |