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

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: 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/HTMLImageElement.h
diff --git a/third_party/WebKit/Source/core/html/HTMLImageElement.h b/third_party/WebKit/Source/core/html/HTMLImageElement.h
index 8f14226428507cef825684b8d063b48515137010..407b51c2d65614fc956ae5946774c750d1f54324 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;
+ bool isHTMLImageElement() const override { return true; }
+
protected:
explicit HTMLImageElement(Document&, HTMLFormElement* = 0, bool createdByParser = false);

Powered by Google App Engine
This is Rietveld 408576698