Fixed requestAnimationFrame and legend for FF.