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

Side by Side Diff: third_party/WebKit/Source/core/css/CSSPathValue.cpp

Issue 1983753002: Remove OwnPtr::release() calls in core/ (part 2). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/cssom/MatrixTransformComponent.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 16 matching lines...) Expand all
27 } 27 }
28 28
29 namespace { 29 namespace {
30 30
31 CSSPathValue* createPathValue() 31 CSSPathValue* createPathValue()
32 { 32 {
33 OwnPtr<SVGPathByteStream> pathByteStream = SVGPathByteStream::create(); 33 OwnPtr<SVGPathByteStream> pathByteStream = SVGPathByteStream::create();
34 // Need to be registered as LSan ignored, as it will be reachable and 34 // Need to be registered as LSan ignored, as it will be reachable and
35 // separately referred to by emptyPathValue() callers. 35 // separately referred to by emptyPathValue() callers.
36 LEAK_SANITIZER_IGNORE_OBJECT(pathByteStream.get()); 36 LEAK_SANITIZER_IGNORE_OBJECT(pathByteStream.get());
37 return CSSPathValue::create(pathByteStream.release()); 37 return CSSPathValue::create(std::move(pathByteStream));
38 } 38 }
39 39
40 } // namespace 40 } // namespace
41 41
42 CSSPathValue& CSSPathValue::emptyPathValue() 42 CSSPathValue& CSSPathValue::emptyPathValue()
43 { 43 {
44 DEFINE_STATIC_LOCAL(CSSPathValue, empty, (createPathValue())); 44 DEFINE_STATIC_LOCAL(CSSPathValue, empty, (createPathValue()));
45 return empty; 45 return empty;
46 } 46 }
47 47
48 String CSSPathValue::customCSSText() const 48 String CSSPathValue::customCSSText() const
49 { 49 {
50 return "path('" + buildStringFromByteStream(byteStream()) + "')"; 50 return "path('" + buildStringFromByteStream(byteStream()) + "')";
51 } 51 }
52 52
53 bool CSSPathValue::equals(const CSSPathValue& other) const 53 bool CSSPathValue::equals(const CSSPathValue& other) const
54 { 54 {
55 return byteStream() == other.byteStream(); 55 return byteStream() == other.byteStream();
56 } 56 }
57 57
58 DEFINE_TRACE_AFTER_DISPATCH(CSSPathValue) 58 DEFINE_TRACE_AFTER_DISPATCH(CSSPathValue)
59 { 59 {
60 CSSValue::traceAfterDispatch(visitor); 60 CSSValue::traceAfterDispatch(visitor);
61 } 61 }
62 62
63 } // namespace blink 63 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/cssom/MatrixTransformComponent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698