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

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

Issue 851633002: Animation: Add template for ListStyleInterpolation (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add template for ListStyleInterpolation Created 5 years, 11 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/LengthBoxStyleInterpolation.cpp
diff --git a/Source/core/animation/LengthBoxStyleInterpolation.cpp b/Source/core/animation/LengthBoxStyleInterpolation.cpp
index 08778ab378f9cd347ef5a4f98c3ea138324e6400..70dbfe26110e820360e4df916bb470306a7fb8c8 100644
--- a/Source/core/animation/LengthBoxStyleInterpolation.cpp
+++ b/Source/core/animation/LengthBoxStyleInterpolation.cpp
@@ -33,10 +33,10 @@ PassRefPtrWillBeRawPtr<CSSValue> LengthBoxStyleInterpolation::interpolableValueT
InterpolableList* lengthBox = toInterpolableList(value);
RefPtrWillBeRawPtr<Rect> result = Rect::create();
- result->setLeft(LengthStyleInterpolation::interpolableValueToLength(lengthBox->get(0), RangeNonNegative));
- result->setRight(LengthStyleInterpolation::interpolableValueToLength(lengthBox->get(1), RangeNonNegative));
- result->setTop(LengthStyleInterpolation::interpolableValueToLength(lengthBox->get(2), RangeNonNegative));
- result->setBottom(LengthStyleInterpolation::interpolableValueToLength(lengthBox->get(3), RangeNonNegative));
+ result->setLeft(LengthStyleInterpolation::interpolableValueToLength(*lengthBox->get(0), RangeNonNegative));
+ result->setRight(LengthStyleInterpolation::interpolableValueToLength(*lengthBox->get(1), RangeNonNegative));
+ result->setTop(LengthStyleInterpolation::interpolableValueToLength(*lengthBox->get(2), RangeNonNegative));
+ result->setBottom(LengthStyleInterpolation::interpolableValueToLength(*lengthBox->get(3), RangeNonNegative));
return CSSPrimitiveValue::create(result.release());
}
@@ -87,10 +87,10 @@ PassRefPtrWillBeRawPtr<CSSValue> LengthBoxStyleInterpolation::interpolableValueT
InterpolableList* lengthBox = toInterpolableList(value);
RefPtrWillBeRawPtr<Quad> quad = Quad::create();
- quad->setLeft(toPrimitiveValue(LengthStyleInterpolation::interpolableValueToLength(lengthBox->get(0), RangeNonNegative)));
- quad->setRight(toPrimitiveValue(LengthStyleInterpolation::interpolableValueToLength(lengthBox->get(1), RangeNonNegative)));
- quad->setTop(toPrimitiveValue(LengthStyleInterpolation::interpolableValueToLength(lengthBox->get(2), RangeNonNegative)));
- quad->setBottom(toPrimitiveValue(LengthStyleInterpolation::interpolableValueToLength(lengthBox->get(3), RangeNonNegative)));
+ quad->setLeft(toPrimitiveValue(LengthStyleInterpolation::interpolableValueToLength(*lengthBox->get(0), RangeNonNegative)));
+ quad->setRight(toPrimitiveValue(LengthStyleInterpolation::interpolableValueToLength(*lengthBox->get(1), RangeNonNegative)));
+ quad->setTop(toPrimitiveValue(LengthStyleInterpolation::interpolableValueToLength(*lengthBox->get(2), RangeNonNegative)));
+ quad->setBottom(toPrimitiveValue(LengthStyleInterpolation::interpolableValueToLength(*lengthBox->get(3), RangeNonNegative)));
return CSSBorderImageSliceValue::create(CSSPrimitiveValue::create(quad.release()), fill);
}

Powered by Google App Engine
This is Rietveld 408576698