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

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

Issue 955303002: Web Animations: Remove AnimationPlayer discarding logic (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: don't actually delete unit test Created 5 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 unified diff | Download patch
« no previous file with comments | « Source/core/animation/Animation.h ('k') | Source/core/animation/AnimationPlayer.h » ('j') | 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) 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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 // that will be, however, so the parent will need to supply it. 204 // that will be, however, so the parent will need to supply it.
205 return forwards 205 return forwards
206 ? std::numeric_limits<double>::infinity() 206 ? std::numeric_limits<double>::infinity()
207 : localTime - end; 207 : localTime - end;
208 default: 208 default:
209 ASSERT_NOT_REACHED(); 209 ASSERT_NOT_REACHED();
210 return std::numeric_limits<double>::infinity(); 210 return std::numeric_limits<double>::infinity();
211 } 211 }
212 } 212 }
213 213
214 void Animation::notifySampledEffectRemovedFromAnimationStack()
215 {
216 ASSERT(m_sampledEffect);
217 m_sampledEffect = nullptr;
218 }
219
220 #if !ENABLE(OILPAN) 214 #if !ENABLE(OILPAN)
221 void Animation::notifyElementDestroyed() 215 void Animation::notifyElementDestroyed()
222 { 216 {
223 // If our player is kept alive just by the sampledEffect, we might get our 217 // If our player is kept alive just by the sampledEffect, we might get our
224 // destructor called when we call SampledEffect::clear(), so we need to 218 // destructor called when we call SampledEffect::clear(), so we need to
225 // clear m_sampledEffect first. 219 // clear m_sampledEffect first.
226 m_target = nullptr; 220 m_target = nullptr;
227 clearEventDelegate(); 221 clearEventDelegate();
228 SampledEffect* sampledEffect = m_sampledEffect; 222 SampledEffect* sampledEffect = m_sampledEffect;
229 m_sampledEffect = nullptr; 223 m_sampledEffect = nullptr;
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 303
310 DEFINE_TRACE(Animation) 304 DEFINE_TRACE(Animation)
311 { 305 {
312 visitor->trace(m_target); 306 visitor->trace(m_target);
313 visitor->trace(m_effect); 307 visitor->trace(m_effect);
314 visitor->trace(m_sampledEffect); 308 visitor->trace(m_sampledEffect);
315 AnimationNode::trace(visitor); 309 AnimationNode::trace(visitor);
316 } 310 }
317 311
318 } // namespace blink 312 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/animation/Animation.h ('k') | Source/core/animation/AnimationPlayer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698