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

Unified Diff: third_party/WebKit/Source/core/html/ImageData.h

Issue 1455763002: Use union type in ImageBitmapFactories.idl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix errors Created 5 years, 1 month 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/html/ImageData.h
diff --git a/third_party/WebKit/Source/core/html/ImageData.h b/third_party/WebKit/Source/core/html/ImageData.h
index 4cb126baa46b68d815be45dfa5bae9e8e78868f9..299723a8769c0fd3ea22631accab838334b0bbd6 100644
--- a/third_party/WebKit/Source/core/html/ImageData.h
+++ b/third_party/WebKit/Source/core/html/ImageData.h
@@ -32,6 +32,7 @@
#include "bindings/core/v8/ScriptWrappable.h"
#include "core/CoreExport.h"
#include "core/dom/DOMTypedArray.h"
+#include "core/imagebitmap/ImageBitmapSource.h"
#include "platform/geometry/IntSize.h"
#include "platform/heap/Handle.h"
#include "wtf/RefPtr.h"
@@ -40,7 +41,7 @@ namespace blink {
class ExceptionState;
-class CORE_EXPORT ImageData final : public GarbageCollectedFinalized<ImageData>, public ScriptWrappable {
+class CORE_EXPORT ImageData final : public GarbageCollectedFinalized<ImageData>, public ScriptWrappable, public ImageBitmapSource {
DEFINE_WRAPPERTYPEINFO();
public:
static ImageData* create(const IntSize&);
@@ -55,6 +56,10 @@ public:
const DOMUint8ClampedArray* data() const { return m_data.get(); }
DOMUint8ClampedArray* data() { return m_data.get(); }
+ // ImageBitmapSource implementation
+ IntSize bitmapSourceSize() const override { return m_size; }
+ bool isImageData() const override { return true; }
+
DEFINE_INLINE_TRACE() { }
void dispose();

Powered by Google App Engine
This is Rietveld 408576698