Add speak-as descriptor for @counter-style

This commit is contained in:
Simon Sapin 2017-04-14 11:24:25 +02:00
parent 62d261add4
commit 6dc317f80b
2 changed files with 74 additions and 0 deletions

View file

@ -241,3 +241,16 @@ impl ToNsCssValue for Vec<counter_style::AdditiveSymbol> {
// FIXME: add bindings for nsCSSValuePairList
}
}
impl ToNsCssValue for counter_style::SpeakAs {
fn convert(&self, nscssvalue: &mut nsCSSValue) {
use counter_style::SpeakAs::*;
match *self {
Auto => {} //nscssvalue.set_auto(), // FIXME: add bindings for nsCSSValue::SetAutoValue
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(ref other) => nscssvalue.set_ident_from_atom(&other.0),
}
}
}