mirror of
https://github.com/servo/servo.git
synced 2025-08-10 16:05:43 +01:00
style: Move animation-iteration-count outside of mako.
This commit is contained in:
parent
2536e1ee98
commit
dc414134bf
9 changed files with 80 additions and 66 deletions
|
@ -3261,15 +3261,16 @@ fn static_assert() {
|
|||
data.longhands_by_name["animation-play-state"].keyword)}
|
||||
|
||||
pub fn set_animation_iteration_count<I>(&mut self, v: I)
|
||||
where I: IntoIterator<Item = longhands::animation_iteration_count::computed_value::single_value::T>,
|
||||
I::IntoIter: ExactSizeIterator + Clone
|
||||
where
|
||||
I: IntoIterator<Item = values::computed::AnimationIterationCount>,
|
||||
I::IntoIter: ExactSizeIterator + Clone
|
||||
{
|
||||
use std::f32;
|
||||
use properties::longhands::animation_iteration_count::single_value::SpecifiedValue as AnimationIterationCount;
|
||||
use values::generics::box_::AnimationIterationCount;
|
||||
|
||||
let v = v.into_iter();
|
||||
|
||||
debug_assert!(v.len() != 0);
|
||||
debug_assert_ne!(v.len(), 0);
|
||||
let input_len = v.len();
|
||||
unsafe { self.gecko.mAnimations.ensure_len(input_len) };
|
||||
|
||||
|
@ -3281,10 +3282,12 @@ fn static_assert() {
|
|||
}
|
||||
}
|
||||
}
|
||||
pub fn animation_iteration_count_at(&self, index: usize)
|
||||
-> longhands::animation_iteration_count::computed_value::SingleComputedValue {
|
||||
use properties::longhands::animation_iteration_count::single_value::computed_value::T
|
||||
as AnimationIterationCount;
|
||||
|
||||
pub fn animation_iteration_count_at(
|
||||
&self,
|
||||
index: usize,
|
||||
) -> values::computed::AnimationIterationCount {
|
||||
use values::generics::box_::AnimationIterationCount;
|
||||
|
||||
if self.gecko.mAnimations[index].mIterationCount.is_infinite() {
|
||||
AnimationIterationCount::Infinite
|
||||
|
@ -3292,6 +3295,7 @@ fn static_assert() {
|
|||
AnimationIterationCount::Number(self.gecko.mAnimations[index].mIterationCount)
|
||||
}
|
||||
}
|
||||
|
||||
${impl_animation_count('iteration_count', 'IterationCount')}
|
||||
${impl_copy_animation_value('iteration_count', 'IterationCount')}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue