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

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

Issue 1115553002: Removing blink::prefix (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 5 years, 7 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
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 "config.h" 5 #include "config.h"
6 #include "core/animation/StringKeyframe.h" 6 #include "core/animation/StringKeyframe.h"
7 7
8 #include "core/animation/AngleSVGInterpolation.h" 8 #include "core/animation/AngleSVGInterpolation.h"
9 #include "core/animation/ColorStyleInterpolation.h" 9 #include "core/animation/ColorStyleInterpolation.h"
10 #include "core/animation/CompositorAnimations.h" 10 #include "core/animation/CompositorAnimations.h"
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 case CSSPropertyFontSizeAdjust: 143 case CSSPropertyFontSizeAdjust:
144 return RangeNonNegative; 144 return RangeNonNegative;
145 default: 145 default:
146 ASSERT_NOT_REACHED(); 146 ASSERT_NOT_REACHED();
147 return RangeAll; 147 return RangeAll;
148 } 148 }
149 } 149 }
150 150
151 } // namespace 151 } // namespace
152 152
153 PassRefPtrWillBeRawPtr<Interpolation> StringKeyframe::CSSPropertySpecificKeyfram e::maybeCreateInterpolation(PropertyHandle propertyHandle, blink::Keyframe::Prop ertySpecificKeyframe& end, Element* element, const ComputedStyle* baseStyle) con st 153 PassRefPtrWillBeRawPtr<Interpolation> StringKeyframe::CSSPropertySpecificKeyfram e::maybeCreateInterpolation(PropertyHandle propertyHandle, Keyframe::PropertySpe cificKeyframe& end, Element* element, const ComputedStyle* baseStyle) const
154 { 154 {
155 CSSPropertyID property = propertyHandle.cssProperty(); 155 CSSPropertyID property = propertyHandle.cssProperty();
156 156
157 // FIXME: Refactor this into a generic piece that lives in InterpolationEffe ct, and a template parameter specific converter. 157 // FIXME: Refactor this into a generic piece that lives in InterpolationEffe ct, and a template parameter specific converter.
158 CSSValue* fromCSSValue = m_value.get(); 158 CSSValue* fromCSSValue = m_value.get();
159 CSSValue* toCSSValue = toCSSPropertySpecificKeyframe(end).value(); 159 CSSValue* toCSSValue = toCSSPropertySpecificKeyframe(end).value();
160 InterpolationRange range = RangeAll; 160 InterpolationRange range = RangeAll;
161 bool fallBackToLegacy = false; 161 bool fallBackToLegacy = false;
162 162
163 // FIXME: Remove this flag once we can rely on legacy's behaviour being corr ect. 163 // FIXME: Remove this flag once we can rely on legacy's behaviour being corr ect.
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 break; 519 break;
520 } 520 }
521 if (interpolation) 521 if (interpolation)
522 return interpolation.release(); 522 return interpolation.release();
523 523
524 return DefaultSVGInterpolation::create(fromValue, toValue, attribute); 524 return DefaultSVGInterpolation::create(fromValue, toValue, attribute);
525 } 525 }
526 526
527 } // namespace 527 } // namespace
528 528
529 PassRefPtrWillBeRawPtr<Interpolation> SVGPropertySpecificKeyframe::maybeCreateIn terpolation(PropertyHandle propertyHandle, blink::Keyframe::PropertySpecificKeyf rame& end, Element* element, const ComputedStyle* baseStyle) const 529 PassRefPtrWillBeRawPtr<Interpolation> SVGPropertySpecificKeyframe::maybeCreateIn terpolation(PropertyHandle propertyHandle, Keyframe::PropertySpecificKeyframe& e nd, Element* element, const ComputedStyle* baseStyle) const
530 { 530 {
531 ASSERT(element); 531 ASSERT(element);
532 RefPtrWillBeRawPtr<SVGAnimatedPropertyBase> attribute = toSVGElement(element )->propertyFromAttribute(*propertyHandle.svgAttribute()); 532 RefPtrWillBeRawPtr<SVGAnimatedPropertyBase> attribute = toSVGElement(element )->propertyFromAttribute(*propertyHandle.svgAttribute());
533 ASSERT(attribute); 533 ASSERT(attribute);
534 534
535 RefPtrWillBeRawPtr<SVGPropertyBase> fromValue = attribute->currentValueBase( )->cloneForAnimation(m_value); 535 RefPtrWillBeRawPtr<SVGPropertyBase> fromValue = attribute->currentValueBase( )->cloneForAnimation(m_value);
536 RefPtrWillBeRawPtr<SVGPropertyBase> toValue = attribute->currentValueBase()- >cloneForAnimation(toSVGPropertySpecificKeyframe(end).value()); 536 RefPtrWillBeRawPtr<SVGPropertyBase> toValue = attribute->currentValueBase()- >cloneForAnimation(toSVGPropertySpecificKeyframe(end).value());
537 537
538 if (!fromValue || !toValue) 538 if (!fromValue || !toValue)
539 return nullptr; 539 return nullptr;
540 540
541 return createSVGInterpolation(fromValue.get(), toValue.get(), attribute.get( )); 541 return createSVGInterpolation(fromValue.get(), toValue.get(), attribute.get( ));
542 } 542 }
543 543
544 } 544 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/animation/StringKeyframe.h ('k') | Source/core/animation/animatable/AnimatableValueKeyframe.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698