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

Unified Diff: Source/core/animation/LengthStyleInterpolation.cpp

Issue 1226123008: CSSValue Immediates: Replace CSSPrimitiveValue usage with const references (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@cssvalue_patch_4_attempt_2
Patch Set: Rebase Created 5 years, 5 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/LengthStyleInterpolation.cpp
diff --git a/Source/core/animation/LengthStyleInterpolation.cpp b/Source/core/animation/LengthStyleInterpolation.cpp
index bc973808d28a07be77bf0178592ba2783e16f889..7ca8aa412904f545b38ac9561982d4339b4f69ec 100644
--- a/Source/core/animation/LengthStyleInterpolation.cpp
+++ b/Source/core/animation/LengthStyleInterpolation.cpp
@@ -54,7 +54,7 @@ bool pixelsForKeyword(CSSPropertyID property, CSSValueID valueID, double& result
bool LengthStyleInterpolation::canCreateFrom(const CSSValue value, CSSPropertyID property)
{
if (value.isPrimitiveValue()) {
- const CSSPrimitiveValue primitiveValue = toCSSPrimitiveValue(value);
+ const CSSPrimitiveValue& primitiveValue = toCSSPrimitiveValue(value);
if (primitiveValue.cssCalcValue())
return true;
@@ -71,14 +71,14 @@ bool LengthStyleInterpolation::canCreateFrom(const CSSValue value, CSSPropertyID
return value.isCalcValue();
}
-PassOwnPtrWillBeRawPtr<InterpolableValue> LengthStyleInterpolation::toInterpolableValue(const CSSValue value, CSSPropertyID id)
+PassOwnPtrWillBeRawPtr<InterpolableValue> LengthStyleInterpolation::toInterpolableValue(const CSSValue& value, CSSPropertyID id)
{
ASSERT(canCreateFrom(value, id));
OwnPtrWillBeRawPtr<InterpolableList> listOfValuesAndTypes = InterpolableList::create(2);
OwnPtrWillBeRawPtr<InterpolableList> listOfValues = InterpolableList::create(CSSPrimitiveValue::LengthUnitTypeCount);
OwnPtrWillBeRawPtr<InterpolableList> listOfTypes = InterpolableList::create(CSSPrimitiveValue::LengthUnitTypeCount);
- const CSSPrimitiveValue primitive = toCSSPrimitiveValue(value);
+ const CSSPrimitiveValue& primitive = toCSSPrimitiveValue(value);
CSSLengthArray arrayOfValues;
CSSPrimitiveValue::CSSLengthTypeArray arrayOfTypes;
« no previous file with comments | « Source/core/animation/LengthStyleInterpolation.h ('k') | Source/core/animation/LengthStyleInterpolationTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698