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

Unified Diff: third_party/WebKit/Source/core/svg/SVGPath.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/svg/SVGPath.cpp
diff --git a/third_party/WebKit/Source/core/svg/SVGPath.cpp b/third_party/WebKit/Source/core/svg/SVGPath.cpp
index 0f6500a6e96e622f84f911f96636ddb30f3028c2..c6b00bacb48e99af9962d8da84d2069d058c6881 100644
--- a/third_party/WebKit/Source/core/svg/SVGPath.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGPath.cpp
@@ -35,9 +35,9 @@ namespace blink {
namespace {
-PassOwnPtr<SVGPathByteStream> blendPathByteStreams(const SVGPathByteStream& fromStream, const SVGPathByteStream& toStream, float progress)
+PassRefPtr<SVGPathByteStream> blendPathByteStreams(const SVGPathByteStream& fromStream, const SVGPathByteStream& toStream, float progress)
{
- OwnPtr<SVGPathByteStream> resultStream = SVGPathByteStream::create();
+ RefPtr<SVGPathByteStream> resultStream = SVGPathByteStream::create();
SVGPathByteStreamBuilder builder(*resultStream);
SVGPathByteStreamSource fromSource(fromStream);
SVGPathByteStreamSource toSource(toStream);
@@ -46,9 +46,9 @@ PassOwnPtr<SVGPathByteStream> blendPathByteStreams(const SVGPathByteStream& from
return resultStream.release();
}
-PassOwnPtr<SVGPathByteStream> addPathByteStreams(const SVGPathByteStream& fromStream, const SVGPathByteStream& byStream, unsigned repeatCount = 1)
+PassRefPtr<SVGPathByteStream> addPathByteStreams(const SVGPathByteStream& fromStream, const SVGPathByteStream& byStream, unsigned repeatCount = 1)
{
- OwnPtr<SVGPathByteStream> resultStream = SVGPathByteStream::create();
+ RefPtr<SVGPathByteStream> resultStream = SVGPathByteStream::create();
SVGPathByteStreamBuilder builder(*resultStream);
SVGPathByteStreamSource fromSource(fromStream);
SVGPathByteStreamSource bySource(byStream);
@@ -57,7 +57,7 @@ PassOwnPtr<SVGPathByteStream> addPathByteStreams(const SVGPathByteStream& fromSt
return resultStream.release();
}
-PassOwnPtr<SVGPathByteStream> conditionallyAddPathByteStreams(PassOwnPtr<SVGPathByteStream> fromStream, const SVGPathByteStream& byStream, unsigned repeatCount = 1)
+PassRefPtr<SVGPathByteStream> conditionallyAddPathByteStreams(PassRefPtr<SVGPathByteStream> fromStream, const SVGPathByteStream& byStream, unsigned repeatCount = 1)
{
if (fromStream->isEmpty() || byStream.isEmpty())
return fromStream;
@@ -96,7 +96,7 @@ PassRefPtrWillBeRawPtr<SVGPath> SVGPath::clone() const
SVGParsingError SVGPath::setValueAsString(const String& string)
{
SVGParsingError parseStatus = NoError;
- OwnPtr<SVGPathByteStream> byteStream = SVGPathByteStream::create();
+ RefPtr<SVGPathByteStream> byteStream = SVGPathByteStream::create();
if (!buildByteStreamFromString(string, *byteStream))
parseStatus = ParsingAttributeFailedError;
m_pathValue = CSSPathValue::create(byteStream.release());
@@ -134,9 +134,9 @@ void SVGPath::calculateAnimatedValue(SVGAnimationElement* animationElement, floa
const RefPtrWillBeRawPtr<SVGPath> from = toSVGPath(fromValue);
const SVGPathByteStream* fromStream = &from->byteStream();
- OwnPtr<SVGPathByteStream> copy;
+ RefPtr<SVGPathByteStream> copy;
if (isToAnimation) {
- copy = byteStream().copy();
+ copy = byteStream().clone();
fromStream = copy.get();
}
@@ -153,7 +153,7 @@ void SVGPath::calculateAnimatedValue(SVGAnimationElement* animationElement, floa
}
}
- OwnPtr<SVGPathByteStream> newStream = blendPathByteStreams(*fromStream, toStream, percentage);
+ RefPtr<SVGPathByteStream> newStream = blendPathByteStreams(*fromStream, toStream, percentage);
// Handle additive='sum'.
if (animationElement->isAdditive() && !isToAnimation)
« no previous file with comments | « third_party/WebKit/Source/core/style/StylePath.cpp ('k') | third_party/WebKit/Source/core/svg/SVGPathByteStream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698