Chromium Code Reviews| 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..894fcabe6ea5b3ddeeb8f5ffa538dc5aba223c7c 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() override { return IntSize(width(), height()); } |
|
xidachen
2015/11/25 17:01:54
This implementation of bitmapSourceSize will be ch
|
| + ScriptPromise createImageBitmap(ScriptState*, EventTarget&, ImageBitmapSource*, int sx, int sy, int sw, int sh, ExceptionState&) override; |
| + |
| protected: |
| explicit HTMLImageElement(Document&, HTMLFormElement* = 0, bool createdByParser = false); |