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

Unified Diff: third_party/WebKit/Source/core/css/CSSPaintValue.h

Issue 1866623002: Hook up CSSPaintValue::image to CSS Paint API callback. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed comments + rebase. Created 4 years, 8 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/core/css/CSSPaintValue.h
diff --git a/third_party/WebKit/Source/core/css/CSSPaintValue.h b/third_party/WebKit/Source/core/css/CSSPaintValue.h
index dcb253750826524f3fe19fefbaa05089b501e5b8..07eb74ca86e61d44b8078e2d150d61312b932427 100644
--- a/third_party/WebKit/Source/core/css/CSSPaintValue.h
+++ b/third_party/WebKit/Source/core/css/CSSPaintValue.h
@@ -7,6 +7,7 @@
#include "core/css/CSSCustomIdentValue.h"
#include "core/css/CSSImageGeneratorValue.h"
+#include "core/css/CSSPaintImageGenerator.h"
#include "platform/heap/Handle.h"
namespace blink {
@@ -39,7 +40,31 @@ public:
private:
explicit CSSPaintValue(CSSCustomIdentValue* name);
+ class Observer final : public CSSPaintImageGenerator::Observer {
+ WTF_MAKE_NONCOPYABLE(Observer);
+ public:
+ explicit Observer(CSSPaintValue* ownerValue)
+ : m_ownerValue(ownerValue)
+ {
+ }
+
+ ~Observer() override { }
+ DEFINE_INLINE_VIRTUAL_TRACE()
+ {
+ visitor->trace(m_ownerValue);
+ CSSPaintImageGenerator::Observer::trace(visitor);
+ }
+
+ void paintImageGeneratorReady() final;
+ private:
+ Member<CSSPaintValue> m_ownerValue;
+ };
+
+ void paintImageGeneratorReady();
+
Member<CSSCustomIdentValue> m_name;
+ Member<CSSPaintImageGenerator> m_generator;
+ Member<Observer> m_paintImageGeneratorObserver;
};
DEFINE_CSS_VALUE_TYPE_CASTS(CSSPaintValue, isPaintValue());
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSPaintImageGenerator.cpp ('k') | third_party/WebKit/Source/core/css/CSSPaintValue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698