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

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

Issue 21779003: Web Animations CSS: Snapshot missing start/end Keyframes and remove duplicates (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
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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 existing->value->setPaused(paused); 175 existing->value->setPaused(paused);
176 inactive.remove(animationName.impl()); 176 inactive.remove(animationName.impl());
177 continue; 177 continue;
178 } 178 }
179 179
180 KeyframeAnimationEffect::KeyframeVector keyframes; 180 KeyframeAnimationEffect::KeyframeVector keyframes;
181 element->document()->styleResolver()->resolveKeyframes(element, styl e, animationName.impl(), keyframes); 181 element->document()->styleResolver()->resolveKeyframes(element, styl e, animationName.impl(), keyframes);
182 if (!keyframes.isEmpty()) { 182 if (!keyframes.isEmpty()) {
183 Timing timing; 183 Timing timing;
184 timingFromAnimationData(animationData, timing); 184 timingFromAnimationData(animationData, timing);
185 // FIXME: Keyframes are already normalized, perhaps there should be a flag on KeyframeAnimationEffect to skip normalization.
Steve Block 2013/08/06 06:30:20 Sounds reasonable. Filed crbug.com/268791
185 m_animations.set(animationName.impl(), element->document()->time line()->play( 186 m_animations.set(animationName.impl(), element->document()->time line()->play(
186 Animation::create(element, KeyframeAnimationEffect::create(k eyframes), timing).get()).get()); 187 Animation::create(element, KeyframeAnimationEffect::create(k eyframes), timing).get()).get());
187 } 188 }
188 } 189 }
189 } 190 }
190 191
191 for (HashSet<StringImpl*>::const_iterator iter = inactive.begin(); iter != i nactive.end(); ++iter) 192 for (HashSet<StringImpl*>::const_iterator iter = inactive.begin(); iter != i nactive.end(); ++iter)
192 m_animations.take(*iter)->cancel(); 193 m_animations.take(*iter)->cancel();
193 } 194 }
194 195
195 void CSSAnimations::cancel() 196 void CSSAnimations::cancel()
196 { 197 {
197 for (AnimationMap::iterator iter = m_animations.begin(); iter != m_animation s.end(); ++iter) 198 for (AnimationMap::iterator iter = m_animations.begin(); iter != m_animation s.end(); ++iter)
198 iter->value->cancel(); 199 iter->value->cancel();
199 200
200 m_animations.clear(); 201 m_animations.clear();
201 } 202 }
202 203
203 } // namespace WebCore 204 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | Source/core/css/resolver/StyleResolver.cpp » ('j') | Source/core/css/resolver/StyleResolver.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698