Chromium Code Reviews| 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); |