Index: third_party/WebKit/Source/core/html/HTMLCanvasElement.h |
diff --git a/third_party/WebKit/Source/core/html/HTMLCanvasElement.h b/third_party/WebKit/Source/core/html/HTMLCanvasElement.h |
index a8fdc1741b6ca79c51d50ab82c3b04d7dea1aca2..f208f37cd8c8b58d3b37059210374440d256c221 100644 |
--- a/third_party/WebKit/Source/core/html/HTMLCanvasElement.h |
+++ b/third_party/WebKit/Source/core/html/HTMLCanvasElement.h |
@@ -37,6 +37,7 @@ |
#include "core/fileapi/FileCallback.h" |
#include "core/html/HTMLElement.h" |
#include "core/html/canvas/CanvasImageSource.h" |
+#include "core/imagebitmap/ImageBitmapSource.h" |
#include "platform/geometry/FloatRect.h" |
#include "platform/geometry/IntSize.h" |
#include "platform/graphics/GraphicsTypes.h" |
@@ -60,7 +61,7 @@ class ImageBufferSurface; |
class ImageData; |
class IntSize; |
-class CORE_EXPORT HTMLCanvasElement final : public HTMLElement, public DocumentVisibilityObserver, public CanvasImageSource, public ImageBufferClient { |
+class CORE_EXPORT HTMLCanvasElement final : public HTMLElement, public DocumentVisibilityObserver, public CanvasImageSource, public ImageBufferClient, public ImageBitmapSource { |
DEFINE_WRAPPERTYPEINFO(); |
WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(HTMLCanvasElement); |
public: |
@@ -158,6 +159,10 @@ public: |
void doDeferredPaintInvalidation(); |
+ // ImageBitmapSource implementation |
+ IntSize bitmapSourceSize() const override; |
+ ScriptPromise createImageBitmap(ScriptState*, EventTarget&, int sx, int sy, int sw, int sh, ExceptionState&) override; |
+ |
DECLARE_VIRTUAL_TRACE(); |
void createImageBufferUsingSurfaceForTesting(PassOwnPtr<ImageBufferSurface>); |