style: Account for cousin sharing in the revalidation logic.

Fixes bug 1361013.
This commit is contained in:
Emilio Cobos Álvarez 2017-05-01 11:32:07 +02:00
parent c71d97ae5e
commit e09ae428eb
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
3 changed files with 43 additions and 57 deletions

View file

@ -109,10 +109,8 @@ fn test_revalidation_selectors() {
"span + div",
"span ~ div",
// Revalidation selectors that will get sliced.
"td > h1[dir]",
"td > span + h1[dir]",
"table td > span + div ~ h1[dir]",
// Selectors in the ancestor chain (needed for cousin sharing).
"p:first-child span",
]).into_iter()
.filter(|s| needs_revalidation(&s))
.map(|s| s.inner.slice_to_first_ancestor_combinator().complex)
@ -147,10 +145,8 @@ fn test_revalidation_selectors() {
"span + div",
"span ~ div",
// Revalidation selectors that got sliced.
"h1[dir]",
"span + h1[dir]",
"span + div ~ h1[dir]",
// Selectors in the ancestor chain (needed for cousin sharing).
"p:first-child span",
]).into_iter()
.map(|s| s.inner.complex)
.collect::<Vec<_>>();