Skip to content

Commit

Permalink
make list-style-type animatable
Browse files Browse the repository at this point in the history
  • Loading branch information
dadaa committed Aug 7, 2017
1 parent 3e40d67 commit 73dfc28
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
17 changes: 17 additions & 0 deletions components/style/properties/gecko.mako.rs
Expand Up @@ -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;
Expand Down
3 changes: 1 addition & 2 deletions components/style/properties/longhand/list.mako.rs
Expand Up @@ -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"
Expand Down

0 comments on commit 73dfc28

Please sign in to comment.