Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[@scope] Expand :scope selectors for :has() cache
The :scope pseudo-class can refer to different elements depending on context. This is similar to the '&' pseudo-class, but differs in that :scope refers to a single *element*, not a specific selector list. This causes problems for the :has() cache, since it uses the serialization of a selector as the key. In CL:5680906, this was solved by expanding '&' in the cache-key, and this CL now does a similar trick for :scope. Unlike '&', however, the :scope selector itself does not know what it refers to; it must come from context. We can use the pointer value of the scope node for this, since the :has() cache only exists on the stack during style recalc. Fixed: 383343312 Change-Id: I08e5d3caf18831d614caed474081d32caa43bd64 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6090905 Reviewed-by: Byungwoo Lee <blee@igalia.com> Commit-Queue: Anders Hartvoll Ruud <andruud@chromium.org> Cr-Commit-Position: refs/heads/main@{#1397188}
- Loading branch information