Excessive repainting can slow down page loading/
Created attachment 28273 [details]
This patch has the feature enabled and bunch of debugging printfs
This looks pretty cool. The biggest issue is just catching all of the things that should not be throttled. You caught user events, but I think you need to catch all the ways a page can animate on its own as well. These include:
CSS Animations and Transitions
We have to make sure none of the situations where a page paints itself because of animations end up getting throttled.
Oh, <video> also. <video> shouldn't be throttled while painting either.
Created attachment 28281 [details]
I agree that a desktop targeted version of this should prefer smooth animations over reduces repaints. On slower CPUs the balance is different.
This patch does not enable the delays by default.
Comment on attachment 28281 [details]
This looks fine to me. Can you maybe add a FIXME comment (similar to what you said in the bug) to the place where the constants are defined that this is primarily for mobile devices now, and that we might want to consider a version for the desktop that doesn't throttle animations?
Transmitting file data .......
Committed revision 41431.