• rune@opera.com's avatar
    Corrected insertion point style recalc. · d72327f2
    rune@opera.com authored
    When crossing an insertion point boundary from style recalc, we mark the
    distributed nodes for subtree style recalc. The reason is that the
    distributed nodes will have their style recalculated in the context of
    where they are distributed from. In the case below, changing class=a on
    content will affect the style of class=b. The invalidation starts on
    class=a and will not reach class=b in the invalidation traversal.
    
    The bug was that InsertionPoint::willRecalcStyle had an early return
    if the parent style change was at least an Inherit, but that is not the
    case if the class change does not affect anything at, or above, the
    insertion point, like in the case below.
    
    <div>
      <:shadow-root>
        <style>.a::content .b { ... }</style>
        <content class="a"></content>
      </:shadow-root>
      <div class="b"></div>
    </div>
    
    R=esprehn@chromium.org,chrishtr@chromium.org
    BUG=423293
    
    Review URL: https://codereview.chromium.org/637273003
    
    git-svn-id: svn://svn.chromium.org/blink/trunk@183844 bbb929c8-8fbe-4397-9dbb-9b2b20218538
    d72327f2
content-pseudo-element-dynamic-class-expected.html 205 Bytes