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

Side by Side Diff: Source/core/css/resolver/AnimatedStyleBuilder.cpp

Issue 1259803007: Make AnimatedStyleBuilder value rounding consistent with StyleBuilder (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 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
« no previous file with comments | « LayoutTests/animations/interpolation/webkit-column-rule-width-interpolation.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 #include "core/animation/animatable/AnimatableLengthSize.h" 45 #include "core/animation/animatable/AnimatableLengthSize.h"
46 #include "core/animation/animatable/AnimatableRepeatable.h" 46 #include "core/animation/animatable/AnimatableRepeatable.h"
47 #include "core/animation/animatable/AnimatableSVGPaint.h" 47 #include "core/animation/animatable/AnimatableSVGPaint.h"
48 #include "core/animation/animatable/AnimatableShadow.h" 48 #include "core/animation/animatable/AnimatableShadow.h"
49 #include "core/animation/animatable/AnimatableShapeValue.h" 49 #include "core/animation/animatable/AnimatableShapeValue.h"
50 #include "core/animation/animatable/AnimatableStrokeDasharrayList.h" 50 #include "core/animation/animatable/AnimatableStrokeDasharrayList.h"
51 #include "core/animation/animatable/AnimatableTransform.h" 51 #include "core/animation/animatable/AnimatableTransform.h"
52 #include "core/animation/animatable/AnimatableUnknown.h" 52 #include "core/animation/animatable/AnimatableUnknown.h"
53 #include "core/animation/animatable/AnimatableValue.h" 53 #include "core/animation/animatable/AnimatableValue.h"
54 #include "core/animation/animatable/AnimatableVisibility.h" 54 #include "core/animation/animatable/AnimatableVisibility.h"
55 #include "core/css/CSSPrimitiveValue.h"
55 #include "core/css/CSSPrimitiveValueMappings.h" 56 #include "core/css/CSSPrimitiveValueMappings.h"
56 #include "core/css/CSSPropertyMetadata.h" 57 #include "core/css/CSSPropertyMetadata.h"
57 #include "core/css/resolver/StyleBuilder.h" 58 #include "core/css/resolver/StyleBuilder.h"
58 #include "core/css/resolver/StyleResolverState.h" 59 #include "core/css/resolver/StyleResolverState.h"
59 #include "core/style/ComputedStyle.h" 60 #include "core/style/ComputedStyle.h"
60 #include "wtf/MathExtras.h" 61 #include "wtf/MathExtras.h"
61 #include "wtf/TypeTraits.h" 62 #include "wtf/TypeTraits.h"
62 63
63 namespace blink { 64 namespace blink {
64 65
(...skipping 20 matching lines...) Expand all
85 BorderImageLength animatableValueToBorderImageLength(const AnimatableValue* valu e, const StyleResolverState& state) 86 BorderImageLength animatableValueToBorderImageLength(const AnimatableValue* valu e, const StyleResolverState& state)
86 { 87 {
87 if (value->isLength()) 88 if (value->isLength())
88 return BorderImageLength(toAnimatableLength(value)->length(state.style() ->effectiveZoom(), ValueRangeNonNegative)); 89 return BorderImageLength(toAnimatableLength(value)->length(state.style() ->effectiveZoom(), ValueRangeNonNegative));
89 if (value->isDouble()) 90 if (value->isDouble())
90 return BorderImageLength(clampTo<double>(toAnimatableDouble(value)->toDo uble(), 0)); 91 return BorderImageLength(clampTo<double>(toAnimatableDouble(value)->toDo uble(), 0));
91 ASSERT(toAnimatableUnknown(value)->toCSSValueID() == CSSValueAuto); 92 ASSERT(toAnimatableUnknown(value)->toCSSValueID() == CSSValueAuto);
92 return Length(Auto); 93 return Length(Auto);
93 } 94 }
94 95
95 template<typename T> T animatableValueRoundClampTo(const AnimatableValue* value, T min = defaultMinimumForClamp<T>(), T max = defaultMaximumForClamp<T>()) 96 template<typename T> T animatableValueClampTo(const AnimatableValue* value, T mi n = defaultMinimumForClamp<T>(), T max = defaultMaximumForClamp<T>())
96 { 97 {
97 static_assert(WTF::IsInteger<T>::value, "should use integral type T when rou nding values"); 98 static_assert(WTF::IsInteger<T>::value, "should use integral type T when rou nding values");
98 return clampTo<T>(round(toAnimatableDouble(value)->toDouble()), min, max); 99 return clampTo<T>(roundForImpreciseConversion<T>(toAnimatableDouble(value)-> toDouble()), min, max);
99 } 100 }
100 101
101 LengthBox animatableValueToLengthBox(const AnimatableValue* value, const StyleRe solverState& state, ValueRange range = ValueRangeAll) 102 LengthBox animatableValueToLengthBox(const AnimatableValue* value, const StyleRe solverState& state, ValueRange range = ValueRangeAll)
102 { 103 {
103 const AnimatableLengthBox* animatableLengthBox = toAnimatableLengthBox(value ); 104 const AnimatableLengthBox* animatableLengthBox = toAnimatableLengthBox(value );
104 return LengthBox( 105 return LengthBox(
105 animatableValueToLength(animatableLengthBox->top(), state, range), 106 animatableValueToLength(animatableLengthBox->top(), state, range),
106 animatableValueToLength(animatableLengthBox->right(), state, range), 107 animatableValueToLength(animatableLengthBox->right(), state, range),
107 animatableValueToLength(animatableLengthBox->bottom(), state, range), 108 animatableValueToLength(animatableLengthBox->bottom(), state, range),
108 animatableValueToLength(animatableLengthBox->left(), state, range)); 109 animatableValueToLength(animatableLengthBox->left(), state, range));
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 style->setBorderBottomColor(toAnimatableColor(value)->color()); 308 style->setBorderBottomColor(toAnimatableColor(value)->color());
308 style->setVisitedLinkBorderBottomColor(toAnimatableColor(value)->visited LinkColor()); 309 style->setVisitedLinkBorderBottomColor(toAnimatableColor(value)->visited LinkColor());
309 return; 310 return;
310 case CSSPropertyBorderBottomLeftRadius: 311 case CSSPropertyBorderBottomLeftRadius:
311 style->setBorderBottomLeftRadius(animatableValueToLengthSize(value, stat e, ValueRangeNonNegative)); 312 style->setBorderBottomLeftRadius(animatableValueToLengthSize(value, stat e, ValueRangeNonNegative));
312 return; 313 return;
313 case CSSPropertyBorderBottomRightRadius: 314 case CSSPropertyBorderBottomRightRadius:
314 style->setBorderBottomRightRadius(animatableValueToLengthSize(value, sta te, ValueRangeNonNegative)); 315 style->setBorderBottomRightRadius(animatableValueToLengthSize(value, sta te, ValueRangeNonNegative));
315 return; 316 return;
316 case CSSPropertyBorderBottomWidth: 317 case CSSPropertyBorderBottomWidth:
317 style->setBorderBottomWidth(animatableValueRoundClampTo<unsigned>(value) ); 318 style->setBorderBottomWidth(animatableValueClampTo<unsigned>(value));
318 return; 319 return;
319 case CSSPropertyBorderImageOutset: 320 case CSSPropertyBorderImageOutset:
320 style->setBorderImageOutset(animatableValueToBorderImageLengthBox(value, state)); 321 style->setBorderImageOutset(animatableValueToBorderImageLengthBox(value, state));
321 return; 322 return;
322 case CSSPropertyBorderImageSlice: 323 case CSSPropertyBorderImageSlice:
323 style->setBorderImageSlices(animatableValueToLengthBox(toAnimatableLengt hBoxAndBool(value)->box(), state, ValueRangeNonNegative)); 324 style->setBorderImageSlices(animatableValueToLengthBox(toAnimatableLengt hBoxAndBool(value)->box(), state, ValueRangeNonNegative));
324 style->setBorderImageSlicesFill(toAnimatableLengthBoxAndBool(value)->fla g()); 325 style->setBorderImageSlicesFill(toAnimatableLengthBoxAndBool(value)->fla g());
325 return; 326 return;
326 case CSSPropertyBorderImageSource: 327 case CSSPropertyBorderImageSource:
327 style->setBorderImageSource(state.styleImage(property, toAnimatableImage (value)->toCSSValue())); 328 style->setBorderImageSource(state.styleImage(property, toAnimatableImage (value)->toCSSValue()));
328 return; 329 return;
329 case CSSPropertyBorderImageWidth: 330 case CSSPropertyBorderImageWidth:
330 style->setBorderImageWidth(animatableValueToBorderImageLengthBox(value, state)); 331 style->setBorderImageWidth(animatableValueToBorderImageLengthBox(value, state));
331 return; 332 return;
332 case CSSPropertyBorderLeftColor: 333 case CSSPropertyBorderLeftColor:
333 style->setBorderLeftColor(toAnimatableColor(value)->color()); 334 style->setBorderLeftColor(toAnimatableColor(value)->color());
334 style->setVisitedLinkBorderLeftColor(toAnimatableColor(value)->visitedLi nkColor()); 335 style->setVisitedLinkBorderLeftColor(toAnimatableColor(value)->visitedLi nkColor());
335 return; 336 return;
336 case CSSPropertyBorderLeftWidth: 337 case CSSPropertyBorderLeftWidth:
337 style->setBorderLeftWidth(animatableValueRoundClampTo<unsigned>(value)); 338 style->setBorderLeftWidth(animatableValueClampTo<unsigned>(value));
338 return; 339 return;
339 case CSSPropertyBorderRightColor: 340 case CSSPropertyBorderRightColor:
340 style->setBorderRightColor(toAnimatableColor(value)->color()); 341 style->setBorderRightColor(toAnimatableColor(value)->color());
341 style->setVisitedLinkBorderRightColor(toAnimatableColor(value)->visitedL inkColor()); 342 style->setVisitedLinkBorderRightColor(toAnimatableColor(value)->visitedL inkColor());
342 return; 343 return;
343 case CSSPropertyBorderRightWidth: 344 case CSSPropertyBorderRightWidth:
344 style->setBorderRightWidth(animatableValueRoundClampTo<unsigned>(value)) ; 345 style->setBorderRightWidth(animatableValueClampTo<unsigned>(value));
345 return; 346 return;
346 case CSSPropertyBorderTopColor: 347 case CSSPropertyBorderTopColor:
347 style->setBorderTopColor(toAnimatableColor(value)->color()); 348 style->setBorderTopColor(toAnimatableColor(value)->color());
348 style->setVisitedLinkBorderTopColor(toAnimatableColor(value)->visitedLin kColor()); 349 style->setVisitedLinkBorderTopColor(toAnimatableColor(value)->visitedLin kColor());
349 return; 350 return;
350 case CSSPropertyBorderTopLeftRadius: 351 case CSSPropertyBorderTopLeftRadius:
351 style->setBorderTopLeftRadius(animatableValueToLengthSize(value, state, ValueRangeNonNegative)); 352 style->setBorderTopLeftRadius(animatableValueToLengthSize(value, state, ValueRangeNonNegative));
352 return; 353 return;
353 case CSSPropertyBorderTopRightRadius: 354 case CSSPropertyBorderTopRightRadius:
354 style->setBorderTopRightRadius(animatableValueToLengthSize(value, state, ValueRangeNonNegative)); 355 style->setBorderTopRightRadius(animatableValueToLengthSize(value, state, ValueRangeNonNegative));
355 return; 356 return;
356 case CSSPropertyBorderTopWidth: 357 case CSSPropertyBorderTopWidth:
357 style->setBorderTopWidth(animatableValueRoundClampTo<unsigned>(value)); 358 style->setBorderTopWidth(animatableValueClampTo<unsigned>(value));
358 return; 359 return;
359 case CSSPropertyBottom: 360 case CSSPropertyBottom:
360 style->setBottom(animatableValueToLength(value, state)); 361 style->setBottom(animatableValueToLength(value, state));
361 return; 362 return;
362 case CSSPropertyBoxShadow: 363 case CSSPropertyBoxShadow:
363 style->setBoxShadow(toAnimatableShadow(value)->shadowList()); 364 style->setBoxShadow(toAnimatableShadow(value)->shadowList());
364 return; 365 return;
365 case CSSPropertyClip: 366 case CSSPropertyClip:
366 style->setClip(animatableValueToLengthBox(value, state)); 367 style->setClip(animatableValueToLengthBox(value, state));
367 return; 368 return;
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 style->setMinWidth(animatableValueToLength(value, state, ValueRangeNonNe gative)); 453 style->setMinWidth(animatableValueToLength(value, state, ValueRangeNonNe gative));
453 return; 454 return;
454 case CSSPropertyObjectPosition: 455 case CSSPropertyObjectPosition:
455 style->setObjectPosition(animatableValueToLengthPoint(value, state)); 456 style->setObjectPosition(animatableValueToLengthPoint(value, state));
456 return; 457 return;
457 case CSSPropertyOpacity: 458 case CSSPropertyOpacity:
458 // Avoiding a value of 1 forces a layer to be created. 459 // Avoiding a value of 1 forces a layer to be created.
459 style->setOpacity(clampTo<float>(toAnimatableDouble(value)->toDouble(), 0, nextafterf(1, 0))); 460 style->setOpacity(clampTo<float>(toAnimatableDouble(value)->toDouble(), 0, nextafterf(1, 0)));
460 return; 461 return;
461 case CSSPropertyOrphans: 462 case CSSPropertyOrphans:
462 style->setOrphans(animatableValueRoundClampTo<unsigned short>(value, 1)) ; 463 style->setOrphans(clampTo<unsigned short>(round(toAnimatableDouble(value )->toDouble()), 1));
463 return; 464 return;
464 case CSSPropertyOutlineColor: 465 case CSSPropertyOutlineColor:
465 style->setOutlineColor(toAnimatableColor(value)->color()); 466 style->setOutlineColor(toAnimatableColor(value)->color());
466 style->setVisitedLinkOutlineColor(toAnimatableColor(value)->visitedLinkC olor()); 467 style->setVisitedLinkOutlineColor(toAnimatableColor(value)->visitedLinkC olor());
467 return; 468 return;
468 case CSSPropertyOutlineOffset: 469 case CSSPropertyOutlineOffset:
469 style->setOutlineOffset(animatableValueRoundClampTo<int>(value)); 470 style->setOutlineOffset(animatableValueClampTo<int>(value));
470 return; 471 return;
471 case CSSPropertyOutlineWidth: 472 case CSSPropertyOutlineWidth:
472 style->setOutlineWidth(animatableValueRoundClampTo<unsigned short>(value )); 473 style->setOutlineWidth(animatableValueClampTo<unsigned short>(value));
473 return; 474 return;
474 case CSSPropertyPaddingBottom: 475 case CSSPropertyPaddingBottom:
475 style->setPaddingBottom(animatableValueToLength(value, state, ValueRange NonNegative)); 476 style->setPaddingBottom(animatableValueToLength(value, state, ValueRange NonNegative));
476 return; 477 return;
477 case CSSPropertyPaddingLeft: 478 case CSSPropertyPaddingLeft:
478 style->setPaddingLeft(animatableValueToLength(value, state, ValueRangeNo nNegative)); 479 style->setPaddingLeft(animatableValueToLength(value, state, ValueRangeNo nNegative));
479 return; 480 return;
480 case CSSPropertyPaddingRight: 481 case CSSPropertyPaddingRight:
481 style->setPaddingRight(animatableValueToLength(value, state, ValueRangeN onNegative)); 482 style->setPaddingRight(animatableValueToLength(value, state, ValueRangeN onNegative));
482 return; 483 return;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
521 case CSSPropertyTextIndent: 522 case CSSPropertyTextIndent:
522 style->setTextIndent(animatableValueToLength(value, state)); 523 style->setTextIndent(animatableValueToLength(value, state));
523 return; 524 return;
524 case CSSPropertyTextShadow: 525 case CSSPropertyTextShadow:
525 style->setTextShadow(toAnimatableShadow(value)->shadowList()); 526 style->setTextShadow(toAnimatableShadow(value)->shadowList());
526 return; 527 return;
527 case CSSPropertyTop: 528 case CSSPropertyTop:
528 style->setTop(animatableValueToLength(value, state)); 529 style->setTop(animatableValueToLength(value, state));
529 return; 530 return;
530 case CSSPropertyWebkitBorderHorizontalSpacing: 531 case CSSPropertyWebkitBorderHorizontalSpacing:
531 style->setHorizontalBorderSpacing(animatableValueRoundClampTo<unsigned s hort>(value)); 532 style->setHorizontalBorderSpacing(animatableValueClampTo<unsigned short> (value));
532 return; 533 return;
533 case CSSPropertyWebkitBorderVerticalSpacing: 534 case CSSPropertyWebkitBorderVerticalSpacing:
534 style->setVerticalBorderSpacing(animatableValueRoundClampTo<unsigned sho rt>(value)); 535 style->setVerticalBorderSpacing(animatableValueClampTo<unsigned short>(v alue));
535 return; 536 return;
536 case CSSPropertyWebkitClipPath: 537 case CSSPropertyWebkitClipPath:
537 style->setClipPath(toAnimatableClipPathOperation(value)->clipPathOperati on()); 538 style->setClipPath(toAnimatableClipPathOperation(value)->clipPathOperati on());
538 return; 539 return;
539 case CSSPropertyWebkitColumnCount: 540 case CSSPropertyWebkitColumnCount:
540 style->setColumnCount(animatableValueRoundClampTo<unsigned short>(value, 1)); 541 style->setColumnCount(clampTo<unsigned short>(toAnimatableDouble(value)- >toDouble(), 1));
541 return; 542 return;
542 case CSSPropertyWebkitColumnGap: 543 case CSSPropertyWebkitColumnGap:
543 style->setColumnGap(clampTo(toAnimatableDouble(value)->toDouble(), 0)); 544 style->setColumnGap(clampTo(toAnimatableDouble(value)->toDouble(), 0));
544 return; 545 return;
545 case CSSPropertyWebkitColumnRuleColor: 546 case CSSPropertyWebkitColumnRuleColor:
546 style->setColumnRuleColor(toAnimatableColor(value)->color()); 547 style->setColumnRuleColor(toAnimatableColor(value)->color());
547 style->setVisitedLinkColumnRuleColor(toAnimatableColor(value)->visitedLi nkColor()); 548 style->setVisitedLinkColumnRuleColor(toAnimatableColor(value)->visitedLi nkColor());
548 return; 549 return;
549 case CSSPropertyWebkitColumnWidth: 550 case CSSPropertyWebkitColumnWidth:
550 style->setColumnWidth(clampTo(toAnimatableDouble(value)->toDouble(), std ::numeric_limits<float>::epsilon())); 551 style->setColumnWidth(clampTo(toAnimatableDouble(value)->toDouble(), std ::numeric_limits<float>::epsilon()));
551 return; 552 return;
552 case CSSPropertyWebkitColumnRuleWidth: 553 case CSSPropertyWebkitColumnRuleWidth:
553 style->setColumnRuleWidth(animatableValueRoundClampTo<unsigned short>(va lue)); 554 style->setColumnRuleWidth(clampTo<unsigned short>(toAnimatableDouble(val ue)->toDouble()));
554 return; 555 return;
555 case CSSPropertyWebkitFilter: 556 case CSSPropertyWebkitFilter:
556 style->setFilter(toAnimatableFilterOperations(value)->operations()); 557 style->setFilter(toAnimatableFilterOperations(value)->operations());
557 return; 558 return;
558 case CSSPropertyWebkitMaskBoxImageOutset: 559 case CSSPropertyWebkitMaskBoxImageOutset:
559 style->setMaskBoxImageOutset(animatableValueToBorderImageLengthBox(value , state)); 560 style->setMaskBoxImageOutset(animatableValueToBorderImageLengthBox(value , state));
560 return; 561 return;
561 case CSSPropertyWebkitMaskBoxImageSlice: 562 case CSSPropertyWebkitMaskBoxImageSlice:
562 style->setMaskBoxImageSlices(animatableValueToLengthBox(toAnimatableLeng thBoxAndBool(value)->box(), state, ValueRangeNonNegative)); 563 style->setMaskBoxImageSlices(animatableValueToLengthBox(toAnimatableLeng thBoxAndBool(value)->box(), state, ValueRangeNonNegative));
563 style->setMaskBoxImageSlicesFill(toAnimatableLengthBoxAndBool(value)->fl ag()); 564 style->setMaskBoxImageSlicesFill(toAnimatableLengthBoxAndBool(value)->fl ag());
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
636 case CSSPropertyWebkitTransformOriginX: 637 case CSSPropertyWebkitTransformOriginX:
637 style->setTransformOriginX(animatableValueToLength(value, state)); 638 style->setTransformOriginX(animatableValueToLength(value, state));
638 return; 639 return;
639 case CSSPropertyWebkitTransformOriginY: 640 case CSSPropertyWebkitTransformOriginY:
640 style->setTransformOriginY(animatableValueToLength(value, state)); 641 style->setTransformOriginY(animatableValueToLength(value, state));
641 return; 642 return;
642 case CSSPropertyWebkitTransformOriginZ: 643 case CSSPropertyWebkitTransformOriginZ:
643 style->setTransformOriginZ(toAnimatableDouble(value)->toDouble()); 644 style->setTransformOriginZ(toAnimatableDouble(value)->toDouble());
644 return; 645 return;
645 case CSSPropertyWidows: 646 case CSSPropertyWidows:
646 style->setWidows(animatableValueRoundClampTo<unsigned short>(value, 1)); 647 style->setWidows(clampTo<unsigned short>(round(toAnimatableDouble(value) ->toDouble()), 1));
647 return; 648 return;
648 case CSSPropertyWidth: 649 case CSSPropertyWidth:
649 style->setWidth(animatableValueToLength(value, state, ValueRangeNonNegat ive)); 650 style->setWidth(animatableValueToLength(value, state, ValueRangeNonNegat ive));
650 return; 651 return;
651 case CSSPropertyWordSpacing: 652 case CSSPropertyWordSpacing:
652 style->setWordSpacing(clampTo<float>(toAnimatableDouble(value)->toDouble ())); 653 style->setWordSpacing(clampTo<float>(toAnimatableDouble(value)->toDouble ()));
653 return; 654 return;
654 case CSSPropertyVerticalAlign: 655 case CSSPropertyVerticalAlign:
655 style->setVerticalAlignLength(animatableValueToLength(value, state)); 656 style->setVerticalAlignLength(animatableValueToLength(value, state));
656 return; 657 return;
657 case CSSPropertyVisibility: 658 case CSSPropertyVisibility:
658 style->setVisibility(toAnimatableVisibility(value)->visibility()); 659 style->setVisibility(toAnimatableVisibility(value)->visibility());
659 return; 660 return;
660 case CSSPropertyZIndex: 661 case CSSPropertyZIndex:
661 style->setZIndex(animatableValueRoundClampTo<int>(value)); 662 style->setZIndex(clampTo<int>(round(toAnimatableDouble(value)->toDouble( ))));
662 return; 663 return;
663 case CSSPropertyCx: 664 case CSSPropertyCx:
664 style->setCx(animatableValueToLength(value, state)); 665 style->setCx(animatableValueToLength(value, state));
665 return; 666 return;
666 case CSSPropertyCy: 667 case CSSPropertyCy:
667 style->setCy(animatableValueToLength(value, state)); 668 style->setCy(animatableValueToLength(value, state));
668 return; 669 return;
669 case CSSPropertyX: 670 case CSSPropertyX:
670 style->setX(animatableValueToLength(value, state)); 671 style->setX(animatableValueToLength(value, state));
671 return; 672 return;
672 case CSSPropertyY: 673 case CSSPropertyY:
673 style->setY(animatableValueToLength(value, state)); 674 style->setY(animatableValueToLength(value, state));
674 return; 675 return;
675 case CSSPropertyR: 676 case CSSPropertyR:
676 style->setR(animatableValueToLength(value, state, ValueRangeNonNegative) ); 677 style->setR(animatableValueToLength(value, state, ValueRangeNonNegative) );
677 return; 678 return;
678 case CSSPropertyRx: 679 case CSSPropertyRx:
679 style->setRx(animatableValueToLength(value, state, ValueRangeNonNegative )); 680 style->setRx(animatableValueToLength(value, state, ValueRangeNonNegative ));
680 return; 681 return;
681 case CSSPropertyRy: 682 case CSSPropertyRy:
682 style->setRy(animatableValueToLength(value, state, ValueRangeNonNegative )); 683 style->setRy(animatableValueToLength(value, state, ValueRangeNonNegative ));
683 return; 684 return;
684 685
685 default: 686 default:
686 ASSERT_NOT_REACHED(); 687 ASSERT_NOT_REACHED();
687 } 688 }
688 } 689 }
689 690
690 } // namespace blink 691 } // namespace blink
OLDNEW
« no previous file with comments | « LayoutTests/animations/interpolation/webkit-column-rule-width-interpolation.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698