From 6bba9d4dab7143d77db5becad78f8f23f8bc201b Mon Sep 17 00:00:00 2001 From: Hiroyuki Ikezoe Date: Wed, 21 Feb 2018 19:34:48 +0900 Subject: [PATCH] Add a new sequential task flag for display propery changes from 'none' Unlike CSS animations/transitions, script animations keep alive on display:none elements, so once the display property was changed to others in normal styling, we need to do styling for the script animations in the second animation traversal. Otherwise, the styling for the script animations will be deferred to the next frame. --- components/style/context.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/components/style/context.rs b/components/style/context.rs index b173aad03eb..337afd65ceb 100644 --- a/components/style/context.rs +++ b/components/style/context.rs @@ -419,6 +419,11 @@ bitflags! { const EFFECT_PROPERTIES = structs::UpdateAnimationsTasks_EffectProperties; /// Update animation cacade results for animations running on the compositor. const CASCADE_RESULTS = structs::UpdateAnimationsTasks_CascadeResults; + /// Display property was changed from none. + /// Script animations keep alive on display:none elements, so we need to trigger + /// the second animation restyles for the script animations in the case where + /// the display property was changed from 'none' to others. + const DISPLAY_CHANGED_FROM_NONE = structs::UpdateAnimationsTasks_DisplayChangedFromNone; } }