From 799d59d88fb8b0aa325415ba8f0c938b5628a757 Mon Sep 17 00:00:00 2001 From: peter chang Date: Mon, 2 Oct 2017 21:49:21 +0800 Subject: [PATCH] Bug 1377894 - Create the new opacity animations only when the animation id is valid, r=kats MozReview-Commit-ID: 1njXoEnyj00 --HG-- extra : rebase_source : 43b9d5451f06de2148f6c7a7228dbcc609c038b3 --- gfx/webrender_bindings/src/bindings.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gfx/webrender_bindings/src/bindings.rs b/gfx/webrender_bindings/src/bindings.rs index b23f3bb6e95d..4668b8c1ffe2 100644 --- a/gfx/webrender_bindings/src/bindings.rs +++ b/gfx/webrender_bindings/src/bindings.rs @@ -1144,7 +1144,9 @@ pub extern "C" fn wr_dp_push_stacking_context(state: &mut WrState, filters.push(FilterOp::Opacity(PropertyBinding::Value(*opacity))); } } else { - filters.push(FilterOp::Opacity(PropertyBinding::Binding(PropertyBindingKey::new(animation_id)))); + if animation_id > 0 { + filters.push(FilterOp::Opacity(PropertyBinding::Binding(PropertyBindingKey::new(animation_id)))); + } } let transform = unsafe { transform.as_ref() };