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

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

Issue 181693006: Refactoring source image usage in CanvasRenderingContext2D (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: applied last corrections Created 6 years, 9 months 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
« no previous file with comments | « Source/core/html/HTMLCanvasElement.idl ('k') | Source/core/html/HTMLImageElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLImageElement.h
diff --git a/Source/core/html/HTMLImageElement.h b/Source/core/html/HTMLImageElement.h
index 1ae6b25195c3402568c084c8cf1df6883607efc1..9a819a750f41f44ff98045f1e377780d11e3636b 100644
--- a/Source/core/html/HTMLImageElement.h
+++ b/Source/core/html/HTMLImageElement.h
@@ -26,6 +26,7 @@
#include "core/html/HTMLElement.h"
#include "core/html/HTMLImageLoader.h"
+#include "core/html/canvas/CanvasImageSource.h"
#include "platform/graphics/GraphicsTypes.h"
#include "wtf/WeakPtr.h"
@@ -33,7 +34,7 @@ namespace WebCore {
class HTMLFormElement;
-class HTMLImageElement FINAL : public HTMLElement {
+class HTMLImageElement FINAL : public HTMLElement, public CanvasImageSource {
public:
static PassRefPtr<HTMLImageElement> create(Document&);
static PassRefPtr<HTMLImageElement> create(Document&, HTMLFormElement*);
@@ -84,6 +85,12 @@ public:
virtual HTMLFormElement* formOwner() const OVERRIDE;
void formRemovedFromTree(const Node& formRoot);
+ // CanvasImageSourceImplementations
+ virtual PassRefPtr<Image> getSourceImageForCanvas(SourceImageMode, SourceImageStatus*) const;
+ virtual bool wouldTaintOrigin(SecurityOrigin*) const OVERRIDE;
+ virtual FloatSize sourceSize() const OVERRIDE;
+ virtual FloatSize defaultDestinationSize() const OVERRIDE;
+
protected:
explicit HTMLImageElement(Document&, HTMLFormElement* = 0);
« no previous file with comments | « Source/core/html/HTMLCanvasElement.idl ('k') | Source/core/html/HTMLImageElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698