diff options
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 |