| Index: Source/core/animation/AnimatableLengthPoint3D.cpp
|
| diff --git a/Source/core/animation/AnimatableLengthPoint.cpp b/Source/core/animation/AnimatableLengthPoint3D.cpp
|
| similarity index 65%
|
| copy from Source/core/animation/AnimatableLengthPoint.cpp
|
| copy to Source/core/animation/AnimatableLengthPoint3D.cpp
|
| index e779699d93dbd2a42d83427d411396906a699500..d87b5b33601dec33f7dca27f6f8e5f8219929427 100644
|
| --- a/Source/core/animation/AnimatableLengthPoint.cpp
|
| +++ b/Source/core/animation/AnimatableLengthPoint3D.cpp
|
| @@ -1,5 +1,5 @@
|
| /*
|
| - * Copyright (C) 2013 Google Inc. All rights reserved.
|
| + * Copyright (C) 2014 Google Inc. All rights reserved.
|
| *
|
| * Redistribution and use in source and binary forms, with or without
|
| * modification, are permitted provided that the following conditions are
|
| @@ -29,30 +29,32 @@
|
| */
|
|
|
| #include "config.h"
|
| -#include "core/animation/AnimatableLengthPoint.h"
|
| +#include "core/animation/AnimatableLengthPoint3D.h"
|
|
|
| namespace WebCore {
|
|
|
| -PassRefPtr<AnimatableValue> AnimatableLengthPoint::interpolateTo(const AnimatableValue* value, double fraction) const
|
| +PassRefPtr<AnimatableValue> AnimatableLengthPoint3D::interpolateTo(const AnimatableValue* value, double fraction) const
|
| {
|
| - const AnimatableLengthPoint* lengthPoint = toAnimatableLengthPoint(value);
|
| - return AnimatableLengthPoint::create(
|
| + const AnimatableLengthPoint3D* lengthPoint = toAnimatableLengthPoint3D(value);
|
| + return AnimatableLengthPoint3D::create(
|
| AnimatableValue::interpolate(this->x(), lengthPoint->x(), fraction),
|
| - AnimatableValue::interpolate(this->y(), lengthPoint->y(), fraction));
|
| + AnimatableValue::interpolate(this->y(), lengthPoint->y(), fraction),
|
| + AnimatableValue::interpolate(this->z(), lengthPoint->z(), fraction));
|
| }
|
|
|
| -PassRefPtr<AnimatableValue> AnimatableLengthPoint::addWith(const AnimatableValue* value) const
|
| +PassRefPtr<AnimatableValue> AnimatableLengthPoint3D::addWith(const AnimatableValue* value) const
|
| {
|
| - const AnimatableLengthPoint* lengthPoint = toAnimatableLengthPoint(value);
|
| - return AnimatableLengthPoint::create(
|
| + const AnimatableLengthPoint3D* lengthPoint = toAnimatableLengthPoint3D(value);
|
| + return AnimatableLengthPoint3D::create(
|
| AnimatableValue::add(this->x(), lengthPoint->x()),
|
| - AnimatableValue::add(this->y(), lengthPoint->y()));
|
| + AnimatableValue::add(this->y(), lengthPoint->y()),
|
| + AnimatableValue::add(this->z(), lengthPoint->z()));
|
| }
|
|
|
| -bool AnimatableLengthPoint::equalTo(const AnimatableValue* value) const
|
| +bool AnimatableLengthPoint3D::equalTo(const AnimatableValue* value) const
|
| {
|
| - const AnimatableLengthPoint* lengthPoint = toAnimatableLengthPoint(value);
|
| - return x()->equals(lengthPoint->x()) && y()->equals(lengthPoint->y());
|
| + const AnimatableLengthPoint3D* lengthPoint = toAnimatableLengthPoint3D(value);
|
| + return x()->equals(lengthPoint->x()) && y()->equals(lengthPoint->y()) && z()->equals(lengthPoint->z());
|
| }
|
|
|
| }
|
|
|