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

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

Issue 956553004: Use Length for baselineShiftValue in SVGLayoutStyle (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: A few more TEs. 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 | Annotate | Revision Log
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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 case CSSPropertyPaddingTop: 170 case CSSPropertyPaddingTop:
171 case CSSPropertyPerspective: 171 case CSSPropertyPerspective:
172 case CSSPropertyShapeMargin: 172 case CSSPropertyShapeMargin:
173 case CSSPropertyWebkitBorderHorizontalSpacing: 173 case CSSPropertyWebkitBorderHorizontalSpacing:
174 case CSSPropertyWebkitBorderVerticalSpacing: 174 case CSSPropertyWebkitBorderVerticalSpacing:
175 case CSSPropertyWebkitColumnGap: 175 case CSSPropertyWebkitColumnGap:
176 case CSSPropertyWebkitColumnWidth: 176 case CSSPropertyWebkitColumnWidth:
177 case CSSPropertyWidth: 177 case CSSPropertyWidth:
178 range = RangeNonNegative; 178 range = RangeNonNegative;
179 // Fall through 179 // Fall through
180 case CSSPropertyBaselineShift:
180 case CSSPropertyBottom: 181 case CSSPropertyBottom:
181 case CSSPropertyLeft: 182 case CSSPropertyLeft:
182 case CSSPropertyLetterSpacing: 183 case CSSPropertyLetterSpacing:
183 case CSSPropertyMarginBottom: 184 case CSSPropertyMarginBottom:
184 case CSSPropertyMarginLeft: 185 case CSSPropertyMarginLeft:
185 case CSSPropertyMarginRight: 186 case CSSPropertyMarginRight:
186 case CSSPropertyMarginTop: 187 case CSSPropertyMarginTop:
187 case CSSPropertyOutlineOffset: 188 case CSSPropertyOutlineOffset:
188 case CSSPropertyRight: 189 case CSSPropertyRight:
189 case CSSPropertyTop: 190 case CSSPropertyTop:
190 case CSSPropertyVerticalAlign: 191 case CSSPropertyVerticalAlign:
191 case CSSPropertyWordSpacing: 192 case CSSPropertyWordSpacing:
192 case CSSPropertyWebkitColumnRuleWidth: 193 case CSSPropertyWebkitColumnRuleWidth:
193 if (LengthStyleInterpolation::canCreateFrom(*fromCSSValue) && LengthStyl eInterpolation::canCreateFrom(*toCSSValue)) 194 if (LengthStyleInterpolation::canCreateFrom(*fromCSSValue) && LengthStyl eInterpolation::canCreateFrom(*toCSSValue))
194 return LengthStyleInterpolation::create(*fromCSSValue, *toCSSValue, property, range); 195 return LengthStyleInterpolation::create(*fromCSSValue, *toCSSValue, property, range);
195 196
196 // FIXME: Handle keywords e.g. 'none'. 197 // FIXME: Handle keywords e.g. 'none'.
197 if (property == CSSPropertyPerspective) 198 if (property == CSSPropertyPerspective)
198 fallBackToLegacy = true; 199 fallBackToLegacy = true;
199 // FIXME: Handle keywords e.g. 'smaller', 'larger'. 200 // FIXME: Handle keywords e.g. 'smaller', 'larger'.
200 if (property == CSSPropertyFontSize) 201 if (property == CSSPropertyFontSize)
201 fallBackToLegacy = true; 202 fallBackToLegacy = true;
202 203
204 // FIXME: Handle keywords e.g. 'baseline', 'sub'.
205 if (property == CSSPropertyBaselineShift)
206 fallBackToLegacy = true;
207
203 // FIXME: Handle keywords e.g. 'normal' 208 // FIXME: Handle keywords e.g. 'normal'
204 if (property == CSSPropertyLetterSpacing) 209 if (property == CSSPropertyLetterSpacing)
205 fallBackToLegacy = true; 210 fallBackToLegacy = true;
206 211
207 // FIXME: Handle keywords e.g. 'thick' 212 // FIXME: Handle keywords e.g. 'thick'
208 if (property == CSSPropertyOutlineWidth || property == CSSPropertyWebkit ColumnRuleWidth) 213 if (property == CSSPropertyOutlineWidth || property == CSSPropertyWebkit ColumnRuleWidth)
209 fallBackToLegacy = true; 214 fallBackToLegacy = true;
210 break; 215 break;
211 case CSSPropertyOrphans: 216 case CSSPropertyOrphans:
212 case CSSPropertyWidows: 217 case CSSPropertyWidows:
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 } 327 }
323 RefPtrWillBeRawPtr<Interpolation> interpolation = LengthBoxStyleInterpol ation::maybeCreateFrom(*fromCSSValue, *toCSSValue, property); 328 RefPtrWillBeRawPtr<Interpolation> interpolation = LengthBoxStyleInterpol ation::maybeCreateFrom(*fromCSSValue, *toCSSValue, property);
324 if (interpolation) 329 if (interpolation)
325 return interpolation.release(); 330 return interpolation.release();
326 break; 331 break;
327 } 332 }
328 333
329 case CSSPropertyStrokeWidth: 334 case CSSPropertyStrokeWidth:
330 range = RangeNonNegative; 335 range = RangeNonNegative;
331 // Fall through 336 // Fall through
332 case CSSPropertyBaselineShift:
333 case CSSPropertyStrokeDashoffset: { 337 case CSSPropertyStrokeDashoffset: {
334 RefPtrWillBeRawPtr<Interpolation> interpolation = SVGLengthStyleInterpol ation::maybeCreate(*fromCSSValue, *toCSSValue, property, range); 338 RefPtrWillBeRawPtr<Interpolation> interpolation = SVGLengthStyleInterpol ation::maybeCreate(*fromCSSValue, *toCSSValue, property, range);
335 if (interpolation) 339 if (interpolation)
336 return interpolation.release(); 340 return interpolation.release();
337 341
338 break; 342 break;
339 } 343 }
340 344
341 default: 345 default:
342 // Fall back to LegacyStyleInterpolation. 346 // Fall back to LegacyStyleInterpolation.
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 } 407 }
404 408
405 void StringKeyframe::PropertySpecificKeyframe::trace(Visitor* visitor) 409 void StringKeyframe::PropertySpecificKeyframe::trace(Visitor* visitor)
406 { 410 {
407 visitor->trace(m_value); 411 visitor->trace(m_value);
408 visitor->trace(m_animatableValueCache); 412 visitor->trace(m_animatableValueCache);
409 Keyframe::PropertySpecificKeyframe::trace(visitor); 413 Keyframe::PropertySpecificKeyframe::trace(visitor);
410 } 414 }
411 415
412 } 416 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698