Commit a7f2c246 authored by Yoshifumi Inoue's avatar Yoshifumi Inoue Committed by Commit Bot

Limit extent of AttachContext in ContainerNode::RemoveBetween()

This patch changes extent of |AttachContext| to its lifetime for improving
code health.

Change-Id: I18b38b1a0e5f1299d8cdbf20c21608be1493a596
Reviewed-on: https://chromium-review.googlesource.com/996774Reviewed-by: default avatarRune Lillesveen <futhark@chromium.org>
Commit-Queue: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#548361}
parent 798c3cbb
......@@ -714,10 +714,11 @@ void ContainerNode::RemoveBetween(Node* previous_child,
DCHECK_EQ(old_child.parentNode(), this);
AttachContext context;
context.clear_invalidation = true;
if (!old_child.NeedsAttach())
if (!old_child.NeedsAttach()) {
AttachContext context;
context.clear_invalidation = true;
old_child.DetachLayoutTree(context);
}
if (next_child)
next_child->SetPreviousSibling(previous_child);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment