Bug 181857

Summary: [Web Animations] Expose timing properties (delay, endDelay, fill, iterationStart, iterations, direction) and getComputedTiming()
Product: WebKit Reporter: Antoine Quint <graouts>
Component: AnimationsAssignee: Antoine Quint <graouts>
Status: RESOLVED FIXED    
Severity: Normal CC: dino, ews-watchlist, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari Technology Preview   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch dino: review+

Antoine Quint
Reported 2018-01-19 08:45:56 PST
We need to expose most of the timing properties on AnimationEffecTiming, namely: - delay - endDelay - fill - iterationStart - iterations - direction … and also AnimationEffect::getComputedTiming() which exposes the computed values for those properties and some of the already-exposed properties.
Attachments
Patch (138.20 KB, patch)
2018-01-19 09:17 PST, Antoine Quint
no flags
Patch (138.17 KB, patch)
2018-01-19 09:23 PST, Antoine Quint
dino: review+
Radar WebKit Bug Importer
Comment 1 2018-01-19 09:10:05 PST
Antoine Quint
Comment 2 2018-01-19 09:17:57 PST
EWS Watchlist
Comment 3 2018-01-19 09:21:13 PST
Attachment 331739 [details] did not pass style-queue: ERROR: Source/WebCore/ChangeLog:20: You should remove the 'No new tests' and either add and list tests, or explain why no new tests were possible. [changelog/nonewtests] [5] Total errors found: 1 in 43 files If any of these errors are false positives, please file a bug against check-webkit-style.
Antoine Quint
Comment 4 2018-01-19 09:23:03 PST
Dean Jackson
Comment 5 2018-01-19 09:44:24 PST
Comment on attachment 331740 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=331740&action=review > Source/WebCore/animation/AnimationEffect.cpp:65 > + else > + computedTiming.localTime = std::nullopt; Wouldn't this be the default value anyway? > Source/WebCore/animation/ComputedTimingProperties.h:38 > + double endTime; > + double activeDuration; > + std::optional<double> localTime; > + std::optional<double> progress; > + std::optional<double> currentIteration; Add some default values here. > Source/WebCore/animation/WebAnimationUtilities.h:32 > +inline double secondsToWebAnimationsAPITime(const Seconds time) Could you just put this in an existing header that is already included by everything?
Antoine Quint
Comment 6 2018-01-19 09:48:28 PST
(In reply to Dean Jackson from comment #5) > Comment on attachment 331740 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=331740&action=review > > > Source/WebCore/animation/AnimationEffect.cpp:65 > > + else > > + computedTiming.localTime = std::nullopt; > > Wouldn't this be the default value anyway? Good point, I'll check. > > Source/WebCore/animation/ComputedTimingProperties.h:38 > > + double endTime; > > + double activeDuration; > > + std::optional<double> localTime; > > + std::optional<double> progress; > > + std::optional<double> currentIteration; > > Add some default values here. These are _always_ computed, I'm not sure there's any value in that. > > Source/WebCore/animation/WebAnimationUtilities.h:32 > > +inline double secondsToWebAnimationsAPITime(const Seconds time) > > Could you just put this in an existing header that is already included by > everything? None that I could find.
Antoine Quint
Comment 7 2018-01-19 09:57:01 PST
Note You need to log in before you can comment on or make changes to this bug.