| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "core/style/StyleRay.h" |
| 6 |
| 7 namespace blink { |
| 8 |
| 9 PassRefPtr<StyleRay> StyleRay::Create(float angle, RaySize size, bool contain) { |
| 10 return AdoptRef(new StyleRay(angle, size, contain)); |
| 11 } |
| 12 |
| 13 StyleRay::StyleRay(float angle, RaySize size, bool contain) |
| 14 : angle_(angle), size_(size), contain_(contain) {} |
| 15 |
| 16 bool StyleRay::operator==(const BasicShape& o) const { |
| 17 if (!IsSameType(o)) |
| 18 return false; |
| 19 const StyleRay& other = ToStyleRay(o); |
| 20 return angle_ == other.angle_ && size_ == other.size_ && |
| 21 contain_ == other.contain_; |
| 22 } |
| 23 |
| 24 void StyleRay::GetPath(Path&, const FloatRect&) { |
| 25 // ComputedStyle::ApplyMotionPathTransform cannot call GetPath |
| 26 // for rays as they may have infinite length. |
| 27 NOTREACHED(); |
| 28 } |
| 29 |
| 30 PassRefPtr<BasicShape> StyleRay::Blend(const BasicShape*, double) const { |
| 31 // TODO(ericwilligers): Implement animation for offset-path. |
| 32 NOTREACHED(); |
| 33 return nullptr; |
| 34 } |
| 35 |
| 36 } // namespace blink |
| OLD | NEW |