Changeset 181412 in webkit
- Timestamp:
- Mar 11, 2015 3:52:43 PM (9 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r181411 r181412 1 2015-03-11 Commit Queue <commit-queue@webkit.org> 2 3 Unreviewed, rolling out r179340 and r179344. 4 https://bugs.webkit.org/show_bug.cgi?id=142598 5 6 Caused images to stay alive forever when navigating away from 7 the page before they finish loading. (Requested by kling on 8 #webkit). 9 10 Reverted changesets: 11 12 "CachedImage: ensure clients overrides imageChanged instead of 13 notifyFinished" 14 https://bugs.webkit.org/show_bug.cgi?id=140722 15 http://trac.webkit.org/changeset/179340 16 17 "HTMLImageLoader: fix build failure on assert condition after 18 r179340" 19 https://bugs.webkit.org/show_bug.cgi?id=140722 20 http://trac.webkit.org/changeset/179344 21 1 22 2015-03-11 Geoffrey Garen <ggaren@apple.com> 2 23 -
trunk/Source/WebCore/html/HTMLImageLoader.cpp
r181411 r181412 74 74 } 75 75 76 void HTMLImageLoader:: imageChanged(CachedImage* cachedImage, const IntRect*)76 void HTMLImageLoader::notifyFinished(CachedResource*) 77 77 { 78 ASSERT(cachedImage == image()); 79 80 if (!cachedImage->isLoaded()) 81 return; 78 CachedImage* cachedImage = image(); 82 79 83 80 Ref<Element> protect(element()); 84 ImageLoader:: imageChanged(cachedImage);81 ImageLoader::notifyFinished(cachedImage); 85 82 86 83 bool loadError = cachedImage->errorOccurred() || cachedImage->response().httpStatusCode() >= 400; -
trunk/Source/WebCore/html/HTMLImageLoader.h
r179340 r181412 36 36 virtual String sourceURI(const AtomicString&) const override; 37 37 38 virtual void imageChanged(CachedImage*, const IntRect* = nullptr) override;38 virtual void notifyFinished(CachedResource*) override; 39 39 }; 40 40 -
trunk/Source/WebCore/loader/ImageLoader.cpp
r179340 r181412 273 273 } 274 274 275 void ImageLoader:: imageChanged(CachedImage* cachedImage, const IntRect*)275 void ImageLoader::notifyFinished(CachedResource* resource) 276 276 { 277 277 ASSERT(m_failedLoadURL.isEmpty()); 278 ASSERT(cachedImage == m_image.get()); 279 280 if (!cachedImage->isLoaded()) 281 return; 278 ASSERT(resource == m_image.get()); 282 279 283 280 m_imageComplete = true; … … 290 287 if (element().fastHasAttribute(HTMLNames::crossoriginAttr) 291 288 && !element().document().securityOrigin()->canRequest(image()->response().url()) 292 && ! cachedImage->passesAccessControlCheck(element().document().securityOrigin())) {289 && !resource->passesAccessControlCheck(element().document().securityOrigin())) { 293 290 294 291 setImageWithoutConsideringPendingLoadEvent(0); … … 308 305 } 309 306 310 if ( cachedImage->wasCanceled()) {307 if (resource->wasCanceled()) { 311 308 m_hasPendingLoadEvent = false; 312 309 // Only consider updating the protection ref-count of the Element immediately before returning -
trunk/Source/WebCore/loader/ImageLoader.h
r179340 r181412 74 74 protected: 75 75 explicit ImageLoader(Element&); 76 virtual void imageChanged(CachedImage*, const IntRect* = nullptr) override;76 virtual void notifyFinished(CachedResource*) override; 77 77 78 78 private: -
trunk/Source/WebCore/loader/cache/CachedImage.cpp
r179626 r181412 430 430 } 431 431 432 notifyObservers(); 432 433 if (m_image) 433 434 setEncodedSize(m_image->data() ? m_image->data()->size() : 0); 434 435 setLoading(false); 436 notifyObservers(); 435 CachedResource::finishLoading(data); 437 436 } 438 437 -
trunk/Source/WebCore/loader/cache/CachedImageClient.h
r179340 r181412 39 39 // Called whenever a frame of an image changes because we got more data from the network. 40 40 // If not null, the IntRect is the changed rect of the image. 41 virtual void imageChanged(CachedImage*, const IntRect* = nullptr) { }41 virtual void imageChanged(CachedImage*, const IntRect* = 0) { } 42 42 43 43 // Called when GIF animation progresses. 44 44 virtual void newImageAnimationFrameAvailable(CachedImage& image) { imageChanged(&image); } 45 46 // Use imageChanged instead.47 virtual void notifyFinished(CachedResource*) override final { }48 45 }; 49 46 -
trunk/Source/WebCore/rendering/RenderImage.cpp
r179488 r181412 365 365 } 366 366 367 void RenderImage::notifyFinished(CachedResource* newImage) 368 { 369 if (documentBeingDestroyed()) 370 return; 371 372 invalidateBackgroundObscurationStatus(); 373 374 if (newImage == imageResource().cachedImage()) { 375 // tell any potential compositing layers 376 // that the image is done and they can reference it directly. 377 contentChanged(ImageChanged); 378 } 379 } 380 367 381 void RenderImage::paintReplaced(PaintInfo& paintInfo, const LayoutPoint& paintOffset) 368 382 { -
trunk/Source/WebCore/rendering/RenderImage.h
r179340 r181412 100 100 virtual LayoutUnit minimumReplacedHeight() const override; 101 101 102 virtual void notifyFinished(CachedResource*) override final; 102 103 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction) override final; 103 104 -
trunk/Source/WebCore/svg/SVGFEImageElement.cpp
r179810 r181412 191 191 } 192 192 193 void SVGFEImageElement::imageChanged(CachedImage* cachedImage, const IntRect*) 194 { 195 if (!cachedImage || !cachedImage->isLoaded()) 196 return; 197 193 void SVGFEImageElement::notifyFinished(CachedResource*) 194 { 198 195 if (!inDocument()) 199 196 return; -
trunk/Source/WebCore/svg/SVGFEImageElement.h
r179340 r181412 52 52 virtual void parseAttribute(const QualifiedName&, const AtomicString&) override; 53 53 virtual void svgAttributeChanged(const QualifiedName&) override; 54 virtual void imageChanged(CachedImage*, const IntRect* = nullptr) override;54 virtual void notifyFinished(CachedResource*) override; 55 55 56 56 virtual void addSubresourceAttributeURLs(ListHashSet<URL>&) const override;
Note: See TracChangeset
for help on using the changeset viewer.