tdf#104121 Set default animation playback speed to match browsers

Change-Id: Id4814c4fa965ea5c4f73931be171294bed258909
Reviewed-on: https://gerrit.libreoffice.org/31416
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
diff --git a/vcl/source/filter/igif/gifread.cxx b/vcl/source/filter/igif/gifread.cxx
index 3c98628..4cd2994 100644
--- a/vcl/source/filter/igif/gifread.cxx
+++ b/vcl/source/filter/igif/gifread.cxx
@@ -630,6 +630,11 @@ void GIFReader::CreateNewBitmaps()
    aAnimBmp.nWait = ( nTimer != 65535 ) ? nTimer : ANIMATION_TIMEOUT_ON_CLICK;
    aAnimBmp.bUserInput = false;

    // tdf#104121 . Internet Explorer, Firefox, Chrome and Safari all set a minimum default playback speed.
    // IE10 Consumer Preview sets default of 100ms for rates less that 20ms. We do the same
    if (aAnimBmp.nWait < 2) // 20ms, specified in 100's of a second
        aAnimBmp.nWait = 10;

    if( nGCDisposalMethod == 2 )
        aAnimBmp.eDisposal = Disposal::Back;
    else if( nGCDisposalMethod == 3 )