OLD | NEW |
---|---|
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 Loading... | |
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 |
OLD | NEW |