Make ImageFrame::duration() return Seconds instead of float
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 Sep 2017 02:45:32 +0000 (02:45 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 Sep 2017 02:45:32 +0000 (02:45 +0000)
commit4d9182f1e93d88a930c16f2850377645bb60a0bd
treed9751641757027242c07bbf7a0d31ba04840d27f
parent5cccea647bdf5ceaff3c4ceb696edb56c605183e
Make ImageFrame::duration() return Seconds instead of float
https://bugs.webkit.org/show_bug.cgi?id=177103

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2017-09-18
Reviewed by Simon Fraser.

ScalableImageDecoder stores milliseconds for the duration of its ImageFrames.
But ImageFrameCache store seconds for the duration of its ImageFrames.
To fix this issue use Seconds for the ImageFrame duration.

* platform/graphics/BitmapImage.h:
* platform/graphics/ImageDecoder.h:
* platform/graphics/ImageFrame.h:
(WebCore::ImageFrame::setDuration):
(WebCore::ImageFrame::duration const):
* platform/graphics/ImageFrameCache.cpp:
(WebCore::ImageFrameCache::frameDurationAtIndex):
* platform/graphics/ImageFrameCache.h:
* platform/graphics/ImageSource.h:
(WebCore::ImageSource::frameDurationAtIndex):
* platform/graphics/cg/ImageDecoderCG.cpp:
(WebCore::ImageDecoderCG::frameDurationAtIndex const):
* platform/graphics/cg/ImageDecoderCG.h:
* platform/image-decoders/ScalableImageDecoder.cpp:
(WebCore::ScalableImageDecoder::frameDurationAtIndex const):
* platform/image-decoders/ScalableImageDecoder.h:
* platform/image-decoders/gif/GIFImageDecoder.cpp:
(WebCore::GIFImageDecoder::frameComplete):
* platform/image-decoders/png/PNGImageDecoder.cpp:
(WebCore::PNGImageDecoder::readChunks):
(WebCore::PNGImageDecoder::frameHeader): Deleted.
(WebCore::PNGImageDecoder::init): Deleted.
(WebCore::PNGImageDecoder::clearFrameBufferCache): Deleted.
(WebCore::PNGImageDecoder::initFrameBuffer): Deleted.
(WebCore::PNGImageDecoder::frameComplete): Deleted.
(WebCore::PNGImageDecoder::processingStart): Deleted.
(WebCore::PNGImageDecoder::processingFinish): Deleted.
(WebCore::PNGImageDecoder::fallbackNotAnimated): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222196 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/BitmapImage.h
Source/WebCore/platform/graphics/ImageDecoder.h
Source/WebCore/platform/graphics/ImageFrame.h
Source/WebCore/platform/graphics/ImageFrameCache.cpp
Source/WebCore/platform/graphics/ImageFrameCache.h
Source/WebCore/platform/graphics/ImageSource.h
Source/WebCore/platform/graphics/cg/ImageDecoderCG.cpp
Source/WebCore/platform/graphics/cg/ImageDecoderCG.h
Source/WebCore/platform/image-decoders/ScalableImageDecoder.cpp
Source/WebCore/platform/image-decoders/ScalableImageDecoder.h
Source/WebCore/platform/image-decoders/gif/GIFImageDecoder.cpp
Source/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp