make list-style-type animatable

This commit is contained in:
Daisuke Akatsuka 2017-08-07 13:14:56 +09:00
parent 3e40d670dd
commit 73dfc28413
2 changed files with 18 additions and 2 deletions

View file

@ -4142,6 +4142,23 @@ fn static_assert() {
self.copy_list_style_type_from(other)
}
pub fn clone_list_style_type(&self) -> longhands::list_style_type::computed_value::T {
use gecko_bindings::bindings::Gecko_CounterStyle_IsSingleString;
use gecko_bindings::bindings::Gecko_CounterStyle_GetSingleString;
use self::longhands::list_style_type::computed_value::T;
use values::generics::CounterStyleOrNone;
if unsafe { Gecko_CounterStyle_IsSingleString(&self.gecko.mCounterStyle) } {
ns_auto_string!(single_string);
unsafe {
Gecko_CounterStyle_GetSingleString(&self.gecko.mCounterStyle, &mut *single_string)
};
T::String(single_string.to_string())
} else {
T::CounterStyle(CounterStyleOrNone::from_gecko_value(&self.gecko.mCounterStyle))
}
}
pub fn set_quotes(&mut self, other: longhands::quotes::computed_value::T) {
use gecko_bindings::bindings::Gecko_NewStyleQuoteValues;
use gecko_bindings::sugar::refptr::UniqueRefPtr;

View file

@ -27,8 +27,7 @@ ${helpers.single_keyword("list-style-position", "outside inside", animation_valu
arabic-indic bengali cambodian cjk-decimal devanagari gujarati gurmukhi kannada khmer lao
malayalam mongolian myanmar oriya persian telugu thai tibetan cjk-earthly-branch
cjk-heavenly-stem lower-greek hiragana hiragana-iroha katakana katakana-iroha""",
needs_conversion="True",
animation_value_type="none",
animation_value_type="discrete",
spec="https://drafts.csswg.org/css-lists/#propdef-list-style-type")}
% else:
<%helpers:longhand name="list-style-type" animation_value_type="none" boxed="True"