ASSERTION FAILED: !canAnimate() && !m_currentFrame
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 30 Jun 2017 17:28:20 +0000 (17:28 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 30 Jun 2017 17:28:20 +0000 (17:28 +0000)
commitb4d8b144ec904caa687c9a4b6c8991606615cf81
tree0ac31cf2766b1e4712be178b947b885a92fdffaf
parent5b441a536e6e74b70e88149b2f62cef46e33adf3
ASSERTION FAILED: !canAnimate() && !m_currentFrame
https://bugs.webkit.org/show_bug.cgi?id=173089

Patch by Fujii Hironori <Hironori.Fujii@sony.com> on 2017-06-30
Reviewed by Said Abou-Hallawa.

Source/WebCore:

WebCore::BitmapImage::draw() has an assertion which ensures
m_currentFrame is zero in case of async decoding. But, this
assertion failed if an GIF animation image which have finished its
animation was repainted. In that time, m_currentFrame was the last
frame index of the image.

Test: fast/images/animated-gif-paint-after-animation.html

* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::draw): Assert m_currentFrame is zero or the animation finished.
Call requestFrameAsyncDecodingAtIndex with m_currentFrame instead of zero.

LayoutTests:

* fast/images/animated-gif-paint-after-animation-expected.txt: Added.
* fast/images/animated-gif-paint-after-animation.html: Added.
* fast/images/resources/animated-red-green-1000x1000-repeat-1.gif: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@219003 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/images/animated-gif-paint-after-animation-expected.txt [new file with mode: 0644]
LayoutTests/fast/images/animated-gif-paint-after-animation.html [new file with mode: 0644]
LayoutTests/fast/images/resources/animated-red-green-1000x1000-repeat-1.gif [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/BitmapImage.cpp