| 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/svg/SVGPathByteStream.h" | 9 #include "core/svg/SVGPathByteStream.h" |
| 10 #include "wtf/PassRefPtr.h" | 10 #include "wtf/PassRefPtr.h" |
| 11 #include "wtf/RefPtr.h" | 11 #include "wtf/RefPtr.h" |
| 12 | 12 |
| 13 namespace blink { | 13 namespace blink { |
| 14 | 14 |
| 15 class StylePath; | 15 class StylePath; |
| 16 | 16 |
| 17 class CSSPathValue : public CSSValue { | 17 class CSSPathValue : public CSSValue { |
| 18 public: | 18 public: |
| 19 static PassRefPtrWillBeRawPtr<CSSPathValue> create(PassRefPtr<SVGPathByteStr
eam>, StylePath* = nullptr); | 19 static RawPtr<CSSPathValue> create(PassRefPtr<SVGPathByteStream>, StylePath*
= nullptr); |
| 20 static PassRefPtrWillBeRawPtr<CSSPathValue> create(const String&); | 20 static RawPtr<CSSPathValue> create(const String&); |
| 21 ~CSSPathValue(); | 21 ~CSSPathValue(); |
| 22 | 22 |
| 23 static CSSPathValue* emptyPathValue(); | 23 static CSSPathValue* emptyPathValue(); |
| 24 | 24 |
| 25 StylePath* cachedPath() const; | 25 StylePath* cachedPath() const; |
| 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_pathByteStream; } | 32 const SVGPathByteStream& byteStream() const { return *m_pathByteStream; } |
| 33 String pathString() const; | 33 String pathString() const; |
| 34 | 34 |
| 35 private: | 35 private: |
| 36 CSSPathValue(PassRefPtr<SVGPathByteStream>, StylePath*); | 36 CSSPathValue(PassRefPtr<SVGPathByteStream>, StylePath*); |
| 37 | 37 |
| 38 RefPtr<SVGPathByteStream> m_pathByteStream; | 38 RefPtr<SVGPathByteStream> m_pathByteStream; |
| 39 mutable RefPtr<StylePath> m_cachedPath; | 39 mutable RefPtr<StylePath> m_cachedPath; |
| 40 }; | 40 }; |
| 41 | 41 |
| 42 DEFINE_CSS_VALUE_TYPE_CASTS(CSSPathValue, isPathValue()); | 42 DEFINE_CSS_VALUE_TYPE_CASTS(CSSPathValue, isPathValue()); |
| 43 | 43 |
| 44 } // namespace blink | 44 } // namespace blink |
| 45 | 45 |
| 46 #endif // CSSPathValue_h | 46 #endif // CSSPathValue_h |
| OLD | NEW |