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