| 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 e7766f1517764202878d2c1e2b76fa3f60166f4a..8e41e6bf16a618b141ddd33d93780aedb1c69769 100644
|
| --- a/third_party/WebKit/Source/core/dom/Node.cpp
|
| +++ b/third_party/WebKit/Source/core/dom/Node.cpp
|
| @@ -697,6 +697,17 @@ void Node::markAncestorsWithChildNeedsStyleRecalc() {
|
| 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);
|
| @@ -888,6 +899,7 @@ void Node::attachLayoutTree(const AttachContext&) {
|
| (layoutObject()->parent() || layoutObject()->isLayoutView())));
|
|
|
| clearNeedsStyleRecalc();
|
| + clearNeedsReattachLayoutTree();
|
|
|
| if (AXObjectCache* cache = document().axObjectCache())
|
| cache->updateCacheAfterNodeIsAttached(this);
|
|
|