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

Unified Diff: Source/core/svg/SVGAnimatedType.cpp

Issue 183143002: Remove SVGAnimatedType (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Missed one rename. Created 6 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
« no previous file with comments | « Source/core/svg/SVGAnimatedType.h ('k') | Source/core/svg/SVGAnimatedTypeAnimator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGAnimatedType.cpp
diff --git a/Source/core/svg/SVGAnimatedType.cpp b/Source/core/svg/SVGAnimatedType.cpp
deleted file mode 100644
index d99eba536d57d8e344e871cadeb79e06cb6b3f20..0000000000000000000000000000000000000000
--- a/Source/core/svg/SVGAnimatedType.cpp
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- * Copyright (C) Research In Motion Limited 2011. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include "config.h"
-#include "core/svg/SVGAnimatedType.h"
-
-#include "bindings/v8/ExceptionState.h"
-#include "core/svg/SVGParserUtilities.h"
-
-namespace WebCore {
-
-SVGAnimatedType::SVGAnimatedType(AnimatedPropertyType type)
- : m_type(type)
-{
-}
-
-SVGAnimatedType::~SVGAnimatedType()
-{
- switch (m_type) {
- // Below properties are migrated to new property implementation.
- case AnimatedAngle:
- case AnimatedBoolean:
- case AnimatedColor:
- case AnimatedEnumeration:
- case AnimatedInteger:
- case AnimatedIntegerOptionalInteger:
- case AnimatedNumber:
- case AnimatedNumberList:
- case AnimatedNumberOptionalNumber:
- case AnimatedLength:
- case AnimatedLengthList:
- case AnimatedPath:
- case AnimatedPoints:
- case AnimatedPreserveAspectRatio:
- case AnimatedRect:
- case AnimatedString:
- case AnimatedStringList:
- case AnimatedTransformList:
- // handled by RefPtr
- break;
-
- // There is no SVGAnimated{Point,Transform}
- case AnimatedPoint:
- case AnimatedTransform:
- ASSERT_NOT_REACHED();
- break;
-
- case AnimatedUnknown:
- ASSERT_NOT_REACHED();
- break;
- }
-}
-
-PassOwnPtr<SVGAnimatedType> SVGAnimatedType::createNewProperty(PassRefPtr<NewSVGPropertyBase> newProperty)
-{
- ASSERT(newProperty);
- OwnPtr<SVGAnimatedType> animatedType = adoptPtr(new SVGAnimatedType(newProperty->type()));
- animatedType->m_newProperty = newProperty;
- return animatedType.release();
-}
-
-String SVGAnimatedType::valueAsString()
-{
- switch (m_type) {
- // Below properties have migrated to new property implementation.
- case AnimatedColor:
- case AnimatedNumber:
- case AnimatedNumberList:
- case AnimatedNumberOptionalNumber:
- case AnimatedLength:
- case AnimatedLengthList:
- case AnimatedPath:
- case AnimatedPoints:
- case AnimatedPreserveAspectRatio:
- case AnimatedRect:
- case AnimatedString:
- case AnimatedStringList:
- return m_newProperty->valueAsString();
-
- // These types don't appear in the table in SVGElement::cssPropertyToTypeMap() and thus don't need valueAsString() support.
- case AnimatedAngle:
- case AnimatedBoolean:
- case AnimatedEnumeration:
- case AnimatedInteger:
- case AnimatedIntegerOptionalInteger:
- case AnimatedPoint:
- case AnimatedTransform:
- case AnimatedTransformList:
- case AnimatedUnknown:
- // Only SVG DOM animations use these property types - that means valueAsString() is never used for those.
- ASSERT_NOT_REACHED();
- break;
- }
- ASSERT_NOT_REACHED();
- return String();
-}
-
-bool SVGAnimatedType::setValueAsString(const QualifiedName& attrName, const String& value)
-{
- switch (m_type) {
- // Below properties have migrated to new property implementation.
- case AnimatedColor:
- case AnimatedNumber:
- case AnimatedNumberList:
- case AnimatedNumberOptionalNumber:
- case AnimatedLength:
- case AnimatedLengthList:
- case AnimatedPath:
- case AnimatedPoints:
- case AnimatedPreserveAspectRatio:
- case AnimatedRect:
- case AnimatedString:
- case AnimatedStringList:
- // Always use createForAnimation call path for these implementations.
- return false;
-
- // These types don't appear in the table in SVGElement::cssPropertyToTypeMap() and thus don't need setValueAsString() support.
- case AnimatedAngle:
- case AnimatedBoolean:
- case AnimatedEnumeration:
- case AnimatedInteger:
- case AnimatedIntegerOptionalInteger:
- case AnimatedPoint:
- case AnimatedTransform:
- case AnimatedTransformList:
- case AnimatedUnknown:
- // Only SVG DOM animations use these property types - that means setValueAsString() is never used for those.
- ASSERT_NOT_REACHED();
- break;
- }
- return true;
-}
-
-bool SVGAnimatedType::supportsAnimVal(AnimatedPropertyType type)
-{
- // AnimatedColor is only used for CSS property animations.
- return type != AnimatedUnknown && type != AnimatedColor;
-}
-
-} // namespace WebCore
« no previous file with comments | « Source/core/svg/SVGAnimatedType.h ('k') | Source/core/svg/SVGAnimatedTypeAnimator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698