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

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

Issue 21156005: Web Animations: Add an event delegate to allow different forms of event dispatch (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/core/animation/TimedItem.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 25 matching lines...) Expand all
36 #include "core/dom/Element.h" 36 #include "core/dom/Element.h"
37 37
38 namespace WebCore { 38 namespace WebCore {
39 39
40 PassRefPtr<Animation> Animation::create(PassRefPtr<Element> target, PassRefPtr<A nimationEffect> effect, const Timing& timing) 40 PassRefPtr<Animation> Animation::create(PassRefPtr<Element> target, PassRefPtr<A nimationEffect> effect, const Timing& timing)
41 { 41 {
42 return adoptRef(new Animation(target, effect, timing)); 42 return adoptRef(new Animation(target, effect, timing));
43 } 43 }
44 44
45 Animation::Animation(PassRefPtr<Element> target, PassRefPtr<AnimationEffect> eff ect, const Timing& timing) 45 Animation::Animation(PassRefPtr<Element> target, PassRefPtr<AnimationEffect> eff ect, const Timing& timing)
46 : TimedItem(timing) 46 : TimedItem(timing, nullptr)
pdr. 2013/08/01 21:11:16 Would it be useful to change the TimedItem to use
dstockwell 2013/08/02 00:23:26 Done.
47 , m_target(target) 47 , m_target(target)
48 , m_effect(effect) 48 , m_effect(effect)
49 , m_activeInAnimationStack(false) 49 , m_activeInAnimationStack(false)
50 { 50 {
51 } 51 }
52 52
53 void Animation::willDetach() 53 void Animation::willDetach()
54 { 54 {
55 if (m_activeInAnimationStack) 55 if (m_activeInAnimationStack)
56 clearEffects(); 56 clearEffects();
(...skipping 27 matching lines...) Expand all
84 void Animation::updateChildrenAndEffects(bool wasInEffect) const 84 void Animation::updateChildrenAndEffects(bool wasInEffect) const
85 { 85 {
86 ASSERT(m_activeInAnimationStack == wasInEffect); 86 ASSERT(m_activeInAnimationStack == wasInEffect);
87 if (isInEffect()) 87 if (isInEffect())
88 const_cast<Animation*>(this)->applyEffects(wasInEffect); 88 const_cast<Animation*>(this)->applyEffects(wasInEffect);
89 else if (wasInEffect) 89 else if (wasInEffect)
90 const_cast<Animation*>(this)->clearEffects(); 90 const_cast<Animation*>(this)->clearEffects();
91 } 91 }
92 92
93 } // namespace WebCore 93 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | Source/core/animation/TimedItem.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698