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

Unified Diff: third_party/WebKit/Source/core/animation/css/CSSAnimatableValueFactory.cpp

Issue 2346193002: Split CSSPrimitiveValue into CSSPrimitiveValue and CSSIdentifierValue (Closed)
Patch Set: Rebase please work Created 4 years, 3 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: third_party/WebKit/Source/core/animation/css/CSSAnimatableValueFactory.cpp
diff --git a/third_party/WebKit/Source/core/animation/css/CSSAnimatableValueFactory.cpp b/third_party/WebKit/Source/core/animation/css/CSSAnimatableValueFactory.cpp
index 846f1451d73285595893f0c0bc958569cb9b6772..471d560c8741640517f2859c38893bc1fa06c6e9 100644
--- a/third_party/WebKit/Source/core/animation/css/CSSAnimatableValueFactory.cpp
+++ b/third_party/WebKit/Source/core/animation/css/CSSAnimatableValueFactory.cpp
@@ -53,6 +53,7 @@
#include "core/animation/animatable/AnimatableUnknown.h"
#include "core/animation/animatable/AnimatableVisibility.h"
#include "core/css/CSSCalculationValue.h"
+#include "core/css/CSSIdentifierValue.h"
#include "core/css/CSSPrimitiveValue.h"
#include "core/css/CSSPrimitiveValueMappings.h"
#include "core/css/CSSPropertyMetadata.h"
@@ -75,7 +76,7 @@ static PassRefPtr<AnimatableValue> createFromLengthWithZoom(const Length& length
case MaxContent:
case FillAvailable:
case FitContent:
- return AnimatableUnknown::create(CSSPrimitiveValue::create(length, 1));
+ return AnimatableUnknown::create(CSSValue::create(length, 1));
case MaxSizeNone:
return AnimatableUnknown::create(CSSValueNone);
case ExtendToZoom: // Does not apply to elements.
@@ -191,7 +192,7 @@ inline static PassRefPtr<AnimatableValue> createFromFillSize(const FillSize& fil
case Contain:
case Cover:
case SizeNone:
- return AnimatableUnknown::create(CSSPrimitiveValue::create(fillSize.type));
+ return AnimatableUnknown::create(CSSIdentifierValue::create(fillSize.type));
default:
NOTREACHED();
return nullptr;
@@ -325,9 +326,9 @@ PassRefPtr<AnimatableValue> CSSAnimatableValueFactory::create(CSSPropertyID prop
case CSSPropertyBaselineShift:
switch (style.svgStyle().baselineShift()) {
case BS_SUPER:
- return AnimatableUnknown::create(CSSPrimitiveValue::createIdentifier(CSSValueSuper));
+ return AnimatableUnknown::create(CSSIdentifierValue::create(CSSValueSuper));
case BS_SUB:
- return AnimatableUnknown::create(CSSPrimitiveValue::createIdentifier(CSSValueSub));
+ return AnimatableUnknown::create(CSSIdentifierValue::create(CSSValueSub));
default:
return createFromLength(style.baselineShiftValue(), style);
}
@@ -369,7 +370,7 @@ PassRefPtr<AnimatableValue> CSSAnimatableValueFactory::create(CSSPropertyID prop
return AnimatableShadow::create(style.boxShadow(), style.color());
case CSSPropertyClip:
if (style.hasAutoClip())
- return AnimatableUnknown::create(CSSPrimitiveValue::createIdentifier(CSSValueAuto));
+ return AnimatableUnknown::create(CSSIdentifierValue::create(CSSValueAuto));
return createFromLengthBox(style.clip(), style);
case CSSPropertyColor:
return createFromColor(property, style);
@@ -523,7 +524,7 @@ PassRefPtr<AnimatableValue> CSSAnimatableValueFactory::create(CSSPropertyID prop
return createFromFillLayers<CSSPropertyWebkitMaskSize>(style.maskLayers(), style);
case CSSPropertyPerspective:
if (style.perspective() == 0)
- return AnimatableUnknown::create(CSSPrimitiveValue::createIdentifier(CSSValueNone));
+ return AnimatableUnknown::create(CSSIdentifierValue::create(CSSValueNone));
return createFromDouble(style.perspective());
case CSSPropertyPerspectiveOrigin:
return createFromLengthPoint(style.perspectiveOrigin(), style);
@@ -578,7 +579,7 @@ PassRefPtr<AnimatableValue> CSSAnimatableValueFactory::create(CSSPropertyID prop
case CSSPropertyVerticalAlign:
if (style.verticalAlign() == VerticalAlignLength)
return createFromLength(style.getVerticalAlignLength(), style);
- return AnimatableUnknown::create(CSSPrimitiveValue::create(style.verticalAlign()));
+ return AnimatableUnknown::create(CSSIdentifierValue::create(style.verticalAlign()));
case CSSPropertyVisibility:
return AnimatableVisibility::create(style.visibility());
case CSSPropertyD:

Powered by Google App Engine
This is Rietveld 408576698