Title: [102066] branches/safari-534.53-branch/Source/WebCore
Diff
Modified: branches/safari-534.53-branch/Source/WebCore/ChangeLog (102065 => 102066)
--- branches/safari-534.53-branch/Source/WebCore/ChangeLog 2011-12-06 00:17:34 UTC (rev 102065)
+++ branches/safari-534.53-branch/Source/WebCore/ChangeLog 2011-12-06 00:32:23 UTC (rev 102066)
@@ -1,5 +1,26 @@
2011-12-05 Lucas Forschler <[email protected]>
+ Merge 94980
+
+ 2011-09-12 Beth Dakin <[email protected]>
+
+ https://bugs.webkit.org/show_bug.cgi?id=67898
+ REGRESSION(r94900): fast/images/support-broken-image-delegate.html fails on Mac
+
+ Reviewed by Simon Fraser.
+
+ New function willPaintBrokenImage() returns true when there has been an error
+ loading the image and the broken image icon will be used in its place. This is
+ necessary since it is possible to have an error loading an image and to NOT use
+ the broken image icon.
+ * loader/cache/CachedImage.cpp:
+ (WebCore::CachedImage::willPaintBrokenImage):
+ * loader/cache/CachedImage.h:
+ * rendering/RenderImage.cpp:
+ (WebCore::RenderImage::imageSizeForError):
+
+2011-12-05 Lucas Forschler <[email protected]>
+
Merge 94912
2011-09-09 David Hyatt <[email protected]>
Modified: branches/safari-534.53-branch/Source/WebCore/loader/cache/CachedImage.cpp (102065 => 102066)
--- branches/safari-534.53-branch/Source/WebCore/loader/cache/CachedImage.cpp 2011-12-06 00:17:34 UTC (rev 102065)
+++ branches/safari-534.53-branch/Source/WebCore/loader/cache/CachedImage.cpp 2011-12-06 00:32:23 UTC (rev 102066)
@@ -124,6 +124,11 @@
return brokenImageLoRes;
}
+bool CachedImage::willPaintBrokenImage() const
+{
+ return errorOccurred() && m_shouldPaintBrokenImage;
+}
+
Image* CachedImage::image() const
{
ASSERT(!isPurgeable());
Modified: branches/safari-534.53-branch/Source/WebCore/loader/cache/CachedImage.h (102065 => 102066)
--- branches/safari-534.53-branch/Source/WebCore/loader/cache/CachedImage.h 2011-12-06 00:17:34 UTC (rev 102065)
+++ branches/safari-534.53-branch/Source/WebCore/loader/cache/CachedImage.h 2011-12-06 00:32:23 UTC (rev 102066)
@@ -48,6 +48,7 @@
bool hasImage() const { return m_image.get(); }
Image* brokenImage(float deviceScaleFactor) const;
+ bool willPaintBrokenImage() const;
bool canRender(float multiplier) const { return !errorOccurred() && !imageSize(multiplier).isEmpty(); }
Modified: branches/safari-534.53-branch/Source/WebCore/rendering/RenderImage.cpp (102065 => 102066)
--- branches/safari-534.53-branch/Source/WebCore/rendering/RenderImage.cpp 2011-12-06 00:17:34 UTC (rev 102065)
+++ branches/safari-534.53-branch/Source/WebCore/rendering/RenderImage.cpp 2011-12-06 00:32:23 UTC (rev 102066)
@@ -85,7 +85,11 @@
ASSERT_ARG(newImage, newImage);
ASSERT_ARG(newImage, newImage->image());
- Image* brokenImage = newImage->brokenImage(Page::deviceScaleFactor(frame()));
+ Image* brokenImage;
+ if (newImage->willPaintBrokenImage())
+ brokenImage = newImage->brokenImage(Page::deviceScaleFactor(frame()));
+ else
+ brokenImage = newImage->image();
// imageSize() returns 0 for the error image. We need the true size of the
// error image, so we have to get it by grabbing image() directly.
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes