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

Side by Side Diff: third_party/WebKit/Source/core/animation/ElementAnimation.h

Issue 2562773002: Migrate WTF::Vector::append() to ::push_back() [part 2 of N] (Closed)
Patch Set: rebase Created 4 years 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
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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 103
104 if (!element.hasAnimations()) 104 if (!element.hasAnimations())
105 return animations; 105 return animations;
106 106
107 for (const auto& animation : 107 for (const auto& animation :
108 element.document().timeline().getAnimations()) { 108 element.document().timeline().getAnimations()) {
109 DCHECK(animation->effect()); 109 DCHECK(animation->effect());
110 if (toKeyframeEffectReadOnly(animation->effect())->target() == element && 110 if (toKeyframeEffectReadOnly(animation->effect())->target() == element &&
111 (animation->effect()->isCurrent() || 111 (animation->effect()->isCurrent() ||
112 animation->effect()->isInEffect())) 112 animation->effect()->isInEffect()))
113 animations.append(animation); 113 animations.push_back(animation);
114 } 114 }
115 return animations; 115 return animations;
116 } 116 }
117 117
118 private: 118 private:
119 static Animation* animateInternal(Element& element, 119 static Animation* animateInternal(Element& element,
120 EffectModel* effect, 120 EffectModel* effect,
121 const Timing& timing) { 121 const Timing& timing) {
122 KeyframeEffect* keyframeEffect = 122 KeyframeEffect* keyframeEffect =
123 KeyframeEffect::create(&element, effect, timing); 123 KeyframeEffect::create(&element, effect, timing);
124 return element.document().timeline().play(keyframeEffect); 124 return element.document().timeline().play(keyframeEffect);
125 } 125 }
126 }; 126 };
127 127
128 } // namespace blink 128 } // namespace blink
129 129
130 #endif // ElementAnimation_h 130 #endif // ElementAnimation_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698