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

Side by Side Diff: Source/core/animation/StringKeyframe.cpp

Issue 813233002: Animation: Fix loss of type information when interpolating value of 0 (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Attempt no2 at fixing linux oilpan errors Created 6 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "core/animation/StringKeyframe.h" 6 #include "core/animation/StringKeyframe.h"
7 7
8 #include "core/animation/ColorStyleInterpolation.h" 8 #include "core/animation/ColorStyleInterpolation.h"
9 #include "core/animation/DefaultStyleInterpolation.h" 9 #include "core/animation/DefaultStyleInterpolation.h"
10 #include "core/animation/DeferredLegacyStyleInterpolation.h" 10 #include "core/animation/DeferredLegacyStyleInterpolation.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 case CSSPropertyColor: 130 case CSSPropertyColor:
131 case CSSPropertyFloodColor: 131 case CSSPropertyFloodColor:
132 case CSSPropertyLightingColor: 132 case CSSPropertyLightingColor:
133 case CSSPropertyOutlineColor: 133 case CSSPropertyOutlineColor:
134 case CSSPropertyStopColor: 134 case CSSPropertyStopColor:
135 case CSSPropertyTextDecorationColor: 135 case CSSPropertyTextDecorationColor:
136 case CSSPropertyWebkitColumnRuleColor: 136 case CSSPropertyWebkitColumnRuleColor:
137 case CSSPropertyWebkitTextStrokeColor: 137 case CSSPropertyWebkitTextStrokeColor:
138 if (ColorStyleInterpolation::canCreateFrom(*fromCSSValue) && ColorStyleI nterpolation::canCreateFrom(*toCSSValue)) 138 if (ColorStyleInterpolation::canCreateFrom(*fromCSSValue) && ColorStyleI nterpolation::canCreateFrom(*toCSSValue))
139 return ColorStyleInterpolation::create(*fromCSSValue, *toCSSValue, p roperty); 139 return ColorStyleInterpolation::create(*fromCSSValue, *toCSSValue, p roperty);
140 case CSSPropertyBorderBottomLeftRadius:
141 case CSSPropertyBorderBottomRightRadius:
142 case CSSPropertyBorderTopLeftRadius:
143 case CSSPropertyBorderTopRightRadius:
144 range = ValueRangeNonNegative;
145 // Fall through
146 case CSSPropertyPerspectiveOrigin:
147 case CSSPropertyObjectPosition:
148 if (LengthPairStyleInterpolation::canCreateFrom(*fromCSSValue) && Length PairStyleInterpolation::canCreateFrom(*toCSSValue))
149 return LengthPairStyleInterpolation::create(*fromCSSValue, *toCSSVal ue, property, range);
150 break;
samli 2014/12/22 03:38:04 Split this into a separate patch
140 default: 151 default:
141 break; 152 break;
142 } 153 }
143 154
144 if (DeferredLegacyStyleInterpolation::interpolationRequiresStyleResolve(*fro mCSSValue) || DeferredLegacyStyleInterpolation::interpolationRequiresStyleResolv e(*toCSSValue)) 155 if (DeferredLegacyStyleInterpolation::interpolationRequiresStyleResolve(*fro mCSSValue) || DeferredLegacyStyleInterpolation::interpolationRequiresStyleResolv e(*toCSSValue))
145 return DeferredLegacyStyleInterpolation::create(fromCSSValue, toCSSValue , property); 156 return DeferredLegacyStyleInterpolation::create(fromCSSValue, toCSSValue , property);
146 157
147 // FIXME: Remove the use of AnimatableValues, RenderStyles and Elements here . 158 // FIXME: Remove the use of AnimatableValues, RenderStyles and Elements here .
148 // FIXME: Remove this cache 159 // FIXME: Remove this cache
149 ASSERT(element); 160 ASSERT(element);
(...skipping 19 matching lines...) Expand all
169 } 180 }
170 181
171 void StringKeyframe::PropertySpecificKeyframe::trace(Visitor* visitor) 182 void StringKeyframe::PropertySpecificKeyframe::trace(Visitor* visitor)
172 { 183 {
173 visitor->trace(m_value); 184 visitor->trace(m_value);
174 visitor->trace(m_animatableValueCache); 185 visitor->trace(m_animatableValueCache);
175 Keyframe::PropertySpecificKeyframe::trace(visitor); 186 Keyframe::PropertySpecificKeyframe::trace(visitor);
176 } 187 }
177 188
178 } 189 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698