diff --git a/components/style/properties/longhand/box.mako.rs b/components/style/properties/longhand/box.mako.rs index 35aff050663..806afcbd1b6 100644 --- a/components/style/properties/longhand/box.mako.rs +++ b/components/style/properties/longhand/box.mako.rs @@ -410,7 +410,8 @@ ${helpers.predefined_type( extra_prefixes=transform_extra_prefixes, animation_value_type="ComputedValue", gecko_ffi_name="mSpecifiedTransform", - flags="CREATES_STACKING_CONTEXT FIXPOS_CB GETCS_NEEDS_LAYOUT_FLUSH", + flags="CREATES_STACKING_CONTEXT FIXPOS_CB \ + GETCS_NEEDS_LAYOUT_FLUSH CAN_ANIMATE_ON_COMPOSITOR", spec="https://drafts.csswg.org/css-transforms/#propdef-transform", servo_restyle_damage="reflow_out_of_flow" )} diff --git a/components/style/properties/longhand/effects.mako.rs b/components/style/properties/longhand/effects.mako.rs index 3292e1bf36c..30493bd270d 100644 --- a/components/style/properties/longhand/effects.mako.rs +++ b/components/style/properties/longhand/effects.mako.rs @@ -7,13 +7,16 @@ // Box-shadow, etc. <% data.new_style_struct("Effects", inherited=False) %> -${helpers.predefined_type("opacity", - "Opacity", - "1.0", - animation_value_type="ComputedValue", - flags="CREATES_STACKING_CONTEXT APPLIES_TO_PLACEHOLDER", - spec="https://drafts.csswg.org/css-color/#opacity", - servo_restyle_damage = "reflow_out_of_flow")} +${helpers.predefined_type( + "opacity", + "Opacity", + "1.0", + animation_value_type="ComputedValue", + flags="CREATES_STACKING_CONTEXT APPLIES_TO_PLACEHOLDER \ + CAN_ANIMATE_ON_COMPOSITOR", + spec="https://drafts.csswg.org/css-color/#opacity", + servo_restyle_damage = "reflow_out_of_flow" +)} ${helpers.predefined_type( "box-shadow", diff --git a/components/style/properties/properties.mako.rs b/components/style/properties/properties.mako.rs index 39e639317f3..e0d6b6cc241 100644 --- a/components/style/properties/properties.mako.rs +++ b/components/style/properties/properties.mako.rs @@ -788,6 +788,8 @@ bitflags! { /// This property's getComputedStyle implementation requires layout /// to be flushed. const GETCS_NEEDS_LAYOUT_FLUSH = 0; + /// This property can be animated on the compositor. + const CAN_ANIMATE_ON_COMPOSITOR = 0; } }