| Index: third_party/WebKit/Source/core/style/StylePath.cpp
|
| diff --git a/third_party/WebKit/Source/core/style/StylePath.cpp b/third_party/WebKit/Source/core/style/StylePath.cpp
|
| index 5ed7a3c2a619ee38b5b2346ed75b39ae2c25940d..2f67b68bfec1cf01227ecfa85db9c5371156bdab 100644
|
| --- a/third_party/WebKit/Source/core/style/StylePath.cpp
|
| +++ b/third_party/WebKit/Source/core/style/StylePath.cpp
|
| @@ -13,6 +13,7 @@ namespace blink {
|
|
|
| StylePath::StylePath(PassRefPtr<SVGPathByteStream> pathByteStream)
|
| : m_byteStream(pathByteStream)
|
| + , m_pathLength(std::numeric_limits<float>::quiet_NaN())
|
| {
|
| ASSERT(m_byteStream);
|
| }
|
| @@ -41,6 +42,18 @@ const Path& StylePath::path() const
|
| return *m_path;
|
| }
|
|
|
| +float StylePath::length() const
|
| +{
|
| + if (std::isnan(m_pathLength))
|
| + m_pathLength = path().length();
|
| + return m_pathLength;
|
| +}
|
| +
|
| +bool StylePath::isClosed() const
|
| +{
|
| + return path().isClosed();
|
| +}
|
| +
|
| const SVGPathByteStream& StylePath::byteStream() const
|
| {
|
| return *m_byteStream;
|
|
|