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

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

Issue 2547053003: s/ passed(...) / WTF::passed(...) / to avoid future ambiguity w/ base::Passed. (Closed)
Patch Set: Rebasing... 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 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 Vector<double> values; 203 Vector<double> values;
204 for (size_t i = 0; i < n; i++) { 204 for (size_t i = 0; i < n; i++) {
205 values.append(static_cast<double>(i)); 205 values.append(static_cast<double>(i));
206 } 206 }
207 return createCompositableFloatKeyframeVector(values); 207 return createCompositableFloatKeyframeVector(values);
208 } 208 }
209 209
210 std::unique_ptr<AnimatableValueKeyframeVector> 210 std::unique_ptr<AnimatableValueKeyframeVector>
211 createCompositableFloatKeyframeVector(Vector<double>& values) { 211 createCompositableFloatKeyframeVector(Vector<double>& values) {
212 std::unique_ptr<AnimatableValueKeyframeVector> frames = 212 std::unique_ptr<AnimatableValueKeyframeVector> frames =
213 wrapUnique(new AnimatableValueKeyframeVector); 213 WTF::wrapUnique(new AnimatableValueKeyframeVector);
214 for (size_t i = 0; i < values.size(); i++) { 214 for (size_t i = 0; i < values.size(); i++) {
215 double offset = 1.0 / (values.size() - 1) * i; 215 double offset = 1.0 / (values.size() - 1) * i;
216 RefPtr<AnimatableDouble> value = AnimatableDouble::create(values[i]); 216 RefPtr<AnimatableDouble> value = AnimatableDouble::create(values[i]);
217 frames->append( 217 frames->append(
218 createReplaceOpKeyframe(CSSPropertyOpacity, value.get(), offset) 218 createReplaceOpKeyframe(CSSPropertyOpacity, value.get(), offset)
219 .get()); 219 .get());
220 } 220 }
221 return frames; 221 return frames;
222 } 222 }
223 223
224 std::unique_ptr<AnimatableValueKeyframeVector> 224 std::unique_ptr<AnimatableValueKeyframeVector>
225 createCompositableTransformKeyframeVector( 225 createCompositableTransformKeyframeVector(
226 const Vector<TransformOperations>& values) { 226 const Vector<TransformOperations>& values) {
227 std::unique_ptr<AnimatableValueKeyframeVector> frames = 227 std::unique_ptr<AnimatableValueKeyframeVector> frames =
228 wrapUnique(new AnimatableValueKeyframeVector); 228 WTF::wrapUnique(new AnimatableValueKeyframeVector);
229 for (size_t i = 0; i < values.size(); ++i) { 229 for (size_t i = 0; i < values.size(); ++i) {
230 double offset = 1.0f / (values.size() - 1) * i; 230 double offset = 1.0f / (values.size() - 1) * i;
231 RefPtr<AnimatableTransform> value = 231 RefPtr<AnimatableTransform> value =
232 AnimatableTransform::create(values[i], 1); 232 AnimatableTransform::create(values[i], 1);
233 frames->append( 233 frames->append(
234 createReplaceOpKeyframe(CSSPropertyTransform, value.get(), offset) 234 createReplaceOpKeyframe(CSSPropertyTransform, value.get(), offset)
235 .get()); 235 .get());
236 } 236 }
237 return frames; 237 return frames;
238 } 238 }
(...skipping 1005 matching lines...) Expand 10 before | Expand all | Expand 10 after
1244 simulateFrame(1.); 1244 simulateFrame(1.);
1245 1245
1246 element->setLayoutObject(nullptr); 1246 element->setLayoutObject(nullptr);
1247 LayoutObjectProxy::dispose(layoutObject); 1247 LayoutObjectProxy::dispose(layoutObject);
1248 1248
1249 ThreadState::current()->collectAllGarbage(); 1249 ThreadState::current()->collectAllGarbage();
1250 EXPECT_TRUE(element->elementAnimations()->animations().isEmpty()); 1250 EXPECT_TRUE(element->elementAnimations()->animations().isEmpty());
1251 } 1251 }
1252 1252
1253 } // namespace blink 1253 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698