| 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 <memory> |
| 8 #include "core/css/CSSPathValue.h" | 8 #include "core/css/CSSPathValue.h" |
| 9 #include "core/svg/SVGPathByteStream.h" | 9 #include "core/svg/SVGPathByteStream.h" |
| 10 #include "core/svg/SVGPathUtilities.h" | 10 #include "core/svg/SVGPathUtilities.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 } | 47 } |
| 48 | 48 |
| 49 bool StylePath::IsClosed() const { | 49 bool StylePath::IsClosed() const { |
| 50 return GetPath().IsClosed(); | 50 return GetPath().IsClosed(); |
| 51 } | 51 } |
| 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 BasicShape& o) const { |
| 58 if (!IsSameType(o)) |
| 59 return false; |
| 60 const StylePath& other = ToStylePath(o); |
| 58 return *byte_stream_ == *other.byte_stream_; | 61 return *byte_stream_ == *other.byte_stream_; |
| 59 } | 62 } |
| 60 | 63 |
| 64 void StylePath::GetPath(Path&, const FloatRect&) { |
| 65 // Callers should use GetPath() overload, which avoids making a copy. |
| 66 NOTREACHED(); |
| 67 } |
| 68 |
| 69 PassRefPtr<BasicShape> StylePath::Blend(const BasicShape*, double) const { |
| 70 // TODO(ericwilligers): Implement animation for offset-path. |
| 71 NOTREACHED(); |
| 72 return nullptr; |
| 73 } |
| 74 |
| 61 } // namespace blink | 75 } // namespace blink |
| OLD | NEW |