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

Unified Diff: Source/core/css/resolver/AnimatedStyleBuilder.cpp

Issue 112003003: [SVG] SVGLength{,List} migration to new SVG property impl. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebaselined Created 7 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: Source/core/css/resolver/AnimatedStyleBuilder.cpp
diff --git a/Source/core/css/resolver/AnimatedStyleBuilder.cpp b/Source/core/css/resolver/AnimatedStyleBuilder.cpp
index 13ea12a0f46837127f5a25cc689b0c6fba398eb7..c19384955f6f3ca4fb3c1ddd50b694c3fdb5f145 100644
--- a/Source/core/css/resolver/AnimatedStyleBuilder.cpp
+++ b/Source/core/css/resolver/AnimatedStyleBuilder.cpp
@@ -134,12 +134,12 @@ void setFillSize(FillLayer* fillLayer, const AnimatableValue* value, const Style
state.styleMap().mapFillSize(property, fillLayer, toAnimatableUnknown(value)->toCSSValue().get());
}
-SVGLength animatableValueToNonNegativeSVGLength(const AnimatableValue* value)
+PassRefPtr<SVGLength> animatableValueToNonNegativeSVGLength(const AnimatableValue* value)
{
- SVGLength length = toAnimatableSVGLength(value)->toSVGLength();
- if (length.valueInSpecifiedUnits() < 0)
- length.setValueInSpecifiedUnits(0);
- return length;
+ RefPtr<SVGLength> length = toAnimatableSVGLength(value)->toSVGLength();
+ if (length->valueInSpecifiedUnits() < 0)
+ length->setValueInSpecifiedUnits(0);
+ return length.release();
}
template <CSSPropertyID property>
@@ -444,7 +444,7 @@ void AnimatedStyleBuilder::applyProperty(CSSPropertyID property, StyleResolverSt
style->setStopOpacity(clampTo<float>(toAnimatableDouble(value)->toDouble(), 0, 1));
return;
case CSSPropertyStrokeDasharray:
- style->setStrokeDashArray(toAnimatableStrokeDasharrayList(value)->toSVGLengthVector());
+ style->setStrokeDashArray(toAnimatableStrokeDasharrayList(value)->toSVGLengthList());
return;
case CSSPropertyStrokeDashoffset:
style->setStrokeDashOffset(toAnimatableSVGLength(value)->toSVGLength());

Powered by Google App Engine
This is Rietveld 408576698