diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
commit | 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch) | |
tree | 46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/loader/cache/CachedImageClient.h | |
parent | 32761a6cee1d0dee366b885b7b9c777e67885688 (diff) | |
download | WebKitGtk-tarball-master.tar.gz |
webkitgtk-2.16.5HEADwebkitgtk-2.16.5master
Diffstat (limited to 'Source/WebCore/loader/cache/CachedImageClient.h')
-rw-r--r-- | Source/WebCore/loader/cache/CachedImageClient.h | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/Source/WebCore/loader/cache/CachedImageClient.h b/Source/WebCore/loader/cache/CachedImageClient.h index 1c3fac206..e09621ed8 100644 --- a/Source/WebCore/loader/cache/CachedImageClient.h +++ b/Source/WebCore/loader/cache/CachedImageClient.h @@ -20,8 +20,7 @@ Boston, MA 02110-1301, USA. */ -#ifndef CachedImageClient_h -#define CachedImageClient_h +#pragma once #include "CachedResourceClient.h" @@ -34,19 +33,14 @@ class CachedImageClient : public CachedResourceClient { public: virtual ~CachedImageClient() { } static CachedResourceClientType expectedType() { return ImageType; } - virtual CachedResourceClientType resourceClientType() const override { return expectedType(); } + CachedResourceClientType resourceClientType() const override { return expectedType(); } - // Called whenever a frame of an image changes, either because we got more data from the network or - // because we are animating. If not null, the IntRect is the changed rect of the image. - virtual void imageChanged(CachedImage*, const IntRect* = 0) { } + // Called whenever a frame of an image changes because we got more data from the network. + // If not null, the IntRect is the changed rect of the image. + virtual void imageChanged(CachedImage*, const IntRect* = nullptr) { } - // Called to find out if this client wants to actually display the image. Used to tell when we - // can halt animation. Content nodes that hold image refs for example would not render the image, - // but RenderImages would (assuming they have visibility: visible and their render tree isn't hidden - // e.g., in the b/f cache or in a background tab). - virtual bool willRenderImage(CachedImage*) { return false; } + // Called when GIF animation progresses. + virtual void newImageAnimationFrameAvailable(CachedImage& image) { imageChanged(&image); } }; -} - -#endif +} // namespace WebCore |