| 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 a22173fd57d4a64eb69c6c2349f24d5ca289a1a9..40a09a43e28784060dc5dcbc07c8deba9b4b3c98 100644
|
| --- a/third_party/WebKit/Source/core/dom/Node.cpp
|
| +++ b/third_party/WebKit/Source/core/dom/Node.cpp
|
| @@ -692,9 +692,20 @@ void Node::markAncestorsWithChildNeedsStyleRecalc() {
|
| for (ContainerNode* p = parentOrShadowHostNode();
|
| p && !p->childNeedsStyleRecalc(); p = p->parentOrShadowHostNode())
|
| p->setChildNeedsStyleRecalc();
|
| + // TODO(nainar): Move this to Node::markAncestorsWithChildNeedsReattachLayoutTree()
|
| 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);
|
| @@ -886,6 +897,7 @@ void Node::attachLayoutTree(const AttachContext&) {
|
| (layoutObject()->parent() || layoutObject()->isLayoutView())));
|
|
|
| clearNeedsStyleRecalc();
|
| + clearNeedsReattachLayoutTree();
|
|
|
| if (AXObjectCache* cache = document().axObjectCache())
|
| cache->updateCacheAfterNodeIsAttached(this);
|
|
|