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

Side by Side Diff: third_party/WebKit/Source/core/style/PathStyleMotionPath.h

Issue 1649003002: Use StylePath instead of (Path)StyleMotionPath (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 10 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 2014 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 #ifndef PathStyleMotionPath_h
6 #define PathStyleMotionPath_h
7
8 #include "core/style/StyleMotionPath.h"
9
10 #include "platform/graphics/Path.h"
11 #include "wtf/Assertions.h"
12 #include "wtf/text/WTFString.h"
13
14 namespace blink {
15
16 class PathStyleMotionPath : public StyleMotionPath {
17 public:
18 static PassRefPtr<PathStyleMotionPath> create(const String& pathString)
19 {
20 return adoptRef(new PathStyleMotionPath(pathString));
21 }
22
23 bool isPathStyleMotionPath() const override { return true; }
24
25 bool equals(const PathStyleMotionPath& other) const
26 {
27 return m_pathString == other.m_pathString;
28 }
29
30 const Path& path() const { return m_path; }
31
32 const String& pathString() const { return m_pathString; }
33
34 bool isClosed() const;
35
36 float length() const { return m_length; }
37
38 private:
39 PathStyleMotionPath(const String& pathString);
40
41 String m_pathString;
42 Path m_path;
43 float m_length;
44 };
45
46 DEFINE_TYPE_CASTS(PathStyleMotionPath, StyleMotionPath, value, value->isPathStyl eMotionPath(), value.isPathStyleMotionPath());
47
48 } // namespace blink
49
50 #endif // PathStyleMotionPath_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/style/ComputedStyle.cpp ('k') | third_party/WebKit/Source/core/style/PathStyleMotionPath.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698