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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/style/StyleRay.cpp
diff --git a/third_party/WebKit/Source/core/style/StyleRay.cpp b/third_party/WebKit/Source/core/style/StyleRay.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..8f02455081702cd507bfe41bbb94408ee31484e6
--- /dev/null
+++ b/third_party/WebKit/Source/core/style/StyleRay.cpp
@@ -0,0 +1,36 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "core/style/StyleRay.h"
+
+namespace blink {
+
+PassRefPtr<StyleRay> StyleRay::Create(float angle, RaySize size, bool contain) {
+ return AdoptRef(new StyleRay(angle, size, contain));
+}
+
+StyleRay::StyleRay(float angle, RaySize size, bool contain)
+ : angle_(angle), size_(size), contain_(contain) {}
+
+bool StyleRay::operator==(const BasicShape& o) const {
+ if (!IsSameType(o))
+ return false;
+ const StyleRay& other = ToStyleRay(o);
+ return angle_ == other.angle_ && size_ == other.size_ &&
+ contain_ == other.contain_;
+}
+
+void StyleRay::GetPath(Path&, const FloatRect&) {
+ // ComputedStyle::ApplyMotionPathTransform cannot call GetPath
+ // for rays as they may have infinite length.
+ NOTREACHED();
+}
+
+PassRefPtr<BasicShape> StyleRay::Blend(const BasicShape*, double) const {
+ // TODO(ericwilligers): Implement animation for offset-path.
+ NOTREACHED();
+ return nullptr;
+}
+
+} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698