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

Unified Diff: third_party/WebKit/Source/core/style/ComputedStyle.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/ComputedStyle.cpp
diff --git a/third_party/WebKit/Source/core/style/ComputedStyle.cpp b/third_party/WebKit/Source/core/style/ComputedStyle.cpp
index 23ccc5c2f19d7cd6ad1ec263e48846cf1e9f7e9b..5e904270c863d87010148a08139b8e3bac218a6c 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyle.cpp
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.cpp
@@ -1344,7 +1344,11 @@ void ComputedStyle::ApplyMotionPathTransform(
}
const LengthPoint& position = OffsetPosition();
const LengthPoint& anchor = OffsetAnchor();
- const StylePath& motion_path = *motion_data.path_;
+ if (motion_data.path_->GetType() == BasicShape::kStyleRayType) {
+ // TODO(ericwilligers): crbug.com/641245 Support ray paths.
+ return;
+ }
+ const StylePath& motion_path = ToStylePath(*motion_data.path_);
float path_length = motion_path.length();
float distance = FloatValueForLength(motion_data.distance_, path_length);
float computed_distance;
@@ -2333,7 +2337,7 @@ void ComputedStyle::SetMarginEnd(const Length& margin) {
}
}
-void ComputedStyle::SetOffsetPath(PassRefPtr<StylePath> path) {
+void ComputedStyle::SetOffsetPath(PassRefPtr<BasicShape> path) {
rare_non_inherited_data_.Access()->transform_.Access()->motion_.path_ =
std::move(path);
}

Powered by Google App Engine
This is Rietveld 408576698