| Index: Source/core/animation/InterpolationEffect.cpp
|
| diff --git a/Source/modules/crypto/AesCtrParams.cpp b/Source/core/animation/InterpolationEffect.cpp
|
| similarity index 69%
|
| copy from Source/modules/crypto/AesCtrParams.cpp
|
| copy to Source/core/animation/InterpolationEffect.cpp
|
| index 9c846cb2fdf891264bd8de0ce4f1302e5c8ec555..2b5bdea223ca78d0b9fff14ec779f7f88796d684 100644
|
| --- a/Source/modules/crypto/AesCtrParams.cpp
|
| +++ b/Source/core/animation/InterpolationEffect.cpp
|
| @@ -29,31 +29,24 @@
|
| */
|
|
|
| #include "config.h"
|
| -#include "modules/crypto/AesCtrParams.h"
|
| -
|
| -#include "public/platform/WebCryptoAlgorithmParams.h"
|
| +#include "core/animation/InterpolationEffect.h"
|
|
|
| namespace WebCore {
|
|
|
| -Uint8Array* AesCtrParams::counter()
|
| +PassOwnPtr<Vector<RefPtr<Interpolation> > > InterpolationEffect::getActiveInterpolations(double fraction) const
|
| {
|
| - if (!m_counter) {
|
| - const blink::WebVector<unsigned char>& counter = m_algorithm.aesCtrParams()->counter();
|
| - m_counter = Uint8Array::create(counter.data(), counter.size());
|
| +
|
| + Vector<RefPtr<Interpolation> >* result = new Vector<RefPtr<Interpolation> >();
|
| +
|
| + for (size_t i = 0; i < m_interpolations.size(); ++i) {
|
| + if (fraction >= m_interpolations[i]->m_start && fraction <= m_interpolations[i]->m_end) {
|
| + RefPtr<Interpolation> interpolation = m_interpolations[i]->m_interpolation;
|
| + interpolation->interpolate(0, (fraction - m_interpolations[i]->m_start) / (m_interpolations[i]->m_end - m_interpolations[i]->m_start));
|
| + result->append(interpolation);
|
| + }
|
| }
|
| - return m_counter.get();
|
| -}
|
|
|
| -unsigned char AesCtrParams::length()
|
| -{
|
| - return m_algorithm.aesCtrParams()->lengthBits();
|
| + return adoptPtr(result);
|
| }
|
|
|
| -AesCtrParams::AesCtrParams(const blink::WebCryptoAlgorithm& algorithm)
|
| - : Algorithm(algorithm)
|
| -{
|
| - ASSERT(algorithm.aesCtrParams());
|
| - ScriptWrappable::init(this);
|
| }
|
| -
|
| -} // namespace WebCore
|
|
|