зеркало из https://github.com/mozilla/pjs.git
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:
Родитель
5b46c05c40
Коммит
368bcb13cf
|
@ -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;
|
||||
|
@ -684,4 +687,4 @@ NS_IMETHODIMP gfxImageFrameWin::GetAlphaDepth(gfx_depth *aDepth)
|
|||
{
|
||||
*aDepth = mAlphaDepth;
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче