• Rune Lillesveen's avatar
    Don't style recalc shadow root descendants if not necessary. · aa00f194
    Rune Lillesveen authored
    Sibling invalidation sets may be (re-)scheduled on shadow roots on dom
    changes. If the removed node was the one that needed style invalidation,
    we may end up with a style-dirty shadow root with no style-dirty
    children. There is a DCHECK in RecalcDescendantStyles which triggers if
    we call it unnecessarily. We called it unconditionally in ShadowRoot.
    
    Discovered while minimizing the fuzzer case for the mentioned Bug.
    
    Bug: 798918
    Change-Id: I4f59b1a77af6a89ed304abd88d7f8cca84775127
    Reviewed-on: https://chromium-review.googlesource.com/850395Reviewed-by: default avatarEric Willigers <ericwilligers@chromium.org>
    Commit-Queue: Rune Lillesveen <futhark@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#526995}
    aa00f194
shadow-root-sibling-invalidation-crash.html 569 Bytes