mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Auto merge of #19005 - emilio:less-mako-more-joy, r=jdm
style: Move animation-name and animation-iteration-count outside of mako. <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19005) <!-- Reviewable:end -->
This commit is contained in:
commit
f9f71c7ed1
11 changed files with 165 additions and 138 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