Bug 1360776 - There is no need to clone for animation/transition declaration block. r?emilio draft
authorHiroyuki Ikezoe <hikezoe@mozilla.com>
Mon, 01 May 2017 08:07:48 +0900
changeset 570800 1052538e16087cd65adf72de72e22e81ecacba3c
parent 570799 a1ee909117654bdb2dfb9195cb007371846f5711
child 626570 827ce220eff680da28133aafef8ad2c3c384c25f
push id56578
push userhikezoe@mozilla.com
push dateSun, 30 Apr 2017 23:25:54 +0000
reviewersemilio
bugs1360776
milestone55.0a1
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
servo/components/style/stylist.rs
--- 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
     }