selectors: Don't track class and id ancestor hashes in quirks mode.

It's incorrect to track classes and id selectors in a quirks-mode document,
since they should match case-insensitively.

Bug: 1382812
Reviewed-by: bholley
MozReview-Commit-ID: 4uvrfYsWb1v
This commit is contained in:
Emilio Cobos Álvarez 2017-07-20 22:10:22 +02:00
parent eba573d774
commit f879ebcc99
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
3 changed files with 24 additions and 15 deletions

View file

@ -45,7 +45,7 @@ fn get_mock_rules(css_selectors: &[&str]) -> (Vec<Vec<Rule>>, SharedRwLock) {
let guard = shared_lock.read();
let rule = locked.read_with(&guard);
rule.selectors.0.iter().map(|s| {
Rule::new(s.clone(), AncestorHashes::new(s), locked.clone(), i as u32)
Rule::new(s.clone(), AncestorHashes::new(s, QuirksMode::NoQuirks), locked.clone(), i as u32)
}).collect()
}).collect(), shared_lock)
}