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

Side by Side Diff: sky/engine/core/animation/animatable/AnimatableValueTestHelper.cpp

Issue 1214633005: Remove CSS clients of ImageResource (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 5 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
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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 { 42 {
43 *os << "AnimatableClipPathOperation@" << &animValue; 43 *os << "AnimatableClipPathOperation@" << &animValue;
44 } 44 }
45 45
46 void PrintTo(const AnimatableColor& animColor, ::std::ostream* os) 46 void PrintTo(const AnimatableColor& animColor, ::std::ostream* os)
47 { 47 {
48 *os << "AnimatableColor(" 48 *os << "AnimatableColor("
49 << animColor.color().serialized().utf8().data() << ")"; 49 << animColor.color().serialized().utf8().data() << ")";
50 } 50 }
51 51
52 void PrintTo(const AnimatableImage& animImage, ::std::ostream* os)
53 {
54 PrintTo(*(animImage.toCSSValue()), os, "AnimatableImage");
55 }
56
57 void PrintTo(const AnimatableNeutral& animValue, ::std::ostream* os) 52 void PrintTo(const AnimatableNeutral& animValue, ::std::ostream* os)
58 { 53 {
59 *os << "AnimatableNeutral@" << &animValue; 54 *os << "AnimatableNeutral@" << &animValue;
60 } 55 }
61 56
62 void PrintTo(const AnimatableRepeatable& animValue, ::std::ostream* os) 57 void PrintTo(const AnimatableRepeatable& animValue, ::std::ostream* os)
63 { 58 {
64 *os << "AnimatableRepeatable("; 59 *os << "AnimatableRepeatable(";
65 60
66 const Vector<RefPtr<AnimatableValue> > v = animValue.values(); 61 const Vector<RefPtr<AnimatableValue> > v = animValue.values();
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 { 126 {
132 PrintTo(*(animUnknown.toCSSValue().get()), os, "AnimatableUnknown"); 127 PrintTo(*(animUnknown.toCSSValue().get()), os, "AnimatableUnknown");
133 } 128 }
134 129
135 void PrintTo(const AnimatableValue& animValue, ::std::ostream* os) 130 void PrintTo(const AnimatableValue& animValue, ::std::ostream* os)
136 { 131 {
137 if (animValue.isClipPathOperation()) 132 if (animValue.isClipPathOperation())
138 PrintTo(toAnimatableClipPathOperation(animValue), os); 133 PrintTo(toAnimatableClipPathOperation(animValue), os);
139 else if (animValue.isColor()) 134 else if (animValue.isColor())
140 PrintTo(toAnimatableColor(animValue), os); 135 PrintTo(toAnimatableColor(animValue), os);
141 else if (animValue.isImage())
142 PrintTo(toAnimatableImage(animValue), os);
143 else if (animValue.isNeutral()) 136 else if (animValue.isNeutral())
144 PrintTo(static_cast<const AnimatableNeutral&>(animValue), os); 137 PrintTo(static_cast<const AnimatableNeutral&>(animValue), os);
145 else if (animValue.isRepeatable()) 138 else if (animValue.isRepeatable())
146 PrintTo(toAnimatableRepeatable(animValue), os); 139 PrintTo(toAnimatableRepeatable(animValue), os);
147 else if (animValue.isShapeValue()) 140 else if (animValue.isShapeValue())
148 PrintTo(toAnimatableShapeValue(animValue), os); 141 PrintTo(toAnimatableShapeValue(animValue), os);
149 else if (animValue.isStrokeDasharrayList()) 142 else if (animValue.isStrokeDasharrayList())
150 PrintTo(toAnimatableStrokeDasharrayList(animValue), os); 143 PrintTo(toAnimatableStrokeDasharrayList(animValue), os);
151 else if (animValue.isTransform()) 144 else if (animValue.isTransform())
152 PrintTo(toAnimatableTransform(animValue), os); 145 PrintTo(toAnimatableTransform(animValue), os);
153 else if (animValue.isUnknown()) 146 else if (animValue.isUnknown())
154 PrintTo(toAnimatableUnknown(animValue), os); 147 PrintTo(toAnimatableUnknown(animValue), os);
155 else 148 else
156 *os << "Unknown AnimatableValue - update ifelse chain in AnimatableValue TestHelper.h"; 149 *os << "Unknown AnimatableValue - update ifelse chain in AnimatableValue TestHelper.h";
157 } 150 }
158 151
159 } // namespace blink 152 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698