Changeset 224127 in webkit
- Timestamp:
- Oct 27, 2017 1:17:53 PM (7 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r224125 r224127 1 2017-10-27 Antoine Quint <graouts@apple.com> 2 3 [Web Animations] Use Seconds vs. MonotonicTime to represent times 4 https://bugs.webkit.org/show_bug.cgi?id=178950 5 6 Reviewed by Dean Jackson. 7 8 Animation start times, all expressed in seconds, in the Web Animations API are relative to the timeline 9 originTime, itself relative to the page's nagigation time (Performance.navigationTime), so it makes more 10 sense to use Seconds to represent them as opposed to a MonotonicTime. 11 12 * animation/WebAnimation.cpp: 13 (WebCore::WebAnimation::bindingsStartTime const): 14 (WebCore::WebAnimation::setBindingsStartTime): 15 * animation/WebAnimation.h: 16 1 17 2017-10-27 Chris Dumez <cdumez@apple.com> 2 18 -
trunk/Source/WebCore/animation/WebAnimation.cpp
r223883 r224127 62 62 { 63 63 if (m_startTime) 64 return m_startTime-> secondsSinceEpoch().value();64 return m_startTime->value(); 65 65 return std::nullopt; 66 66 } … … 71 71 m_startTime = std::nullopt; 72 72 else 73 m_startTime = MonotonicTime::fromRawSeconds(startTime.value());73 m_startTime = Seconds(startTime.value()); 74 74 } 75 75 -
trunk/Source/WebCore/animation/WebAnimation.h
r223883 r224127 27 27 28 28 #include <wtf/Forward.h> 29 #include <wtf/MonotonicTime.h>30 29 #include <wtf/Optional.h> 31 30 #include <wtf/Ref.h> 32 31 #include <wtf/RefCounted.h> 33 32 #include <wtf/RefPtr.h> 33 #include <wtf/Seconds.h> 34 34 35 35 namespace WebCore { … … 48 48 std::optional<double> bindingsStartTime() const; 49 49 void setBindingsStartTime(std::optional<double>); 50 std::optional< MonotonicTime> startTime() const { return m_startTime; }51 void setStartTime( MonotonicTime&startTime) { m_startTime = startTime; }50 std::optional<Seconds> startTime() const { return m_startTime; } 51 void setStartTime(Seconds startTime) { m_startTime = startTime; } 52 52 53 53 String description(); … … 57 57 RefPtr<AnimationEffect> m_effect; 58 58 RefPtr<AnimationTimeline> m_timeline; 59 std::optional< MonotonicTime> m_startTime;59 std::optional<Seconds> m_startTime; 60 60 }; 61 61
Note: See TracChangeset
for help on using the changeset viewer.