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

Unified Diff: third_party/WebKit/Source/core/svg/SVGPath.h

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/svg/SVGPath.h
diff --git a/third_party/WebKit/Source/core/svg/SVGPath.h b/third_party/WebKit/Source/core/svg/SVGPath.h
index 546afc6c47ac42c77f6a705b6dd949375fc50cd9..a498addab9c6919abe35d7c7cc5a981316277685 100644
--- a/third_party/WebKit/Source/core/svg/SVGPath.h
+++ b/third_party/WebKit/Source/core/svg/SVGPath.h
@@ -31,6 +31,7 @@
#ifndef SVGPath_h
#define SVGPath_h
+#include "core/css/CSSPathValue.h"
#include "core/svg/SVGPathByteStream.h"
#include "core/svg/properties/SVGProperty.h"
@@ -47,16 +48,15 @@ public:
{
return adoptRefWillBeNoop(new SVGPath());
}
- static PassRefPtrWillBeRawPtr<SVGPath> create(PassOwnPtr<SVGPathByteStream> pathByteStream)
+ static PassRefPtrWillBeRawPtr<SVGPath> create(PassRefPtrWillBeRawPtr<CSSPathValue> pathValue)
{
- return adoptRefWillBeNoop(new SVGPath(pathByteStream));
+ return adoptRefWillBeNoop(new SVGPath(pathValue));
}
~SVGPath() override;
- const Path& path() const;
-
- const SVGPathByteStream& byteStream() const;
+ const SVGPathByteStream& byteStream() const { return m_pathValue->byteStream(); }
+ CSSPathValue* pathValue() const { return m_pathValue.get(); }
// SVGPropertyBase:
PassRefPtrWillBeRawPtr<SVGPath> clone() const;
@@ -70,16 +70,13 @@ public:
static AnimatedPropertyType classType() { return AnimatedPath; }
+ DECLARE_VIRTUAL_TRACE();
+
private:
SVGPath();
- explicit SVGPath(PassOwnPtr<SVGPathByteStream>);
-
- SVGPathByteStream& ensureByteStream();
- void byteStreamChanged();
- void setValueAsByteStream(PassOwnPtr<SVGPathByteStream>);
+ explicit SVGPath(PassRefPtrWillBeRawPtr<CSSPathValue>);
- OwnPtr<SVGPathByteStream> m_byteStream;
- mutable OwnPtr<Path> m_cachedPath;
+ RefPtrWillBeMember<CSSPathValue> m_pathValue;
};
DEFINE_SVG_PROPERTY_TYPE_CASTS(SVGPath);

Powered by Google App Engine
This is Rietveld 408576698