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

Side by Side Diff: third_party/WebKit/Source/core/svg/animation/SMILTimeContainer.cpp

Issue 2254303005: Don't schedule a wake-up if the timeline hasn't started (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@smilcontainer-timeline-cleanup
Patch Set: Created 4 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2008 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 } 220 }
221 221
222 void SMILTimeContainer::resume() 222 void SMILTimeContainer::resume()
223 { 223 {
224 if (!handleAnimationPolicy(RestartOnceTimer)) 224 if (!handleAnimationPolicy(RestartOnceTimer))
225 return; 225 return;
226 DCHECK(isPaused()); 226 DCHECK(isPaused());
227 227
228 m_paused = false; 228 m_paused = false;
229 229
230 if (isStarted()) 230 if (!isStarted())
231 synchronizeToDocumentTimeline(); 231 return;
232 232
233 synchronizeToDocumentTimeline();
233 scheduleWakeUp(0, SynchronizeAnimations); 234 scheduleWakeUp(0, SynchronizeAnimations);
234 } 235 }
235 236
236 void SMILTimeContainer::setElapsed(SMILTime time) 237 void SMILTimeContainer::setElapsed(SMILTime time)
237 { 238 {
238 m_presentationTime = time.value(); 239 m_presentationTime = time.value();
239 240
240 // If the document hasn't finished loading, |m_presentationTime| will be 241 // If the document hasn't finished loading, |m_presentationTime| will be
241 // used as the start time to seek to once it's possible. 242 // used as the start time to seek to once it's possible.
242 if (!isStarted()) 243 if (!isStarted())
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 setElapsed(elapsed().value() + initialFrameDelay); 546 setElapsed(elapsed().value() + initialFrameDelay);
546 } 547 }
547 548
548 DEFINE_TRACE(SMILTimeContainer) 549 DEFINE_TRACE(SMILTimeContainer)
549 { 550 {
550 visitor->trace(m_scheduledAnimations); 551 visitor->trace(m_scheduledAnimations);
551 visitor->trace(m_ownerSVGElement); 552 visitor->trace(m_ownerSVGElement);
552 } 553 }
553 554
554 } // namespace blink 555 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698