diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2010-06-16 15:26:22 (GMT) |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2010-06-16 15:26:22 (GMT) |
commit | 8e59d3372d9ba18b48ae0b2271fa453332a1ac12 (patch) | |
tree | 61c3801151346b756c89040fa640ab1eb57d5f6e /src/3rdparty/webkit | |
parent | 0b9638476c1a8bad4e33cbd20be1f6ff33935766 (diff) | |
parent | 90f2f19795a46f3ba1d46fd62f1cbe31072c2c53 (diff) | |
download | Qt-8e59d3372d9ba18b48ae0b2271fa453332a1ac12.zip Qt-8e59d3372d9ba18b48ae0b2271fa453332a1ac12.tar.gz Qt-8e59d3372d9ba18b48ae0b2271fa453332a1ac12.tar.bz2 |
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt into qt-4.7-from-4.6
Conflicts:
src/3rdparty/harfbuzz/src/harfbuzz-shaper.h
src/3rdparty/webkit/VERSION
src/3rdparty/webkit/WebCore/ChangeLog
src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageDecoderQt.cpp
src/corelib/global/qglobal.h
src/plugins/qpluginbase.pri
src/qbase.pri
tests/auto/selftests/expected_cmptest.txt
tests/auto/selftests/expected_crashes_3.txt
tests/auto/selftests/expected_longstring.txt
tests/auto/selftests/expected_maxwarnings.txt
tests/auto/selftests/expected_skip.txt
tools/assistant/tools/assistant/doc/assistant.qdocconf
tools/qdoc3/test/assistant.qdocconf
tools/qdoc3/test/designer.qdocconf
tools/qdoc3/test/linguist.qdocconf
tools/qdoc3/test/qmake.qdocconf
tools/qdoc3/test/qt-build-docs.qdocconf
tools/qdoc3/test/qt.qdocconf
Diffstat (limited to 'src/3rdparty/webkit')
-rw-r--r-- | src/3rdparty/webkit/WebCore/platform/graphics/BitmapImage.cpp | 4 | ||||
-rw-r--r-- | src/3rdparty/webkit/WebCore/platform/graphics/ImageSource.h | 17 |
2 files changed, 19 insertions, 2 deletions
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/BitmapImage.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/BitmapImage.cpp index 910d39a..799055d 100644 --- a/src/3rdparty/webkit/WebCore/platform/graphics/BitmapImage.cpp +++ b/src/3rdparty/webkit/WebCore/platform/graphics/BitmapImage.cpp @@ -404,7 +404,9 @@ bool BitmapImage::internalAdvanceAnimation(bool skippingFrames) // Get the repetition count again. If we weren't able to get a // repetition count before, we should have decoded the whole image by // now, so it should now be available. - if (repetitionCount(true) && m_repetitionsComplete >= m_repetitionCount) { + // Note that we don't need to special-case cAnimationLoopOnce here + // because it is 0 (see comments on its declaration in ImageSource.h). + if (repetitionCount(true) != cAnimationLoopInfinite && m_repetitionsComplete > m_repetitionCount) { m_animationFinished = true; m_desiredFrameStartTime = 0; --m_currentFrame; diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/ImageSource.h b/src/3rdparty/webkit/WebCore/platform/graphics/ImageSource.h index 258fd0f..0853d7b 100644 --- a/src/3rdparty/webkit/WebCore/platform/graphics/ImageSource.h +++ b/src/3rdparty/webkit/WebCore/platform/graphics/ImageSource.h @@ -86,7 +86,22 @@ typedef RefPtr<SharedBitmap> NativeImagePtr; #endif #endif -const int cAnimationLoopOnce = -1; +// Right now GIFs are the only recognized image format that supports animation. +// The animation system and the constants below are designed with this in mind. +// GIFs have an optional 16-bit unsigned loop count that describes how an +// animated GIF should be cycled. If the loop count is absent, the animation +// cycles once; if it is 0, the animation cycles infinitely; otherwise the +// animation plays n + 1 cycles (where n is the specified loop count). If the +// GIF decoder defaults to cAnimationLoopOnce in the absence of any loop count +// and translates an explicit "0" loop count to cAnimationLoopInfinite, then we +// get a couple of nice side effects: +// * By making cAnimationLoopOnce be 0, we allow the animation cycling code in +// BitmapImage.cpp to avoid special-casing it, and simply treat all +// non-negative loop counts identically. +// * By making the other two constants negative, we avoid conflicts with any +// real loop count values. +const int cAnimationLoopOnce = 0; +const int cAnimationLoopInfinite = -1; const int cAnimationNone = -2; class ImageSource : public Noncopyable { |