Bug 1355721 - Convert to lowercase the @font-feature-values declarations r?emilio draft
authorNazım Can Altınova <canaltinova@gmail.com>
Tue, 22 Aug 2017 15:13:52 -0700
changeset 650806 96e12432493e68d49f0670e81bf4dea10785e73a
parent 650074 a9d372645a32b8d23d44244f351639af9d73b96a
child 650807 e72b5af48e2c992f0231bbc6996b3bb5d635ee2b
child 650834 42ea92c2e115b2609bc93dd193417fc1972eeb39
child 651596 d66da5d250d2323d8a16306c8ea38ee03a376f35
child 651599 9b8e25415f36d6963853550be1e3af5bedaafceb
child 651814 7fd40ea82ae6d3dd101bd21e560b4133fcecf8a3
child 651817 4c3f25b993efccb5bfbca7da495aa7bc0b5ff8b8
child 651830 f24695fa854f7cc343e6fedf00aa470c47812af9
child 651835 2e31ad7e7c611d5f122af013ac925c62bc89623c
child 652271 02645ad21374785dfb1d1545246cbcd373dd4393
child 652287 6834fc68739f0b2469c28eb52d12cf54a7cb1551
child 652297 8d8fa810ae25ccd199e18bd3b72dc1b89dae0be5
child 652300 8eb43745255267cb607acc9f115487f9f59287fb
push id75503
push userbmo:canaltinova@gmail.com
push dateTue, 22 Aug 2017 22:44:18 +0000
reviewersemilio
bugs1355721
milestone57.0a1
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
servo/components/style/stylesheets/font_feature_values_rule.rs
--- 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 {