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

Unified Diff: third_party/WebKit/Source/core/animation/SVGInterpolationTypesMap.cpp

Issue 2567453002: Revert of Make InvalidatableInterpolation's InterpolationTypes decided at effect application time (Closed)
Patch Set: Created 4 years 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: third_party/WebKit/Source/core/animation/SVGInterpolationTypesMap.cpp
diff --git a/third_party/WebKit/Source/core/animation/SVGInterpolationTypesMap.cpp b/third_party/WebKit/Source/core/animation/SVGInterpolationTypesMap.cpp
deleted file mode 100644
index 9c17acab8d782cd4c830cc952f9eafa91a31d125..0000000000000000000000000000000000000000
--- a/third_party/WebKit/Source/core/animation/SVGInterpolationTypesMap.cpp
+++ /dev/null
@@ -1,157 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "core/animation/SVGInterpolationTypesMap.h"
-
-#include "core/HTMLNames.h"
-#include "core/animation/SVGAngleInterpolationType.h"
-#include "core/animation/SVGIntegerInterpolationType.h"
-#include "core/animation/SVGIntegerOptionalIntegerInterpolationType.h"
-#include "core/animation/SVGLengthInterpolationType.h"
-#include "core/animation/SVGLengthListInterpolationType.h"
-#include "core/animation/SVGNumberInterpolationType.h"
-#include "core/animation/SVGNumberListInterpolationType.h"
-#include "core/animation/SVGNumberOptionalNumberInterpolationType.h"
-#include "core/animation/SVGPathInterpolationType.h"
-#include "core/animation/SVGPointListInterpolationType.h"
-#include "core/animation/SVGRectInterpolationType.h"
-#include "core/animation/SVGTransformListInterpolationType.h"
-#include "core/animation/SVGValueInterpolationType.h"
-#include "core/css/CSSPropertyMetadata.h"
-#include "wtf/PtrUtil.h"
-#include <memory>
-
-namespace blink {
-
-const InterpolationTypes& SVGInterpolationTypesMap::get(
- const PropertyHandle& property) const {
- using ApplicableTypesMap =
- HashMap<PropertyHandle, std::unique_ptr<const InterpolationTypes>>;
- DEFINE_STATIC_LOCAL(ApplicableTypesMap, applicableTypesMap, ());
- auto entry = applicableTypesMap.find(property);
- if (entry != applicableTypesMap.end())
- return *entry->value.get();
-
- std::unique_ptr<InterpolationTypes> applicableTypes =
- makeUnique<InterpolationTypes>();
-
- const QualifiedName& attribute = property.svgAttribute();
- if (attribute == SVGNames::orientAttr) {
- applicableTypes->append(makeUnique<SVGAngleInterpolationType>(attribute));
- } else if (attribute == SVGNames::numOctavesAttr ||
- attribute == SVGNames::targetXAttr ||
- attribute == SVGNames::targetYAttr) {
- applicableTypes->append(makeUnique<SVGIntegerInterpolationType>(attribute));
- } else if (attribute == SVGNames::orderAttr) {
- applicableTypes->append(
- wrapUnique(new SVGIntegerOptionalIntegerInterpolationType(attribute)));
- } else if (attribute == SVGNames::cxAttr || attribute == SVGNames::cyAttr ||
- attribute == SVGNames::fxAttr || attribute == SVGNames::fyAttr ||
- attribute == SVGNames::heightAttr ||
- attribute == SVGNames::markerHeightAttr ||
- attribute == SVGNames::markerWidthAttr ||
- attribute == SVGNames::rAttr || attribute == SVGNames::refXAttr ||
- attribute == SVGNames::refYAttr || attribute == SVGNames::rxAttr ||
- attribute == SVGNames::ryAttr ||
- attribute == SVGNames::startOffsetAttr ||
- attribute == SVGNames::textLengthAttr ||
- attribute == SVGNames::widthAttr ||
- attribute == SVGNames::x1Attr || attribute == SVGNames::x2Attr ||
- attribute == SVGNames::y1Attr || attribute == SVGNames::y2Attr) {
- applicableTypes->append(makeUnique<SVGLengthInterpolationType>(attribute));
- } else if (attribute == SVGNames::dxAttr || attribute == SVGNames::dyAttr) {
- applicableTypes->append(makeUnique<SVGNumberInterpolationType>(attribute));
- applicableTypes->append(
- makeUnique<SVGLengthListInterpolationType>(attribute));
- } else if (attribute == SVGNames::xAttr || attribute == SVGNames::yAttr) {
- applicableTypes->append(makeUnique<SVGLengthInterpolationType>(attribute));
- applicableTypes->append(
- makeUnique<SVGLengthListInterpolationType>(attribute));
- } else if (attribute == SVGNames::amplitudeAttr ||
- attribute == SVGNames::azimuthAttr ||
- attribute == SVGNames::biasAttr ||
- attribute == SVGNames::diffuseConstantAttr ||
- attribute == SVGNames::divisorAttr ||
- attribute == SVGNames::elevationAttr ||
- attribute == SVGNames::exponentAttr ||
- attribute == SVGNames::interceptAttr ||
- attribute == SVGNames::k1Attr || attribute == SVGNames::k2Attr ||
- attribute == SVGNames::k3Attr || attribute == SVGNames::k4Attr ||
- attribute == SVGNames::limitingConeAngleAttr ||
- attribute == SVGNames::offsetAttr ||
- attribute == SVGNames::pathLengthAttr ||
- attribute == SVGNames::pointsAtXAttr ||
- attribute == SVGNames::pointsAtYAttr ||
- attribute == SVGNames::pointsAtZAttr ||
- attribute == SVGNames::scaleAttr ||
- attribute == SVGNames::seedAttr ||
- attribute == SVGNames::slopeAttr ||
- attribute == SVGNames::specularConstantAttr ||
- attribute == SVGNames::specularExponentAttr ||
- attribute == SVGNames::surfaceScaleAttr ||
- attribute == SVGNames::zAttr) {
- applicableTypes->append(makeUnique<SVGNumberInterpolationType>(attribute));
- } else if (attribute == SVGNames::kernelMatrixAttr ||
- attribute == SVGNames::rotateAttr ||
- attribute == SVGNames::tableValuesAttr ||
- attribute == SVGNames::valuesAttr) {
- applicableTypes->append(
- makeUnique<SVGNumberListInterpolationType>(attribute));
- } else if (attribute == SVGNames::baseFrequencyAttr ||
- attribute == SVGNames::kernelUnitLengthAttr ||
- attribute == SVGNames::radiusAttr ||
- attribute == SVGNames::stdDeviationAttr) {
- applicableTypes->append(
- makeUnique<SVGNumberOptionalNumberInterpolationType>(attribute));
- } else if (attribute == SVGNames::dAttr) {
- applicableTypes->append(makeUnique<SVGPathInterpolationType>(attribute));
- } else if (attribute == SVGNames::pointsAttr) {
- applicableTypes->append(
- makeUnique<SVGPointListInterpolationType>(attribute));
- } else if (attribute == SVGNames::viewBoxAttr) {
- applicableTypes->append(makeUnique<SVGRectInterpolationType>(attribute));
- } else if (attribute == SVGNames::gradientTransformAttr ||
- attribute == SVGNames::patternTransformAttr ||
- attribute == SVGNames::transformAttr) {
- applicableTypes->append(
- makeUnique<SVGTransformListInterpolationType>(attribute));
- } else if (attribute == HTMLNames::classAttr ||
- attribute == SVGNames::clipPathUnitsAttr ||
- attribute == SVGNames::edgeModeAttr ||
- attribute == SVGNames::filterUnitsAttr ||
- attribute == SVGNames::gradientUnitsAttr ||
- attribute == SVGNames::hrefAttr || attribute == SVGNames::inAttr ||
- attribute == SVGNames::in2Attr ||
- attribute == SVGNames::lengthAdjustAttr ||
- attribute == SVGNames::markerUnitsAttr ||
- attribute == SVGNames::maskContentUnitsAttr ||
- attribute == SVGNames::maskUnitsAttr ||
- attribute == SVGNames::methodAttr ||
- attribute == SVGNames::modeAttr ||
- attribute == SVGNames::operatorAttr ||
- attribute == SVGNames::patternContentUnitsAttr ||
- attribute == SVGNames::patternUnitsAttr ||
- attribute == SVGNames::preserveAlphaAttr ||
- attribute == SVGNames::preserveAspectRatioAttr ||
- attribute == SVGNames::primitiveUnitsAttr ||
- attribute == SVGNames::resultAttr ||
- attribute == SVGNames::spacingAttr ||
- attribute == SVGNames::spreadMethodAttr ||
- attribute == SVGNames::stitchTilesAttr ||
- attribute == SVGNames::targetAttr ||
- attribute == SVGNames::typeAttr ||
- attribute == SVGNames::xChannelSelectorAttr ||
- attribute == SVGNames::yChannelSelectorAttr) {
- // Use default SVGValueInterpolationType.
- } else {
- NOTREACHED();
- }
-
- applicableTypes->append(makeUnique<SVGValueInterpolationType>(attribute));
-
- auto addResult = applicableTypesMap.add(property, std::move(applicableTypes));
- return *addResult.storedValue->value.get();
-}
-
-} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698