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

Unified Diff: Source/core/animation/animatable/AnimatableImage.cpp

Issue 1164573002: CSSValue Immediates: Change CSSValue to an object instead of a pointer (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
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/animatable/AnimatableImage.cpp
diff --git a/Source/core/animation/animatable/AnimatableImage.cpp b/Source/core/animation/animatable/AnimatableImage.cpp
index 383617dba69b033cbd80504642623e969c2a006e..4e0b740af11c27315df552fc4c8171029baff145 100644
--- a/Source/core/animation/animatable/AnimatableImage.cpp
+++ b/Source/core/animation/animatable/AnimatableImage.cpp
@@ -40,9 +40,9 @@ namespace blink {
// FIXME: Once cross-fade works on generated image types, remove this method.
bool AnimatableImage::usesDefaultInterpolationWith(const AnimatableValue* value) const
{
- if (!m_value->isImageValue())
+ if (!m_value.isImageValue())
return true;
- if (!toAnimatableImage(value)->toCSSValue()->isImageValue())
+ if (!toAnimatableImage(value)->toCSSValue().isImageValue())
return true;
return false;
}
@@ -52,8 +52,8 @@ PassRefPtrWillBeRawPtr<AnimatableValue> AnimatableImage::interpolateTo(const Ani
if (fraction <= 0 || fraction >= 1 || usesDefaultInterpolationWith(value))
return defaultInterpolateTo(this, value, fraction);
- CSSValue* fromValue = toCSSValue();
- CSSValue* toValue = toAnimatableImage(value)->toCSSValue();
+ CSSValue fromValue = toCSSValue();
+ CSSValue toValue = toAnimatableImage(value)->toCSSValue();
RefPtrWillBeRawPtr<CSSCrossfadeValue> crossfadeValue = CSSCrossfadeValue::create(fromValue, toValue);
crossfadeValue->setPercentage(CSSPrimitiveValue::create(fraction, CSSPrimitiveValue::CSS_NUMBER));
@@ -62,7 +62,7 @@ PassRefPtrWillBeRawPtr<AnimatableValue> AnimatableImage::interpolateTo(const Ani
bool AnimatableImage::equalTo(const AnimatableValue* value) const
{
- return m_value->equals(*toAnimatableImage(value)->m_value.get());
+ return m_value.equals(toAnimatableImage(value)->m_value);
}
}
« no previous file with comments | « Source/core/animation/animatable/AnimatableImage.h ('k') | Source/core/animation/animatable/AnimatableUnknown.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698