Chromium Code Reviews| Index: third_party/WebKit/Source/core/svg/SVGPathElement.cpp |
| diff --git a/third_party/WebKit/Source/core/svg/SVGPathElement.cpp b/third_party/WebKit/Source/core/svg/SVGPathElement.cpp |
| index 8a26824bbabad397c0903c1a668485173d08e32e..d7af7f8b6b3d0fb402090b2d8a315388d33bd237 100644 |
| --- a/third_party/WebKit/Source/core/svg/SVGPathElement.cpp |
| +++ b/third_party/WebKit/Source/core/svg/SVGPathElement.cpp |
| @@ -72,9 +72,11 @@ DEFINE_NODE_FACTORY(SVGPathElement) |
| Path SVGPathElement::asPath() const |
| { |
| - Path path; |
| - buildPathFromByteStream(pathByteStream(), path); |
| - return path; |
| + // If this is a <use> instance, return the referenced path to maximize geometry sharing. |
| + if (const auto* element = correspondingElement()) |
|
fs
2015/10/30 09:48:34
Nit: I'd prefer s/auto/SVGElement/ here - there's
f(malita)
2015/10/30 12:42:56
Done.
|
| + return toSVGPathElement(element)->asPath(); |
| + |
| + return m_path->currentValue()->path(); |
| } |
| float SVGPathElement::getTotalLength() |