| OLD | NEW |
| 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 CSSPaintValue_h | 5 #ifndef CSSPaintValue_h |
| 6 #define CSSPaintValue_h | 6 #define CSSPaintValue_h |
| 7 | 7 |
| 8 #include "core/css/CSSCustomIdentValue.h" | 8 #include "core/css/CSSCustomIdentValue.h" |
| 9 #include "core/css/CSSImageGeneratorValue.h" | 9 #include "core/css/CSSImageGeneratorValue.h" |
| 10 #include "platform/heap/Handle.h" | 10 #include "platform/heap/Handle.h" |
| 11 | 11 |
| 12 namespace blink { | 12 namespace blink { |
| 13 | 13 |
| 14 class CSSPaintValue : public CSSImageGeneratorValue { | 14 class CSSPaintValue : public CSSImageGeneratorValue { |
| 15 public: | 15 public: |
| 16 static PassRefPtrWillBeRawPtr<CSSPaintValue> create(PassRefPtrWillBeRawPtr<C
SSCustomIdentValue> name) | 16 static RawPtr<CSSPaintValue> create(RawPtr<CSSCustomIdentValue> name) |
| 17 { | 17 { |
| 18 return adoptRefWillBeNoop(new CSSPaintValue(name)); | 18 return new CSSPaintValue(name); |
| 19 } | 19 } |
| 20 ~CSSPaintValue(); | 20 ~CSSPaintValue(); |
| 21 | 21 |
| 22 String customCSSText() const; | 22 String customCSSText() const; |
| 23 | 23 |
| 24 String name() const; | 24 String name() const; |
| 25 | 25 |
| 26 PassRefPtr<Image> image(const LayoutObject&, const IntSize&); | 26 PassRefPtr<Image> image(const LayoutObject&, const IntSize&); |
| 27 bool isFixedSize() const { return false; } | 27 bool isFixedSize() const { return false; } |
| 28 IntSize fixedSize(const LayoutObject&) { return IntSize(); } | 28 IntSize fixedSize(const LayoutObject&) { return IntSize(); } |
| 29 | 29 |
| 30 bool isPending() const { return false; } | 30 bool isPending() const { return false; } |
| 31 bool knownToBeOpaque(const LayoutObject&) const { return false; } | 31 bool knownToBeOpaque(const LayoutObject&) const { return false; } |
| 32 | 32 |
| 33 void loadSubimages(Document*) { } | 33 void loadSubimages(Document*) { } |
| 34 | 34 |
| 35 bool equals(const CSSPaintValue&) const; | 35 bool equals(const CSSPaintValue&) const; |
| 36 | 36 |
| 37 DECLARE_TRACE_AFTER_DISPATCH(); | 37 DECLARE_TRACE_AFTER_DISPATCH(); |
| 38 | 38 |
| 39 private: | 39 private: |
| 40 explicit CSSPaintValue(PassRefPtrWillBeRawPtr<CSSCustomIdentValue> name); | 40 explicit CSSPaintValue(RawPtr<CSSCustomIdentValue> name); |
| 41 | 41 |
| 42 RefPtrWillBeMember<CSSCustomIdentValue> m_name; | 42 Member<CSSCustomIdentValue> m_name; |
| 43 }; | 43 }; |
| 44 | 44 |
| 45 DEFINE_CSS_VALUE_TYPE_CASTS(CSSPaintValue, isPaintValue()); | 45 DEFINE_CSS_VALUE_TYPE_CASTS(CSSPaintValue, isPaintValue()); |
| 46 | 46 |
| 47 } // namespace blink | 47 } // namespace blink |
| 48 | 48 |
| 49 #endif // CSSPaintValue_h | 49 #endif // CSSPaintValue_h |
| OLD | NEW |