Skip to content
Permalink
Browse files
[web-animations] updating timing should invalidate the effect
https://bugs.webkit.org/show_bug.cgi?id=246865

Reviewed by Dean Jackson.

Since timing properties affect how the effect value is computed, we need to invalidate
the effect when those properties change. It's pretty amazing that this wasn't caught by
an existing WPT, but implementing iterationComposite surfaced that issue.

* LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/keyframe-effects/effect-value-iteration-composite-operation-expected.txt:
* Source/WebCore/animation/KeyframeEffect.cpp:
(WebCore::KeyframeEffect::animationDidChangeTimingProperties):

Canonical link: https://commits.webkit.org/255863@main
  • Loading branch information
graouts committed Oct 22, 2022
1 parent 6ac3761 commit 705266f62fe851ee4294db050faf6714495ee1ef
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
@@ -30,5 +30,5 @@ PASS iteration composition of transform of matrix3d function
PASS iteration composition of transform of rotate3d function
PASS iteration composition starts with non-zero value animation
PASS iteration composition with negative final value animation
FAIL duration changes with an iteration composition operation of accumulate assert_equals: Animated style at 25s of the first iteration expected "12.5px" but got "25px"
PASS duration changes with an iteration composition operation of accumulate

@@ -1808,6 +1808,8 @@ void KeyframeEffect::animationDidChangeTimingProperties()
}
} else if (canBeAccelerated())
m_runningAccelerated = RunningAccelerated::NotStarted;

invalidate();
}

void KeyframeEffect::transformRelatedPropertyDidChange()

0 comments on commit 705266f

Please sign in to comment.