ol[type=…] and li[type=…] preshints need to be case-sensitive

This commit is contained in:
Simon Sapin 2017-05-18 10:32:26 +02:00
parent 853b688d0b
commit 7149a6a29d
7 changed files with 53 additions and 19 deletions

View file

@ -2451,6 +2451,11 @@ impl<'a> ::selectors::Element for Root<Element> {
}
},
NonTSPseudoClass::ServoCaseSensitiveTypeAttr(ref expected_value) => {
self.get_attribute(&ns!(), &local_name!("type"))
.map_or(false, |attr| attr.value().eq(expected_value))
}
// FIXME(#15746): This is wrong, we need to instead use extended filtering as per RFC4647
// https://tools.ietf.org/html/rfc4647#section-3.3.2
NonTSPseudoClass::Lang(ref lang) => extended_filtering(&*self.get_lang(), &*lang),