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

Unified Diff: third_party/WebKit/Source/core/animation/DocumentTimeline.h

Issue 2960733004: Implement DocumentTimeline constructor (Closed)
Patch Set: Created 3 years, 6 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: third_party/WebKit/Source/core/animation/DocumentTimeline.h
diff --git a/third_party/WebKit/Source/core/animation/DocumentTimeline.h b/third_party/WebKit/Source/core/animation/DocumentTimeline.h
index 59f41e35329a3bc4fadd4c77fc3df2232d42efc0..fb7bc9dcc212b795c1da7fa5b1701423695da0f1 100644
--- a/third_party/WebKit/Source/core/animation/DocumentTimeline.h
+++ b/third_party/WebKit/Source/core/animation/DocumentTimeline.h
@@ -50,6 +50,7 @@ namespace blink {
class Animation;
class AnimationEffectReadOnly;
class Document;
+class DocumentTimelineOptions;
// DocumentTimeline is constructed and owned by Document, and tied to its
// lifecycle.
@@ -66,7 +67,13 @@ class CORE_EXPORT DocumentTimeline : public AnimationTimeline {
DEFINE_INLINE_VIRTUAL_TRACE() {}
};
- static DocumentTimeline* Create(Document*, PlatformTiming* = nullptr);
+ static DocumentTimeline* Create(Document*,
+ double origin_time = 0.0,
alancutter (OOO until 2018) 2017/06/29 03:16:18 Let's use origin_time_in_seconds here.
+ PlatformTiming* = nullptr);
+
+ // Web Animations API IDL constructor
+ static DocumentTimeline* Create(ExecutionContext*,
+ const DocumentTimelineOptions&);
virtual ~DocumentTimeline() {}
@@ -112,11 +119,11 @@ class CORE_EXPORT DocumentTimeline : public AnimationTimeline {
DECLARE_VIRTUAL_TRACE();
- protected:
- DocumentTimeline(Document*, PlatformTiming*);
-
private:
+ DocumentTimeline(Document*, double origin_time, PlatformTiming*);
+
Member<Document> document_;
+ double origin_time_;
double zero_time_;
bool zero_time_initialized_;
unsigned outdated_animation_count_;

Powered by Google App Engine
This is Rietveld 408576698