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

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: isNull not isNullTime 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
« no previous file with comments | « Source/core/animation/DocumentTimeline.h ('k') | Source/core/animation/DocumentTimelineTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/DocumentTimeline.cpp
diff --git a/Source/core/animation/DocumentTimeline.cpp b/Source/core/animation/DocumentTimeline.cpp
index 77ef592d566ff005da38639a7d62257444a653db..88bc50d0c12a24df1522f541f1680182e1440b3a 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& isNull)
{
- if (!m_document)
+ if (!m_document) {
+ isNull = true;
return std::numeric_limits<double>::quiet_NaN();
- return m_document->animationClock().currentTime() - m_zeroTime;
+ }
+ double result = m_document->animationClock().currentTime() - m_zeroTime;
+ isNull = std::isnan(result);
+ return result;
+}
+
+double DocumentTimeline::currentTime()
+{
+ bool isNull;
+ return currentTime(isNull);
}
double DocumentTimeline::effectiveTime()
« no previous file with comments | « Source/core/animation/DocumentTimeline.h ('k') | Source/core/animation/DocumentTimelineTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698