Bug 983812 - Center header text based on amount of available space

requestAnimationFrame stress me a little bit. What if an app has no repaint ?