Chromium Code Reviews| 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 "core/css/CSSPaintImageGenerator.h" | 10 #include "core/css/CSSPaintImageGenerator.h" |
| (...skipping 17 matching lines...) Expand all Loading... | |
| 28 bool isFixedSize() const { return false; } | 28 bool isFixedSize() const { return false; } |
| 29 IntSize fixedSize(const LayoutObject&) { return IntSize(); } | 29 IntSize fixedSize(const LayoutObject&) { return IntSize(); } |
| 30 | 30 |
| 31 bool isPending() const { return false; } | 31 bool isPending() const { return false; } |
| 32 bool knownToBeOpaque(const LayoutObject&) const { return false; } | 32 bool knownToBeOpaque(const LayoutObject&) const { return false; } |
| 33 | 33 |
| 34 void loadSubimages(Document*) { } | 34 void loadSubimages(Document*) { } |
| 35 | 35 |
| 36 bool equals(const CSSPaintValue&) const; | 36 bool equals(const CSSPaintValue&) const; |
| 37 | 37 |
| 38 const Vector<CSSPropertyID>& nativeInvalidationProperties() const | |
| 39 { | |
| 40 DCHECK(m_generator); | |
|
ikilpatrick
2016/04/19 22:31:25
This is potentially bad, the m_generator doesn't e
| |
| 41 return m_generator->nativeInvalidationProperties(); | |
| 42 } | |
| 43 const Vector<AtomicString>& customInvalidationProperties() const | |
| 44 { | |
| 45 DCHECK(m_generator); | |
| 46 return m_generator->customInvalidationProperties(); | |
| 47 } | |
| 48 | |
| 38 DECLARE_TRACE_AFTER_DISPATCH(); | 49 DECLARE_TRACE_AFTER_DISPATCH(); |
| 39 | 50 |
| 40 private: | 51 private: |
| 41 explicit CSSPaintValue(CSSCustomIdentValue* name); | 52 explicit CSSPaintValue(CSSCustomIdentValue* name); |
| 42 | 53 |
| 43 class Observer final : public CSSPaintImageGenerator::Observer { | 54 class Observer final : public CSSPaintImageGenerator::Observer { |
| 44 WTF_MAKE_NONCOPYABLE(Observer); | 55 WTF_MAKE_NONCOPYABLE(Observer); |
| 45 public: | 56 public: |
| 46 explicit Observer(CSSPaintValue* ownerValue) | 57 explicit Observer(CSSPaintValue* ownerValue) |
| 47 : m_ownerValue(ownerValue) | 58 : m_ownerValue(ownerValue) |
| (...skipping 17 matching lines...) Expand all Loading... | |
| 65 Member<CSSCustomIdentValue> m_name; | 76 Member<CSSCustomIdentValue> m_name; |
| 66 Member<CSSPaintImageGenerator> m_generator; | 77 Member<CSSPaintImageGenerator> m_generator; |
| 67 Member<Observer> m_paintImageGeneratorObserver; | 78 Member<Observer> m_paintImageGeneratorObserver; |
| 68 }; | 79 }; |
| 69 | 80 |
| 70 DEFINE_CSS_VALUE_TYPE_CASTS(CSSPaintValue, isPaintValue()); | 81 DEFINE_CSS_VALUE_TYPE_CASTS(CSSPaintValue, isPaintValue()); |
| 71 | 82 |
| 72 } // namespace blink | 83 } // namespace blink |
| 73 | 84 |
| 74 #endif // CSSPaintValue_h | 85 #endif // CSSPaintValue_h |
| OLD | NEW |