Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(321)

Unified Diff: Source/core/animation/animatable/AnimatableColor.cpp

Issue 928103002: Remove some unused functions in core (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: git cl try Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/animation/animatable/AnimatableColor.cpp
diff --git a/Source/core/animation/animatable/AnimatableColor.cpp b/Source/core/animation/animatable/AnimatableColor.cpp
index 51361568dc1b9cd56b8176e6c2c3d5c3ed147e73..337fe3c96dc09bcdb403bd4a424079ddb1fe75f3 100644
--- a/Source/core/animation/animatable/AnimatableColor.cpp
+++ b/Source/core/animation/animatable/AnimatableColor.cpp
@@ -32,16 +32,6 @@
#include "core/animation/animatable/AnimatableColor.h"
#include "platform/animation/AnimationUtilities.h"
-#include "wtf/MathExtras.h"
-
-namespace {
-
-double square(double x)
-{
- return x * x;
-}
-
-} // namespace
namespace blink {
@@ -84,14 +74,6 @@ bool AnimatableColorImpl::operator==(const AnimatableColorImpl& other) const
&& m_alpha == other.m_alpha;
}
-double AnimatableColorImpl::distanceTo(const AnimatableColorImpl& other) const
-{
- return sqrt(square(m_red - other.m_red)
- + square(m_green - other.m_green)
- + square(m_blue - other.m_blue)
- + square(m_alpha - other.m_alpha));
-}
-
PassRefPtrWillBeRawPtr<AnimatableColor> AnimatableColor::create(const AnimatableColorImpl& color, const AnimatableColorImpl& visitedLinkColor)
{
return adoptRefWillBeNoop(new AnimatableColor(color, visitedLinkColor));
@@ -110,10 +92,4 @@ bool AnimatableColor::equalTo(const AnimatableValue* value) const
return m_color == color->m_color && m_visitedLinkColor == color->m_visitedLinkColor;
}
-double AnimatableColor::distanceTo(const AnimatableValue* value) const
-{
- const AnimatableColor* color = toAnimatableColor(value);
- return m_color.distanceTo(color->m_color);
-}
-
} // namespace blink
« no previous file with comments | « Source/core/animation/animatable/AnimatableColor.h ('k') | Source/core/animation/animatable/AnimatableColorTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698