OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/style/StylePath.h" | 5 #include "core/style/StylePath.h" |
6 | 6 |
| 7 #include <memory> |
7 #include "core/css/CSSPathValue.h" | 8 #include "core/css/CSSPathValue.h" |
8 #include "core/svg/SVGPathByteStream.h" | 9 #include "core/svg/SVGPathByteStream.h" |
9 #include "core/svg/SVGPathUtilities.h" | 10 #include "core/svg/SVGPathUtilities.h" |
10 #include "platform/graphics/Path.h" | 11 #include "platform/graphics/Path.h" |
11 #include "wtf/PtrUtil.h" | 12 #include "wtf/PtrUtil.h" |
12 #include <memory> | |
13 | 13 |
14 namespace blink { | 14 namespace blink { |
15 | 15 |
16 StylePath::StylePath(std::unique_ptr<SVGPathByteStream> pathByteStream) | 16 StylePath::StylePath(std::unique_ptr<SVGPathByteStream> pathByteStream) |
17 : m_byteStream(std::move(pathByteStream)), | 17 : m_byteStream(std::move(pathByteStream)), |
18 m_pathLength(std::numeric_limits<float>::quiet_NaN()) { | 18 m_pathLength(std::numeric_limits<float>::quiet_NaN()) { |
19 ASSERT(m_byteStream); | 19 ASSERT(m_byteStream); |
20 } | 20 } |
21 | 21 |
22 StylePath::~StylePath() {} | 22 StylePath::~StylePath() {} |
(...skipping 29 matching lines...) Expand all Loading... |
52 | 52 |
53 CSSValue* StylePath::computedCSSValue() const { | 53 CSSValue* StylePath::computedCSSValue() const { |
54 return CSSPathValue::create(const_cast<StylePath*>(this)); | 54 return CSSPathValue::create(const_cast<StylePath*>(this)); |
55 } | 55 } |
56 | 56 |
57 bool StylePath::operator==(const StylePath& other) const { | 57 bool StylePath::operator==(const StylePath& other) const { |
58 return *m_byteStream == *other.m_byteStream; | 58 return *m_byteStream == *other.m_byteStream; |
59 } | 59 } |
60 | 60 |
61 } // namespace blink | 61 } // namespace blink |
OLD | NEW |