Index: third_party/WebKit/Source/core/html/canvas/HTMLAndSVGImageElementSource.h |
diff --git a/third_party/WebKit/Source/core/html/canvas/CanvasImageElementSource.h b/third_party/WebKit/Source/core/html/canvas/HTMLAndSVGImageElementSource.h |
similarity index 67% |
rename from third_party/WebKit/Source/core/html/canvas/CanvasImageElementSource.h |
rename to third_party/WebKit/Source/core/html/canvas/HTMLAndSVGImageElementSource.h |
index 4497a7925640ae1edf0e8b60a546f17b76277e16..69bda33cda5f63327e0bff5e5f05bd92c55778e0 100644 |
--- a/third_party/WebKit/Source/core/html/canvas/CanvasImageElementSource.h |
+++ b/third_party/WebKit/Source/core/html/canvas/HTMLAndSVGImageElementSource.h |
@@ -2,11 +2,12 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#ifndef CanvasImageElementSource_h |
-#define CanvasImageElementSource_h |
+#ifndef HTMLAndSVGImageElementSource_h |
+#define HTMLAndSVGImageElementSource_h |
#include "core/CoreExport.h" |
#include "core/html/canvas/CanvasImageSource.h" |
+#include "core/imagebitmap/ImageBitmapSource.h" |
namespace blink { |
@@ -14,11 +15,19 @@ class Element; |
class ImageLoader; |
class ImageResourceContent; |
-class CORE_EXPORT CanvasImageElementSource : public CanvasImageSource { |
+class CORE_EXPORT HTMLAndSVGImageElementSource : public CanvasImageSource, |
Justin Novosad
2017/04/12 22:17:04
I find the name of this class to be awkward. First
fserb
2017/04/13 15:50:47
ImageElementBase. Done.
|
+ public ImageBitmapSource { |
public: |
virtual ImageLoader& GetImageLoader() const = 0; |
virtual FloatSize SourceDefaultObjectSize() = 0; |
+ IntSize BitmapSourceSize() const override; |
+ ScriptPromise CreateImageBitmap(ScriptState*, |
+ EventTarget&, |
+ Optional<IntRect>, |
+ const ImageBitmapOptions&, |
+ ExceptionState&) override; |
+ |
PassRefPtr<Image> GetSourceImageForCanvas(SourceImageStatus*, |
AccelerationHint, |
SnapshotReason, |
@@ -42,11 +51,12 @@ class CORE_EXPORT CanvasImageElementSource : public CanvasImageSource { |
const KURL& SourceURL() const override; |
- private: |
ImageResourceContent* CachedImage() const; |
+ |
+ private: |
const Element& GetElement() const; |
}; |
} // namespace blink |
-#endif // CanvasImageElementSource_h |
+#endif // HTMLAndSVGImageElementSource_h |