Chromium Code Reviews| Index: Source/core/animation/StringKeyframe.cpp |
| diff --git a/Source/core/animation/StringKeyframe.cpp b/Source/core/animation/StringKeyframe.cpp |
| index 76e4fcf7843944e1b8c7d0418a1923e5d4df1720..f6afe1716ffb3f12aface27fbcb676bdba77f44f 100644 |
| --- a/Source/core/animation/StringKeyframe.cpp |
| +++ b/Source/core/animation/StringKeyframe.cpp |
| @@ -83,18 +83,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) |
| @@ -152,7 +152,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(); |
| @@ -271,9 +271,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; |
|
sof
2015/05/30 11:34:05
Could you fix indentation of this "break"?
peria
2015/06/01 04:43:02
Thank you for catching up this mistake!
|
| } |
| case CSSPropertyVisibility: |
| @@ -298,9 +298,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)) |
| @@ -333,9 +333,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; |
| @@ -345,9 +345,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)) { |
| @@ -367,17 +367,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; |
| @@ -385,17 +385,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. |
| fallBackToLegacy = true; |
| @@ -427,27 +427,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), 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) |
| @@ -475,21 +475,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: |
| @@ -533,14 +533,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()); |