| 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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 RefPtr<TimingFunction> timingFunction; | 106 RefPtr<TimingFunction> timingFunction; |
| 107 if (value.isInheritedValue() && parentStyle->animations()) { | 107 if (value.isInheritedValue() && parentStyle->animations()) { |
| 108 timingFunction = parentStyle->animations()->timingFunctionList()[0]; | 108 timingFunction = parentStyle->animations()->timingFunctionList()[0]; |
| 109 } else if (value.isValueList()) { | 109 } else if (value.isValueList()) { |
| 110 timingFunction = CSSToStyleMap::mapAnimationTimingFunction( | 110 timingFunction = CSSToStyleMap::mapAnimationTimingFunction( |
| 111 toCSSValueList(value).item(0)); | 111 toCSSValueList(value).item(0)); |
| 112 } else { | 112 } else { |
| 113 DCHECK(value.isCSSWideKeyword()); | 113 DCHECK(value.isCSSWideKeyword()); |
| 114 timingFunction = CSSTimingData::initialTimingFunction(); | 114 timingFunction = CSSTimingData::initialTimingFunction(); |
| 115 } | 115 } |
| 116 keyframe->setEasing(timingFunction.release()); | 116 keyframe->setEasing(std::move(timingFunction)); |
| 117 } else if (!CSSAnimations::isAnimationAffectingProperty(property)) { | 117 } else if (!CSSAnimations::isAnimationAffectingProperty(property)) { |
| 118 keyframe->setCSSPropertyValue(property, | 118 keyframe->setCSSPropertyValue(property, |
| 119 properties.propertyAt(j).value()); | 119 properties.propertyAt(j).value()); |
| 120 } | 120 } |
| 121 } | 121 } |
| 122 keyframes.push_back(keyframe); | 122 keyframes.push_back(keyframe); |
| 123 // The last keyframe specified at a given offset is used. | 123 // The last keyframe specified at a given offset is used. |
| 124 for (size_t j = 1; j < offsets.size(); ++j) { | 124 for (size_t j = 1; j < offsets.size(); ++j) { |
| 125 keyframes.push_back( | 125 keyframes.push_back( |
| 126 toStringKeyframe(keyframe->cloneWithOffset(offsets[j]).get())); | 126 toStringKeyframe(keyframe->cloneWithOffset(offsets[j]).get())); |
| (...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 708 RefPtr<AnimatableValueKeyframe> delayKeyframe = | 708 RefPtr<AnimatableValueKeyframe> delayKeyframe = |
| 709 AnimatableValueKeyframe::create(); | 709 AnimatableValueKeyframe::create(); |
| 710 delayKeyframe->setPropertyValue(id, from.get()); | 710 delayKeyframe->setPropertyValue(id, from.get()); |
| 711 delayKeyframe->setOffset(0); | 711 delayKeyframe->setOffset(0); |
| 712 keyframes.push_back(delayKeyframe); | 712 keyframes.push_back(delayKeyframe); |
| 713 | 713 |
| 714 RefPtr<AnimatableValueKeyframe> startKeyframe = | 714 RefPtr<AnimatableValueKeyframe> startKeyframe = |
| 715 AnimatableValueKeyframe::create(); | 715 AnimatableValueKeyframe::create(); |
| 716 startKeyframe->setPropertyValue(id, from.get()); | 716 startKeyframe->setPropertyValue(id, from.get()); |
| 717 startKeyframe->setOffset(startKeyframeOffset); | 717 startKeyframe->setOffset(startKeyframeOffset); |
| 718 startKeyframe->setEasing(timing.timingFunction.release()); | 718 startKeyframe->setEasing(std::move(timing.timingFunction)); |
| 719 timing.timingFunction = LinearTimingFunction::shared(); | 719 timing.timingFunction = LinearTimingFunction::shared(); |
| 720 keyframes.push_back(startKeyframe); | 720 keyframes.push_back(startKeyframe); |
| 721 | 721 |
| 722 RefPtr<AnimatableValueKeyframe> endKeyframe = | 722 RefPtr<AnimatableValueKeyframe> endKeyframe = |
| 723 AnimatableValueKeyframe::create(); | 723 AnimatableValueKeyframe::create(); |
| 724 endKeyframe->setPropertyValue(id, to.get()); | 724 endKeyframe->setPropertyValue(id, to.get()); |
| 725 endKeyframe->setOffset(1); | 725 endKeyframe->setOffset(1); |
| 726 keyframes.push_back(endKeyframe); | 726 keyframes.push_back(endKeyframe); |
| 727 | 727 |
| 728 AnimatableValueKeyframeEffectModel* model = | 728 AnimatableValueKeyframeEffectModel* model = |
| (...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1097 isCustomPropertyHandle); | 1097 isCustomPropertyHandle); |
| 1098 } | 1098 } |
| 1099 | 1099 |
| 1100 DEFINE_TRACE(CSSAnimations) { | 1100 DEFINE_TRACE(CSSAnimations) { |
| 1101 visitor->trace(m_transitions); | 1101 visitor->trace(m_transitions); |
| 1102 visitor->trace(m_pendingUpdate); | 1102 visitor->trace(m_pendingUpdate); |
| 1103 visitor->trace(m_runningAnimations); | 1103 visitor->trace(m_runningAnimations); |
| 1104 } | 1104 } |
| 1105 | 1105 |
| 1106 } // namespace blink | 1106 } // namespace blink |
| OLD | NEW |