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

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

Issue 2578043002: Rename apply() in CSSInterpolationType subclasses (Closed)
Patch Set: rebased Created 3 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/CSSPathInterpolationType.h" 5 #include "core/animation/CSSPathInterpolationType.h"
6 6
7 #include "core/animation/PathInterpolationFunctions.h" 7 #include "core/animation/PathInterpolationFunctions.h"
8 #include "core/css/CSSIdentifierValue.h" 8 #include "core/css/CSSIdentifierValue.h"
9 #include "core/css/CSSPathValue.h" 9 #include "core/css/CSSPathValue.h"
10 #include "core/css/resolver/StyleResolverState.h" 10 #include "core/css/resolver/StyleResolverState.h"
11 #include "wtf/PtrUtil.h" 11 #include "wtf/PtrUtil.h"
12 #include <memory> 12 #include <memory>
13 13
14 namespace blink { 14 namespace blink {
15 15
16 void CSSPathInterpolationType::apply( 16 void CSSPathInterpolationType::applyStandardPropertyValue(
17 const InterpolableValue& interpolableValue, 17 const InterpolableValue& interpolableValue,
18 const NonInterpolableValue* nonInterpolableValue, 18 const NonInterpolableValue* nonInterpolableValue,
19 InterpolationEnvironment& environment) const { 19 StyleResolverState& state) const {
20 DCHECK_EQ(cssProperty(), CSSPropertyD); 20 DCHECK_EQ(cssProperty(), CSSPropertyD);
21 std::unique_ptr<SVGPathByteStream> pathByteStream = 21 std::unique_ptr<SVGPathByteStream> pathByteStream =
22 PathInterpolationFunctions::appliedValue(interpolableValue, 22 PathInterpolationFunctions::appliedValue(interpolableValue,
23 nonInterpolableValue); 23 nonInterpolableValue);
24 if (pathByteStream->isEmpty()) { 24 if (pathByteStream->isEmpty()) {
25 environment.state().style()->setD(nullptr); 25 state.style()->setD(nullptr);
26 return; 26 return;
27 } 27 }
28 environment.state().style()->setD( 28 state.style()->setD(StylePath::create(std::move(pathByteStream)));
29 StylePath::create(std::move(pathByteStream)));
30 } 29 }
31 30
32 void CSSPathInterpolationType::composite( 31 void CSSPathInterpolationType::composite(
33 UnderlyingValueOwner& underlyingValueOwner, 32 UnderlyingValueOwner& underlyingValueOwner,
34 double underlyingFraction, 33 double underlyingFraction,
35 const InterpolationValue& value, 34 const InterpolationValue& value,
36 double interpolationFraction) const { 35 double interpolationFraction) const {
37 PathInterpolationFunctions::composite(underlyingValueOwner, 36 PathInterpolationFunctions::composite(underlyingValueOwner,
38 underlyingFraction, *this, value); 37 underlyingFraction, *this, value);
39 } 38 }
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 } 103 }
105 104
106 PairwiseInterpolationValue CSSPathInterpolationType::maybeMergeSingles( 105 PairwiseInterpolationValue CSSPathInterpolationType::maybeMergeSingles(
107 InterpolationValue&& start, 106 InterpolationValue&& start,
108 InterpolationValue&& end) const { 107 InterpolationValue&& end) const {
109 return PathInterpolationFunctions::maybeMergeSingles(std::move(start), 108 return PathInterpolationFunctions::maybeMergeSingles(std::move(start),
110 std::move(end)); 109 std::move(end));
111 } 110 }
112 111
113 } // namespace blink 112 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698