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) if (!mInitalized)
return NS_ERROR_NOT_INITIALIZED; return NS_ERROR_NOT_INITIALIZED;
if (mTimeout == 0) // Ensure a minimal time between updates so we don't throttle the UI thread.
*aTimeout = 100; // 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 else
*aTimeout = mTimeout; *aTimeout = mTimeout;
return NS_OK; return NS_OK;
} }

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

@ -401,10 +401,14 @@ NS_IMETHODIMP gfxImageFrame::GetTimeout(PRInt32 *aTimeout)
if (!mInitalized) if (!mInitalized)
return NS_ERROR_NOT_INITIALIZED; return NS_ERROR_NOT_INITIALIZED;
if (mTimeout == 0) // Ensure a minimal time between updates so we don't throttle the UI thread.
*aTimeout = 100; // 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 else
*aTimeout = mTimeout; *aTimeout = mTimeout;
return NS_OK; return NS_OK;
} }

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

@ -478,8 +478,11 @@ NS_IMETHODIMP gfxImageFrameWin::GetTimeout(PRInt32 *aTimeout)
if (!mInitalized) if (!mInitalized)
return NS_ERROR_NOT_INITIALIZED; return NS_ERROR_NOT_INITIALIZED;
if (mTimeout == 0) // Ensure a minimal time between updates so we don't throttle the UI thread.
*aTimeout = 100; // 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 else
*aTimeout = mTimeout; *aTimeout = mTimeout;
return NS_OK; return NS_OK;
@ -684,4 +687,4 @@ NS_IMETHODIMP gfxImageFrameWin::GetAlphaDepth(gfx_depth *aDepth)
{ {
*aDepth = mAlphaDepth; *aDepth = mAlphaDepth;
return NS_OK; return NS_OK;
} }