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

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

Issue 2723093004: Adds SVGImageElement as a CanvasImageSource (Closed)
Patch Set: Refactored, added tests 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 37bf7e4034697eb37bf8e706420fb3a765a5e852..ea3e3b5d09406a499491f2fddee075036096b123 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 sourceDefaultSize() 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; }
fs 2017/03/07 22:01:24 (This is a bit scary-looking, hopefully it's futur
fserb 2017/03/21 19:15:22 I double checked with some people and nobody could
fs 2017/03/21 21:05:41 Ok.
void notifyViewportChanged();
void createMediaQueryListIfDoesNotExist();

Powered by Google App Engine
This is Rietveld 408576698