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

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

Issue 1120003002: [Oilpan] Migrate most classes under core/animations to Oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 5 years, 4 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/StringKeyframe.h ('k') | Source/core/animation/StyleInterpolation.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/StringKeyframe.cpp
diff --git a/Source/core/animation/StringKeyframe.cpp b/Source/core/animation/StringKeyframe.cpp
index db56d6314be26151a03088ec6836f78d9454bd74..89b4dd5496f44724ff7c347462a3953131ff2aee 100644
--- a/Source/core/animation/StringKeyframe.cpp
+++ b/Source/core/animation/StringKeyframe.cpp
@@ -87,18 +87,18 @@ PropertyHandleSet StringKeyframe::properties() const
return properties;
}
-PassRefPtrWillBeRawPtr<Keyframe> StringKeyframe::clone() const
+Keyframe* StringKeyframe::clone() const
{
- return adoptRefWillBeNoop(new StringKeyframe(*this));
+ return new StringKeyframe(*this);
}
-PassOwnPtrWillBeRawPtr<Keyframe::PropertySpecificKeyframe> StringKeyframe::createPropertySpecificKeyframe(PropertyHandle property) const
+Keyframe::PropertySpecificKeyframe* StringKeyframe::createPropertySpecificKeyframe(PropertyHandle property) const
{
if (property.isCSSProperty())
- return adoptPtrWillBeNoop(new CSSPropertySpecificKeyframe(offset(), &easing(), cssPropertyValue(property.cssProperty()), composite()));
+ return new CSSPropertySpecificKeyframe(offset(), &easing(), cssPropertyValue(property.cssProperty()), composite());
ASSERT(property.isSVGAttribute());
- return adoptPtrWillBeNoop(new SVGPropertySpecificKeyframe(offset(), &easing(), svgPropertyValue(*property.svgAttribute()), composite()));
+ return new SVGPropertySpecificKeyframe(offset(), &easing(), svgPropertyValue(*property.svgAttribute()), composite());
}
DEFINE_TRACE(StringKeyframe)
@@ -183,9 +183,9 @@ const Vector<const InterpolationType*>* applicableTypesForProperty(CSSPropertyID
} // namespace
-PassRefPtrWillBeRawPtr<Interpolation> StringKeyframe::CSSPropertySpecificKeyframe::createLegacyStyleInterpolation(CSSPropertyID property, Keyframe::PropertySpecificKeyframe& end, Element* element, const ComputedStyle* baseStyle) const
+Interpolation* StringKeyframe::CSSPropertySpecificKeyframe::createLegacyStyleInterpolation(CSSPropertyID property, Keyframe::PropertySpecificKeyframe& end, Element* element, const ComputedStyle* baseStyle) const
{
- CSSValue& fromCSSValue = *m_value.get();
+ CSSValue& fromCSSValue = *m_value;
CSSValue& toCSSValue = *toCSSPropertySpecificKeyframe(end).value();
if (DeferredLegacyStyleInterpolation::interpolationRequiresStyleResolve(fromCSSValue) || DeferredLegacyStyleInterpolation::interpolationRequiresStyleResolve(toCSSValue)) {
// FIXME: Handle these cases outside of DeferredLegacyStyleInterpolation.
@@ -199,7 +199,7 @@ PassRefPtrWillBeRawPtr<Interpolation> StringKeyframe::CSSPropertySpecificKeyfram
return LegacyStyleInterpolation::create(getAnimatableValue(), end.getAnimatableValue(), property);
}
-PassRefPtrWillBeRawPtr<Interpolation> StringKeyframe::CSSPropertySpecificKeyframe::maybeCreateInterpolation(PropertyHandle propertyHandle, Keyframe::PropertySpecificKeyframe& end, Element* element, const ComputedStyle* baseStyle) const
+Interpolation* StringKeyframe::CSSPropertySpecificKeyframe::maybeCreateInterpolation(PropertyHandle propertyHandle, Keyframe::PropertySpecificKeyframe& end, Element* element, const ComputedStyle* baseStyle) const
{
CSSPropertyID property = propertyHandle.cssProperty();
const Vector<const InterpolationType*>* applicableTypes = applicableTypesForProperty(property);
@@ -324,11 +324,11 @@ PassRefPtrWillBeRawPtr<Interpolation> StringKeyframe::CSSPropertySpecificKeyfram
break;
case CSSPropertyMotionRotation: {
- RefPtrWillBeRawPtr<Interpolation> interpolation = DoubleStyleInterpolation::maybeCreateFromMotionRotation(*fromCSSValue, *toCSSValue, property);
+ Interpolation* interpolation = DoubleStyleInterpolation::maybeCreateFromMotionRotation(*fromCSSValue, *toCSSValue, property);
if (interpolation)
- return interpolation.release();
- break;
- }
+ return interpolation;
+ break;
+ }
case CSSPropertyVisibility:
if (VisibilityStyleInterpolation::canCreateFrom(*fromCSSValue) && VisibilityStyleInterpolation::canCreateFrom(*toCSSValue) && (VisibilityStyleInterpolation::isVisible(*fromCSSValue) || VisibilityStyleInterpolation::isVisible(*toCSSValue)))
return VisibilityStyleInterpolation::create(*fromCSSValue, *toCSSValue, property);
@@ -351,9 +351,9 @@ PassRefPtrWillBeRawPtr<Interpolation> StringKeyframe::CSSPropertySpecificKeyfram
case CSSPropertyWebkitColumnRuleColor:
case CSSPropertyWebkitTextStrokeColor:
{
- RefPtrWillBeRawPtr<Interpolation> interpolation = ColorStyleInterpolation::maybeCreateFromColor(*fromCSSValue, *toCSSValue, property);
+ Interpolation* interpolation = ColorStyleInterpolation::maybeCreateFromColor(*fromCSSValue, *toCSSValue, property);
if (interpolation)
- return interpolation.release();
+ return interpolation;
// Current color should use LegacyStyleInterpolation
if (ColorStyleInterpolation::shouldUseLegacyStyleInterpolation(*fromCSSValue, *toCSSValue))
@@ -386,9 +386,9 @@ PassRefPtrWillBeRawPtr<Interpolation> StringKeyframe::CSSPropertySpecificKeyfram
case CSSPropertyPerspectiveOrigin:
case CSSPropertyTransformOrigin: {
- RefPtrWillBeRawPtr<Interpolation> interpolation = ListStyleInterpolation<LengthStyleInterpolation>::maybeCreateFromList(*fromCSSValue, *toCSSValue, property, range);
+ Interpolation* interpolation = ListStyleInterpolation<LengthStyleInterpolation>::maybeCreateFromList(*fromCSSValue, *toCSSValue, property, range);
if (interpolation)
- return interpolation.release();
+ return interpolation;
// FIXME: Handle keywords: top, right, left, center, bottom
return createLegacyStyleInterpolation(property, end, element, baseStyle);
@@ -396,9 +396,9 @@ PassRefPtrWillBeRawPtr<Interpolation> StringKeyframe::CSSPropertySpecificKeyfram
case CSSPropertyBoxShadow:
case CSSPropertyTextShadow: {
- RefPtrWillBeRawPtr<Interpolation> interpolation = ListStyleInterpolation<ShadowStyleInterpolation>::maybeCreateFromList(*fromCSSValue, *toCSSValue, property);
+ Interpolation* interpolation = ListStyleInterpolation<ShadowStyleInterpolation>::maybeCreateFromList(*fromCSSValue, *toCSSValue, property);
if (interpolation)
- return interpolation.release();
+ return interpolation;
// FIXME: AnimatableShadow incorrectly animates between inset and non-inset values so it will never indicate it needs default interpolation
if (ShadowStyleInterpolation::usesDefaultStyleInterpolation(*fromCSSValue, *toCSSValue)) {
@@ -415,17 +415,17 @@ PassRefPtrWillBeRawPtr<Interpolation> StringKeyframe::CSSPropertySpecificKeyfram
forceDefaultInterpolation = true;
break;
}
- RefPtrWillBeRawPtr<Interpolation> interpolation = LengthBoxStyleInterpolation::maybeCreateFrom(*fromCSSValue, *toCSSValue, property);
+ Interpolation* interpolation = LengthBoxStyleInterpolation::maybeCreateFrom(*fromCSSValue, *toCSSValue, property);
if (interpolation)
- return interpolation.release();
+ return interpolation;
break;
}
case CSSPropertyBorderImageSlice:
case CSSPropertyWebkitMaskBoxImageSlice: {
- RefPtrWillBeRawPtr<Interpolation> interpolation = ImageSliceStyleInterpolation::maybeCreate(*fromCSSValue, *toCSSValue, property);
+ Interpolation* interpolation = ImageSliceStyleInterpolation::maybeCreate(*fromCSSValue, *toCSSValue, property);
if (interpolation)
- return interpolation.release();
+ return interpolation;
if (ImageSliceStyleInterpolation::usesDefaultInterpolation(*fromCSSValue, *toCSSValue))
forceDefaultInterpolation = true;
@@ -433,17 +433,17 @@ PassRefPtrWillBeRawPtr<Interpolation> StringKeyframe::CSSPropertySpecificKeyfram
}
case CSSPropertyStrokeDasharray: {
- RefPtrWillBeRawPtr<Interpolation> interpolation = SVGStrokeDasharrayStyleInterpolation::maybeCreate(*fromCSSValue, *toCSSValue, property);
+ Interpolation* interpolation = SVGStrokeDasharrayStyleInterpolation::maybeCreate(*fromCSSValue, *toCSSValue, property);
if (interpolation)
- return interpolation.release();
+ return interpolation;
break;
}
case CSSPropertyWebkitFilter: {
- RefPtrWillBeRawPtr<Interpolation> interpolation = FilterStyleInterpolation::maybeCreateList(*fromCSSValue, *toCSSValue, property);
+ Interpolation* interpolation = FilterStyleInterpolation::maybeCreateList(*fromCSSValue, *toCSSValue, property);
if (interpolation)
- return interpolation.release();
+ return interpolation;
// FIXME: Support drop shadow interpolation.
return createLegacyStyleInterpolation(property, end, element, baseStyle);
@@ -451,9 +451,9 @@ PassRefPtrWillBeRawPtr<Interpolation> StringKeyframe::CSSPropertySpecificKeyfram
}
case CSSPropertyTranslate: {
- RefPtrWillBeRawPtr<Interpolation> interpolation = ListStyleInterpolation<LengthStyleInterpolation>::maybeCreateFromList(*fromCSSValue, *toCSSValue, property, range);
+ Interpolation* interpolation = ListStyleInterpolation<LengthStyleInterpolation>::maybeCreateFromList(*fromCSSValue, *toCSSValue, property, range);
if (interpolation)
- return interpolation.release();
+ return interpolation;
// TODO(soonm): Legacy mode is used when from and to cssvaluelist length does not match.
return createLegacyStyleInterpolation(property, end, element, baseStyle);
@@ -461,9 +461,9 @@ PassRefPtrWillBeRawPtr<Interpolation> StringKeyframe::CSSPropertySpecificKeyfram
}
case CSSPropertyScale: {
- RefPtrWillBeRawPtr<Interpolation> interpolation = ListStyleInterpolation<DoubleStyleInterpolation>::maybeCreateFromList(*fromCSSValue, *toCSSValue, property, range);
+ Interpolation* interpolation = ListStyleInterpolation<DoubleStyleInterpolation>::maybeCreateFromList(*fromCSSValue, *toCSSValue, property, range);
if (interpolation)
- return interpolation.release();
+ return interpolation;
// TODO(soonm): Legacy mode is used when from and to cssvaluelist length does not match.
return createLegacyStyleInterpolation(property, end, element, baseStyle);
@@ -481,24 +481,24 @@ PassRefPtrWillBeRawPtr<Interpolation> StringKeyframe::CSSPropertySpecificKeyfram
if (!forceDefaultInterpolation) {
ASSERT(AnimatableValue::usesDefaultInterpolation(
- StyleResolver::createAnimatableValueSnapshot(*element, baseStyle, property, fromCSSValue).get(),
- StyleResolver::createAnimatableValueSnapshot(*element, baseStyle, property, toCSSValue).get()));
+ StyleResolver::createAnimatableValueSnapshot(*element, baseStyle, property, fromCSSValue),
+ StyleResolver::createAnimatableValueSnapshot(*element, baseStyle, property, toCSSValue)));
}
return nullptr;
}
-PassOwnPtrWillBeRawPtr<Keyframe::PropertySpecificKeyframe> StringKeyframe::CSSPropertySpecificKeyframe::neutralKeyframe(double offset, PassRefPtr<TimingFunction> easing) const
+Keyframe::PropertySpecificKeyframe* StringKeyframe::CSSPropertySpecificKeyframe::neutralKeyframe(double offset, PassRefPtr<TimingFunction> easing) const
{
- return adoptPtrWillBeNoop(new CSSPropertySpecificKeyframe(offset, easing, static_cast<CSSValue*>(0), EffectModel::CompositeAdd));
+ return new CSSPropertySpecificKeyframe(offset, easing, static_cast<CSSValue*>(0), EffectModel::CompositeAdd);
}
-PassOwnPtrWillBeRawPtr<Keyframe::PropertySpecificKeyframe> StringKeyframe::CSSPropertySpecificKeyframe::cloneWithOffset(double offset) const
+Keyframe::PropertySpecificKeyframe* StringKeyframe::CSSPropertySpecificKeyframe::cloneWithOffset(double offset) const
{
Keyframe::PropertySpecificKeyframe* theClone = new CSSPropertySpecificKeyframe(offset, m_easing, m_value.get());
toCSSPropertySpecificKeyframe(theClone)->m_animatableValueCache = m_animatableValueCache;
- return adoptPtrWillBeNoop(theClone);
+ return theClone;
}
DEFINE_TRACE(StringKeyframe::CSSPropertySpecificKeyframe)
@@ -526,21 +526,21 @@ DEFINE_TRACE(StringKeyframe::SVGPropertySpecificKeyframe)
Keyframe::PropertySpecificKeyframe::trace(visitor);
}
-PassOwnPtrWillBeRawPtr<Keyframe::PropertySpecificKeyframe> SVGPropertySpecificKeyframe::cloneWithOffset(double offset) const
+Keyframe::PropertySpecificKeyframe* SVGPropertySpecificKeyframe::cloneWithOffset(double offset) const
{
- return adoptPtrWillBeNoop(new SVGPropertySpecificKeyframe(offset, m_easing, m_value));
+ return new SVGPropertySpecificKeyframe(offset, m_easing, m_value);
}
-PassOwnPtrWillBeRawPtr<Keyframe::PropertySpecificKeyframe> SVGPropertySpecificKeyframe::neutralKeyframe(double offset, PassRefPtr<TimingFunction> easing) const
+Keyframe::PropertySpecificKeyframe* SVGPropertySpecificKeyframe::neutralKeyframe(double offset, PassRefPtr<TimingFunction> easing) const
{
- return adoptPtrWillBeNoop(new SVGPropertySpecificKeyframe(offset, easing, "", EffectModel::CompositeAdd));
+ return new SVGPropertySpecificKeyframe(offset, easing, "", EffectModel::CompositeAdd);
}
namespace {
-PassRefPtrWillBeRawPtr<Interpolation> createSVGInterpolation(SVGPropertyBase* fromValue, SVGPropertyBase* toValue, SVGAnimatedPropertyBase* attribute)
+Interpolation* createSVGInterpolation(SVGPropertyBase* fromValue, SVGPropertyBase* toValue, SVGAnimatedPropertyBase* attribute)
{
- RefPtrWillBeRawPtr<Interpolation> interpolation = nullptr;
+ Interpolation* interpolation = nullptr;
ASSERT(fromValue->type() == toValue->type());
switch (fromValue->type()) {
case AnimatedAngle:
@@ -584,14 +584,14 @@ PassRefPtrWillBeRawPtr<Interpolation> createSVGInterpolation(SVGPropertyBase* fr
break;
}
if (interpolation)
- return interpolation.release();
+ return interpolation;
return DefaultSVGInterpolation::create(fromValue, toValue, attribute);
}
} // namespace
-PassRefPtrWillBeRawPtr<Interpolation> SVGPropertySpecificKeyframe::maybeCreateInterpolation(PropertyHandle propertyHandle, Keyframe::PropertySpecificKeyframe& end, Element* element, const ComputedStyle* baseStyle) const
+Interpolation* SVGPropertySpecificKeyframe::maybeCreateInterpolation(PropertyHandle propertyHandle, Keyframe::PropertySpecificKeyframe& end, Element* element, const ComputedStyle* baseStyle) const
{
ASSERT(element);
RefPtrWillBeRawPtr<SVGAnimatedPropertyBase> attribute = toSVGElement(element)->propertyFromAttribute(*propertyHandle.svgAttribute());
« no previous file with comments | « Source/core/animation/StringKeyframe.h ('k') | Source/core/animation/StyleInterpolation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698