haikuwebkit/LayoutTests/animations/animation-direction-reverse...

4 lines
126 B
Plaintext
Raw Permalink Normal View History

[ Mac iOS ] animations/animation-direction-normal.html is a flaky failure https://bugs.webkit.org/show_bug.cgi?id=210156 <rdar://problem/61411725> Reviewed by Simon Fraser. The tests animations/animation-direction-normal.html and animations/animation-direction-reverse.html were both written similarly to test that an element targeted by a CSS Animation would have styles animated while the animation is running and that those styles would no longer be animated once the CSS Animation was paused using the "animation-play-state" CSS property. The way those assertions were made were to use setTimeout() to check the computed style at a given time and compared it to an expected value give or take an error margin. This design was flaky, as a system under load could easily not run the timeout until a much larger delta than the one expected would elapse. We use a new JS helper to write these tests in a non-flaky manner. The technique used now is to record the computed style while the animation is running without providing expected times and values, but rather specifying delays between which we want to record the computed style. Once all values have been recorded, a method can be used to check those recorded values by using the Web Animations API to pause and seek the animation at recorded times and query the computed style, which allows us to test values without an error margin. Finally, the new JS helper also allows to check the computed style using a timeout when the animation play state is not relevant, allowing those tests to pause the animation using the "animation-play-state" property and check after incremental timeouts that the computed style did not change. We also made the tests use the WPT harness for assertions and reporting. * animations/animation-direction-normal-expected.txt: * animations/animation-direction-normal.html: * animations/animation-direction-reverse-expected.txt: * animations/animation-direction-reverse.html: * animations/resources/animation-test.js: Added. (AnimationTest): (AnimationTest.prototype.get animation): (AnimationTest.prototype.get value): (AnimationTest.prototype.async valueAfterWaitingFor): (AnimationTest.prototype.async recordValueAfterRunningFor): (AnimationTest.prototype.checkRecordedValues): (AnimationTest.prototype._tickUntil): * platform/ios-wk1/TestExpectations: * platform/ios-wk2/TestExpectations: Canonical link: https://commits.webkit.org/223804@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@260577 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-04-23 17:23:18 +00:00
PASS Pausing an animation using the animation-play-state property stops animating styles with animation-direction: reverse.
Source/WebCore: Implement reverse animation direction Implement reverse animation direction https://bugs.webkit.org/show_bug.cgi?id=60525 Implement reverse and alternate-reverse direction. Reviewed by Dean Jackson. Tests: animations/animation-direction-alternate-reverse.html animations/animation-direction-reverse.html animations/fill-mode-reverse.html * css/CSSParser.cpp: (WebCore::CSSParser::parseAnimationDirection): * css/CSSStyleSelector.cpp: (WebCore::CSSStyleSelector::mapAnimationDirection): * css/CSSValueKeywords.in: * page/WebKitAnimation.cpp: (WebCore::WebKitAnimation::direction): * page/WebKitAnimation.h: * page/animation/AnimationBase.cpp: (WebCore::AnimationBase::fractionalTime): * platform/animation/Animation.h: (Animation): * platform/graphics/texmap/TextureMapperAnimation.cpp: (WebCore): (WebCore::shouldReverseAnimationValue): (WebCore::normalizedAnimationValue): LayoutTests: Implement reverse animation direction https://bugs.webkit.org/show_bug.cgi?id=60525 Add test for the new animation-direction values. Reviewed by Dean Jackson. * animations/animation-direction-alternate-reverse-expected.txt: Added. * animations/animation-direction-alternate-reverse.html: Added. * animations/animation-direction-reverse-expected.txt: Added. * animations/animation-direction-reverse.html: Added. * animations/fill-mode-reverse-expected.txt: Added. * animations/fill-mode-reverse.html: Added. Canonical link: https://commits.webkit.org/95071@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@107162 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2012-02-09 02:07:11 +00:00