Title: [227615] trunk/Source/WebCore
- Revision
- 227615
- Author
- [email protected]
- Date
- 2018-01-25 10:48:02 -0800 (Thu, 25 Jan 2018)
Log Message
[Web Animations] Avoid querying the current time multiple time when resolving the play state
https://bugs.webkit.org/show_bug.cgi?id=182099
Patch by Antoine Quint <[email protected]> on 2018-01-25
Reviewed by Dean Jackson.
No test change since this shouldn't cause any change in behavior.
* animation/WebAnimation.cpp:
(WebCore::WebAnimation::playState const):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (227614 => 227615)
--- trunk/Source/WebCore/ChangeLog 2018-01-25 18:43:46 UTC (rev 227614)
+++ trunk/Source/WebCore/ChangeLog 2018-01-25 18:48:02 UTC (rev 227615)
@@ -1,3 +1,15 @@
+2018-01-25 Antoine Quint <[email protected]>
+
+ [Web Animations] Avoid querying the current time multiple time when resolving the play state
+ https://bugs.webkit.org/show_bug.cgi?id=182099
+
+ Reviewed by Dean Jackson.
+
+ No test change since this shouldn't cause any change in behavior.
+
+ * animation/WebAnimation.cpp:
+ (WebCore::WebAnimation::playState const):
+
2018-01-25 Youenn Fablet <[email protected]>
Set integrity fetch options for loading scripts and CSS
Modified: trunk/Source/WebCore/animation/WebAnimation.cpp (227614 => 227615)
--- trunk/Source/WebCore/animation/WebAnimation.cpp 2018-01-25 18:43:46 UTC (rev 227614)
+++ trunk/Source/WebCore/animation/WebAnimation.cpp 2018-01-25 18:48:02 UTC (rev 227615)
@@ -311,7 +311,8 @@
return PlayState::Pending;
// The current time of animation is unresolved → idle
- if (!currentTime())
+ auto animationCurrentTime = currentTime();
+ if (!animationCurrentTime)
return PlayState::Idle;
// The start time of animation is unresolved → paused
@@ -320,7 +321,7 @@
// For animation, animation playback rate > 0 and current time ≥ target effect end; or
// animation playback rate < 0 and current time ≤ 0 → finished
- if ((m_playbackRate > 0 && currentTime().value() >= effectEndTime()) || (m_playbackRate < 0 && currentTime().value() <= 0_s))
+ if ((m_playbackRate > 0 && animationCurrentTime.value() >= effectEndTime()) || (m_playbackRate < 0 && animationCurrentTime.value() <= 0_s))
return PlayState::Finished;
// Otherwise → running
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes