[:is/:where] Improve :host-context and whole subtree invalidation
- The insertion point crossing flag needs to be reset in a similar way to the tree crossing flag. Otherwise flags may "leak" from one nested complex selector to another unrelated nested complex selector. - In ExtractInvalidationSetFeaturesFromSelectorList, don't return as soon as we encounter kRequiresSubtreeInvalidation, as this causes selectors following a :host-context to be skipped, for example we would ignore '.b' in ':is(:host-context(.a), .b)'. - We should also not propagate the kRequiresSubtreeInvalidation value from nested complex selectors, as it causes whole subtree invalid for _everything_ in the top-level rightmost compound, even the parts unrelated to kRequiresSubtreeInvalidation. For example, for ':is(:host-context(.a), .b)', .b would be marked as whole subtree invalid. Instead we rely on this being handled locally inside each call to UpdateInvalidationSetsForComplex. Bug: 568705 Change-Id: If54b7c006a4c1d886513a0bfb3e075fd4f71be63 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2438417 Commit-Queue: Anders Hartvoll Ruud <andruud@chromium.org> Reviewed-by:Rune Lillesveen <futhark@chromium.org> Cr-Commit-Position: refs/heads/master@{#812879}
Showing
Please register or sign in to comment