kangax/fabric.js — pull request #1097 by GordoRank (2014-01-14 17:10:54+00:00)
Title: Rewrite renderSelection to only draw once per line

Previously RenderSelection performed a fillRect() command for every character. This resulted in poor performance on large bodies of text. This rewrite calculates the selection box for each line of text and draws a single rectangle for each line, dramatically improving performance.