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

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

Issue 1233363002: 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
« no previous file with comments | « Source/core/animation/ShadowStyleInterpolation.h ('k') | Source/core/animation/StringKeyframe.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/ShadowStyleInterpolation.cpp
diff --git a/Source/core/animation/ShadowStyleInterpolation.cpp b/Source/core/animation/ShadowStyleInterpolation.cpp
index adf267e4beaffaba402b1f72f1db82382fa49495..b72c8be798e7665155b988fe313749c6bae13acb 100644
--- a/Source/core/animation/ShadowStyleInterpolation.cpp
+++ b/Source/core/animation/ShadowStyleInterpolation.cpp
@@ -21,7 +21,7 @@ bool ShadowStyleInterpolation::canCreateFrom(const CSSValue& start, const CSSVal
&& toCSSShadowValue(start).color && toCSSShadowValue(end).color;
}
-PassOwnPtrWillBeRawPtr<InterpolableValue> ShadowStyleInterpolation::lengthToInterpolableValue(NullableCSSValue value)
+PassOwnPtrWillBeRawPtr<InterpolableValue> ShadowStyleInterpolation::lengthToInterpolableValue(const NullableCSSValue& value)
{
if (value)
return LengthStyleInterpolation::toInterpolableValue(*value);
@@ -52,10 +52,10 @@ PassOwnPtrWillBeRawPtr<InterpolableValue> ShadowStyleInterpolation::toInterpolab
CSSValue ShadowStyleInterpolation::fromInterpolableValue(const InterpolableValue& value, NonInterpolableType nonInterpolableData, InterpolationRange range)
{
const InterpolableList* shadow = toInterpolableList(&value);
- CSSPrimitiveValue x = LengthStyleInterpolation::fromInterpolableValue(*shadow->get(0), RangeAll);
- CSSPrimitiveValue y = LengthStyleInterpolation::fromInterpolableValue(*shadow->get(1), RangeAll);
- CSSPrimitiveValue blur = LengthStyleInterpolation::fromInterpolableValue(*shadow->get(2), RangeNonNegative);
- CSSPrimitiveValue spread = LengthStyleInterpolation::fromInterpolableValue(*shadow->get(3), RangeAll);
+ const CSSPrimitiveValue& x = LengthStyleInterpolation::fromInterpolableValue(*shadow->get(0), RangeAll);
+ const CSSPrimitiveValue& y = LengthStyleInterpolation::fromInterpolableValue(*shadow->get(1), RangeAll);
+ const CSSPrimitiveValue& blur = LengthStyleInterpolation::fromInterpolableValue(*shadow->get(2), RangeNonNegative);
+ const CSSPrimitiveValue& spread = LengthStyleInterpolation::fromInterpolableValue(*shadow->get(3), RangeAll);
CSSPrimitiveValue color = ColorStyleInterpolation::interpolableValueToColor(*shadow->get(4));
CSSPrimitiveValue style = nonInterpolableData ? CSSPrimitiveValue::createIdentifier(CSSValueInset) : CSSPrimitiveValue::createIdentifier(CSSValueNone);
« no previous file with comments | « Source/core/animation/ShadowStyleInterpolation.h ('k') | Source/core/animation/StringKeyframe.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698