bug 125137: set minimum timeout for animations to 100ms to match IE and Opera.

r=pavlov, sr=jst, a=Asa
This commit is contained in:
rjesup%wgate.com 2002-04-09 04:25:22 +00:00
Родитель 5b46c05c40
Коммит 368bcb13cf
3 изменённых файлов: 18 добавлений и 7 удалений

Просмотреть файл

@ -401,10 +401,14 @@ NS_IMETHODIMP gfxImageFrame::GetTimeout(PRInt32 *aTimeout)
if (!mInitalized)
return NS_ERROR_NOT_INITIALIZED;
if (mTimeout == 0)
*aTimeout = 100; // Ensure a minimal time between updates so we don't throttle the UI thread.
// Ensure a minimal time between updates so we don't throttle the UI thread.
// consider 0 == unspecified and make it fast but not too fast.
// 100 is compatible with IE and Opera among others
if (mTimeout >= 0 && mTimeout < 100)
*aTimeout = 100;
else
*aTimeout = mTimeout;
return NS_OK;
}

Просмотреть файл

@ -401,10 +401,14 @@ NS_IMETHODIMP gfxImageFrame::GetTimeout(PRInt32 *aTimeout)
if (!mInitalized)
return NS_ERROR_NOT_INITIALIZED;
if (mTimeout == 0)
*aTimeout = 100; // Ensure a minimal time between updates so we don't throttle the UI thread.
// Ensure a minimal time between updates so we don't throttle the UI thread.
// consider 0 == unspecified and make it fast but not too fast.
// 100 is compatible with IE and Opera among others
if (mTimeout >= 0 && mTimeout < 100)
*aTimeout = 100;
else
*aTimeout = mTimeout;
return NS_OK;
}

Просмотреть файл

@ -478,8 +478,11 @@ NS_IMETHODIMP gfxImageFrameWin::GetTimeout(PRInt32 *aTimeout)
if (!mInitalized)
return NS_ERROR_NOT_INITIALIZED;
if (mTimeout == 0)
*aTimeout = 100; // Ensure a minimal time between updates so we don't throttle the UI thread.
// Ensure a minimal time between updates so we don't throttle the UI thread.
// consider 0 == unspecified and make it fast but not too fast
// 100 is compatible with IE and Opera among others
if (mTimeout >= 0 && mTimeout < 100)
*aTimeout = 100;
else
*aTimeout = mTimeout;
return NS_OK;