WebKit Bugzilla
Attachment 343061 Details for
Bug 183828
: [Web Animations] Make imported/mozilla/css-animations/test_animation-playstate.html pass reliably
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-183828-20180619182921.patch (text/plain), 7.61 KB, created by
Antoine Quint
on 2018-06-19 09:29:23 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Antoine Quint
Created:
2018-06-19 09:29:23 PDT
Size:
7.61 KB
patch
obsolete
>Subversion Revision: 232961 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 407eb59039e274f54c7cf8f9f4621dfdcd2173b7..c188455435fc8ea393e457587724d90a80def6f1 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,22 @@ >+2018-06-19 Antoine Quint <graouts@apple.com> >+ >+ [Web Animations] Make imported/mozilla/css-animations/test_animation-playstate.html pass reliably >+ https://bugs.webkit.org/show_bug.cgi?id=183828 >+ <rdar://problem/40997469> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ We need to ensure pending styles have been resolved prior to returning the play state for a CSS Animation since >+ it can be controlled by the animation-play-state CSS property. To that end we expose a specific bindings-only >+ method which we override for CSSAnimation to force a style update. >+ >+ * animation/CSSAnimation.cpp: >+ (WebCore::CSSAnimation::bindingsPlayState const): >+ * animation/CSSAnimation.h: >+ * animation/WebAnimation.h: >+ (WebCore::WebAnimation::bindingsPlayState const): >+ * animation/WebAnimation.idl: >+ > 2018-06-19 Antoine Quint <graouts@apple.com> > > [Web Animations] Make imported/mozilla/css-transitions/test_animation-cancel.html pass reliably >diff --git a/Source/WebCore/animation/CSSAnimation.cpp b/Source/WebCore/animation/CSSAnimation.cpp >index 1b65f513876a74a946a00179d707e0f250ab1613..b50857d6b4df0809b982c659ae0aca68ce873894 100644 >--- a/Source/WebCore/animation/CSSAnimation.cpp >+++ b/Source/WebCore/animation/CSSAnimation.cpp >@@ -107,4 +107,17 @@ std::optional<double> CSSAnimation::bindingsCurrentTime() const > return currentTime; > } > >+WebAnimation::PlayState CSSAnimation::bindingsPlayState() const >+{ >+ // Since an animation's play state can be set via the animation-play-state property, >+ // we need to account for any pending CSS changes first. >+ if (auto* animationEffect = effect()) { >+ if (is<KeyframeEffectReadOnly>(animationEffect)) { >+ if (auto* target = downcast<KeyframeEffectReadOnly>(animationEffect)->target()) >+ target->document().updateStyleIfNeeded(); >+ } >+ } >+ return WebAnimation::bindingsPlayState(); >+} >+ > } // namespace WebCore >diff --git a/Source/WebCore/animation/CSSAnimation.h b/Source/WebCore/animation/CSSAnimation.h >index 12bf20b2ea89a47abf9d04324aa2c5bb7dc06b73..d4ec5adfed727e574357860af39d5d8dd326deaa 100644 >--- a/Source/WebCore/animation/CSSAnimation.h >+++ b/Source/WebCore/animation/CSSAnimation.h >@@ -44,6 +44,7 @@ public: > const RenderStyle& unanimatedStyle() const { return *m_unanimatedStyle; } > > std::optional<double> bindingsCurrentTime() const final; >+ WebAnimation::PlayState bindingsPlayState() const final; > > protected: > void syncPropertiesWithBackingAnimation() final; >diff --git a/Source/WebCore/animation/WebAnimation.h b/Source/WebCore/animation/WebAnimation.h >index cb8db1d2573db6bfd279325f8dd38d171c57cdaf..9079aceb8b734824292f7d55eb9d6ffae28ba58f 100644 >--- a/Source/WebCore/animation/WebAnimation.h >+++ b/Source/WebCore/animation/WebAnimation.h >@@ -83,6 +83,7 @@ public: > > enum class PlayState { Idle, Running, Paused, Finished }; > PlayState playState() const; >+ virtual PlayState bindingsPlayState() const { return playState(); } > > bool pending() const { return hasPendingPauseTask() || hasPendingPlayTask(); } > >diff --git a/Source/WebCore/animation/WebAnimation.idl b/Source/WebCore/animation/WebAnimation.idl >index 107226099fb185410da17b75a051015924638b69..88e30d1fd1f29dccc5e2fd2d249207bc7b5d0289 100644 >--- a/Source/WebCore/animation/WebAnimation.idl >+++ b/Source/WebCore/animation/WebAnimation.idl >@@ -43,7 +43,7 @@ enum AnimationPlayState { > [ImplementedAs=bindingsStartTime] attribute double? startTime; > [MayThrowException, ImplementedAs=bindingsCurrentTime] attribute double? currentTime; > attribute double playbackRate; >- readonly attribute AnimationPlayState playState; >+ [ImplementedAs=bindingsPlayState] readonly attribute AnimationPlayState playState; > readonly attribute boolean pending; > attribute EventHandler onfinish; > attribute EventHandler oncancel; >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index c643ed625760f4f91b0cb7a7b431d90be3629f3c..e15c6cb485a1239747cf4654779eeaa56c1b0c6a 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,15 @@ >+2018-06-19 Antoine Quint <graouts@apple.com> >+ >+ [Web Animations] Make imported/mozilla/css-animations/test_animation-playstate.html pass reliably >+ https://bugs.webkit.org/show_bug.cgi?id=183828 >+ <rdar://problem/40997469> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ This test now passes reliably. >+ >+ * TestExpectations: >+ > 2018-06-19 Antoine Quint <graouts@apple.com> > > Layout Test imported/mozilla/css-animations/test_animation-cancel.html is a flaky failure >diff --git a/LayoutTests/imported/mozilla/ChangeLog b/LayoutTests/imported/mozilla/ChangeLog >index bd26ef0ecd6554f2577d74a508bbdfbb8a2b4a29..3c00b757a3f84ee904b779ed541f76a401d8aac3 100644 >--- a/LayoutTests/imported/mozilla/ChangeLog >+++ b/LayoutTests/imported/mozilla/ChangeLog >@@ -1,3 +1,15 @@ >+2018-06-19 Antoine Quint <graouts@apple.com> >+ >+ [Web Animations] Make imported/mozilla/css-animations/test_animation-playstate.html pass reliably >+ https://bugs.webkit.org/show_bug.cgi?id=183828 >+ <rdar://problem/40997469> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Mark a progression in the Mozilla CSS Animations tests. >+ >+ * css-animations/test_animation-playstate-expected.txt: >+ > 2018-06-19 Antoine Quint <graouts@apple.com> > > [Web Animations] Make imported/mozilla/css-transitions/test_animation-cancel.html pass reliably >diff --git a/LayoutTests/TestExpectations b/LayoutTests/TestExpectations >index 9c2c893bf40e09e2b9d46e0d3e1c6f199c4bbb93..ada2035bd36d499d1bc55e276efa13a12ab55a14 100644 >--- a/LayoutTests/TestExpectations >+++ b/LayoutTests/TestExpectations >@@ -1928,7 +1928,6 @@ webkit.org/b/181888 imported/w3c/web-platform-tests/web-animations/timing-model/ > > webkit.org/b/183818 imported/mozilla/css-animations/test_pseudoElement-get-animations.html [ Pass Failure Timeout ] > webkit.org/b/183826 imported/mozilla/css-animations/test_animation-pausing.html [ Pass Failure Timeout ] >-webkit.org/b/183828 imported/mozilla/css-animations/test_animation-playstate.html [ Pass Failure Timeout ] > webkit.org/b/183830 imported/mozilla/css-animations/test_animation-ready.html [ Pass Failure Timeout ] > webkit.org/b/183834 imported/mozilla/css-animations/test_animation-starttime.html [ Pass Failure Timeout ] > webkit.org/b/183836 imported/mozilla/css-animations/test_animations-dynamic-changes.html [ Pass Failure Timeout ] >diff --git a/LayoutTests/imported/mozilla/css-animations/test_animation-playstate-expected.txt b/LayoutTests/imported/mozilla/css-animations/test_animation-playstate-expected.txt >index 47d7af83d9508d6c6ed7e6c326fbf60f738ab31d..f79fcb277075b4812987efccdbd01aecf98695b7 100644 >--- a/LayoutTests/imported/mozilla/css-animations/test_animation-playstate-expected.txt >+++ b/LayoutTests/imported/mozilla/css-animations/test_animation-playstate-expected.txt >@@ -2,6 +2,6 @@ > PASS Animation returns correct playState when running > PASS Animation returns correct playState when paused > PASS Animation.playState updates when paused by script >-FAIL Animation.playState updates when resumed by setting style assert_equals: Animation.playState reports running after updating animation-play-state (got: paused) expected "running" but got "paused" >+PASS Animation.playState updates when resumed by setting style > PASS Animation returns correct playState when cancelled >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
dino
:
review+
ews-watchlist
:
commit-queue-
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 183828
: 343061 |
343075