| Index: Source/core/animation/StringKeyframe.cpp
|
| diff --git a/Source/core/animation/StringKeyframe.cpp b/Source/core/animation/StringKeyframe.cpp
|
| index a654909c3cc86416f29376f2ec8c2a7616cf5f5e..993e32259d69b618b230c2e5ce492c95943501ec 100644
|
| --- a/Source/core/animation/StringKeyframe.cpp
|
| +++ b/Source/core/animation/StringKeyframe.cpp
|
| @@ -82,18 +82,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)
|
| @@ -151,7 +151,7 @@ InterpolationRange setRange(CSSPropertyID id)
|
|
|
| } // namespace
|
|
|
| -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();
|
|
|
| @@ -270,9 +270,9 @@ 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();
|
| + return interpolation;
|
| break;
|
| }
|
| case CSSPropertyVisibility:
|
| @@ -297,9 +297,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))
|
| @@ -332,9 +332,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
|
| fallBackToLegacy = true;
|
| @@ -344,9 +344,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)) {
|
| @@ -366,17 +366,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;
|
|
|
| @@ -384,9 +384,9 @@ 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;
|
| }
|
| @@ -417,27 +417,27 @@ PassRefPtrWillBeRawPtr<Interpolation> StringKeyframe::CSSPropertySpecificKeyfram
|
| ASSERT(element);
|
| populateAnimatableValue(property, *element, baseStyle);
|
| end.populateAnimatableValue(property, *element, baseStyle);
|
| - return LegacyStyleInterpolation::create(getAnimatableValue(), end.getAnimatableValue(), property);
|
| + return LegacyStyleInterpolation::create(const_cast<AnimatableValue*>(getAnimatableValue()), const_cast<AnimatableValue*>(end.getAnimatableValue()), property);
|
| }
|
|
|
| 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), AnimationEffect::CompositeAdd));
|
| + return new CSSPropertySpecificKeyframe(offset, easing, static_cast<CSSValue*>(0), AnimationEffect::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)
|
| @@ -465,21 +465,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, "", AnimationEffect::CompositeAdd));
|
| + return new SVGPropertySpecificKeyframe(offset, easing, "", AnimationEffect::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:
|
| @@ -523,14 +523,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());
|
|
|