summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/renderer/core/animation/document_timeline.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/blink/renderer/core/animation/document_timeline.h')
-rw-r--r--chromium/third_party/blink/renderer/core/animation/document_timeline.h23
1 files changed, 14 insertions, 9 deletions
diff --git a/chromium/third_party/blink/renderer/core/animation/document_timeline.h b/chromium/third_party/blink/renderer/core/animation/document_timeline.h
index ce4350a6a60..080957bcc37 100644
--- a/chromium/third_party/blink/renderer/core/animation/document_timeline.h
+++ b/chromium/third_party/blink/renderer/core/animation/document_timeline.h
@@ -68,15 +68,16 @@ class CORE_EXPORT DocumentTimeline : public AnimationTimeline {
virtual void Trace(blink::Visitor* visitor) {}
};
- static DocumentTimeline* Create(Document*,
- TimeDelta origin_time = TimeDelta(),
- PlatformTiming* = nullptr);
+ static DocumentTimeline* Create(
+ Document*,
+ base::TimeDelta origin_time = base::TimeDelta(),
+ PlatformTiming* = nullptr);
// Web Animations API IDL constructor
static DocumentTimeline* Create(ExecutionContext*,
const DocumentTimelineOptions*);
- DocumentTimeline(Document*, TimeDelta origin_time, PlatformTiming*);
+ DocumentTimeline(Document*, base::TimeDelta origin_time, PlatformTiming*);
~DocumentTimeline() override = default;
bool IsDocumentTimeline() const final { return true; }
@@ -87,7 +88,10 @@ class CORE_EXPORT DocumentTimeline : public AnimationTimeline {
Animation* Play(AnimationEffect*);
HeapVector<Member<Animation>> getAnimations();
- void AnimationAttached(Animation&);
+ void AnimationAttached(Animation*) override;
+ // animations_ is a map of weak members so there is no need to explicitly
+ // clean it up.
+ void AnimationDetached(Animation*) override {}
bool IsActive() const override;
bool HasPendingUpdates() const {
@@ -96,7 +100,7 @@ class CORE_EXPORT DocumentTimeline : public AnimationTimeline {
wtf_size_t PendingAnimationsCount() const {
return animations_needing_update_.size();
}
- TimeTicks ZeroTime();
+ base::TimeTicks ZeroTime();
double currentTime(bool& is_null) override;
double currentTime();
double CurrentTimeInternal(bool& is_null);
@@ -118,9 +122,10 @@ class CORE_EXPORT DocumentTimeline : public AnimationTimeline {
return compositor_timeline_.get();
}
- Document* GetDocument() { return document_.Get(); }
+ Document* GetDocument() override { return document_.Get(); }
void Wake();
void ResetForTesting();
+ void SetTimingForTesting(PlatformTiming* timing);
bool HasAnimations() { return !animations_.IsEmpty(); }
void Trace(blink::Visitor*) override;
@@ -130,10 +135,10 @@ class CORE_EXPORT DocumentTimeline : public AnimationTimeline {
// Origin time for the timeline relative to the time origin of the document.
// Provided when the timeline is constructed. See
// https://drafts.csswg.org/web-animations/#dom-documenttimelineoptions-origintime.
- TimeDelta origin_time_;
+ base::TimeDelta origin_time_;
// The origin time. This is computed by adding |origin_time_| to the time
// origin of the document.
- TimeTicks zero_time_;
+ base::TimeTicks zero_time_;
bool zero_time_initialized_;
unsigned outdated_animation_count_;
// Animations which will be updated on the next frame