Commit 06df759d authored by Rune Lillesveen's avatar Rune Lillesveen Committed by Commit Bot

Use GetStyleRecalcParent for recalc root ancestors.

This ParentOrShadowHostNode() -> GetStyleRecalcParent() change was
missing in [1]. Caused many test failures with FlatTreeStyleRecalc
enabled.

[1] https://crrevs.com/d7eefe3ee4e1b35b57faf3060bed03ca2b1f73c3

Bug: 972752
Change-Id: Ife9858e7ab36f6dfbca0a423ffef953fedd6ffba
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1841452Reviewed-by: default avatarMorten Stenshorne <mstensho@chromium.org>
Commit-Queue: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#703286}
parent 1e1b9272
...@@ -1746,8 +1746,8 @@ void StyleEngine::RecalcStyle() { ...@@ -1746,8 +1746,8 @@ void StyleEngine::RecalcStyle() {
SelectorFilterRootScope filter_scope(parent); SelectorFilterRootScope filter_scope(parent);
root_element->RecalcStyle({}); root_element->RecalcStyle({});
for (ContainerNode* ancestor = root_element->ParentOrShadowHostNode(); for (ContainerNode* ancestor = root_element->GetStyleRecalcParent(); ancestor;
ancestor; ancestor = ancestor->ParentOrShadowHostNode()) { ancestor = ancestor->GetStyleRecalcParent()) {
if (auto* ancestor_element = DynamicTo<Element>(ancestor)) if (auto* ancestor_element = DynamicTo<Element>(ancestor))
ancestor_element->RecalcStyleForTraversalRootAncestor(); ancestor_element->RecalcStyleForTraversalRootAncestor();
ancestor->ClearChildNeedsStyleRecalc(); ancestor->ClearChildNeedsStyleRecalc();
......
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