Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(727)

Unified Diff: third_party/WebKit/Source/modules/csspaint/CSSPaintDefinition.h

Issue 1896893004: Hook up style invalidation for CSS Paint API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@css-paint-register
Patch Set: rebase. Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/csspaint/CSSPaintDefinition.h
diff --git a/third_party/WebKit/Source/modules/csspaint/CSSPaintDefinition.h b/third_party/WebKit/Source/modules/csspaint/CSSPaintDefinition.h
index a7290e47adc56a38436ae6e8ab1ecd3e5981107e..a7933f2a8c77693bf13820f4a3072bd59afc9e1e 100644
--- a/third_party/WebKit/Source/modules/csspaint/CSSPaintDefinition.h
+++ b/third_party/WebKit/Source/modules/csspaint/CSSPaintDefinition.h
@@ -6,6 +6,7 @@
#define CSSPaintDefinition_h
#include "bindings/core/v8/ScopedPersistent.h"
+#include "core/CSSPropertyNames.h"
#include "platform/geometry/IntSize.h"
#include "platform/heap/Handle.h"
#include <v8.h>
@@ -19,7 +20,7 @@ class ScriptState;
// the author.
class CSSPaintDefinition final : public GarbageCollectedFinalized<CSSPaintDefinition> {
public:
- static CSSPaintDefinition* create(ScriptState*, v8::Local<v8::Function> constructor, v8::Local<v8::Function> paint);
+ static CSSPaintDefinition* create(ScriptState*, v8::Local<v8::Function> constructor, v8::Local<v8::Function> paint, Vector<CSSPropertyID>&, Vector<AtomicString>& customInvalidationProperties);
virtual ~CSSPaintDefinition();
// Invokes the javascript 'paint' callback on an instance of the javascript
@@ -29,6 +30,8 @@ public:
// This may return a nullptr (representing an invalid image) if javascript
// throws an error.
PassRefPtr<Image> paint(const IntSize&);
+ const Vector<CSSPropertyID>& nativeInvalidationProperties() const { return m_nativeInvalidationProperties; }
+ const Vector<AtomicString>& customInvalidationProperties() const { return m_customInvalidationProperties; }
ScriptState* getScriptState() const { return m_scriptState.get(); }
@@ -37,7 +40,7 @@ public:
DEFINE_INLINE_TRACE() { };
private:
- CSSPaintDefinition(ScriptState*, v8::Local<v8::Function> constructor, v8::Local<v8::Function> paint);
+ CSSPaintDefinition(ScriptState*, v8::Local<v8::Function> constructor, v8::Local<v8::Function> paint, Vector<CSSPropertyID>& nativeInvalidationProperties, Vector<AtomicString>& customInvalidationProperties);
void maybeCreatePaintInstance();
@@ -53,6 +56,9 @@ private:
ScopedPersistent<v8::Object> m_instance;
bool m_didCallConstructor;
+
+ Vector<CSSPropertyID> m_nativeInvalidationProperties;
+ Vector<AtomicString> m_customInvalidationProperties;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698