b=451441; EnableRefresh with IMMEDIATE needs to always call Composite(); r+sr=roc

This commit is contained in:
Vladimir Vukicevic 2008-09-07 23:04:15 -07:00
Родитель a76dd47cd2
Коммит d095922d05
1 изменённых файлов: 6 добавлений и 6 удалений

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

@ -1923,16 +1923,16 @@ NS_IMETHODIMP nsViewManager::EnableRefresh(PRUint32 aUpdateFlags)
mRefreshEnabled = PR_TRUE; mRefreshEnabled = PR_TRUE;
if (!mHasPendingUpdates) {
// Nothing to do
return NS_OK;
}
// nested batching can combine IMMEDIATE with DEFERRED. Favour // nested batching can combine IMMEDIATE with DEFERRED. Favour
// IMMEDIATE over DEFERRED and DEFERRED over NO_SYNC. // IMMEDIATE over DEFERRED and DEFERRED over NO_SYNC. We need to
// check for IMMEDIATE before checking mHasPendingUpdates, because
// the latter might be false as far as gecko is concerned but the OS
// might still have queued up expose events that it hasn't sent yet.
if (aUpdateFlags & NS_VMREFRESH_IMMEDIATE) { if (aUpdateFlags & NS_VMREFRESH_IMMEDIATE) {
FlushPendingInvalidates(); FlushPendingInvalidates();
Composite(); Composite();
} else if (!mHasPendingUpdates) {
// Nothing to do
} else if (aUpdateFlags & NS_VMREFRESH_DEFERRED) { } else if (aUpdateFlags & NS_VMREFRESH_DEFERRED) {
PostInvalidateEvent(); PostInvalidateEvent();
} else { // NO_SYNC } else { // NO_SYNC