mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
style: Fix servo build.
This commit is contained in:
parent
39169ad92e
commit
33b593d32e
5 changed files with 32 additions and 32 deletions
|
@ -39,14 +39,14 @@ where
|
|||
let mut new_running_animations = vec![];
|
||||
while let Ok(animation) = new_animations_receiver.try_recv() {
|
||||
let mut should_push = true;
|
||||
if let Animation::Keyframes(ref node, ref name, ref state) = animation {
|
||||
if let Animation::Keyframes(ref node, _, ref name, ref state) = animation {
|
||||
// If the animation was already present in the list for the
|
||||
// node, just update its state, else push the new animation to
|
||||
// run.
|
||||
if let Some(ref mut animations) = running_animations.get_mut(node) {
|
||||
// TODO: This being linear is probably not optimal.
|
||||
for anim in animations.iter_mut() {
|
||||
if let Animation::Keyframes(_, ref anim_name, ref mut anim_state) = *anim {
|
||||
if let Animation::Keyframes(_, _, ref anim_name, ref mut anim_state) = *anim {
|
||||
if *name == *anim_name {
|
||||
debug!("update_animation_state: Found other animation {}", name);
|
||||
anim_state.update_from_other(&state, timer);
|
||||
|
@ -83,7 +83,7 @@ where
|
|||
Animation::Transition(_, started_at, ref frame, _expired) => {
|
||||
now < started_at + frame.duration
|
||||
}
|
||||
Animation::Keyframes(_, _, ref mut state) => {
|
||||
Animation::Keyframes(_, _, _, ref mut state) => {
|
||||
// This animation is still running, or we need to keep
|
||||
// iterating.
|
||||
now < state.started_at + state.duration || state.tick()
|
||||
|
|
|
@ -272,27 +272,27 @@ impl<'a, 'b> ResolveGeneratedContentFragmentMutator<'a, 'b> {
|
|||
}
|
||||
self.traversal.list_item.truncate_to_level(self.level);
|
||||
|
||||
for &(ref counter_name, value) in &*fragment.style().get_counters().counter_reset {
|
||||
let counter_name = &*counter_name.0;
|
||||
for pair in &*fragment.style().get_counters().counter_reset {
|
||||
let counter_name = &*pair.name.0;
|
||||
if let Some(ref mut counter) = self.traversal.counters.get_mut(counter_name) {
|
||||
counter.reset(self.level, value);
|
||||
counter.reset(self.level, pair.value);
|
||||
continue
|
||||
}
|
||||
|
||||
let mut counter = Counter::new();
|
||||
counter.reset(self.level, value);
|
||||
counter.reset(self.level, pair.value);
|
||||
self.traversal.counters.insert(counter_name.to_owned(), counter);
|
||||
}
|
||||
|
||||
for &(ref counter_name, value) in &*fragment.style().get_counters().counter_increment {
|
||||
let counter_name = &*counter_name.0;
|
||||
for pair in &*fragment.style().get_counters().counter_increment {
|
||||
let counter_name = &*pair.name.0;
|
||||
if let Some(ref mut counter) = self.traversal.counters.get_mut(counter_name) {
|
||||
counter.increment(self.level, value);
|
||||
counter.increment(self.level, pair.value);
|
||||
continue
|
||||
}
|
||||
|
||||
let mut counter = Counter::new();
|
||||
counter.increment(self.level, value);
|
||||
counter.increment(self.level, pair.value);
|
||||
self.traversal.counters.insert(counter_name.to_owned(), counter);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue