| 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 return properties; | 84 return properties; |
| 85 } | 85 } |
| 86 | 86 |
| 87 PassRefPtrWillBeRawPtr<Keyframe> Keyframe::cloneWithOffset(double offset) const | 87 PassRefPtrWillBeRawPtr<Keyframe> Keyframe::cloneWithOffset(double offset) const |
| 88 { | 88 { |
| 89 RefPtrWillBeRawPtr<Keyframe> theClone = clone(); | 89 RefPtrWillBeRawPtr<Keyframe> theClone = clone(); |
| 90 theClone->setOffset(offset); | 90 theClone->setOffset(offset); |
| 91 return theClone.release(); | 91 return theClone.release(); |
| 92 } | 92 } |
| 93 | 93 |
| 94 void Keyframe::trace(Visitor* visitor) |
| 95 { |
| 96 visitor->trace(m_propertyValues); |
| 97 } |
| 98 |
| 94 KeyframeEffectModel::KeyframeEffectModel(const KeyframeVector& keyframes) | 99 KeyframeEffectModel::KeyframeEffectModel(const KeyframeVector& keyframes) |
| 95 : m_keyframes(keyframes) | 100 : m_keyframes(keyframes) |
| 96 { | 101 { |
| 97 } | 102 } |
| 98 | 103 |
| 99 PropertySet KeyframeEffectModel::properties() const | 104 PropertySet KeyframeEffectModel::properties() const |
| 100 { | 105 { |
| 101 PropertySet result; | 106 PropertySet result; |
| 102 if (!m_keyframes.size()) { | 107 if (!m_keyframes.size()) { |
| 103 return result; | 108 return result; |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 } | 265 } |
| 261 | 266 |
| 262 KeyframeEffectModel::PropertySpecificKeyframe::PropertySpecificKeyframe(double o
ffset, PassRefPtr<TimingFunction> easing, const AnimatableValue* value, Composit
eOperation composite) | 267 KeyframeEffectModel::PropertySpecificKeyframe::PropertySpecificKeyframe(double o
ffset, PassRefPtr<TimingFunction> easing, const AnimatableValue* value, Composit
eOperation composite) |
| 263 : m_offset(offset) | 268 : m_offset(offset) |
| 264 , m_easing(easing) | 269 , m_easing(easing) |
| 265 , m_composite(composite) | 270 , m_composite(composite) |
| 266 { | 271 { |
| 267 m_value = AnimatableValue::takeConstRef(value); | 272 m_value = AnimatableValue::takeConstRef(value); |
| 268 } | 273 } |
| 269 | 274 |
| 270 KeyframeEffectModel::PropertySpecificKeyframe::PropertySpecificKeyframe(double o
ffset, PassRefPtr<TimingFunction> easing, PassRefPtr<AnimatableValue> value, Com
positeOperation composite) | 275 KeyframeEffectModel::PropertySpecificKeyframe::PropertySpecificKeyframe(double o
ffset, PassRefPtr<TimingFunction> easing, PassRefPtrWillBeRawPtr<AnimatableValue
> value, CompositeOperation composite) |
| 271 : m_offset(offset) | 276 : m_offset(offset) |
| 272 , m_easing(easing) | 277 , m_easing(easing) |
| 273 , m_value(value) | 278 , m_value(value) |
| 274 , m_composite(composite) | 279 , m_composite(composite) |
| 275 { | 280 { |
| 276 ASSERT(!isNull(m_offset)); | 281 ASSERT(!isNull(m_offset)); |
| 277 } | 282 } |
| 278 | 283 |
| 279 PassOwnPtr<KeyframeEffectModel::PropertySpecificKeyframe> KeyframeEffectModel::P
ropertySpecificKeyframe::cloneWithOffset(double offset) const | 284 PassOwnPtr<KeyframeEffectModel::PropertySpecificKeyframe> KeyframeEffectModel::P
ropertySpecificKeyframe::cloneWithOffset(double offset) const |
| 280 { | 285 { |
| 281 return adoptPtr(new PropertySpecificKeyframe(offset, m_easing, m_value, m_co
mposite)); | 286 return adoptPtr(new PropertySpecificKeyframe(offset, m_easing, m_value.get()
, m_composite)); |
| 282 } | 287 } |
| 283 | 288 |
| 284 | 289 |
| 285 void KeyframeEffectModel::PropertySpecificKeyframeGroup::appendKeyframe(PassOwnP
tr<PropertySpecificKeyframe> keyframe) | 290 void KeyframeEffectModel::PropertySpecificKeyframeGroup::appendKeyframe(PassOwnP
tr<PropertySpecificKeyframe> keyframe) |
| 286 { | 291 { |
| 287 ASSERT(m_keyframes.isEmpty() || m_keyframes.last()->offset() <= keyframe->of
fset()); | 292 ASSERT(m_keyframes.isEmpty() || m_keyframes.last()->offset() <= keyframe->of
fset()); |
| 288 m_keyframes.append(keyframe); | 293 m_keyframes.append(keyframe); |
| 289 } | 294 } |
| 290 | 295 |
| 291 void KeyframeEffectModel::PropertySpecificKeyframeGroup::removeRedundantKeyframe
s() | 296 void KeyframeEffectModel::PropertySpecificKeyframeGroup::removeRedundantKeyframe
s() |
| (...skipping 23 matching lines...) Expand all Loading... |
| 315 if (m_keyframes.last()->offset() != 1.0) | 320 if (m_keyframes.last()->offset() != 1.0) |
| 316 appendKeyframe(adoptPtr(new PropertySpecificKeyframe(1, nullptr, Animata
bleValue::neutralValue(), CompositeAdd))); | 321 appendKeyframe(adoptPtr(new PropertySpecificKeyframe(1, nullptr, Animata
bleValue::neutralValue(), CompositeAdd))); |
| 317 } | 322 } |
| 318 | 323 |
| 319 void KeyframeEffectModel::trace(Visitor* visitor) | 324 void KeyframeEffectModel::trace(Visitor* visitor) |
| 320 { | 325 { |
| 321 visitor->trace(m_keyframes); | 326 visitor->trace(m_keyframes); |
| 322 } | 327 } |
| 323 | 328 |
| 324 } // namespace | 329 } // namespace |
| OLD | NEW |