void KeyframeEffectModelBase::PropertySpecificKeyframeGroup::addSyntheticKeyframeIfRequired(const KeyframeEffectModelBase* context) { ASSERT(!m_keyframes.isEmpty()); if (m_keyframes.first()->offset() != 0.0) m_keyframes.insert(0, m_keyframes.first()->neutralKeyframe(0, nullptr)); if (m_keyframes.last()->offset() != 1.0) appendKeyframe(m_keyframes.last()->neutralKeyframe(1, nullptr)); }
bool KeyframeEffectModelBase::PropertySpecificKeyframeGroup::addSyntheticKeyframeIfRequired(PassRefPtr<TimingFunction> zeroOffsetEasing) { ASSERT(!m_keyframes.isEmpty()); bool addedSyntheticKeyframe = false; if (m_keyframes.first()->offset() != 0.0) { m_keyframes.insert(0, m_keyframes.first()->neutralKeyframe(0, zeroOffsetEasing)); addedSyntheticKeyframe = true; } if (m_keyframes.last()->offset() != 1.0) { appendKeyframe(m_keyframes.last()->neutralKeyframe(1, nullptr)); addedSyntheticKeyframe = true; } return addedSyntheticKeyframe; }