Bug 1402925 - Reset the animation id passed to the StackingContextHelper if there is no animation. r=kats
authorEthan Lin <ethlin@mozilla.com>
Mon, 25 Sep 2017 13:48:57 -0400
changeset 670018 4c4b18031f8030a7ff433bb709ae049a619ea834
parent 670016 e0005dc883eed2d5f6b0ccc80dff6cab9967e3e2
child 670103 d2ab042f20e4101e08a7748425e70038df61b8d4
push id81481
push userkgupta@mozilla.com
push dateMon, 25 Sep 2017 17:49:16 +0000
reviewerskats
bugs1402925
milestone58.0a1
Bug 1402925 - Reset the animation id passed to the StackingContextHelper if there is no animation. r=kats MozReview-Commit-ID: 2WM5FeeDAIc
layout/painting/nsDisplayList.cpp
--- a/layout/painting/nsDisplayList.cpp
+++ b/layout/painting/nsDisplayList.cpp
@@ -6276,16 +6276,17 @@ nsDisplayOpacity::CreateWebRenderCommand
 
     OpAddCompositorAnimations
       anim(CompositorAnimations(animationInfo.GetAnimations(), animationsId),
            void_t(), opacityForCompositor);
     aManager->WrBridge()->AddWebRenderParentCommand(anim);
     aManager->AddActiveCompositorAnimationId(animationsId);
   } else if (animationsId) {
     aManager->AddCompositorAnimationsIdForDiscard(animationsId);
+    animationsId = 0;
   }
 
   nsTArray<mozilla::wr::WrFilterOp> filters;
   StackingContextHelper sc(aSc,
                            aBuilder,
                            aDisplayListBuilder,
                            this,
                            &mList,
@@ -8050,16 +8051,17 @@ nsDisplayTransform::CreateWebRenderComma
 
     OpAddCompositorAnimations
       anim(CompositorAnimations(animationInfo.GetAnimations(), animationsId),
            transformForCompositor, void_t());
     aManager->WrBridge()->AddWebRenderParentCommand(anim);
     aManager->AddActiveCompositorAnimationId(animationsId);
   } else if (animationsId) {
     aManager->AddCompositorAnimationsIdForDiscard(animationsId);
+    animationsId = 0;
   }
 
   gfx::Matrix4x4Typed<LayerPixel, LayerPixel> boundTransform = ViewAs<gfx::Matrix4x4Typed<LayerPixel, LayerPixel>>(newTransformMatrix);
 
   nsTArray<mozilla::wr::WrFilterOp> filters;
   StackingContextHelper sc(aSc,
                            aBuilder,
                            aDisplayListBuilder,