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

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

Issue 2723093004: Adds SVGImageElement as a CanvasImageSource (Closed)
Patch Set: Moved from circle to rect, to avoid aliasing Created 3 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
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 97e42b416212186afda835f7cd97bbd916118818..f4a5c8c901d8695641345da02626b0bb2929f7e4 100644
--- a/third_party/WebKit/Source/core/html/HTMLImageElement.h
+++ b/third_party/WebKit/Source/core/html/HTMLImageElement.h
@@ -29,7 +29,7 @@
#include "core/html/FormAssociated.h"
#include "core/html/HTMLElement.h"
#include "core/html/HTMLImageLoader.h"
-#include "core/html/canvas/CanvasImageSource.h"
+#include "core/html/canvas/CanvasImageElementSource.h"
#include "core/imagebitmap/ImageBitmapSource.h"
#include "platform/graphics/GraphicsTypes.h"
#include "platform/loader/fetch/FetchRequest.h"
@@ -44,7 +44,7 @@ class ImageBitmapOptions;
class CORE_EXPORT HTMLImageElement final
: public HTMLElement,
- public CanvasImageSource,
+ public CanvasImageElementSource,
public ImageBitmapSource,
public ActiveScriptWrappable<HTMLImageElement>,
public FormAssociated {
@@ -116,20 +116,9 @@ class CORE_EXPORT HTMLImageElement final
virtual void ensurePrimaryContent();
bool isCollapsed() const;
- // CanvasImageSource implementation
- PassRefPtr<Image> getSourceImageForCanvas(SourceImageStatus*,
- AccelerationHint,
- SnapshotReason,
- const FloatSize&) const override;
- bool isSVGSource() const override;
- bool wouldTaintOrigin(SecurityOrigin*) const override;
- FloatSize elementSize(const FloatSize&) const override;
+ // CanvasImageSource interface implementation.
+ FloatSize sourceDefaultObjectSize() override;
FloatSize defaultDestinationSize(const FloatSize&) const override;
- const KURL& sourceURL() const override;
- bool isAccelerated() const override { return false; }
- bool isOpaque() const override;
- int sourceWidth() override;
- int sourceHeight() override;
// public so that HTMLPictureElement can call this as well.
void selectSourceURL(ImageLoader::UpdateFromElementBehavior);
@@ -208,7 +197,7 @@ class CORE_EXPORT HTMLImageElement final
void resetFormOwner();
ImageCandidate findBestFitImageFromPictureParent();
void setBestFitURLAndDPRFromImageCandidate(const ImageCandidate&);
- HTMLImageLoader& imageLoader() const { return *m_imageLoader; }
+ HTMLImageLoader& imageLoader() const override { return *m_imageLoader; }
void notifyViewportChanged();
void createMediaQueryListIfDoesNotExist();
« no previous file with comments | « third_party/WebKit/Source/core/html/BUILD.gn ('k') | third_party/WebKit/Source/core/html/HTMLImageElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698