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

Side by Side Diff: third_party/WebKit/Source/core/css/CSSPathValue.h

Issue 1439793003: SVG: Promote d to a property (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: DECLARE_VIRTUAL_TRACE Created 5 years 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 2014 The Chromium Authors. All rights reserved. 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 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 CSSPathValue_h 5 #ifndef CSSPathValue_h
6 #define CSSPathValue_h 6 #define CSSPathValue_h
7 7
8 #include "core/css/CSSValue.h" 8 #include "core/css/CSSValue.h"
9 #include "core/svg/SVGPathByteStream.h"
10 #include "platform/graphics/Path.h"
9 #include "wtf/PassRefPtr.h" 11 #include "wtf/PassRefPtr.h"
10 #include "wtf/RefPtr.h" 12 #include "wtf/RefPtr.h"
11 13
12 namespace blink { 14 namespace blink {
13 15
14 class CSSPathValue : public CSSValue { 16 class CSSPathValue : public CSSValue {
15 public: 17 public:
16 static PassRefPtrWillBeRawPtr<CSSPathValue> create(const String& pathString) 18 static PassRefPtrWillBeRawPtr<CSSPathValue> create(PassOwnPtr<SVGPathByteStr eam> pathByteStream)
17 { 19 {
18 return adoptRefWillBeNoop(new CSSPathValue(pathString)); 20 return adoptRefWillBeNoop(new CSSPathValue(pathByteStream));
19 } 21 }
20 22
23 static PassRefPtrWillBeRawPtr<CSSPathValue> create(const String&);
24
25 static CSSPathValue* emptyPathValue();
26
21 String customCSSText() const; 27 String customCSSText() const;
22 28
23 bool equals(const CSSPathValue&) const; 29 bool equals(const CSSPathValue&) const;
24 30
25 DECLARE_TRACE_AFTER_DISPATCH(); 31 DECLARE_TRACE_AFTER_DISPATCH();
26 32
27 const String& pathString() const { return m_pathString; } 33 const SVGPathByteStream& byteStream() const { return *m_pathByteStream; }
34 String pathString() const;
35 const Path& path() const { return m_path; }
28 36
29 private: 37 private:
30 CSSPathValue(const String& pathString); 38 CSSPathValue(PassOwnPtr<SVGPathByteStream>);
31 39
32 String m_pathString; 40 OwnPtr<SVGPathByteStream> m_pathByteStream;
41 Path m_path;
33 }; 42 };
34 43
35 DEFINE_CSS_VALUE_TYPE_CASTS(CSSPathValue, isPathValue()); 44 DEFINE_CSS_VALUE_TYPE_CASTS(CSSPathValue, isPathValue());
36 45
37 } // namespace blink 46 } // namespace blink
38 47
39 #endif // CSSPathValue_h 48 #endif // CSSPathValue_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698