mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
style: Return early instead of indenting in animation code.
And also leave some WTF comments, because they make no sense so far.
This commit is contained in:
parent
e77dd773d8
commit
e5bd8fc5d8
2 changed files with 47 additions and 32 deletions
|
@ -606,7 +606,6 @@ pub fn update_style_for_animation_frame(mut new_style: &mut Arc<ComputedValues>,
|
|||
true
|
||||
}
|
||||
/// Updates a single animation and associated style based on the current time.
|
||||
/// If `damage` is provided, inserts the appropriate restyle damage.
|
||||
pub fn update_style_for_animation<E>(
|
||||
context: &SharedStyleContext,
|
||||
animation: &Animation,
|
||||
|
@ -796,8 +795,11 @@ where
|
|||
|
||||
/// Update the style in the node when it finishes.
|
||||
#[cfg(feature = "servo")]
|
||||
pub fn complete_expired_transitions(node: OpaqueNode, style: &mut Arc<ComputedValues>,
|
||||
context: &SharedStyleContext) -> bool {
|
||||
pub fn complete_expired_transitions(
|
||||
node: OpaqueNode,
|
||||
style: &mut Arc<ComputedValues>,
|
||||
context: &SharedStyleContext,
|
||||
) -> bool {
|
||||
let had_animations_to_expire;
|
||||
{
|
||||
let all_expired_animations = context.expired_animations.read();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue