Changeset 122269 in webkit
- Timestamp:
- Jul 10, 2012 3:11:54 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r122268 r122269 1 2012-07-10 Huang Dongsung <luxtella@company100.net> 2 3 Fix a potential bug of BitmapImage::frameCount(). 4 https://bugs.webkit.org/show_bug.cgi?id=90756 5 6 Reviewed by Simon Fraser. 7 8 If an ImageDecoder is not yet initialized, m_source.frameCount() returns 0. This 9 does not mean that the frame count is actually 0. So we must set 10 m_haveFrameCount to true only when m_frameCount is not 0. 11 12 The current code is okay because BitmapImage::frameCount() is never called 13 before the decoder is initialized. However, this no longer holds true once we 14 introduce parallel image decoders. 15 16 No new tests, no behavior change. 17 18 * platform/graphics/BitmapImage.cpp: 19 (WebCore::BitmapImage::frameCount): 20 1 21 2012-07-10 Ojan Vafai <ojan@chromium.org> 2 22 -
trunk/Source/WebCore/platform/graphics/BitmapImage.cpp
r121827 r122269 264 264 { 265 265 if (!m_haveFrameCount) { 266 m_haveFrameCount = true;267 266 m_frameCount = m_source.frameCount(); 268 didDecodeProperties(); 267 // If decoder is not initialized yet, m_source.frameCount() returns 0. 268 if (m_frameCount) { 269 didDecodeProperties(); 270 m_haveFrameCount = true; 271 } 269 272 } 270 273 return m_frameCount;
Note: See TracChangeset
for help on using the changeset viewer.