Clear style recalc root for flat tree.
For FlatTreeStyleRecalc enabled, we did not walk the slot and ancestors clearing child-dirty bits when clearing a style recalc root as part of removing shadow host children. That would leave stray child-dirty bits. Here, we find the child-dirty slot and start clearing child-dirty bits from the slot and up the flat tree ancestor chain. If the slot was removed before the shadow host child, fall back to use the light tree parent of the removed nodes as the new style recalc root instead. Fall back to use the light tree parent for Shadow DOM V0 as trying to find the flat tree parent to start from is too complicated. TEST=shadow-dom/crashes/cyclic-detach-crash2.html Bug: 972752 Change-Id: If503bb3e102208440dae5b42c9231e680dc4d0b4 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1899372Reviewed-by:Morten Stenshorne <mstensho@chromium.org> Commit-Queue: Rune Lillesveen <futhark@chromium.org> Cr-Commit-Position: refs/heads/master@{#712937}
Showing
Please register or sign in to comment