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

Unified Diff: third_party/WebKit/Source/core/animation/animatable/AnimatablePath.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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/animation/animatable/AnimatablePath.cpp
diff --git a/third_party/WebKit/Source/core/animation/animatable/AnimatablePath.cpp b/third_party/WebKit/Source/core/animation/animatable/AnimatablePath.cpp
index 95bf245bc3266580eb93f72a80e5a798ff9a904f..21f06be2ac2bcf310a93afc41178c1bc3c3567a9 100644
--- a/third_party/WebKit/Source/core/animation/animatable/AnimatablePath.cpp
+++ b/third_party/WebKit/Source/core/animation/animatable/AnimatablePath.cpp
@@ -7,7 +7,6 @@
#include "core/svg/SVGPathBlender.h"
#include "core/svg/SVGPathByteStreamBuilder.h"
#include "core/svg/SVGPathByteStreamSource.h"
-#include "core/svg/SVGPathUtilities.h"
namespace blink {
@@ -16,8 +15,8 @@ bool AnimatablePath::usesDefaultInterpolationWith(const AnimatableValue* value)
// Default interpolation is used if the paths have different lengths,
// or the paths have a segment with different types (ignoring "relativeness").
- SVGPathByteStreamSource fromSource(pathValue()->byteStream());
- SVGPathByteStreamSource toSource(toAnimatablePath(value)->pathValue()->byteStream());
+ SVGPathByteStreamSource fromSource(path()->byteStream());
+ SVGPathByteStreamSource toSource(toAnimatablePath(value)->path()->byteStream());
while (fromSource.hasMoreData()) {
if (!toSource.hasMoreData())
@@ -40,21 +39,26 @@ PassRefPtr<AnimatableValue> AnimatablePath::interpolateTo(const AnimatableValue*
if (usesDefaultInterpolationWith(value))
return defaultInterpolateTo(this, value, fraction);
- OwnPtr<SVGPathByteStream> byteStream = SVGPathByteStream::create();
+ RefPtr<SVGPathByteStream> byteStream = SVGPathByteStream::create();
SVGPathByteStreamBuilder builder(*byteStream);
- SVGPathByteStreamSource fromSource(pathValue()->byteStream());
- SVGPathByteStreamSource toSource(toAnimatablePath(value)->pathValue()->byteStream());
+ SVGPathByteStreamSource fromSource(path()->byteStream());
+ SVGPathByteStreamSource toSource(toAnimatablePath(value)->path()->byteStream());
SVGPathBlender blender(&fromSource, &toSource, &builder);
bool ok = blender.blendAnimatedPath(fraction);
ASSERT_UNUSED(ok, ok);
- return AnimatablePath::create(CSSPathValue::create(byteStream.release()));
+ return AnimatablePath::create(StylePath::create(byteStream.release()));
+}
+
+StylePath* AnimatablePath::path() const
+{
+ return m_path.get();
}
bool AnimatablePath::equalTo(const AnimatableValue* value) const
{
- return pathValue()->equals(*toAnimatablePath(value)->pathValue());
+ return m_path->equals(*toAnimatablePath(value)->path());
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698