Add selectors with an id in them to the list of revalidation selectors.

This commit is contained in:
Boris Zbarsky 2017-06-01 19:29:11 -04:00
parent 98f95a32da
commit d031b5badb
4 changed files with 82 additions and 1 deletions

View file

@ -20,6 +20,8 @@ use stylearc::Arc;
#[inline]
pub fn relations_are_shareable(relations: &StyleRelations) -> bool {
use selectors::matching::*;
// If we start sharing things that are AFFECTED_BY_PSEUDO_ELEMENTS, we need
// to track revalidation selectors on a per-pseudo-element basis.
!relations.intersects(AFFECTED_BY_ID_SELECTOR |
AFFECTED_BY_PSEUDO_ELEMENTS)
}