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

Side by Side Diff: third_party/WebKit/Source/core/style/StyleRay.cpp

Issue 2881673003: CSS Motion Path: Support parsing of ray(<angle>) paths (Closed)
Patch Set: DCHECK_EQ Created 3 years, 7 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
(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698