Bug 1355721 - Convert to lowercase the @font-feature-values declarations r?emilio
The @font-feature-values declaration identifiers are asci case insensitive.
We should convert all of them to lowercase to be able to reduce the same
declarations. Also gecko stores them as lowercase in gfxFontFeatureValueSet.
MozReview-Commit-ID: 8PXKbOfRpR6
--- a/servo/components/style/stylesheets/font_feature_values_rule.rs
+++ b/servo/components/style/stylesheets/font_feature_values_rule.rs
@@ -161,17 +161,17 @@ impl<'a, 'b, 'i, T> DeclarationParser<'i
{
type Declaration = ();
type Error = SelectorParseError<'i, StyleParseError<'i>>;
fn parse_value<'t>(&mut self, name: CowRcStr<'i>, input: &mut Parser<'i, 't>)
-> Result<(), ParseError<'i>> {
let value = input.parse_entirely(|i| T::parse(self.context, i))?;
let new = FFVDeclaration {
- name: Atom::from(&*name),
+ name: Atom::from(&*name).to_ascii_lowercase(),
value: value,
};
update_or_push(&mut self.declarations, new);
Ok(())
}
}
macro_rules! font_feature_values_blocks {