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

Side by Side Diff: Source/core/animation/css/CSSAnimations.cpp

Issue 22364002: Web Animations: Address some review feedback to clean up CSS Animations (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 | « Source/core/animation/css/CSSAnimations.h ('k') | Source/core/css/resolver/StyleResolver.cpp » ('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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 129
130 if (cssAnimations) { 130 if (cssAnimations) {
131 AnimationMap::const_iterator existing(cssAnimations->m_animation s.find(animationName.impl())); 131 AnimationMap::const_iterator existing(cssAnimations->m_animation s.find(animationName.impl()));
132 if (existing != cssAnimations->m_animations.end()) { 132 if (existing != cssAnimations->m_animations.end()) {
133 inactive.remove(animationName.impl()); 133 inactive.remove(animationName.impl());
134 continue; 134 continue;
135 } 135 }
136 } 136 }
137 137
138 // If there's a delay, no styles will apply yet. 138 // If there's a delay, no styles will apply yet.
139 if (animationData->isDelaySet() && animationData->delay()) 139 if (animationData->isDelaySet() && animationData->delay()) {
140 RELEASE_ASSERT_WITH_MESSAGE(animationData->delay() > 0, "Negativ e delay is not yet supported.");
140 continue; 141 continue;
142 }
141 143
142 const StylePropertySet* keyframeStyles = resolver->firstKeyframeStyl es(element, animationName.impl()); 144 const StylePropertySet* keyframeStyles = resolver->firstKeyframeStyl es(element, animationName.impl());
143 if (keyframeStyles) { 145 if (keyframeStyles) {
144 if (!update) 146 if (!update)
145 update = adoptPtr(new CSSAnimationUpdate()); 147 update = adoptPtr(new CSSAnimationUpdate());
146 update->addStyles(keyframeStyles); 148 update->addStyles(keyframeStyles);
147 } 149 }
148 } 150 }
149 } 151 }
150 152
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 196
195 void CSSAnimations::cancel() 197 void CSSAnimations::cancel()
196 { 198 {
197 for (AnimationMap::iterator iter = m_animations.begin(); iter != m_animation s.end(); ++iter) 199 for (AnimationMap::iterator iter = m_animations.begin(); iter != m_animation s.end(); ++iter)
198 iter->value->cancel(); 200 iter->value->cancel();
199 201
200 m_animations.clear(); 202 m_animations.clear();
201 } 203 }
202 204
203 } // namespace WebCore 205 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/animation/css/CSSAnimations.h ('k') | Source/core/css/resolver/StyleResolver.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698