Google Plus and Gmail are recalculating style often when in background tabs
Google Plus and Gmail are recalculating style often when in background tabs

Thanks to Dave Moore for the report.

This was caused by some animation on those pages which we
were servicing often (often 218ms, sometimes more frequently)
in order to send animation events.

This change does not attempt to detect if we have animation events
nor does it stop servicing animations entirely on background tabs
it just throttles how often we do so to 1s (which after discussion
with James Robinson seemed like a reasonable value).

This isn't a complete fix, but should save users a lot of battery
until we can come up with a better fix.

BUG=263669

Review URL: https://chromiumcodereview.appspot.com/22887009

git-svn-id: bf5cd6ccde378db821296732a091cfbcf5285fbd@156123 bbb929c8-8fbe-4397-9dbb-9b2b20218538

Bysmyyr/blink-crosswalk,Bysmyyr/blink-crosswalk,XiaosongWei/blink-crosswalk,Pluto-tv/blink-crosswalk,nwjs/blink,smishenk/blink-crosswalk,crosswalk-project/blink-crosswalk-efl,Bysmyyr/blink-crosswalk,ondra-novak/blink,jtg-gg/blink,jtg-gg/blink,Pluto-tv/blink-crosswalk,crosswalk-project/blink-crosswalk-efl,PeterWangIntel/blink-crosswalk,Bysmyyr/blink-crosswalk,hgl888/blink-crosswalk-efl,kurli/blink-crosswalk,ondra-novak/blink,nwjs/blink,crosswalk-project/blink-crosswalk-efl,XiaosongWei/blink-crosswalk,crosswalk-project/blink-crosswalk-efl,ondra-novak/blink,ondra-novak/blink,jtg-gg/blink,smishenk/blink-crosswalk,hgl888/blink-crosswalk-efl,kurli/blink-crosswalk,hgl888/blink-crosswalk-efl,smishenk/blink-crosswalk,Pluto-tv/blink-crosswalk,smishenk/blink-crosswalk,modulexcite/blink,kurli/blink-crosswalk,hgl888/blink-crosswalk-efl,XiaosongWei/blink-crosswalk,smishenk/blink-crosswalk,nwjs/blink,jtg-gg/blink,Pluto-tv/blink-crosswalk,kurli/blink-crosswalk,modulexcite/blink,PeterWangIntel/blink-crosswalk,ondra-novak/blink,Bysmyyr/blink-crosswalk,Bysmyyr/blink-crosswalk,hgl888/blink-crosswalk-efl,jtg-gg/blink,crosswalk-project/blink-crosswalk-efl,PeterWangIntel/blink-crosswalk,Pluto-tv/blink-crosswalk,ondra-novak/blink,modulexcite/blink,kurli/blink-crosswalk,hgl888/blink-crosswalk-efl,jtg-gg/blink,XiaosongWei/blink-crosswalk,modulexcite/blink,PeterWangIntel/blink-crosswalk,nwjs/blink,nwjs/blink,XiaosongWei/blink-crosswalk,nwjs/blink,crosswalk-project/blink-crosswalk-efl,modulexcite/blink,hgl888/blink-crosswalk-efl,jtg-gg/blink,modulexcite/blink,XiaosongWei/blink-crosswalk,nwjs/blink,Bysmyyr/blink-crosswalk,kurli/blink-crosswalk,Bysmyyr/blink-crosswalk,Pluto-tv/blink-crosswalk,jtg-gg/blink,modulexcite/blink,Pluto-tv/blink-crosswalk,Pluto-tv/blink-crosswalk,nwjs/blink,XiaosongWei/blink-crosswalk,crosswalk-project/blink-crosswalk-efl,modulexcite/blink,PeterWangIntel/blink-crosswalk,nwjs/blink,ondra-novak/blink,modulexcite/blink,XiaosongWei/blink-crosswalk,PeterWangIntel/blink-crosswalk,smishenk/blink-crosswalk,Bysmyyr/blink-crosswalk,smishenk/blink-crosswalk,hgl888/blink-crosswalk-efl,hgl888/blink-crosswalk-efl,hgl888/blink-crosswalk-efl,modulexcite/blink,crosswalk-project/blink-crosswalk-efl,smishenk/blink-crosswalk,XiaosongWei/blink-crosswalk,PeterWangIntel/blink-crosswalk,crosswalk-project/blink-crosswalk-efl,Pluto-tv/blink-crosswalk,kurli/blink-crosswalk,smishenk/blink-crosswalk,PeterWangIntel/blink-crosswalk,ondra-novak/blink,jtg-gg/blink,Pluto-tv/blink-crosswalk,kurli/blink-crosswalk,PeterWangIntel/blink-crosswalk,nwjs/blink,PeterWangIntel/blink-crosswalk,ondra-novak/blink,Bysmyyr/blink-crosswalk,jtg-gg/blink,kurli/blink-crosswalk,kurli/blink-crosswalk,smishenk/blink-crosswalk,XiaosongWei/blink-crosswalk