| 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 "platform/wtf/PtrUtil.h" |
| 12 #include <memory> | |
| 13 | 13 |
| 14 namespace blink { | 14 namespace blink { |
| 15 | 15 |
| 16 StylePath::StylePath(std::unique_ptr<SVGPathByteStream> path_byte_stream) | 16 StylePath::StylePath(std::unique_ptr<SVGPathByteStream> path_byte_stream) |
| 17 : byte_stream_(std::move(path_byte_stream)), | 17 : byte_stream_(std::move(path_byte_stream)), |
| 18 path_length_(std::numeric_limits<float>::quiet_NaN()) { | 18 path_length_(std::numeric_limits<float>::quiet_NaN()) { |
| 19 DCHECK(byte_stream_); | 19 DCHECK(byte_stream_); |
| 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 *byte_stream_ == *other.byte_stream_; | 58 return *byte_stream_ == *other.byte_stream_; |
| 59 } | 59 } |
| 60 | 60 |
| 61 } // namespace blink | 61 } // namespace blink |
| OLD | NEW |