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>
This commit is contained in:
Mark Page
2016-11-30 12:06:55 +00:00
committed by Caolán McNamara
parent 51b6a7c87b
commit 5a20df55ff

View File

@@ -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 )