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

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

Issue 2766723002: Migrate WTF::Vector::prepend() to ::push_front() (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/iterators/SearchBuffer.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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 if (!keyframes.isEmpty()) 160 if (!keyframes.isEmpty())
161 keyframes.shrink(targetIndex + 1); 161 keyframes.shrink(targetIndex + 1);
162 162
163 // Add 0% and 100% keyframes if absent. 163 // Add 0% and 100% keyframes if absent.
164 RefPtr<StringKeyframe> startKeyframe = 164 RefPtr<StringKeyframe> startKeyframe =
165 keyframes.isEmpty() ? nullptr : keyframes[0]; 165 keyframes.isEmpty() ? nullptr : keyframes[0];
166 if (!startKeyframe || keyframes[0]->offset() != 0) { 166 if (!startKeyframe || keyframes[0]->offset() != 0) {
167 startKeyframe = StringKeyframe::create(); 167 startKeyframe = StringKeyframe::create();
168 startKeyframe->setOffset(0); 168 startKeyframe->setOffset(0);
169 startKeyframe->setEasing(defaultTimingFunction); 169 startKeyframe->setEasing(defaultTimingFunction);
170 keyframes.prepend(startKeyframe); 170 keyframes.push_front(startKeyframe);
171 } 171 }
172 RefPtr<StringKeyframe> endKeyframe = keyframes[keyframes.size() - 1]; 172 RefPtr<StringKeyframe> endKeyframe = keyframes[keyframes.size() - 1];
173 if (endKeyframe->offset() != 1) { 173 if (endKeyframe->offset() != 1) {
174 endKeyframe = StringKeyframe::create(); 174 endKeyframe = StringKeyframe::create();
175 endKeyframe->setOffset(1); 175 endKeyframe->setOffset(1);
176 endKeyframe->setEasing(defaultTimingFunction); 176 endKeyframe->setEasing(defaultTimingFunction);
177 keyframes.push_back(endKeyframe); 177 keyframes.push_back(endKeyframe);
178 } 178 }
179 DCHECK_GE(keyframes.size(), 2U); 179 DCHECK_GE(keyframes.size(), 2U);
180 DCHECK(!keyframes.front()->offset()); 180 DCHECK(!keyframes.front()->offset());
(...skipping 1031 matching lines...) Expand 10 before | Expand all | Expand 10 after
1212 isCustomPropertyHandle); 1212 isCustomPropertyHandle);
1213 } 1213 }
1214 1214
1215 DEFINE_TRACE(CSSAnimations) { 1215 DEFINE_TRACE(CSSAnimations) {
1216 visitor->trace(m_transitions); 1216 visitor->trace(m_transitions);
1217 visitor->trace(m_pendingUpdate); 1217 visitor->trace(m_pendingUpdate);
1218 visitor->trace(m_runningAnimations); 1218 visitor->trace(m_runningAnimations);
1219 } 1219 }
1220 1220
1221 } // namespace blink 1221 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/iterators/SearchBuffer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698