Title: [224127] trunk/Source/WebCore
- Revision
- 224127
- Author
- [email protected]
- Date
- 2017-10-27 13:17:53 -0700 (Fri, 27 Oct 2017)
Log Message
[Web Animations] Use Seconds vs. MonotonicTime to represent times
https://bugs.webkit.org/show_bug.cgi?id=178950
Reviewed by Dean Jackson.
Animation start times, all expressed in seconds, in the Web Animations API are relative to the timeline
originTime, itself relative to the page's nagigation time (Performance.navigationTime), so it makes more
sense to use Seconds to represent them as opposed to a MonotonicTime.
* animation/WebAnimation.cpp:
(WebCore::WebAnimation::bindingsStartTime const):
(WebCore::WebAnimation::setBindingsStartTime):
* animation/WebAnimation.h:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (224126 => 224127)
--- trunk/Source/WebCore/ChangeLog 2017-10-27 20:09:34 UTC (rev 224126)
+++ trunk/Source/WebCore/ChangeLog 2017-10-27 20:17:53 UTC (rev 224127)
@@ -1,3 +1,19 @@
+2017-10-27 Antoine Quint <[email protected]>
+
+ [Web Animations] Use Seconds vs. MonotonicTime to represent times
+ https://bugs.webkit.org/show_bug.cgi?id=178950
+
+ Reviewed by Dean Jackson.
+
+ Animation start times, all expressed in seconds, in the Web Animations API are relative to the timeline
+ originTime, itself relative to the page's nagigation time (Performance.navigationTime), so it makes more
+ sense to use Seconds to represent them as opposed to a MonotonicTime.
+
+ * animation/WebAnimation.cpp:
+ (WebCore::WebAnimation::bindingsStartTime const):
+ (WebCore::WebAnimation::setBindingsStartTime):
+ * animation/WebAnimation.h:
+
2017-10-27 Chris Dumez <[email protected]>
DOMWindow::dispatchEvent() does not reset the event's dispatch flag
Modified: trunk/Source/WebCore/animation/WebAnimation.cpp (224126 => 224127)
--- trunk/Source/WebCore/animation/WebAnimation.cpp 2017-10-27 20:09:34 UTC (rev 224126)
+++ trunk/Source/WebCore/animation/WebAnimation.cpp 2017-10-27 20:17:53 UTC (rev 224127)
@@ -61,7 +61,7 @@
std::optional<double> WebAnimation::bindingsStartTime() const
{
if (m_startTime)
- return m_startTime->secondsSinceEpoch().value();
+ return m_startTime->value();
return std::nullopt;
}
@@ -70,7 +70,7 @@
if (startTime == std::nullopt)
m_startTime = std::nullopt;
else
- m_startTime = MonotonicTime::fromRawSeconds(startTime.value());
+ m_startTime = Seconds(startTime.value());
}
String WebAnimation::description()
Modified: trunk/Source/WebCore/animation/WebAnimation.h (224126 => 224127)
--- trunk/Source/WebCore/animation/WebAnimation.h 2017-10-27 20:09:34 UTC (rev 224126)
+++ trunk/Source/WebCore/animation/WebAnimation.h 2017-10-27 20:17:53 UTC (rev 224127)
@@ -26,11 +26,11 @@
#pragma once
#include <wtf/Forward.h>
-#include <wtf/MonotonicTime.h>
#include <wtf/Optional.h>
#include <wtf/Ref.h>
#include <wtf/RefCounted.h>
#include <wtf/RefPtr.h>
+#include <wtf/Seconds.h>
namespace WebCore {
@@ -47,8 +47,8 @@
AnimationTimeline* timeline() const { return m_timeline.get(); }
std::optional<double> bindingsStartTime() const;
void setBindingsStartTime(std::optional<double>);
- std::optional<MonotonicTime> startTime() const { return m_startTime; }
- void setStartTime(MonotonicTime& startTime) { m_startTime = startTime; }
+ std::optional<Seconds> startTime() const { return m_startTime; }
+ void setStartTime(Seconds startTime) { m_startTime = startTime; }
String description();
@@ -56,7 +56,7 @@
WebAnimation(AnimationTimeline*);
RefPtr<AnimationEffect> m_effect;
RefPtr<AnimationTimeline> m_timeline;
- std::optional<MonotonicTime> m_startTime;
+ std::optional<Seconds> m_startTime;
};
} // namespace WebCore
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes