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

Unified Diff: third_party/WebKit/Source/core/animation/PathSVGInterpolation.cpp

Issue 1439793003: SVG: Promote d to a property (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: DECLARE_VIRTUAL_TRACE Created 5 years 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/animation/PathSVGInterpolation.cpp
diff --git a/third_party/WebKit/Source/core/animation/PathSVGInterpolation.cpp b/third_party/WebKit/Source/core/animation/PathSVGInterpolation.cpp
index dce4bd134898743489fd7097b54bd8006ccad698..33d87a45d2e0d996ec4a2c5e8a1a5d0094cb5f47 100644
--- a/third_party/WebKit/Source/core/animation/PathSVGInterpolation.cpp
+++ b/third_party/WebKit/Source/core/animation/PathSVGInterpolation.cpp
@@ -392,11 +392,8 @@ size_t countPathCommands(const SVGPathByteStream& path)
PassRefPtr<PathSVGInterpolation> PathSVGInterpolation::maybeCreate(SVGPropertyBase* start, SVGPropertyBase* end, PassRefPtrWillBeRawPtr<SVGAnimatedPropertyBase> attribute)
{
- ASSERT(start->type() == SVGPath::classType());
- ASSERT(end->type() == SVGPath::classType());
-
- const SVGPathByteStream& startPath = static_cast<SVGPath*>(start)->byteStream();
- const SVGPathByteStream& endPath = static_cast<SVGPath*>(end)->byteStream();
+ const SVGPathByteStream& startPath = toSVGPath(start)->pathValue()->byteStream();
+ const SVGPathByteStream& endPath = toSVGPath(end)->pathValue()->byteStream();
if (startPath.size() != endPath.size())
return nullptr;
@@ -438,7 +435,7 @@ PassRefPtrWillBeRawPtr<SVGPropertyBase> PathSVGInterpolation::fromInterpolableVa
SVGPathByteStreamBuilder builder(*pathByteStream);
SVGPathParser parser(&source, &builder);
parser.parsePathDataFromSource(UnalteredParsing, false);
- return SVGPath::create(pathByteStream.release());
+ return SVGPath::create(CSSPathValue::create(pathByteStream.release()));
}
PassRefPtrWillBeRawPtr<SVGPropertyBase> PathSVGInterpolation::interpolatedValue(SVGElement&) const

Powered by Google App Engine
This is Rietveld 408576698