mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1251405
. Part 2. Use 64 bit ints to hold the delay between the current time and the last animation time. r=edwin
When storing ms, 32 bit ints can hold 2^32/1000/60/60/24 ~= 49 days. It's quite conceivable that someone would leave a tab in the background for 50 days.
This commit is contained in:
parent
f0724d93e6
commit
fde95fcc03
@ -192,7 +192,7 @@ FrameAnimator::AdvanceFrame(TimeStamp aTime)
|
||||
if (delay.ToMilliseconds() > loopTime) {
|
||||
// Explicitly use integer division to get the floor of the number of
|
||||
// loops.
|
||||
uint32_t loops = static_cast<uint32_t>(delay.ToMilliseconds()) / loopTime;
|
||||
uint64_t loops = static_cast<uint64_t>(delay.ToMilliseconds()) / loopTime;
|
||||
mCurrentAnimationFrameTime +=
|
||||
TimeDuration::FromMilliseconds(loops * loopTime);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user