OLD | NEW |
1 /* | 1 /* |
2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) | 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) |
3 Copyright (C) 2001 Dirk Mueller <mueller@kde.org> | 3 Copyright (C) 2001 Dirk Mueller <mueller@kde.org> |
4 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) | 4 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) |
5 Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. | 5 Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. |
6 | 6 |
7 This library is free software; you can redistribute it and/or | 7 This library is free software; you can redistribute it and/or |
8 modify it under the terms of the GNU Library General Public | 8 modify it under the terms of the GNU Library General Public |
9 License as published by the Free Software Foundation; either | 9 License as published by the Free Software Foundation; either |
10 version 2 of the License, or (at your option) any later version. | 10 version 2 of the License, or (at your option) any later version. |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 virtual bool stillNeedsLoad() const OVERRIDE { return !errorOccurred() && st
atus() == Unknown && !isLoading(); } | 88 virtual bool stillNeedsLoad() const OVERRIDE { return !errorOccurred() && st
atus() == Unknown && !isLoading(); } |
89 | 89 |
90 // ImageObserver | 90 // ImageObserver |
91 virtual void decodedSizeChanged(const Image* image, int delta); | 91 virtual void decodedSizeChanged(const Image* image, int delta); |
92 virtual void didDraw(const Image*); | 92 virtual void didDraw(const Image*); |
93 | 93 |
94 virtual bool shouldPauseAnimation(const Image*); | 94 virtual bool shouldPauseAnimation(const Image*); |
95 virtual void animationAdvanced(const Image*); | 95 virtual void animationAdvanced(const Image*); |
96 virtual void changedInRect(const Image*, const IntRect&); | 96 virtual void changedInRect(const Image*, const IntRect&); |
97 | 97 |
98 virtual void reportMemoryUsage(MemoryObjectInfo*) const OVERRIDE; | |
99 | |
100 private: | 98 private: |
101 void clear(); | 99 void clear(); |
102 | 100 |
103 void setCustomAcceptHeader(); | 101 void setCustomAcceptHeader(); |
104 void createImage(); | 102 void createImage(); |
105 void updateImage(bool allDataReceived); | 103 void updateImage(bool allDataReceived); |
106 void clearImage(); | 104 void clearImage(); |
107 // If not null, changeRect is the changed part of the image. | 105 // If not null, changeRect is the changed part of the image. |
108 void notifyObservers(const IntRect* changeRect = 0); | 106 void notifyObservers(const IntRect* changeRect = 0); |
109 virtual PurgePriority purgePriority() const { return PurgeFirst; } | 107 virtual PurgePriority purgePriority() const { return PurgeFirst; } |
110 | 108 |
111 virtual void switchClientsToRevalidatedResource() OVERRIDE; | 109 virtual void switchClientsToRevalidatedResource() OVERRIDE; |
112 | 110 |
113 typedef pair<IntSize, float> SizeAndZoom; | 111 typedef pair<IntSize, float> SizeAndZoom; |
114 typedef HashMap<const CachedImageClient*, SizeAndZoom> ContainerSizeRequests
; | 112 typedef HashMap<const CachedImageClient*, SizeAndZoom> ContainerSizeRequests
; |
115 ContainerSizeRequests m_pendingContainerSizeRequests; | 113 ContainerSizeRequests m_pendingContainerSizeRequests; |
116 | 114 |
117 RefPtr<Image> m_image; | 115 RefPtr<Image> m_image; |
118 #if ENABLE(SVG) | 116 #if ENABLE(SVG) |
119 OwnPtr<SVGImageCache> m_svgImageCache; | 117 OwnPtr<SVGImageCache> m_svgImageCache; |
120 #endif | 118 #endif |
121 bool m_loadingMultipartContent; | 119 bool m_loadingMultipartContent; |
122 }; | 120 }; |
123 | 121 |
124 } | 122 } |
125 | 123 |
126 #endif | 124 #endif |
OLD | NEW |