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

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

Issue 2080623002: Revert "Remove OwnPtr from Blink." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
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 #include <memory>
10 9
11 namespace blink { 10 namespace blink {
12 11
13 CSSPathValue* CSSPathValue::create(PassRefPtr<StylePath> stylePath) 12 CSSPathValue* CSSPathValue::create(PassRefPtr<StylePath> stylePath)
14 { 13 {
15 return new CSSPathValue(stylePath); 14 return new CSSPathValue(stylePath);
16 } 15 }
17 16
18 CSSPathValue* CSSPathValue::create(std::unique_ptr<SVGPathByteStream> pathByteSt ream) 17 CSSPathValue* CSSPathValue::create(PassOwnPtr<SVGPathByteStream> pathByteStream)
19 { 18 {
20 return CSSPathValue::create(StylePath::create(std::move(pathByteStream))); 19 return CSSPathValue::create(StylePath::create(std::move(pathByteStream)));
21 } 20 }
22 21
23 CSSPathValue::CSSPathValue(PassRefPtr<StylePath> stylePath) 22 CSSPathValue::CSSPathValue(PassRefPtr<StylePath> stylePath)
24 : CSSValue(PathClass) 23 : CSSValue(PathClass)
25 , m_stylePath(stylePath) 24 , m_stylePath(stylePath)
26 { 25 {
27 ASSERT(m_stylePath); 26 ASSERT(m_stylePath);
28 } 27 }
29 28
30 namespace { 29 namespace {
31 30
32 CSSPathValue* createPathValue() 31 CSSPathValue* createPathValue()
33 { 32 {
34 std::unique_ptr<SVGPathByteStream> pathByteStream = SVGPathByteStream::creat e(); 33 OwnPtr<SVGPathByteStream> pathByteStream = SVGPathByteStream::create();
35 // 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
36 // separately referred to by emptyPathValue() callers. 35 // separately referred to by emptyPathValue() callers.
37 LEAK_SANITIZER_IGNORE_OBJECT(pathByteStream.get()); 36 LEAK_SANITIZER_IGNORE_OBJECT(pathByteStream.get());
38 return CSSPathValue::create(std::move(pathByteStream)); 37 return CSSPathValue::create(std::move(pathByteStream));
39 } 38 }
40 39
41 } // namespace 40 } // namespace
42 41
43 CSSPathValue& CSSPathValue::emptyPathValue() 42 CSSPathValue& CSSPathValue::emptyPathValue()
44 { 43 {
(...skipping 10 matching lines...) Expand all
55 { 54 {
56 return byteStream() == other.byteStream(); 55 return byteStream() == other.byteStream();
57 } 56 }
58 57
59 DEFINE_TRACE_AFTER_DISPATCH(CSSPathValue) 58 DEFINE_TRACE_AFTER_DISPATCH(CSSPathValue)
60 { 59 {
61 CSSValue::traceAfterDispatch(visitor); 60 CSSValue::traceAfterDispatch(visitor);
62 } 61 }
63 62
64 } // namespace blink 63 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSPathValue.h ('k') | third_party/WebKit/Source/core/css/CSSSelector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698