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

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

Issue 1455763002: Use union type in ImageBitmapFactories.idl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: better argument passing 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/HTMLImageElement.h
diff --git a/third_party/WebKit/Source/core/html/HTMLImageElement.h b/third_party/WebKit/Source/core/html/HTMLImageElement.h
index 8f14226428507cef825684b8d063b48515137010..de522d3c4d39f988cc1dcd673197ca334efab5b5 100644
--- a/third_party/WebKit/Source/core/html/HTMLImageElement.h
+++ b/third_party/WebKit/Source/core/html/HTMLImageElement.h
@@ -29,6 +29,7 @@
#include "core/html/HTMLElement.h"
#include "core/html/HTMLImageLoader.h"
#include "core/html/canvas/CanvasImageSource.h"
+#include "core/imagebitmap/ImageBitmapSource.h"
#include "platform/graphics/GraphicsTypes.h"
#include "platform/network/ResourceResponse.h"
#include "wtf/WeakPtr.h"
@@ -39,7 +40,7 @@ class HTMLFormElement;
class ImageCandidate;
class ShadowRoot;
-class CORE_EXPORT HTMLImageElement final : public HTMLElement, public CanvasImageSource {
+class CORE_EXPORT HTMLImageElement final : public HTMLElement, public CanvasImageSource, public ImageBitmapSource {
DEFINE_WRAPPERTYPEINFO();
public:
class ViewportChangeListener;
@@ -115,6 +116,10 @@ public:
void forceReload() const;
+ // ImageBitmapSource implementation
+ IntSize bitmapSourceSize() const override;
+ ScriptPromise createImageBitmap(ScriptState*, EventTarget&, int sx, int sy, int sw, int sh, ExceptionState&) override;
+
protected:
explicit HTMLImageElement(Document&, HTMLFormElement* = 0, bool createdByParser = false);
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp ('k') | third_party/WebKit/Source/core/html/HTMLImageElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698