mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
remove '#ifndef REPEATING_TIMERS' code. This was accidentally turned back on in 9/02 after being dead from 12/01, and will now revert to using repeating timers. Affect caret, <blink>, bookmarks & search 'ping'. bug 182141, r+sr=smfr
This commit is contained in:
parent
c7b1659bae
commit
9f319a79e1
@ -1170,10 +1170,6 @@ void nsCaret::CaretBlinkCallback(nsITimer *aTimer, void *aClosure)
|
||||
if (!theCaret) return;
|
||||
|
||||
theCaret->DrawCaret();
|
||||
|
||||
#ifndef REPEATING_TIMERS
|
||||
theCaret->PrimeTimer();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -1170,10 +1170,6 @@ void nsCaret::CaretBlinkCallback(nsITimer *aTimer, void *aClosure)
|
||||
if (!theCaret) return;
|
||||
|
||||
theCaret->DrawCaret();
|
||||
|
||||
#ifndef REPEATING_TIMERS
|
||||
theCaret->PrimeTimer();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -325,13 +325,6 @@ NS_IMETHODIMP nsBlinkTimer::Notify(nsITimer *timer)
|
||||
// in unison.
|
||||
sBlinkTextOff = PRBool(!sBlinkTextOff);
|
||||
|
||||
#ifndef REPEATING_TIMERS
|
||||
// XXX hack to get auto-repeating timers; restart before doing
|
||||
// expensive work so that time between ticks is more even
|
||||
Stop();
|
||||
Start();
|
||||
#endif
|
||||
|
||||
#ifdef NOISY_BLINK
|
||||
PRTime now = PR_Now();
|
||||
char buf[50];
|
||||
|
@ -325,13 +325,6 @@ NS_IMETHODIMP nsBlinkTimer::Notify(nsITimer *timer)
|
||||
// in unison.
|
||||
sBlinkTextOff = PRBool(!sBlinkTextOff);
|
||||
|
||||
#ifndef REPEATING_TIMERS
|
||||
// XXX hack to get auto-repeating timers; restart before doing
|
||||
// expensive work so that time between ticks is more even
|
||||
Stop();
|
||||
Start();
|
||||
#endif
|
||||
|
||||
#ifdef NOISY_BLINK
|
||||
PRTime now = PR_Now();
|
||||
char buf[50];
|
||||
|
@ -328,16 +328,6 @@ nsThrobber::Tick()
|
||||
mWidget->Invalidate(PR_TRUE);
|
||||
mCompletedImages = 0;
|
||||
}
|
||||
|
||||
#ifndef REPEATING_TIMERS
|
||||
|
||||
nsresult rv;
|
||||
mTimer = do_CreateInstance("@mozilla.org/timer;1", &rv);
|
||||
if (NS_OK == rv) {
|
||||
mTimer->InitWithFuncCallback(ThrobTimerCallback, this, 33,
|
||||
nsITimer::TYPE_ONE_SHOT);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
nsresult
|
||||
|
@ -2132,19 +2132,6 @@ else
|
||||
printf("nsBookmarksService::FireTimer - busy pinging.\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef REPEATING_TIMERS
|
||||
if (bmks->mTimer)
|
||||
{
|
||||
bmks->mTimer->Cancel();
|
||||
bmks->mTimer = nsnull;
|
||||
}
|
||||
bmks->mTimer = do_CreateInstance("@mozilla.org/timer;1", &rv);
|
||||
if (NS_FAILED(rv) || (!bmks->mTimer)) return;
|
||||
bmks->mTimer->InitWithFuncCallback(nsBookmarksService::FireTimer, bmks, BOOKMARK_TIMEOUT,
|
||||
nsITimer::TYPE_REPEATING_SLACK);
|
||||
// Note: don't addref "this" as we'll cancel the timer in the nsBookmarkService destructor
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -709,22 +709,6 @@ else
|
||||
printf(" InternetSearchDataSource::FireTimer - busy pinging.\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef REPEATING_TIMERS
|
||||
if (search->mTimer)
|
||||
{
|
||||
search->mTimer->Cancel();
|
||||
search->mTimer = nsnull;
|
||||
}
|
||||
|
||||
nsresult rv;
|
||||
|
||||
search->mTimer = do_CreateInstance("@mozilla.org/timer;1", &rv);
|
||||
if (NS_FAILED(rv) || (!search->mTimer)) return;
|
||||
search->mTimer->InitWithFuncCallback(InternetSearchDataSource::FireTimer, search,
|
||||
SEARCH_UPDATE_TIMEOUT, nsITimer::TYPE_REPEATING_SLACK);
|
||||
// Note: don't addref "this" as we'll cancel the timer in the InternetSearchDataSource destructor
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user