diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2010-05-21 12:51:29 (GMT) |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2010-05-21 12:51:29 (GMT) |
commit | d5f3db332292e31ccf430b8267b045e014fae389 (patch) | |
tree | 88db9e8a76967be5d97ad8bad00940e5b95ab703 /src/3rdparty/webkit/WebCore/platform | |
parent | 38b3258d6d00988f63a8384632b1ba99bb84c892 (diff) | |
download | Qt-d5f3db332292e31ccf430b8267b045e014fae389.zip Qt-d5f3db332292e31ccf430b8267b045e014fae389.tar.gz Qt-d5f3db332292e31ccf430b8267b045e014fae389.tar.bz2 |
Updated WebKit from /home/shausman/src/webkit/trunk to qtwebkit/qtwebkit-4.6 ( ecee9d7244ce4f7e7acf723bcef535532780db5f )
Changes in WebKit/qt since the last update:
* [Qt] Nested overflow div does not scroll https://bugs.webkit.org/show_bug.cgi?id=38641
* [Qt] Non animated gifs are animated in QtWebKit https://bugs.webkit.org/show_bug.cgi?id=35955
* [Qt] startAnimation() is not needed to preceede nativeImageForCurrentFrame() https://bugs.webkit.org/show_bug.cgi?id=37844
* Animated GIF images does not animate 10x as expected by default. https://bugs.webkit.org/show_bug.cgi?id=36818
Plus updated/fixed def files
Diffstat (limited to 'src/3rdparty/webkit/WebCore/platform')
-rw-r--r-- | src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageDecoderQt.cpp | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageDecoderQt.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageDecoderQt.cpp index 9bcb3e9..764b240 100644 --- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageDecoderQt.cpp +++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageDecoderQt.cpp @@ -114,8 +114,23 @@ size_t ImageDecoderQt::frameCount() int ImageDecoderQt::repetitionCount() const { - if (m_reader && m_reader->supportsAnimation()) - m_repetitionCount = qMax(0, m_reader->loopCount()); + if (m_reader && m_reader->supportsAnimation()) { + m_repetitionCount = m_reader->loopCount(); + + // Qt and WebCore have a incompatible understanding of + // the loop count and we can not completely map everything. + // Qt | WebCore | description + // -1 | 0 | infinite animation + // 0 | cAnimationLoopOnce | show every frame once + // n | n+1 | Qt returns the # of iterations - 1 + // n/a | cAnimationNone | show only the first frame + if (m_repetitionCount == -1) + m_repetitionCount = 0; + else if (m_repetitionCount == 0) + m_repetitionCount = cAnimationLoopOnce; + else + ++m_repetitionCount; + } return m_repetitionCount; } @@ -188,8 +203,11 @@ void ImageDecoderQt::internalHandleCurrentImage(size_t frameIndex) { // Now get the QImage from Qt and place it in the RGBA32Buffer QImage img; - if (!m_reader->read(&img)) + if (!m_reader->read(&img)) { + frameCount(); + repetitionCount(); return failRead(); + } // now into the RGBA32Buffer - even if the image is not QSize imageSize = img.size(); |