| Index: Source/core/platform/graphics/BitmapImage.cpp
|
| diff --git a/Source/core/platform/graphics/BitmapImage.cpp b/Source/core/platform/graphics/BitmapImage.cpp
|
| index 0e7e1c3528f4ccd51ffbb7dbb2bd3ae7b64ca555..c6c2f8c6da0beaf25adc34aca0302f32540526fa 100644
|
| --- a/Source/core/platform/graphics/BitmapImage.cpp
|
| +++ b/Source/core/platform/graphics/BitmapImage.cpp
|
| @@ -308,16 +308,16 @@ PassNativeImagePtr BitmapImage::frameAtIndex(size_t index)
|
|
|
| bool BitmapImage::frameIsCompleteAtIndex(size_t index)
|
| {
|
| - if (!ensureFrameIsCached(index))
|
| - return false;
|
| - return m_frames[index].m_isComplete;
|
| + if (index < m_frames.size() && m_frames[index].m_haveMetadata && m_frames[index].m_isComplete)
|
| + return true;
|
| + return m_source.frameIsCompleteAtIndex(index);
|
| }
|
|
|
| float BitmapImage::frameDurationAtIndex(size_t index)
|
| {
|
| - if (!ensureFrameIsCached(index))
|
| - return 0;
|
| - return m_frames[index].m_duration;
|
| + if (index < m_frames.size() && m_frames[index].m_haveMetadata)
|
| + return m_frames[index].m_duration;
|
| + return m_source.frameDurationAtIndex(index);
|
| }
|
|
|
| PassNativeImagePtr BitmapImage::nativeImageForCurrentFrame()
|
|
|