Bug 1360776 - There is no need to clone for animation/transition declaration block. r?emilio
Because it's a newly created Arc<Locked<PropertyDeclarationBlock> in
get_animation_rule.
MozReview-Commit-ID: JSmuy117Jbs
--- a/servo/components/style/stylist.rs
+++ b/servo/components/style/stylist.rs
@@ -747,17 +747,17 @@ impl Stylist {
debug!("SMIL: {:?}", relations);
// Step 6: Animations.
// The animations sheet (CSS animations, script-generated animations,
// and CSS transitions that are no longer tied to CSS markup)
if let Some(anim) = animation_rules.0 {
Push::push(
applicable_declarations,
- ApplicableDeclarationBlock::from_declarations(anim.clone(),
+ ApplicableDeclarationBlock::from_declarations(anim,
CascadeLevel::Animations));
}
debug!("animation: {:?}", relations);
// Step 7: Author-supplied `!important` rules.
map.author.get_all_matching_rules(element,
parent_bf,
applicable_declarations,
@@ -803,17 +803,17 @@ impl Stylist {
debug!("UA important: {:?}", relations);
// Step 11: Transitions.
// The transitions sheet (CSS transitions that are tied to CSS markup)
if let Some(anim) = animation_rules.1 {
Push::push(
applicable_declarations,
- ApplicableDeclarationBlock::from_declarations(anim.clone(), CascadeLevel::Transitions));
+ ApplicableDeclarationBlock::from_declarations(anim, CascadeLevel::Transitions));
}
debug!("transition: {:?}", relations);
debug!("push_applicable_declarations: shareable: {:?}", relations);
relations
}