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

Side by Side Diff: third_party/WebKit/Source/core/animation/StringKeyframe.cpp

Issue 1541923002: Make SVGElement::propertyFromAttribute return raw pointer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/svg/SVGAnimatedTypeAnimator.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/animation/StringKeyframe.h" 5 #include "core/animation/StringKeyframe.h"
6 6
7 #include "core/XLinkNames.h" 7 #include "core/XLinkNames.h"
8 #include "core/animation/CSSColorInterpolationType.h" 8 #include "core/animation/CSSColorInterpolationType.h"
9 #include "core/animation/CSSImageInterpolationType.h" 9 #include "core/animation/CSSImageInterpolationType.h"
10 #include "core/animation/CSSImageListInterpolationType.h" 10 #include "core/animation/CSSImageListInterpolationType.h"
(...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after
625 625
626 } // namespace 626 } // namespace
627 627
628 PassRefPtr<Interpolation> SVGPropertySpecificKeyframe::maybeCreateInterpolation( PropertyHandle propertyHandle, Keyframe::PropertySpecificKeyframe& end, Element* element, const ComputedStyle* baseStyle) const 628 PassRefPtr<Interpolation> SVGPropertySpecificKeyframe::maybeCreateInterpolation( PropertyHandle propertyHandle, Keyframe::PropertySpecificKeyframe& end, Element* element, const ComputedStyle* baseStyle) const
629 { 629 {
630 const InterpolationTypes* applicableTypes = applicableTypesForProperty(prope rtyHandle); 630 const InterpolationTypes* applicableTypes = applicableTypesForProperty(prope rtyHandle);
631 if (applicableTypes) 631 if (applicableTypes)
632 return InvalidatableInterpolation::create(*applicableTypes, *this, end); 632 return InvalidatableInterpolation::create(*applicableTypes, *this, end);
633 633
634 ASSERT(element); 634 ASSERT(element);
635 RefPtrWillBeRawPtr<SVGAnimatedPropertyBase> attribute = toSVGElement(element )->propertyFromAttribute(propertyHandle.svgAttribute()); 635 SVGAnimatedPropertyBase* attribute = toSVGElement(element)->propertyFromAttr ibute(propertyHandle.svgAttribute());
636 ASSERT(attribute); 636 ASSERT(attribute);
637 637
638 RefPtrWillBeRawPtr<SVGPropertyBase> fromValue = attribute->currentValueBase( )->cloneForAnimation(m_value); 638 RefPtrWillBeRawPtr<SVGPropertyBase> fromValue = attribute->currentValueBase( )->cloneForAnimation(m_value);
639 RefPtrWillBeRawPtr<SVGPropertyBase> toValue = attribute->currentValueBase()- >cloneForAnimation(toSVGPropertySpecificKeyframe(end).value()); 639 RefPtrWillBeRawPtr<SVGPropertyBase> toValue = attribute->currentValueBase()- >cloneForAnimation(toSVGPropertySpecificKeyframe(end).value());
640 640
641 if (!fromValue || !toValue) 641 if (!fromValue || !toValue)
642 return nullptr; 642 return nullptr;
643 643
644 return createSVGInterpolation(fromValue.get(), toValue.get(), attribute.get( )); 644 return createSVGInterpolation(fromValue.get(), toValue.get(), attribute);
645 } 645 }
646 646
647 } // namespace blink 647 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/svg/SVGAnimatedTypeAnimator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698