Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(453)

Unified Diff: Source/core/animation/DocumentTimeline.cpp

Issue 215043007: Web Animations: Expose timeline currentTime in IDL (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/animation/DocumentTimeline.cpp
diff --git a/Source/core/animation/DocumentTimeline.cpp b/Source/core/animation/DocumentTimeline.cpp
index 77ef592d566ff005da38639a7d62257444a653db..b6cc311743003ef73179b1b9b35896a59218c896 100644
--- a/Source/core/animation/DocumentTimeline.cpp
+++ b/Source/core/animation/DocumentTimeline.cpp
@@ -144,11 +144,21 @@ void DocumentTimeline::DocumentTimelineTiming::serviceOnNextFrame()
m_timeline->m_document->view()->scheduleAnimation();
}
-double DocumentTimeline::currentTime()
+double DocumentTimeline::currentTime(bool& isNullTime)
shans 2014/03/31 09:39:11 Is the reference here necessary for the IDL to wor
dstockwell 2014/03/31 23:33:29 just 'isNull'
Eric Willigers 2014/04/01 01:15:45 Done.
Eric Willigers 2014/04/01 01:15:45 This is needed because the IDL has currentTime as
{
- if (!m_document)
+ if (!m_document) {
+ isNullTime = true;
return std::numeric_limits<double>::quiet_NaN();
- return m_document->animationClock().currentTime() - m_zeroTime;
+ }
+ double result = m_document->animationClock().currentTime() - m_zeroTime;
+ isNullTime = isNull(result);
+ return result;
+}
+
+double DocumentTimeline::currentTime()
+{
+ bool isNullTime;
+ return currentTime(isNullTime);
}
double DocumentTimeline::effectiveTime()

Powered by Google App Engine
This is Rietveld 408576698