If an ImageDecoder is not yet initialized, m_source.frameCount() returns 0. This does not mean that the frame count is actually 0. So we must set m_haveFrameCount to true only when m_frameCount is not 0.
The current code is okay because BitmapImage::frameCount() is never called before the decoder is initialized. However, this no longer holds true once we introduce parallel image decoders.
Created attachment 151206 [details]
Comment on attachment 151206 [details]
Attachment 151206 [details] did not pass chromium-ews (chromium-xvfb):
New failing tests:
Created attachment 151216 [details]
Archive of layout-test-results from gce-cr-linux-02
The attached test failures were seen while running run-webkit-tests on the chromium-ews.
Bot: gce-cr-linux-02 Port: <class 'webkitpy.common.config.ports.ChromiumXVFBPort'> Platform: Linux-2.6.39-gcg-201203291735-x86_64-with-Ubuntu-10.04-lucid
It seems the failed layout test is not relevant to my patch.
(In reply to comment #4)
> It seems the failed layout test is not relevant to my patch.
In my computer, the test is passed in chromium port.
I wonder if the patch needs to be uploaded again if the layout tests failed due to flakyness.
Committed r122269: <http://trac.webkit.org/changeset/122269>