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

Side by Side Diff: Source/core/animation/DocumentTimeline.cpp

Issue 210363007: Declare onFinish event handler for AnimationPlayer (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: AnimationPlayerEvent guarded by WebAnimationsAPI flag Created 6 years, 8 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 } 63 }
64 64
65 DocumentTimeline::~DocumentTimeline() 65 DocumentTimeline::~DocumentTimeline()
66 { 66 {
67 for (HashSet<AnimationPlayer*>::iterator it = m_players.begin(); it != m_pla yers.end(); ++it) 67 for (HashSet<AnimationPlayer*>::iterator it = m_players.begin(); it != m_pla yers.end(); ++it)
68 (*it)->timelineDestroyed(); 68 (*it)->timelineDestroyed();
69 } 69 }
70 70
71 AnimationPlayer* DocumentTimeline::createAnimationPlayer(TimedItem* child) 71 AnimationPlayer* DocumentTimeline::createAnimationPlayer(TimedItem* child)
72 { 72 {
73 RefPtr<AnimationPlayer> player = AnimationPlayer::create(*this, child); 73 RefPtr<AnimationPlayer> player = AnimationPlayer::create(m_document ? m_docu ment->contextDocument().get() : 0, *this, child);
alancutter (OOO until 2018) 2014/03/31 06:28:13 Ideally a JS handle to DocumentTimeline would keep
Eric Willigers 2014/03/31 08:48:47 Done.
74 AnimationPlayer* result = player.get(); 74 AnimationPlayer* result = player.get();
75 m_players.add(result); 75 m_players.add(result);
76 setOutdatedAnimationPlayer(result); 76 setOutdatedAnimationPlayer(result);
77 return result; 77 return result;
78 } 78 }
79 79
80 AnimationPlayer* DocumentTimeline::play(TimedItem* child) 80 AnimationPlayer* DocumentTimeline::play(TimedItem* child)
81 { 81 {
82 AnimationPlayer* player = createAnimationPlayer(child); 82 AnimationPlayer* player = createAnimationPlayer(child);
83 player->setStartTime(effectiveTime()); 83 player->setStartTime(effectiveTime());
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 count += (timedItem && (timedItem->isCurrent() || timedItem->isInEff ect())); 187 count += (timedItem && (timedItem->isCurrent() || timedItem->isInEff ect()));
188 } 188 }
189 return count; 189 return count;
190 } 190 }
191 191
192 void DocumentTimeline::detachFromDocument() { 192 void DocumentTimeline::detachFromDocument() {
193 m_document = 0; 193 m_document = 0;
194 } 194 }
195 195
196 } // namespace 196 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698