Set atom identifier for counter style names in @counter-style rule. r?SimonSapin
draft
Set atom identifier for counter style names in @counter-style rule. r?SimonSapin
MozReview-Commit-ID: 8lVmUKlzCwc
--- 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),
}
}
}