Commit 98bab02d authored by Rune Lillesveen's avatar Rune Lillesveen Committed by Commit Bot

ClearChildNeedsReattachLayoutTree after pseudo elements done.

Instead of doing this call inside RebuildChildrenLayoutTrees, wait until
we have finished all pseudo element children as well. This is done in
preparation for ::first-letter update changes and split out from [1].

The other call-site for RebuildChildrenLayoutTrees,
ShadowRoot::RebuildLayoutTree, already cleared this flag afterwards.

[1] https://chromium-review.googlesource.com/c/chromium/src/+/1155591

Bug: 847218
Change-Id: I72816c5249bcb863fab906ffef90c026619d8165
Reviewed-on: https://chromium-review.googlesource.com/1156387Reviewed-by: default avatarAnders Ruud <andruud@chromium.org>
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#579806}
parent 481c3593
......@@ -1445,7 +1445,6 @@ void ContainerNode::RebuildChildrenLayoutTrees(
// This is done in ContainerNode::AttachLayoutTree but will never be cleared
// if we don't enter ContainerNode::AttachLayoutTree so we do it here.
ClearChildNeedsStyleRecalc();
ClearChildNeedsReattachLayoutTree();
}
void ContainerNode::CheckForSiblingStyleChanges(SiblingCheckType change_type,
......
......@@ -2524,6 +2524,7 @@ void Element::RebuildLayoutTree(WhitespaceAttacher& whitespace_attacher) {
RebuildPseudoElementLayoutTree(kPseudoIdBefore, *child_attacher);
RebuildPseudoElementLayoutTree(kPseudoIdBackdrop, *child_attacher);
RebuildPseudoElementLayoutTree(kPseudoIdFirstLetter, *child_attacher);
ClearChildNeedsReattachLayoutTree();
}
DCHECK(!NeedsStyleRecalc());
DCHECK(!ChildNeedsStyleRecalc());
......
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