OLD | NEW |
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/style/StylePath.h" | 9 #include "core/style/StylePath.h" |
10 #include "core/svg/SVGPathByteStream.h" | 10 #include "core/svg/SVGPathByteStream.h" |
11 #include "wtf/PassRefPtr.h" | 11 #include "wtf/PassRefPtr.h" |
12 #include "wtf/RefPtr.h" | 12 #include "wtf/RefPtr.h" |
13 | 13 |
14 namespace blink { | 14 namespace blink { |
15 | 15 |
16 class StylePath; | 16 class StylePath; |
17 | 17 |
18 class CSSPathValue : public CSSValue { | 18 class CSSPathValue : public CSSValue { |
19 public: | 19 public: |
20 static RawPtr<CSSPathValue> create(PassRefPtr<StylePath>); | 20 static RawPtr<CSSPathValue> create(PassRefPtr<StylePath>); |
21 static RawPtr<CSSPathValue> create(PassOwnPtr<SVGPathByteStream>); | 21 static RawPtr<CSSPathValue> create(PassOwnPtr<SVGPathByteStream>); |
22 | 22 |
23 static CSSPathValue* emptyPathValue(); | 23 static CSSPathValue& emptyPathValue(); |
24 | 24 |
25 StylePath* stylePath() const { return m_stylePath.get(); } | 25 StylePath* stylePath() const { return m_stylePath.get(); } |
26 String customCSSText() const; | 26 String customCSSText() const; |
27 | 27 |
28 bool equals(const CSSPathValue&) const; | 28 bool equals(const CSSPathValue&) const; |
29 | 29 |
30 DECLARE_TRACE_AFTER_DISPATCH(); | 30 DECLARE_TRACE_AFTER_DISPATCH(); |
31 | 31 |
32 const SVGPathByteStream& byteStream() const { return m_stylePath->byteStream
(); } | 32 const SVGPathByteStream& byteStream() const { return m_stylePath->byteStream
(); } |
33 | 33 |
34 private: | 34 private: |
35 CSSPathValue(PassRefPtr<StylePath>); | 35 CSSPathValue(PassRefPtr<StylePath>); |
36 | 36 |
37 RefPtr<StylePath> m_stylePath; | 37 RefPtr<StylePath> m_stylePath; |
38 }; | 38 }; |
39 | 39 |
40 DEFINE_CSS_VALUE_TYPE_CASTS(CSSPathValue, isPathValue()); | 40 DEFINE_CSS_VALUE_TYPE_CASTS(CSSPathValue, isPathValue()); |
41 | 41 |
42 } // namespace blink | 42 } // namespace blink |
43 | 43 |
44 #endif // CSSPathValue_h | 44 #endif // CSSPathValue_h |
OLD | NEW |