| OLD | NEW |
| 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 579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 590 case CSSPropertyWebkitTextStrokeColor: | 590 case CSSPropertyWebkitTextStrokeColor: |
| 591 style->setTextStrokeColor(toAnimatableColor(value)->color()); | 591 style->setTextStrokeColor(toAnimatableColor(value)->color()); |
| 592 style->setVisitedLinkTextStrokeColor(toAnimatableColor(value)->visitedLi
nkColor()); | 592 style->setVisitedLinkTextStrokeColor(toAnimatableColor(value)->visitedLi
nkColor()); |
| 593 return; | 593 return; |
| 594 case CSSPropertyTransform: { | 594 case CSSPropertyTransform: { |
| 595 const TransformOperations& operations = toAnimatableTransform(value)->tr
ansformOperations(); | 595 const TransformOperations& operations = toAnimatableTransform(value)->tr
ansformOperations(); |
| 596 // FIXME: This normalization (handling of 'none') should be performed at
input in AnimatableValueFactory. | 596 // FIXME: This normalization (handling of 'none') should be performed at
input in AnimatableValueFactory. |
| 597 style->setTransform(operations.size() ? operations : TransformOperations
(true)); | 597 style->setTransform(operations.size() ? operations : TransformOperations
(true)); |
| 598 return; | 598 return; |
| 599 } | 599 } |
| 600 case CSSPropertyTranslate: { |
| 601 const TransformOperations& transformList = toAnimatableTransform(value)-
>transformOperations(); |
| 602 ASSERT(transformList.size() == 1); |
| 603 ASSERT(transformList.operations()[0]->type() == TransformOperation::Tran
slateX |
| 604 || transformList.operations()[0]->type() == TransformOperation::Tran
slate |
| 605 || transformList.operations()[0]->type() == TransformOperation::Tran
slate3D |
| 606 || transformList.operations()[0]->type() == TransformOperation::Inte
rpolated); |
| 607 style->setTranslate(toTranslateTransformOperation(transformList.operatio
ns()[0].get())); |
| 608 return; |
| 609 } |
| 610 case CSSPropertyRotate: { |
| 611 const TransformOperations& transformList = toAnimatableTransform(value)-
>transformOperations(); |
| 612 ASSERT(transformList.size() == 1); |
| 613 ASSERT(transformList.operations()[0]->type() == TransformOperation::Rota
te |
| 614 || transformList.operations()[0]->type() == TransformOperation::Rota
te3D |
| 615 || transformList.operations()[0]->type() == TransformOperation::Inte
rpolated); |
| 616 style->setRotate(toRotateTransformOperation(transformList.operations()[0
].get())); |
| 617 return; |
| 618 } |
| 619 case CSSPropertyScale: { |
| 620 const TransformOperations& transformList = toAnimatableTransform(value)-
>transformOperations(); |
| 621 ASSERT(transformList.size() == 1); |
| 622 ASSERT(transformList.operations()[0]->type() == TransformOperation::Scal
eX |
| 623 || transformList.operations()[0]->type() == TransformOperation::Scal
e |
| 624 || transformList.operations()[0]->type() == TransformOperation::Scal
e3D |
| 625 || transformList.operations()[0]->type() == TransformOperation::Inte
rpolated); |
| 626 style->setScale(toScaleTransformOperation(transformList.operations()[0].
get())); |
| 627 return; |
| 628 } |
| 600 case CSSPropertyTransformOrigin: | 629 case CSSPropertyTransformOrigin: |
| 601 style->setTransformOrigin(animatableValueToTransformOrigin(value, state)
); | 630 style->setTransformOrigin(animatableValueToTransformOrigin(value, state)
); |
| 602 return; | 631 return; |
| 603 case CSSPropertyMotionOffset: | 632 case CSSPropertyMotionOffset: |
| 604 style->setMotionOffset(animatableValueToLength(value, state)); | 633 style->setMotionOffset(animatableValueToLength(value, state)); |
| 605 return; | 634 return; |
| 606 case CSSPropertyMotionRotation: | 635 case CSSPropertyMotionRotation: |
| 607 style->setMotionRotation(toAnimatableDoubleAndBool(value)->toDouble()); | 636 style->setMotionRotation(toAnimatableDoubleAndBool(value)->toDouble()); |
| 608 style->setMotionRotationType(toAnimatableDoubleAndBool(value)->flag() ?
MotionRotationAuto : MotionRotationFixed); | 637 style->setMotionRotationType(toAnimatableDoubleAndBool(value)->flag() ?
MotionRotationAuto : MotionRotationFixed); |
| 609 return; | 638 return; |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 661 case CSSPropertyRy: | 690 case CSSPropertyRy: |
| 662 style->setRy(animatableValueToLength(value, state, ValueRangeNonNegative
)); | 691 style->setRy(animatableValueToLength(value, state, ValueRangeNonNegative
)); |
| 663 return; | 692 return; |
| 664 | 693 |
| 665 default: | 694 default: |
| 666 ASSERT_NOT_REACHED(); | 695 ASSERT_NOT_REACHED(); |
| 667 } | 696 } |
| 668 } | 697 } |
| 669 | 698 |
| 670 } // namespace blink | 699 } // namespace blink |
| OLD | NEW |