| 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 RefPtr<RenderStyle> keyframeStyle = resolver->styleForKeyframe(element,
style, parentStyle, styleKeyframe, name); | 102 RefPtr<RenderStyle> keyframeStyle = resolver->styleForKeyframe(element,
style, parentStyle, styleKeyframe, name); |
| 103 RefPtr<AnimatableValueKeyframe> keyframe = AnimatableValueKeyframe::crea
te(); | 103 RefPtr<AnimatableValueKeyframe> keyframe = AnimatableValueKeyframe::crea
te(); |
| 104 const Vector<double>& offsets = styleKeyframe->keys(); | 104 const Vector<double>& offsets = styleKeyframe->keys(); |
| 105 ASSERT(!offsets.isEmpty()); | 105 ASSERT(!offsets.isEmpty()); |
| 106 keyframe->setOffset(offsets[0]); | 106 keyframe->setOffset(offsets[0]); |
| 107 keyframe->setEasing(defaultTimingFunction); | 107 keyframe->setEasing(defaultTimingFunction); |
| 108 const StylePropertySet& properties = styleKeyframe->properties(); | 108 const StylePropertySet& properties = styleKeyframe->properties(); |
| 109 for (unsigned j = 0; j < properties.propertyCount(); j++) { | 109 for (unsigned j = 0; j < properties.propertyCount(); j++) { |
| 110 specifiedPropertiesForUseCounter.add(properties.propertyAt(j).id()); | 110 specifiedPropertiesForUseCounter.add(properties.propertyAt(j).id()); |
| 111 CSSPropertyID property = propertyForAnimation(properties.propertyAt(
j).id()); | 111 CSSPropertyID property = propertyForAnimation(properties.propertyAt(
j).id()); |
| 112 if (property == CSSPropertyWebkitAnimationTimingFunction || property
== CSSPropertyAnimationTimingFunction) { | 112 if (property == CSSPropertyAnimationTimingFunction) { |
| 113 CSSValue* value = properties.propertyAt(j).value(); | 113 CSSValue* value = properties.propertyAt(j).value(); |
| 114 RefPtr<TimingFunction> timingFunction; | 114 RefPtr<TimingFunction> timingFunction; |
| 115 if (value->isInheritedValue() && parentStyle->animations()) | 115 if (value->isInheritedValue() && parentStyle->animations()) |
| 116 timingFunction = parentStyle->animations()->timingFunctionLi
st()[0]; | 116 timingFunction = parentStyle->animations()->timingFunctionLi
st()[0]; |
| 117 else if (value->isInheritedValue() || value->isInitialValue()) | 117 else if (value->isInheritedValue() || value->isInitialValue()) |
| 118 timingFunction = CSSTimingData::initialTimingFunction(); | 118 timingFunction = CSSTimingData::initialTimingFunction(); |
| 119 else | 119 else |
| 120 timingFunction = CSSToStyleMap::mapAnimationTimingFunction(t
oCSSValueList(value)->item(0)); | 120 timingFunction = CSSToStyleMap::mapAnimationTimingFunction(t
oCSSValueList(value)->item(0)); |
| 121 keyframe->setEasing(timingFunction.release()); | 121 keyframe->setEasing(timingFunction.release()); |
| 122 } else if (CSSPropertyMetadata::isAnimatableProperty(property)) { | 122 } else if (CSSPropertyMetadata::isAnimatableProperty(property)) { |
| (...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 635 case CSSPropertyAnimationIterationCount: | 635 case CSSPropertyAnimationIterationCount: |
| 636 case CSSPropertyAnimationName: | 636 case CSSPropertyAnimationName: |
| 637 case CSSPropertyAnimationPlayState: | 637 case CSSPropertyAnimationPlayState: |
| 638 case CSSPropertyAnimationTimingFunction: | 638 case CSSPropertyAnimationTimingFunction: |
| 639 case CSSPropertyDisplay: | 639 case CSSPropertyDisplay: |
| 640 case CSSPropertyTransition: | 640 case CSSPropertyTransition: |
| 641 case CSSPropertyTransitionDelay: | 641 case CSSPropertyTransitionDelay: |
| 642 case CSSPropertyTransitionDuration: | 642 case CSSPropertyTransitionDuration: |
| 643 case CSSPropertyTransitionProperty: | 643 case CSSPropertyTransitionProperty: |
| 644 case CSSPropertyTransitionTimingFunction: | 644 case CSSPropertyTransitionTimingFunction: |
| 645 case CSSPropertyWebkitAnimation: | |
| 646 case CSSPropertyWebkitAnimationDelay: | |
| 647 case CSSPropertyWebkitAnimationDirection: | |
| 648 case CSSPropertyWebkitAnimationDuration: | |
| 649 case CSSPropertyWebkitAnimationFillMode: | |
| 650 case CSSPropertyWebkitAnimationIterationCount: | |
| 651 case CSSPropertyWebkitAnimationName: | |
| 652 case CSSPropertyWebkitAnimationPlayState: | |
| 653 case CSSPropertyWebkitAnimationTimingFunction: | |
| 654 case CSSPropertyWebkitTransition: | |
| 655 case CSSPropertyWebkitTransitionDelay: | |
| 656 case CSSPropertyWebkitTransitionDuration: | |
| 657 case CSSPropertyWebkitTransitionProperty: | |
| 658 case CSSPropertyWebkitTransitionTimingFunction: | |
| 659 return false; | 645 return false; |
| 660 default: | 646 default: |
| 661 return true; | 647 return true; |
| 662 } | 648 } |
| 663 } | 649 } |
| 664 | 650 |
| 665 } // namespace blink | 651 } // namespace blink |
| OLD | NEW |