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

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 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..4aa21b435f2d76e10ec05a94eae426fe7ad1e774 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,30 @@ public:
private:
explicit CSSPaintValue(CSSCustomIdentValue* name);
+ class Observer final : public CSSPaintImageGenerator::Observer {
+ DISALLOW_NEW();
+ public:
+ explicit Observer(CSSPaintValue* ownerValue)
+ : m_ownerValue(ownerValue)
+ {
+ }
+
+ ~Observer() override { }
+ DEFINE_INLINE_TRACE()
+ {
+ visitor->trace(m_ownerValue);
+ }
+
+ void paintImageGeneratorReady() final;
+ private:
+ Member<CSSPaintValue> m_ownerValue;
+ };
+
+ void paintImageGeneratorReady();
+
Member<CSSCustomIdentValue> m_name;
+ Member<CSSPaintImageGenerator> m_generator;
+ Observer m_paintImageGeneratorObserver;
haraken 2016/04/08 04:31:19 How about just making CSSPaintValue CSSPaintImageG
ikilpatrick 2016/04/08 18:43:21 CSSPaintValue inherits from CSSValue which is a tr
};
DEFINE_CSS_VALUE_TYPE_CASTS(CSSPaintValue, isPaintValue());

Powered by Google App Engine
This is Rietveld 408576698