[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373
mrowe at apple.com
mrowe at apple.com
Thu Apr 8 01:57:32 UTC 2010
The following commit has been merged in the webkit-1.2 branch:
commit 9014c92bead3729c8a4c0f1a6453bee8cb5b767b
Author: mrowe at apple.com <mrowe at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Feb 23 22:01:09 2010 +0000
<http://webkit.org/b/35287> ImageSourceCG::frameIsCompleteAtIndex returns false for all frames until image has completed loading
Reviewed by Geoff Garen.
CGImageSourceGetStatusAtIndex claims that all frames of a multi-frame image are incomplete when we've not yet received the
complete data for an image that is using an incremental data source (<rdar://problem/7679174>). We work around this by
special-casing all frames except the last in an image and treating them as complete if they are present and reported as
being incomplete. We do this on the assumption that loading new data can only modify the existing last frame or append new
frames. The last frame is only treated as being complete if the image source reports it as such. This ensures that it is
truly the last frame of the image rather than just the last that we currently have data for.
* platform/graphics/cg/ImageSourceCG.cpp:
(WebCore::ImageSource::frameIsCompleteAtIndex):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55169 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 10c1dd9..29d32bb 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2010-02-23 Mark Rowe <mrowe at apple.com>
+
+ Reviewed by Geoff Garen.
+
+ <http://webkit.org/b/35287> ImageSourceCG::frameIsCompleteAtIndex returns false for all frames until image has completed loading
+
+ CGImageSourceGetStatusAtIndex claims that all frames of a multi-frame image are incomplete when we've not yet received the
+ complete data for an image that is using an incremental data source (<rdar://problem/7679174>). We work around this by
+ special-casing all frames except the last in an image and treating them as complete if they are present and reported as
+ being incomplete. We do this on the assumption that loading new data can only modify the existing last frame or append new
+ frames. The last frame is only treated as being complete if the image source reports it as such. This ensures that it is
+ truly the last frame of the image rather than just the last that we currently have data for.
+
+ * platform/graphics/cg/ImageSourceCG.cpp:
+ (WebCore::ImageSource::frameIsCompleteAtIndex):
+
2010-02-23 Enrica Casucci <enrica at apple.com>
Reviewed by Darin Adler.
diff --git a/WebCore/platform/graphics/cg/ImageSourceCG.cpp b/WebCore/platform/graphics/cg/ImageSourceCG.cpp
index 6e0ba50..a9179bc 100644
--- a/WebCore/platform/graphics/cg/ImageSourceCG.cpp
+++ b/WebCore/platform/graphics/cg/ImageSourceCG.cpp
@@ -234,7 +234,22 @@ CGImageRef ImageSource::createFrameAtIndex(size_t index)
bool ImageSource::frameIsCompleteAtIndex(size_t index)
{
- return CGImageSourceGetStatusAtIndex(m_decoder, index) == kCGImageStatusComplete;
+ ASSERT(frameCount());
+
+ // CGImageSourceGetStatusAtIndex claims that all frames of a multi-frame image are incomplete
+ // when we've not yet received the complete data for an image that is using an incremental data
+ // source (<rdar://problem/7679174>). We work around this by special-casing all frames except the
+ // last in an image and treating them as complete if they are present and reported as being
+ // incomplete. We do this on the assumption that loading new data can only modify the existing last
+ // frame or append new frames. The last frame is only treated as being complete if the image source
+ // reports it as such. This ensures that it is truly the last frame of the image rather than just
+ // the last that we currently have data for.
+
+ CGImageSourceStatus frameStatus = CGImageSourceGetStatusAtIndex(m_decoder, index);
+ if (index < frameCount() - 1)
+ return frameStatus >= kCGImageStatusIncomplete;
+
+ return frameStatus == kCGImageStatusComplete;
}
float ImageSource::frameDurationAtIndex(size_t index)
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list