Changeset 99415 in webkit
- Timestamp:
- Nov 7, 2011, 6:10:56 AM (15 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
-
ChangeLog (modified) (1 diff)
-
css/CSSImageValue.cpp (modified) (3 diffs)
-
css/CSSImageValue.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r99412 r99415 1 2011-11-07 Andreas Kling <kling@webkit.org> 2 3 CSSImageValue: Remove inheritance from CachedImageClient. 4 <http://webkit.org/b/71675> 5 6 Reviewed by Antti Koivisto. 7 8 CSSImageValue doesn't actually use any of the CachedImageClient 9 functionality, and holds a reference to the resource via the 10 CachedResourceHandle in StyleCachedImage. 11 12 So we can safely remove the multiple inheritance and simplify 13 the class. 14 15 * css/CSSImageValue.cpp: 16 (WebCore::CSSImageValue::~CSSImageValue): 17 (WebCore::CSSImageValue::cachedImage): 18 (WebCore::CSSImageValue::clearCachedImage): 19 * css/CSSImageValue.h: 20 1 21 2011-11-07 Andreas Kling <kling@webkit.org> 2 22 -
trunk/Source/WebCore/css/CSSImageValue.cpp
r97854 r99415 46 46 CSSImageValue::~CSSImageValue() 47 47 { 48 if (m_image && m_image->isCachedImage())49 static_cast<StyleCachedImage*>(m_image.get())->cachedImage()->removeClient(this);50 48 } 51 49 … … 74 72 75 73 ResourceRequest request(loader->document()->completeURL(url)); 76 if (CachedImage* cachedImage = loader->requestImage(request)) { 77 cachedImage->addClient(this); 74 if (CachedImage* cachedImage = loader->requestImage(request)) 78 75 m_image = StyleCachedImage::create(cachedImage); 79 }80 76 } 81 77 … … 92 88 void CSSImageValue::clearCachedImage() 93 89 { 94 if (m_image && m_image->isCachedImage())95 static_cast<StyleCachedImage*>(m_image.get())->cachedImage()->removeClient(this);96 90 m_image = 0; 97 91 m_accessedImage = false; -
trunk/Source/WebCore/css/CSSImageValue.h
r97854 r99415 23 23 24 24 #include "CSSPrimitiveValue.h" 25 #include "CachedImage.h"26 25 #include <wtf/RefPtr.h> 27 26 … … 32 31 class StyleImage; 33 32 34 class CSSImageValue : public CSSPrimitiveValue , private CachedImageClient{33 class CSSImageValue : public CSSPrimitiveValue { 35 34 WTF_MAKE_FAST_ALLOCATED; 36 35 public:
Note:
See TracChangeset
for help on using the changeset viewer.