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

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: RefPtrWillBePersistent 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..96175019ae519fa3ec6043d05f313cb682e4adbb 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> d)
fs 2015/12/11 13:01:58 Nit: I think we should refrain from using "d" in t
Eric Willigers 2015/12/14 05:36:46 Done.
{
- return adoptRefWillBeNoop(new SVGPath(pathByteStream));
+ return adoptRefWillBeNoop(new SVGPath(d));
}
~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;
@@ -72,14 +72,9 @@ public:
private:
SVGPath();
- explicit SVGPath(PassOwnPtr<SVGPathByteStream>);
-
- SVGPathByteStream& ensureByteStream();
- void byteStreamChanged();
- void setValueAsByteStream(PassOwnPtr<SVGPathByteStream>);
+ explicit SVGPath(PassRefPtrWillBeRawPtr<CSSPathValue> d);
fs 2015/12/11 13:01:58 Nit: Can drop 'd' here (it doesn't really add anyt
Eric Willigers 2015/12/14 05:36:46 Done.
- OwnPtr<SVGPathByteStream> m_byteStream;
- mutable OwnPtr<Path> m_cachedPath;
+ RefPtrWillBePersistent<CSSPathValue> m_pathValue;
fs 2015/12/11 13:01:58 You should make this a RefPtrWillBeMember<...> ins
Eric Willigers 2015/12/14 05:36:46 Done.
};
DEFINE_SVG_PROPERTY_TYPE_CASTS(SVGPath);

Powered by Google App Engine
This is Rietveld 408576698