Set atom identifier for counter style names in @counter-style rule. r?SimonSapin draft
authorXidorn Quan <me@upsuper.org>
Wed, 10 May 2017 10:50:51 +1000
changeset 577631 a7c0971b77dd25af6e8c68b5133f01376681d548
parent 577630 fe0a12a13f35956d4ead502778ac2fbc77264940
child 577632 5adc4a1fa7cc6b132794d3dd82dfe95a4f5a5690
push id58742
push userxquan@mozilla.com
push dateMon, 15 May 2017 05:03:58 +0000
reviewersSimonSapin
milestone55.0a1
Set atom identifier for counter style names in @counter-style rule. r?SimonSapin MozReview-Commit-ID: 8lVmUKlzCwc
servo/components/style/gecko/rules.rs
--- a/servo/components/style/gecko/rules.rs
+++ b/servo/components/style/gecko/rules.rs
@@ -179,17 +179,17 @@ impl ToNsCssValue for counter_style::Sys
                 a.set_enum(structs::NS_STYLE_COUNTER_SYSTEM_FIXED as i32);
                 b.set_integer(first_symbol_value.unwrap_or(1));
                 nscssvalue.set_pair(&a, &b);
             }
             Extends(other) => {
                 let mut a = nsCSSValue::null();
                 let mut b = nsCSSValue::null();
                 a.set_enum(structs::NS_STYLE_COUNTER_SYSTEM_EXTENDS as i32);
-                b.set_string_from_atom(&other.0);
+                b.set_atom_ident(other.0);
                 nscssvalue.set_pair(&a, &b);
             }
         }
     }
 }
 
 impl ToNsCssValue for counter_style::Negative {
     fn convert(self, nscssvalue: &mut nsCSSValue) {
@@ -244,17 +244,17 @@ impl ToNsCssValue for counter_style::Pad
         min_length.set_integer(self.0 as i32);
         pad_with.set_from(self.1);
         nscssvalue.set_pair(&min_length, &pad_with);
     }
 }
 
 impl ToNsCssValue for counter_style::Fallback {
     fn convert(self, nscssvalue: &mut nsCSSValue) {
-        nscssvalue.set_ident_from_atom(&self.0 .0)
+        nscssvalue.set_atom_ident(self.0 .0)
     }
 }
 
 impl ToNsCssValue for counter_style::Symbols {
     fn convert(self, nscssvalue: &mut nsCSSValue) {
         nscssvalue.set_list(self.0.into_iter().map(|item| {
             let mut value = nsCSSValue::null();
             value.set_from(item);
@@ -278,12 +278,12 @@ impl ToNsCssValue for counter_style::Add
 impl ToNsCssValue for counter_style::SpeakAs {
     fn convert(self, nscssvalue: &mut nsCSSValue) {
         use counter_style::SpeakAs::*;
         match self {
             Auto => nscssvalue.set_auto(),
             Bullets => nscssvalue.set_enum(structs::NS_STYLE_COUNTER_SPEAKAS_BULLETS as i32),
             Numbers => nscssvalue.set_enum(structs::NS_STYLE_COUNTER_SPEAKAS_NUMBERS as i32),
             Words => nscssvalue.set_enum(structs::NS_STYLE_COUNTER_SPEAKAS_WORDS as i32),
-            Other(other) => nscssvalue.set_ident_from_atom(&other.0),
+            Other(other) => nscssvalue.set_atom_ident(other.0),
         }
     }
 }