style: Move ANCHORS_RELATIVE_SELECTOR out of nsINode flags

Move the flag to ComputedValueFlags, like `CONSIDERED_RELATIVE_SELECTOR`.

Differential Revision: https://phabricator.services.mozilla.com/D180726
This commit is contained in:
David Shin 2023-06-13 13:21:42 +00:00 committed by Martin Robinson
parent 9321265b38
commit ae5e0d49d8
7 changed files with 59 additions and 43 deletions

View file

@ -632,7 +632,11 @@ impl<E: TElement> StyleSharingCache<E> {
// matching `.foo`, even if `:has()` may not even be used. Ideally we'd
// have something like `RelativeSelectorConsidered::RightMost`, but the
// element flag is required for invalidation, and this reduces more tracking.
if element.anchors_relative_selector() {
if style
.style
.0
.flags
.intersects(ComputedValueFlags::ANCHORS_RELATIVE_SELECTOR) {
debug!("Failing to insert to the cache: may anchor relative selector");
return;
}