| 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 CSSPaintDefinition_h | 5 #ifndef CSSPaintDefinition_h |
| 6 #define CSSPaintDefinition_h | 6 #define CSSPaintDefinition_h |
| 7 | 7 |
| 8 #include "bindings/core/v8/ScopedPersistent.h" | 8 #include "bindings/core/v8/ScopedPersistent.h" |
| 9 #include "core/CSSPropertyNames.h" | 9 #include "core/CSSPropertyNames.h" |
| 10 #include "core/css/CSSSyntaxDescriptor.h" | 10 #include "core/css/CSSSyntaxDescriptor.h" |
| 11 #include "core/css/cssom/CSSStyleValue.h" |
| 11 #include "platform/geometry/IntSize.h" | 12 #include "platform/geometry/IntSize.h" |
| 12 #include "platform/heap/Handle.h" | 13 #include "platform/heap/Handle.h" |
| 13 #include "v8/include/v8.h" | 14 #include "v8/include/v8.h" |
| 14 | 15 |
| 15 namespace blink { | 16 namespace blink { |
| 16 | 17 |
| 17 class Image; | 18 class Image; |
| 18 class LayoutObject; | 19 class LayoutObject; |
| 19 class ScriptState; | 20 class ScriptState; |
| 20 | 21 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 33 Vector<CSSSyntaxDescriptor>& inputArgumentTypes, | 34 Vector<CSSSyntaxDescriptor>& inputArgumentTypes, |
| 34 bool hasAlpha); | 35 bool hasAlpha); |
| 35 virtual ~CSSPaintDefinition(); | 36 virtual ~CSSPaintDefinition(); |
| 36 | 37 |
| 37 // Invokes the javascript 'paint' callback on an instance of the javascript | 38 // Invokes the javascript 'paint' callback on an instance of the javascript |
| 38 // class. The size given will be the size of the PaintRenderingContext2D | 39 // class. The size given will be the size of the PaintRenderingContext2D |
| 39 // given to the callback. | 40 // given to the callback. |
| 40 // | 41 // |
| 41 // This may return a nullptr (representing an invalid image) if javascript | 42 // This may return a nullptr (representing an invalid image) if javascript |
| 42 // throws an error. | 43 // throws an error. |
| 43 PassRefPtr<Image> paint(const LayoutObject&, const IntSize&, float zoom); | 44 PassRefPtr<Image> paint(const LayoutObject&, |
| 45 const IntSize&, |
| 46 float zoom, |
| 47 const CSSStyleValueVector*); |
| 44 const Vector<CSSPropertyID>& nativeInvalidationProperties() const { | 48 const Vector<CSSPropertyID>& nativeInvalidationProperties() const { |
| 45 return m_nativeInvalidationProperties; | 49 return m_nativeInvalidationProperties; |
| 46 } | 50 } |
| 47 const Vector<AtomicString>& customInvalidationProperties() const { | 51 const Vector<AtomicString>& customInvalidationProperties() const { |
| 48 return m_customInvalidationProperties; | 52 return m_customInvalidationProperties; |
| 49 } | 53 } |
| 50 const Vector<CSSSyntaxDescriptor>& inputArgumentTypes() const { | 54 const Vector<CSSSyntaxDescriptor>& inputArgumentTypes() const { |
| 51 return m_inputArgumentTypes; | 55 return m_inputArgumentTypes; |
| 52 } | 56 } |
| 53 bool hasAlpha() const { return m_hasAlpha; } | 57 bool hasAlpha() const { return m_hasAlpha; } |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 Vector<CSSPropertyID> m_nativeInvalidationProperties; | 91 Vector<CSSPropertyID> m_nativeInvalidationProperties; |
| 88 Vector<AtomicString> m_customInvalidationProperties; | 92 Vector<AtomicString> m_customInvalidationProperties; |
| 89 // Input argument types, if applicable. | 93 // Input argument types, if applicable. |
| 90 Vector<CSSSyntaxDescriptor> m_inputArgumentTypes; | 94 Vector<CSSSyntaxDescriptor> m_inputArgumentTypes; |
| 91 bool m_hasAlpha; | 95 bool m_hasAlpha; |
| 92 }; | 96 }; |
| 93 | 97 |
| 94 } // namespace blink | 98 } // namespace blink |
| 95 | 99 |
| 96 #endif // CSSPaintDefinition_h | 100 #endif // CSSPaintDefinition_h |
| OLD | NEW |