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

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

Issue 1545713003: Add StylePath and use it to store 'd' in ComputedStyle (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2015->2016; Remove unnecessary explicit. Created 4 years, 11 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/animation/animatable/AnimatablePath.h » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/SVGPathInterpolationType.h" 5 #include "core/animation/SVGPathInterpolationType.h"
6 6
7 #include "core/animation/InterpolatedSVGPathSource.h" 7 #include "core/animation/InterpolatedSVGPathSource.h"
8 #include "core/animation/InterpolationEnvironment.h" 8 #include "core/animation/InterpolationEnvironment.h"
9 #include "core/animation/SVGPathSegInterpolationFunctions.h" 9 #include "core/animation/SVGPathSegInterpolationFunctions.h"
10 #include "core/svg/SVGPath.h" 10 #include "core/svg/SVGPath.h"
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 150
151 ASSERT(pathSegTypesMatch( 151 ASSERT(pathSegTypesMatch(
152 toSVGPathNonInterpolableValue(underlyingValue->nonInterpolableValue())-> pathSegTypes(), 152 toSVGPathNonInterpolableValue(underlyingValue->nonInterpolableValue())-> pathSegTypes(),
153 toSVGPathNonInterpolableValue(value.nonInterpolableValue())->pathSegType s())); 153 toSVGPathNonInterpolableValue(value.nonInterpolableValue())->pathSegType s()));
154 underlyingValue.mutableComponent().interpolableValue->scaleAndAdd(neutralCom ponent, value.interpolableValue()); 154 underlyingValue.mutableComponent().interpolableValue->scaleAndAdd(neutralCom ponent, value.interpolableValue());
155 underlyingValue.mutableComponent().nonInterpolableValue = const_cast<NonInte rpolableValue*>(value.nonInterpolableValue()); // Take ref. 155 underlyingValue.mutableComponent().nonInterpolableValue = const_cast<NonInte rpolableValue*>(value.nonInterpolableValue()); // Take ref.
156 } 156 }
157 157
158 PassRefPtrWillBeRawPtr<SVGPropertyBase> SVGPathInterpolationType::appliedSVGValu e(const InterpolableValue& interpolableValue, const NonInterpolableValue* nonInt erpolableValue) const 158 PassRefPtrWillBeRawPtr<SVGPropertyBase> SVGPathInterpolationType::appliedSVGValu e(const InterpolableValue& interpolableValue, const NonInterpolableValue* nonInt erpolableValue) const
159 { 159 {
160 OwnPtr<SVGPathByteStream> pathByteStream = SVGPathByteStream::create(); 160 RefPtr<SVGPathByteStream> pathByteStream = SVGPathByteStream::create();
161 InterpolatedSVGPathSource source( 161 InterpolatedSVGPathSource source(
162 toInterpolableList(*toInterpolableList(interpolableValue).get(PathArgsIn dex)), 162 toInterpolableList(*toInterpolableList(interpolableValue).get(PathArgsIn dex)),
163 toSVGPathNonInterpolableValue(nonInterpolableValue)->pathSegTypes()); 163 toSVGPathNonInterpolableValue(nonInterpolableValue)->pathSegTypes());
164 SVGPathByteStreamBuilder builder(*pathByteStream); 164 SVGPathByteStreamBuilder builder(*pathByteStream);
165 SVGPathParser(&source, &builder).parsePathDataFromSource(UnalteredParsing, f alse); 165 SVGPathParser(&source, &builder).parsePathDataFromSource(UnalteredParsing, f alse);
166 return SVGPath::create(CSSPathValue::create(pathByteStream.release())); 166 return SVGPath::create(CSSPathValue::create(pathByteStream.release()));
167 } 167 }
168 168
169 } // namespace blink 169 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/animation/animatable/AnimatablePath.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698