| Index: Source/core/platform/graphics/BitmapImage.cpp
|
| diff --git a/Source/core/platform/graphics/BitmapImage.cpp b/Source/core/platform/graphics/BitmapImage.cpp
|
| index 119507f93c0b782604984efe6aaf9fbbff5408fa..2f5390b8280360e4dc19f68cf50d2284ba8e2dcd 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()
|
|
|