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

Side by Side Diff: third_party/WebKit/Source/core/animation/PathPropertyFunctions.cpp

Issue 2720653002: CSS Motion Path: Implement animation for the offset-path property
Patch Set: move Created 3 years, 9 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/animation/PathPropertyFunctions.h"
6
7 #include "core/style/ComputedStyle.h"
8
9 namespace blink {
10
11 StylePath* PathPropertyFunctions::getPath(CSSPropertyID property,
12 const ComputedStyle& style) {
13 switch (property) {
14 case CSSPropertyD:
15 return style.svgStyle().d();
16 case CSSPropertyOffsetPath:
17 return style.offsetPath();
18 default:
19 NOTREACHED();
20 return nullptr;
21 }
22 }
23
24 void PathPropertyFunctions::setPath(CSSPropertyID property,
25 ComputedStyle& style,
26 RefPtr<blink::StylePath> path) {
27 switch (property) {
28 case CSSPropertyD:
29 style.setD(std::move(path));
30 return;
31 case CSSPropertyOffsetPath:
32 style.setOffsetPath(std::move(path));
33 return;
34 default:
35 NOTREACHED();
36 return;
37 }
38 }
39
40 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698