OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "core/css/CSSPathValue.h" | 5 #include "core/css/CSSPathValue.h" |
6 | 6 |
7 #include "core/style/StylePath.h" | 7 #include "core/style/StylePath.h" |
8 #include "core/svg/SVGPathUtilities.h" | 8 #include "core/svg/SVGPathUtilities.h" |
9 | 9 |
10 namespace blink { | 10 namespace blink { |
(...skipping 26 matching lines...) Expand all Loading... |
37 | 37 |
38 PassRefPtrWillBeRawPtr<CSSPathValue> createPathValue() | 38 PassRefPtrWillBeRawPtr<CSSPathValue> createPathValue() |
39 { | 39 { |
40 RefPtr<SVGPathByteStream> pathByteStream = SVGPathByteStream::create(); | 40 RefPtr<SVGPathByteStream> pathByteStream = SVGPathByteStream::create(); |
41 // Need to be registered as LSan ignored, as it will be reachable and | 41 // Need to be registered as LSan ignored, as it will be reachable and |
42 // separately referred to by emptyPathValue() callers. | 42 // separately referred to by emptyPathValue() callers. |
43 LEAK_SANITIZER_IGNORE_OBJECT(pathByteStream.get()); | 43 LEAK_SANITIZER_IGNORE_OBJECT(pathByteStream.get()); |
44 return CSSPathValue::create(pathByteStream.release()); | 44 return CSSPathValue::create(pathByteStream.release()); |
45 } | 45 } |
46 | 46 |
47 } | 47 } // namespace |
48 | 48 |
49 CSSPathValue* CSSPathValue::emptyPathValue() | 49 CSSPathValue* CSSPathValue::emptyPathValue() |
50 { | 50 { |
51 DEFINE_STATIC_LOCAL(RefPtrWillBePersistent<CSSPathValue>, empty, (createPath
Value())); | 51 DEFINE_STATIC_LOCAL(RefPtrWillBePersistent<CSSPathValue>, empty, (createPath
Value())); |
52 return empty.get(); | 52 return empty.get(); |
53 } | 53 } |
54 | 54 |
55 StylePath* CSSPathValue::cachedPath() | 55 StylePath* CSSPathValue::cachedPath() |
56 { | 56 { |
57 if (!m_cachedPath) | 57 if (!m_cachedPath) |
(...skipping 15 matching lines...) Expand all Loading... |
73 { | 73 { |
74 CSSValue::traceAfterDispatch(visitor); | 74 CSSValue::traceAfterDispatch(visitor); |
75 } | 75 } |
76 | 76 |
77 String CSSPathValue::pathString() const | 77 String CSSPathValue::pathString() const |
78 { | 78 { |
79 return buildStringFromByteStream(*m_pathByteStream); | 79 return buildStringFromByteStream(*m_pathByteStream); |
80 } | 80 } |
81 | 81 |
82 } // namespace blink | 82 } // namespace blink |
OLD | NEW |