mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Stop transitioning properties with a discrete animation type (#30565)
They are not transitionable: https://drafts.csswg.org/css-transitions-1/#transitionable There are some new failures in background-image-interpolation.html, but I think the test is wrong, because it expects background-image to be transitionable, even though the spec defines it with a discrete animation type.
This commit is contained in:
parent
9af3495d8a
commit
111716d458
39 changed files with 410 additions and 1280 deletions
|
@ -1028,6 +1028,10 @@ impl ElementAnimationSet {
|
|||
old_style: &ComputedValues,
|
||||
new_style: &Arc<ComputedValues>,
|
||||
) {
|
||||
if !longhand_id.is_transitionable() {
|
||||
return;
|
||||
}
|
||||
|
||||
let style = new_style.get_ui();
|
||||
let timing_function = style.transition_timing_function_mod(index);
|
||||
let duration = style.transition_duration_mod(index);
|
||||
|
|
|
@ -981,6 +981,12 @@ impl LonghandIdSet {
|
|||
&DISCRETE_ANIMATABLE
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn transitionable() -> &'static Self {
|
||||
${static_longhand_id_set("TRANSITIONABLE", lambda p: p.transitionable)}
|
||||
&TRANSITIONABLE
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn logical() -> &'static Self {
|
||||
${static_longhand_id_set("LOGICAL", lambda p: p.logical)}
|
||||
|
@ -1360,6 +1366,12 @@ impl LonghandId {
|
|||
LonghandIdSet::discrete_animatable().contains(self)
|
||||
}
|
||||
|
||||
/// Returns whether this property is transitionable.
|
||||
#[inline]
|
||||
pub fn is_transitionable(self) -> bool {
|
||||
LonghandIdSet::transitionable().contains(self)
|
||||
}
|
||||
|
||||
/// Converts from a LonghandId to an adequate nsCSSPropertyID.
|
||||
#[cfg(feature = "gecko")]
|
||||
#[inline]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue