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

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

Issue 955863002: Support keywords in LengthStyleInterpolation (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 10 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 // 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/CompositorAnimations.h" 9 #include "core/animation/CompositorAnimations.h"
10 #include "core/animation/ConstantStyleInterpolation.h" 10 #include "core/animation/ConstantStyleInterpolation.h"
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 case CSSPropertyMarginBottom: 183 case CSSPropertyMarginBottom:
184 case CSSPropertyMarginLeft: 184 case CSSPropertyMarginLeft:
185 case CSSPropertyMarginRight: 185 case CSSPropertyMarginRight:
186 case CSSPropertyMarginTop: 186 case CSSPropertyMarginTop:
187 case CSSPropertyOutlineOffset: 187 case CSSPropertyOutlineOffset:
188 case CSSPropertyRight: 188 case CSSPropertyRight:
189 case CSSPropertyTop: 189 case CSSPropertyTop:
190 case CSSPropertyVerticalAlign: 190 case CSSPropertyVerticalAlign:
191 case CSSPropertyWordSpacing: 191 case CSSPropertyWordSpacing:
192 case CSSPropertyWebkitColumnRuleWidth: 192 case CSSPropertyWebkitColumnRuleWidth:
193 if (LengthStyleInterpolation::canCreateFrom(*fromCSSValue) && LengthStyl eInterpolation::canCreateFrom(*toCSSValue)) 193 if (LengthStyleInterpolation::canCreateFrom(*fromCSSValue, property) && LengthStyleInterpolation::canCreateFrom(*toCSSValue, property))
194 return LengthStyleInterpolation::create(*fromCSSValue, *toCSSValue, property, range); 194 return LengthStyleInterpolation::create(*fromCSSValue, *toCSSValue, property, range);
195 195
196 // FIXME: Handle keywords e.g. 'none'.
197 if (property == CSSPropertyPerspective)
198 fallBackToLegacy = true;
199 // FIXME: Handle keywords e.g. 'smaller', 'larger'. 196 // FIXME: Handle keywords e.g. 'smaller', 'larger'.
200 if (property == CSSPropertyFontSize) 197 if (property == CSSPropertyFontSize)
201 fallBackToLegacy = true; 198 fallBackToLegacy = true;
202 199
203 // FIXME: Handle keywords e.g. 'normal'
204 if (property == CSSPropertyLetterSpacing)
205 fallBackToLegacy = true;
206
207 // FIXME: Handle keywords e.g. 'thick'
208 if (property == CSSPropertyOutlineWidth || property == CSSPropertyWebkit ColumnRuleWidth)
209 fallBackToLegacy = true;
210 break; 200 break;
211 case CSSPropertyOrphans: 201 case CSSPropertyOrphans:
212 case CSSPropertyWidows: 202 case CSSPropertyWidows:
213 case CSSPropertyZIndex: 203 case CSSPropertyZIndex:
214 case CSSPropertyWebkitColumnCount: 204 case CSSPropertyWebkitColumnCount:
215 case CSSPropertyShapeImageThreshold: 205 case CSSPropertyShapeImageThreshold:
216 case CSSPropertyFillOpacity: 206 case CSSPropertyFillOpacity:
217 case CSSPropertyFloodOpacity: 207 case CSSPropertyFloodOpacity:
218 case CSSPropertyOpacity: 208 case CSSPropertyOpacity:
219 case CSSPropertyStopOpacity: 209 case CSSPropertyStopOpacity:
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 } 393 }
404 394
405 void StringKeyframe::PropertySpecificKeyframe::trace(Visitor* visitor) 395 void StringKeyframe::PropertySpecificKeyframe::trace(Visitor* visitor)
406 { 396 {
407 visitor->trace(m_value); 397 visitor->trace(m_value);
408 visitor->trace(m_animatableValueCache); 398 visitor->trace(m_animatableValueCache);
409 Keyframe::PropertySpecificKeyframe::trace(visitor); 399 Keyframe::PropertySpecificKeyframe::trace(visitor);
410 } 400 }
411 401
412 } 402 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698