| 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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 for (KeyframeGroupMap::iterator iter = m_keyframeGroups->begin(); iter != m_
keyframeGroups->end(); ++iter) { | 167 for (KeyframeGroupMap::iterator iter = m_keyframeGroups->begin(); iter != m_
keyframeGroups->end(); ++iter) { |
| 168 const PropertySpecificKeyframeVector& keyframeVector = iter->value->keyf
rames(); | 168 const PropertySpecificKeyframeVector& keyframeVector = iter->value->keyf
rames(); |
| 169 for (size_t i = 0; i < keyframeVector.size(); ++i) { | 169 for (size_t i = 0; i < keyframeVector.size(); ++i) { |
| 170 if (keyframeVector[i]->composite() != AnimationEffect::CompositeRepl
ace) | 170 if (keyframeVector[i]->composite() != AnimationEffect::CompositeRepl
ace) |
| 171 return false; | 171 return false; |
| 172 } | 172 } |
| 173 } | 173 } |
| 174 return true; | 174 return true; |
| 175 } | 175 } |
| 176 | 176 |
| 177 void KeyframeEffectModelBase::trace(Visitor* visitor) | |
| 178 { | |
| 179 visitor->trace(m_keyframes); | |
| 180 visitor->trace(m_interpolationEffect); | |
| 181 #if ENABLE_OILPAN | |
| 182 visitor->trace(m_keyframeGroups); | |
| 183 #endif | |
| 184 AnimationEffect::trace(visitor); | |
| 185 } | |
| 186 | |
| 187 Keyframe::PropertySpecificKeyframe::PropertySpecificKeyframe(double offset, Pass
RefPtr<TimingFunction> easing, AnimationEffect::CompositeOperation composite) | 177 Keyframe::PropertySpecificKeyframe::PropertySpecificKeyframe(double offset, Pass
RefPtr<TimingFunction> easing, AnimationEffect::CompositeOperation composite) |
| 188 : m_offset(offset) | 178 : m_offset(offset) |
| 189 , m_easing(easing) | 179 , m_easing(easing) |
| 190 , m_composite(composite) | 180 , m_composite(composite) |
| 191 { | 181 { |
| 192 } | 182 } |
| 193 | 183 |
| 194 void KeyframeEffectModelBase::PropertySpecificKeyframeGroup::appendKeyframe(Pass
OwnPtr<Keyframe::PropertySpecificKeyframe> keyframe) | 184 void KeyframeEffectModelBase::PropertySpecificKeyframeGroup::appendKeyframe(Pass
OwnPtr<Keyframe::PropertySpecificKeyframe> keyframe) |
| 195 { | 185 { |
| 196 ASSERT(m_keyframes.isEmpty() || m_keyframes.last()->offset() <= keyframe->of
fset()); | 186 ASSERT(m_keyframes.isEmpty() || m_keyframes.last()->offset() <= keyframe->of
fset()); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 218 | 208 |
| 219 void KeyframeEffectModelBase::PropertySpecificKeyframeGroup::addSyntheticKeyfram
eIfRequired(const KeyframeEffectModelBase* context) | 209 void KeyframeEffectModelBase::PropertySpecificKeyframeGroup::addSyntheticKeyfram
eIfRequired(const KeyframeEffectModelBase* context) |
| 220 { | 210 { |
| 221 ASSERT(!m_keyframes.isEmpty()); | 211 ASSERT(!m_keyframes.isEmpty()); |
| 222 if (m_keyframes.first()->offset() != 0.0) | 212 if (m_keyframes.first()->offset() != 0.0) |
| 223 m_keyframes.insert(0, m_keyframes.first()->neutralKeyframe(0, nullptr)); | 213 m_keyframes.insert(0, m_keyframes.first()->neutralKeyframe(0, nullptr)); |
| 224 if (m_keyframes.last()->offset() != 1.0) | 214 if (m_keyframes.last()->offset() != 1.0) |
| 225 appendKeyframe(m_keyframes.last()->neutralKeyframe(1, nullptr)); | 215 appendKeyframe(m_keyframes.last()->neutralKeyframe(1, nullptr)); |
| 226 } | 216 } |
| 227 | 217 |
| 228 void KeyframeEffectModelBase::PropertySpecificKeyframeGroup::trace(Visitor* visi
tor) | |
| 229 { | |
| 230 #if ENABLE(OILPAN) | |
| 231 visitor->trace(m_keyframes); | |
| 232 #endif | |
| 233 } | |
| 234 | |
| 235 } // namespace | 218 } // namespace |
| OLD | NEW |