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

Side by Side Diff: third_party/WebKit/Source/core/style/StylePath.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
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef StylePath_h 5 #ifndef StylePath_h
6 #define StylePath_h 6 #define StylePath_h
7 7
8 #include "platform/heap/Handle.h" 8 #include "platform/heap/Handle.h"
9 #include "wtf/OwnPtr.h" 9 #include "wtf/OwnPtr.h"
10 #include "wtf/PassRefPtr.h" 10 #include "wtf/PassRefPtr.h"
11 #include "wtf/RefCounted.h" 11 #include "wtf/RefCounted.h"
12 #include "wtf/RefPtr.h" 12 #include "wtf/RefPtr.h"
13 13
14 namespace blink { 14 namespace blink {
15 15
16 class CSSValue; 16 class CSSValue;
17 class Path; 17 class Path;
18 class SVGPathByteStream; 18 class SVGPathByteStream;
19 19
20 class StylePath : public RefCounted<StylePath> { 20 class StylePath : public RefCounted<StylePath> {
21 public: 21 public:
22 static PassRefPtr<StylePath> create(PassRefPtr<SVGPathByteStream>); 22 static PassRefPtr<StylePath> create(PassRefPtr<SVGPathByteStream>);
23 ~StylePath(); 23 ~StylePath();
24 24
25 static StylePath* emptyPath(); 25 static StylePath* emptyPath();
26 26
27 const Path& path() const; 27 const Path& path() const;
28 float length() const;
29 bool isClosed() const;
30
28 const SVGPathByteStream& byteStream() const; 31 const SVGPathByteStream& byteStream() const;
29 32
30 PassRefPtrWillBeRawPtr<CSSValue> computedCSSValue() const; 33 PassRefPtrWillBeRawPtr<CSSValue> computedCSSValue() const;
31 34
32 bool equals(const StylePath&) const; 35 bool equals(const StylePath&) const;
33 36
34 private: 37 private:
35 explicit StylePath(PassRefPtr<SVGPathByteStream>); 38 explicit StylePath(PassRefPtr<SVGPathByteStream>);
36 39
37 RefPtr<SVGPathByteStream> m_byteStream; 40 RefPtr<SVGPathByteStream> m_byteStream;
38 mutable OwnPtr<Path> m_path; 41 mutable OwnPtr<Path> m_path;
42 mutable float m_pathLength;
39 }; 43 };
40 44
41 } // namespace blink 45 } // namespace blink
42 46
43 #endif // StylePath_h 47 #endif // StylePath_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/style/StyleMotionPath.h ('k') | third_party/WebKit/Source/core/style/StylePath.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698