Commit c589cd8c authored by Rune Lillesveen's avatar Rune Lillesveen Committed by Commit Bot

[Squad] Recalculate style separately for AttachContext tests.

We relied on LayoutTreeBuilderForElement to compute style through
StyleForLayoutObject for these tests. Compute style in style recalc pass
as we would do in production.

Bug: 843520
Change-Id: Ib03317c479f06f3aecad668a8bdba0924fa5b8f5
Reviewed-on: https://chromium-review.googlesource.com/1065683Reviewed-by: default avatarChris Harrelson <chrishtr@chromium.org>
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#560364}
parent 47b09409
......@@ -40,7 +40,9 @@ class NodeTest : public EditingTestBase {
}
LayoutObject* ReattachLayoutTreeForNode(Node& node) {
node.LazyReattachIfAttached();
GetDocument().Lifecycle().AdvanceTo(DocumentLifecycle::kInStyleRecalc);
GetDocument().documentElement()->RecalcStyle(kNoChange);
PushSelectorFilterAncestors(
GetDocument().EnsureStyleResolver().GetSelectorFilter(), node);
Node::AttachContext context;
......
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