Title: [122368] trunk/Source/WebCore
- Revision
- 122368
- Author
- [email protected]
- Date
- 2012-07-11 14:03:49 -0700 (Wed, 11 Jul 2012)
Log Message
BitmapImage::frameIsCompleteAtIndex() must return false if ImageDecoder is not initialized.
https://bugs.webkit.org/show_bug.cgi?id=90757
Patch by Huang Dongsung <[email protected]> on 2012-07-11
Reviewed by Simon Fraser.
The current code fortunately has worked so far because only
BitmapImage::startAnimation calls frameIsCompleteAtIndex, and startAnimation
cannot call frameIsCompleteAtIndex if ImageDecoder is not yet initialized.
startAnimation returns at the first line becase shouldAnimate() always return
false in this case.
if (m_frameTimer || !shouldAnimate() || frameCount() <= 1)
return;
This change is needed because parallel image decoders call
BitmapImage::frameIsCompleteAtIndex in other places too.
No new tests, manually tested whether the caller exists or not that
calls BitmapImage::frameIsCompleteAtIndex() before ImageDecoder is
initialized.
* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::frameIsCompleteAtIndex):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (122367 => 122368)
--- trunk/Source/WebCore/ChangeLog 2012-07-11 20:56:41 UTC (rev 122367)
+++ trunk/Source/WebCore/ChangeLog 2012-07-11 21:03:49 UTC (rev 122368)
@@ -1,3 +1,29 @@
+2012-07-11 Huang Dongsung <[email protected]>
+
+ BitmapImage::frameIsCompleteAtIndex() must return false if ImageDecoder is not initialized.
+ https://bugs.webkit.org/show_bug.cgi?id=90757
+
+ Reviewed by Simon Fraser.
+
+ The current code fortunately has worked so far because only
+ BitmapImage::startAnimation calls frameIsCompleteAtIndex, and startAnimation
+ cannot call frameIsCompleteAtIndex if ImageDecoder is not yet initialized.
+ startAnimation returns at the first line becase shouldAnimate() always return
+ false in this case.
+
+ if (m_frameTimer || !shouldAnimate() || frameCount() <= 1)
+ return;
+
+ This change is needed because parallel image decoders call
+ BitmapImage::frameIsCompleteAtIndex in other places too.
+
+ No new tests, manually tested whether the caller exists or not that
+ calls BitmapImage::frameIsCompleteAtIndex() before ImageDecoder is
+ initialized.
+
+ * platform/graphics/BitmapImage.cpp:
+ (WebCore::BitmapImage::frameIsCompleteAtIndex):
+
2012-07-11 Kevin Ollivier <[email protected]>
[wx] Unreviewed build fix. Update code to use the new constant name.
Modified: trunk/Source/WebCore/platform/graphics/BitmapImage.cpp (122367 => 122368)
--- trunk/Source/WebCore/platform/graphics/BitmapImage.cpp 2012-07-11 20:56:41 UTC (rev 122367)
+++ trunk/Source/WebCore/platform/graphics/BitmapImage.cpp 2012-07-11 21:03:49 UTC (rev 122368)
@@ -304,7 +304,7 @@
bool BitmapImage::frameIsCompleteAtIndex(size_t index)
{
if (!ensureFrameIsCached(index))
- return true; // Why would an invalid index return true here?
+ return false;
return m_frames[index].m_isComplete;
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes