Commit Graph

25 Commits

Author SHA1 Message Date
Masayuki Nakano
4a5030c91a Bug 660121 Remove all pref related methods from nsContentUtils r=roc 2011-05-29 08:42:57 +09:00
Masayuki Nakano
7b13fbd2d9 Bug 659536 part.2 Replace nsContentUtils::GetIntPref() with Preferences::GetInt() or Preferences::GetUint() r=roc 2011-05-25 15:32:00 +09:00
Boris Zbarsky
13f47fe406 Bug 652401. Make sure to not have straggling JSContexts on the stack when notifying in the refresh driver. r=smaug 2011-05-05 12:26:32 -04:00
Boris Zbarsky
2d337f0522 Bug 650379. Add a new XPCOM timer type that is like TYPE_REPEATING_PRECISE but does not swamp the event queue if the callback takes longer than the timer interval to run. r=cjones, sr=brendan
This implements proposal 3 from bug 650379 comment 13.  The main difference
between TYPE_REPEATING_PRECISE and TYPE_REPEATING_PRECISE_CAN_SKIP is to not
AddTimer the REPEATING_PRECISE_CAN_SKIP timer until after the callback has run;
this guarantees that no more timer events will be posted until after the
callback finishes executing.  A secondary change is to make
REPEATING_PRECISE_CAN_SKIP timers advance their firing time to mDelay from when
PostTimerEvent is called, not mDelay from the old mTimeout.  While this arguably
makes them less precise, the alternative is that if a timer is significantly
delayed for some reason (e.g. because the user puts the computer to sleep for a
while) it will then fire a whole bunch of times to "catch up" to where it's
supposed to be, advancing its firing time by mDelay at a time.  That seems
undesirable.

An alternate approach would have been to readd the timer from inside
PostTimerEvent, but only if we're not in the middle of firing the timer. That
would allow more precise timers in the case when the callback is not taking too
long, but still handle gracefully the case when the callback is
slow. Unfortunately this falls down if something _else_ is hogging the main
thread event loop (e.g. some other timer has a slow callback, or whatever); in
that case we would post multiple events for the one precise timer while the
event-loop-hogging operation is running. So I don't think we should do that.
2011-04-28 19:33:52 -04:00
L. David Baron
2eabd34794 Ensure nsRefreshDriver::MostRecentRefresh tells the truth even when we stop and restart timers. (Bug 650469) r=bzbarsky 2011-04-21 20:17:32 -07:00
L. David Baron
d39d3c28e6 Add interface for taking over the refresh driver in a test (i.e., mocking time). (Bug 435442, patch 9) r=bzbarsky 2011-04-11 23:18:43 -07:00
Boris Zbarsky
39339055a9 Bug 645943. Initialize mLastTimerInterval correctly. r=dbaron 2011-03-29 00:41:01 -04:00
Boris Zbarsky
7a05c2134d Bug 642717. Hold strong references to our MozBeforePaint event targets. r=roc 2011-03-28 10:49:48 -04:00
Boris Zbarsky
c47cc5c95d Bug 630127. Use a precise timer when we have animation frame callbacks. r=dbaron 2011-03-07 11:58:48 -05:00
Boris Zbarsky
7e0fe6f823 Bug 614733. Do exponential backoff on throttled refresh drivers. r=dbaron 2011-03-04 10:27:02 -05:00
Ehsan Akhgari
d6ce0afef0 Bug 598726 - Prevent hangs in the refresh driver due to outstanding restyles on the same pres shell after processing the pending restyles on it; r=bzbarsky a=blocking-final+ 2011-01-14 15:03:06 -05:00
Boris Zbarsky
b0c0705ee9 588174. Make it possible to pass an explicit callback function to mozRequestAnimationFrame. r=roc, sr=dbaron 2010-09-09 01:38:04 -04:00
Boris Zbarsky
6f3192a88a Bug 586201. Throttle refresh drivers in background tabs. r=roc, a=roc 2010-08-27 00:26:23 -04:00
Robert O'Callahan
ee8bdd0d70 Bug 587887. Create pref for refresh driver timer, and make it 60Hz by default. r=dbaron,a=bsmedberg 2010-08-23 21:30:08 +12:00
Boris Zbarsky
6fc9d4f89d Bug 569520 part 2. Implement a mozRequestAnimationFrame/mozAnimationStartTime API. r=roc, a=joe 2010-08-11 17:05:28 -04:00
Boris Zbarsky
75b9e08789 Bug 577607 part 2. Teach the refresh driver to flush restyles and reflow on more than one presshell. r=roc 2010-08-11 17:05:27 -04:00
Robert O'Callahan
19a4e37ac9 Backed out changeset 0c4519d63a98 2010-08-12 11:32:21 +12:00
Boris Zbarsky
cfd42187e4 Bug 577607 part 2. Teach the refresh driver to flush restyles and reflow on more than one presshell. r=roc 2010-08-11 17:05:27 -04:00
Ben Newman
bd232d2cb8 Replace direct instantiations of nsRunnableMethod with calls to the templatized NS_NewRunnableMethod function (part 3/3 of bug 558498). r=dwitte sr=dbaron 2010-04-20 16:21:35 -07:00
Boris Zbarsky
22e26321c0 Bug 538087. Hook up reflow to refresh driver. r=dbaron 2010-02-19 12:11:40 -05:00
Boris Zbarsky
ccbbce9e7e Bug 540531. Freeze the refresh driver when a page goes into bfcache. r=dbaron 2010-02-03 16:17:55 -05:00
Boris Zbarsky
475566b4d4 Bug 528306 part 1. Don't stop the refresh driver timer on observer removal; instead just stop it if it fires when there are no observers. r=dbaron 2009-12-31 14:07:57 -05:00
L. David Baron
0d65365453 Make nsRefreshDriver hold a reference to its observers while notifying them. (Bug 531585) r=bzbarsky 2009-12-21 16:46:25 -05:00
L. David Baron
16f3a3a5b5 Make nsRefreshDriver reference-counted instead of being a sub-object of the pres context. (Bug 531585) r=bzbarsky 2009-12-21 16:46:24 -05:00
L. David Baron
2ccbe80f89 Implement CSS transitions: handle starting and animation of the transitions. (Bug 435441) r=bzbarsky sr=roc 2009-10-07 20:22:42 -07:00