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

Unified Diff: third_party/WebKit/Source/core/svg/SVGLength.cpp

Issue 1419423002: Remove dead method SVGLength::blend (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGLength.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/svg/SVGLength.cpp
diff --git a/third_party/WebKit/Source/core/svg/SVGLength.cpp b/third_party/WebKit/Source/core/svg/SVGLength.cpp
index e45706a773303395670c2d5a21185f9daf809da2..decc141174f4362309d65185a707f37e147b7b38 100644
--- a/third_party/WebKit/Source/core/svg/SVGLength.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGLength.cpp
@@ -317,51 +317,6 @@ SVGLengthMode SVGLength::lengthModeForAnimatedLengthAttribute(const QualifiedNam
return SVGLengthMode::Other;
}
-PassRefPtrWillBeRawPtr<SVGLength> SVGLength::blend(PassRefPtrWillBeRawPtr<SVGLength> passFrom, float progress) const
-{
- RefPtrWillBeRawPtr<SVGLength> from = passFrom;
-
- SVGLengthType toType = unitType();
- SVGLengthType fromType = from->unitType();
- if ((from->isZero() && isZero())
- || fromType == LengthTypeUnknown
- || toType == LengthTypeUnknown
- || (!from->isZero() && fromType != LengthTypePercentage && toType == LengthTypePercentage)
- || (!isZero() && fromType == LengthTypePercentage && toType != LengthTypePercentage)
- || (!from->isZero() && !isZero() && (fromType == LengthTypeEMS || fromType == LengthTypeEXS || fromType == LengthTypeREMS || fromType == LengthTypeCHS) && fromType != toType))
- return clone();
-
- RefPtrWillBeRawPtr<SVGLength> length = create();
-
- if (fromType == LengthTypePercentage || toType == LengthTypePercentage) {
- float fromPercent = from->valueAsPercentage100();
- float toPercent = valueAsPercentage100();
- length->newValueSpecifiedUnits(LengthTypePercentage, blink::blend(fromPercent, toPercent, progress));
- return length;
- }
-
- if (fromType == toType || from->isZero() || isZero() || fromType == LengthTypeEMS || fromType == LengthTypeEXS || fromType == LengthTypeREMS || fromType == LengthTypeCHS) {
- float fromValue = from->valueInSpecifiedUnits();
- float toValue = valueInSpecifiedUnits();
- if (isZero())
- length->newValueSpecifiedUnits(fromType, blink::blend(fromValue, toValue, progress));
- else
- length->newValueSpecifiedUnits(toType, blink::blend(fromValue, toValue, progress));
- return length;
- }
-
- ASSERT(!isRelative());
- ASSERT(!from->isRelative());
-
- SVGLengthContext nonRelativeLengthContext(0);
- float fromValueInUserUnits = nonRelativeLengthContext.convertValueToUserUnits(from->valueInSpecifiedUnits(), from->unitMode(), fromType);
- float fromValue = nonRelativeLengthContext.convertValueFromUserUnits(fromValueInUserUnits, unitMode(), toType);
-
- float toValue = valueInSpecifiedUnits();
- length->newValueSpecifiedUnits(toType, blink::blend(fromValue, toValue, progress));
- return length;
-}
-
void SVGLength::add(PassRefPtrWillBeRawPtr<SVGPropertyBase> other, SVGElement* contextElement)
{
SVGLengthContext lengthContext(contextElement);
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGLength.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698