LibWeb: Ignore non-animatable properties in keyframes

Gains us 21 WPT tests
This commit is contained in:
Callum Law 2025-10-30 20:55:19 +13:00 committed by Alexander Kalenik
parent ed0b741a26
commit 2447b8a759
Notes: github-actions[bot] 2025-11-02 22:55:29 +00:00
3 changed files with 166 additions and 0 deletions

View file

@ -2778,6 +2778,9 @@ void StyleComputer::make_rule_cache_for_cascade_origin(CascadeOrigin cascade_ori
auto key = static_cast<u64>(keyframe.key().value() * Animations::KeyframeEffect::AnimationKeyFrameKeyScaleFactor);
auto const& keyframe_style = *keyframe.style();
for (auto const& it : keyframe_style.properties()) {
if (!is_animatable_property(it.property_id))
continue;
// Unresolved properties will be resolved in collect_animation_into()
for_each_property_expanding_shorthands(it.property_id, it.value, [&](PropertyID shorthand_id, StyleValue const& shorthand_value) {
animated_properties.set(shorthand_id);

View file

@ -0,0 +1,131 @@
Harness status: OK
Found 126 tests
126 Pass
Pass CSS Transitions with transition-behavior:allow-discrete: property <transition-duration> from [1s] to [2s] at (-0.3) should be [2s]
Pass CSS Transitions with transition-behavior:allow-discrete: property <transition-duration> from [1s] to [2s] at (0) should be [2s]
Pass CSS Transitions with transition-behavior:allow-discrete: property <transition-duration> from [1s] to [2s] at (0.3) should be [2s]
Pass CSS Transitions with transition-behavior:allow-discrete: property <transition-duration> from [1s] to [2s] at (0.5) should be [2s]
Pass CSS Transitions with transition-behavior:allow-discrete: property <transition-duration> from [1s] to [2s] at (0.6) should be [2s]
Pass CSS Transitions with transition-behavior:allow-discrete: property <transition-duration> from [1s] to [2s] at (1) should be [2s]
Pass CSS Transitions with transition-behavior:allow-discrete: property <transition-duration> from [1s] to [2s] at (1.5) should be [2s]
Pass CSS Transitions with transition-property:all and transition-behavor:allow-discrete: property <transition-duration> from [1s] to [2s] at (-0.3) should be [2s]
Pass CSS Transitions with transition-property:all and transition-behavor:allow-discrete: property <transition-duration> from [1s] to [2s] at (0) should be [2s]
Pass CSS Transitions with transition-property:all and transition-behavor:allow-discrete: property <transition-duration> from [1s] to [2s] at (0.3) should be [2s]
Pass CSS Transitions with transition-property:all and transition-behavor:allow-discrete: property <transition-duration> from [1s] to [2s] at (0.5) should be [2s]
Pass CSS Transitions with transition-property:all and transition-behavor:allow-discrete: property <transition-duration> from [1s] to [2s] at (0.6) should be [2s]
Pass CSS Transitions with transition-property:all and transition-behavor:allow-discrete: property <transition-duration> from [1s] to [2s] at (1) should be [2s]
Pass CSS Transitions with transition-property:all and transition-behavor:allow-discrete: property <transition-duration> from [1s] to [2s] at (1.5) should be [2s]
Pass CSS Transitions: property <transition-duration> from [1s] to [2s] at (-0.3) should be [2s]
Pass CSS Transitions: property <transition-duration> from [1s] to [2s] at (0) should be [2s]
Pass CSS Transitions: property <transition-duration> from [1s] to [2s] at (0.3) should be [2s]
Pass CSS Transitions: property <transition-duration> from [1s] to [2s] at (0.5) should be [2s]
Pass CSS Transitions: property <transition-duration> from [1s] to [2s] at (0.6) should be [2s]
Pass CSS Transitions: property <transition-duration> from [1s] to [2s] at (1) should be [2s]
Pass CSS Transitions: property <transition-duration> from [1s] to [2s] at (1.5) should be [2s]
Pass CSS Transitions with transition: all: property <transition-duration> from [1s] to [2s] at (-0.3) should be [2s]
Pass CSS Transitions with transition: all: property <transition-duration> from [1s] to [2s] at (0) should be [2s]
Pass CSS Transitions with transition: all: property <transition-duration> from [1s] to [2s] at (0.3) should be [2s]
Pass CSS Transitions with transition: all: property <transition-duration> from [1s] to [2s] at (0.5) should be [2s]
Pass CSS Transitions with transition: all: property <transition-duration> from [1s] to [2s] at (0.6) should be [2s]
Pass CSS Transitions with transition: all: property <transition-duration> from [1s] to [2s] at (1) should be [2s]
Pass CSS Transitions with transition: all: property <transition-duration> from [1s] to [2s] at (1.5) should be [2s]
Pass CSS Animations: property <transition-duration> from [1s] to [2s] at (-0.3) should be [0s]
Pass CSS Animations: property <transition-duration> from [1s] to [2s] at (0) should be [0s]
Pass CSS Animations: property <transition-duration> from [1s] to [2s] at (0.3) should be [0s]
Pass CSS Animations: property <transition-duration> from [1s] to [2s] at (0.5) should be [0s]
Pass CSS Animations: property <transition-duration> from [1s] to [2s] at (0.6) should be [0s]
Pass CSS Animations: property <transition-duration> from [1s] to [2s] at (1) should be [0s]
Pass CSS Animations: property <transition-duration> from [1s] to [2s] at (1.5) should be [0s]
Pass Web Animations: property <transition-duration> from [1s] to [2s] at (-0.3) should be [0s]
Pass Web Animations: property <transition-duration> from [1s] to [2s] at (0) should be [0s]
Pass Web Animations: property <transition-duration> from [1s] to [2s] at (0.3) should be [0s]
Pass Web Animations: property <transition-duration> from [1s] to [2s] at (0.5) should be [0s]
Pass Web Animations: property <transition-duration> from [1s] to [2s] at (0.6) should be [0s]
Pass Web Animations: property <transition-duration> from [1s] to [2s] at (1) should be [0s]
Pass Web Animations: property <transition-duration> from [1s] to [2s] at (1.5) should be [0s]
Pass CSS Transitions with transition-behavior:allow-discrete: property <transition-delay> from [1s] to [2s] at (-0.3) should be [2s]
Pass CSS Transitions with transition-behavior:allow-discrete: property <transition-delay> from [1s] to [2s] at (0) should be [2s]
Pass CSS Transitions with transition-behavior:allow-discrete: property <transition-delay> from [1s] to [2s] at (0.3) should be [2s]
Pass CSS Transitions with transition-behavior:allow-discrete: property <transition-delay> from [1s] to [2s] at (0.5) should be [2s]
Pass CSS Transitions with transition-behavior:allow-discrete: property <transition-delay> from [1s] to [2s] at (0.6) should be [2s]
Pass CSS Transitions with transition-behavior:allow-discrete: property <transition-delay> from [1s] to [2s] at (1) should be [2s]
Pass CSS Transitions with transition-behavior:allow-discrete: property <transition-delay> from [1s] to [2s] at (1.5) should be [2s]
Pass CSS Transitions with transition-property:all and transition-behavor:allow-discrete: property <transition-delay> from [1s] to [2s] at (-0.3) should be [2s]
Pass CSS Transitions with transition-property:all and transition-behavor:allow-discrete: property <transition-delay> from [1s] to [2s] at (0) should be [2s]
Pass CSS Transitions with transition-property:all and transition-behavor:allow-discrete: property <transition-delay> from [1s] to [2s] at (0.3) should be [2s]
Pass CSS Transitions with transition-property:all and transition-behavor:allow-discrete: property <transition-delay> from [1s] to [2s] at (0.5) should be [2s]
Pass CSS Transitions with transition-property:all and transition-behavor:allow-discrete: property <transition-delay> from [1s] to [2s] at (0.6) should be [2s]
Pass CSS Transitions with transition-property:all and transition-behavor:allow-discrete: property <transition-delay> from [1s] to [2s] at (1) should be [2s]
Pass CSS Transitions with transition-property:all and transition-behavor:allow-discrete: property <transition-delay> from [1s] to [2s] at (1.5) should be [2s]
Pass CSS Transitions: property <transition-delay> from [1s] to [2s] at (-0.3) should be [2s]
Pass CSS Transitions: property <transition-delay> from [1s] to [2s] at (0) should be [2s]
Pass CSS Transitions: property <transition-delay> from [1s] to [2s] at (0.3) should be [2s]
Pass CSS Transitions: property <transition-delay> from [1s] to [2s] at (0.5) should be [2s]
Pass CSS Transitions: property <transition-delay> from [1s] to [2s] at (0.6) should be [2s]
Pass CSS Transitions: property <transition-delay> from [1s] to [2s] at (1) should be [2s]
Pass CSS Transitions: property <transition-delay> from [1s] to [2s] at (1.5) should be [2s]
Pass CSS Transitions with transition: all: property <transition-delay> from [1s] to [2s] at (-0.3) should be [2s]
Pass CSS Transitions with transition: all: property <transition-delay> from [1s] to [2s] at (0) should be [2s]
Pass CSS Transitions with transition: all: property <transition-delay> from [1s] to [2s] at (0.3) should be [2s]
Pass CSS Transitions with transition: all: property <transition-delay> from [1s] to [2s] at (0.5) should be [2s]
Pass CSS Transitions with transition: all: property <transition-delay> from [1s] to [2s] at (0.6) should be [2s]
Pass CSS Transitions with transition: all: property <transition-delay> from [1s] to [2s] at (1) should be [2s]
Pass CSS Transitions with transition: all: property <transition-delay> from [1s] to [2s] at (1.5) should be [2s]
Pass CSS Animations: property <transition-delay> from [1s] to [2s] at (-0.3) should be [0s]
Pass CSS Animations: property <transition-delay> from [1s] to [2s] at (0) should be [0s]
Pass CSS Animations: property <transition-delay> from [1s] to [2s] at (0.3) should be [0s]
Pass CSS Animations: property <transition-delay> from [1s] to [2s] at (0.5) should be [0s]
Pass CSS Animations: property <transition-delay> from [1s] to [2s] at (0.6) should be [0s]
Pass CSS Animations: property <transition-delay> from [1s] to [2s] at (1) should be [0s]
Pass CSS Animations: property <transition-delay> from [1s] to [2s] at (1.5) should be [0s]
Pass Web Animations: property <transition-delay> from [1s] to [2s] at (-0.3) should be [0s]
Pass Web Animations: property <transition-delay> from [1s] to [2s] at (0) should be [0s]
Pass Web Animations: property <transition-delay> from [1s] to [2s] at (0.3) should be [0s]
Pass Web Animations: property <transition-delay> from [1s] to [2s] at (0.5) should be [0s]
Pass Web Animations: property <transition-delay> from [1s] to [2s] at (0.6) should be [0s]
Pass Web Animations: property <transition-delay> from [1s] to [2s] at (1) should be [0s]
Pass Web Animations: property <transition-delay> from [1s] to [2s] at (1.5) should be [0s]
Pass CSS Transitions with transition-behavior:allow-discrete: property <transition-property> from [color] to [background-color] at (-0.3) should be [background-color]
Pass CSS Transitions with transition-behavior:allow-discrete: property <transition-property> from [color] to [background-color] at (0) should be [background-color]
Pass CSS Transitions with transition-behavior:allow-discrete: property <transition-property> from [color] to [background-color] at (0.3) should be [background-color]
Pass CSS Transitions with transition-behavior:allow-discrete: property <transition-property> from [color] to [background-color] at (0.5) should be [background-color]
Pass CSS Transitions with transition-behavior:allow-discrete: property <transition-property> from [color] to [background-color] at (0.6) should be [background-color]
Pass CSS Transitions with transition-behavior:allow-discrete: property <transition-property> from [color] to [background-color] at (1) should be [background-color]
Pass CSS Transitions with transition-behavior:allow-discrete: property <transition-property> from [color] to [background-color] at (1.5) should be [background-color]
Pass CSS Transitions with transition-property:all and transition-behavor:allow-discrete: property <transition-property> from [color] to [background-color] at (-0.3) should be [background-color]
Pass CSS Transitions with transition-property:all and transition-behavor:allow-discrete: property <transition-property> from [color] to [background-color] at (0) should be [background-color]
Pass CSS Transitions with transition-property:all and transition-behavor:allow-discrete: property <transition-property> from [color] to [background-color] at (0.3) should be [background-color]
Pass CSS Transitions with transition-property:all and transition-behavor:allow-discrete: property <transition-property> from [color] to [background-color] at (0.5) should be [background-color]
Pass CSS Transitions with transition-property:all and transition-behavor:allow-discrete: property <transition-property> from [color] to [background-color] at (0.6) should be [background-color]
Pass CSS Transitions with transition-property:all and transition-behavor:allow-discrete: property <transition-property> from [color] to [background-color] at (1) should be [background-color]
Pass CSS Transitions with transition-property:all and transition-behavor:allow-discrete: property <transition-property> from [color] to [background-color] at (1.5) should be [background-color]
Pass CSS Transitions: property <transition-property> from [color] to [background-color] at (-0.3) should be [background-color]
Pass CSS Transitions: property <transition-property> from [color] to [background-color] at (0) should be [background-color]
Pass CSS Transitions: property <transition-property> from [color] to [background-color] at (0.3) should be [background-color]
Pass CSS Transitions: property <transition-property> from [color] to [background-color] at (0.5) should be [background-color]
Pass CSS Transitions: property <transition-property> from [color] to [background-color] at (0.6) should be [background-color]
Pass CSS Transitions: property <transition-property> from [color] to [background-color] at (1) should be [background-color]
Pass CSS Transitions: property <transition-property> from [color] to [background-color] at (1.5) should be [background-color]
Pass CSS Transitions with transition: all: property <transition-property> from [color] to [background-color] at (-0.3) should be [background-color]
Pass CSS Transitions with transition: all: property <transition-property> from [color] to [background-color] at (0) should be [background-color]
Pass CSS Transitions with transition: all: property <transition-property> from [color] to [background-color] at (0.3) should be [background-color]
Pass CSS Transitions with transition: all: property <transition-property> from [color] to [background-color] at (0.5) should be [background-color]
Pass CSS Transitions with transition: all: property <transition-property> from [color] to [background-color] at (0.6) should be [background-color]
Pass CSS Transitions with transition: all: property <transition-property> from [color] to [background-color] at (1) should be [background-color]
Pass CSS Transitions with transition: all: property <transition-property> from [color] to [background-color] at (1.5) should be [background-color]
Pass CSS Animations: property <transition-property> from [color] to [background-color] at (-0.3) should be [all]
Pass CSS Animations: property <transition-property> from [color] to [background-color] at (0) should be [all]
Pass CSS Animations: property <transition-property> from [color] to [background-color] at (0.3) should be [all]
Pass CSS Animations: property <transition-property> from [color] to [background-color] at (0.5) should be [all]
Pass CSS Animations: property <transition-property> from [color] to [background-color] at (0.6) should be [all]
Pass CSS Animations: property <transition-property> from [color] to [background-color] at (1) should be [all]
Pass CSS Animations: property <transition-property> from [color] to [background-color] at (1.5) should be [all]
Pass Web Animations: property <transition-property> from [color] to [background-color] at (-0.3) should be [all]
Pass Web Animations: property <transition-property> from [color] to [background-color] at (0) should be [all]
Pass Web Animations: property <transition-property> from [color] to [background-color] at (0.3) should be [all]
Pass Web Animations: property <transition-property> from [color] to [background-color] at (0.5) should be [all]
Pass Web Animations: property <transition-property> from [color] to [background-color] at (0.6) should be [all]
Pass Web Animations: property <transition-property> from [color] to [background-color] at (1) should be [all]
Pass Web Animations: property <transition-property> from [color] to [background-color] at (1.5) should be [all]

View file

@ -0,0 +1,32 @@
<!DOCTYPE html>
<link rel=author href="mailto:jarhar@chromium.org">
<link rel="help" href="https://www.w3.org/TR/css-transitions-1/#transition-duration-property">
<link rel="help" href="https://www.w3.org/TR/css-transitions-1/#transition-delay-property">
<link rel="help" href="https://www.w3.org/TR/css-transitions-1/#transition-property-property">
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../../css/support/interpolation-testcommon.js"></script>
<body>
<script>
test_not_animatable({
property: 'transition-duration',
from: '1s',
to: '2s',
underlying: '0s',
});
test_not_animatable({
property: 'transition-delay',
from: '1s',
to: '2s',
underlying: '0s',
});
test_not_animatable({
property: 'transition-property',
from: 'color',
to: 'background-color',
underlying: 'all',
});
</script>