mozilla/pdf.js — pull request #937 by ironymark (2011-12-14 22:37:03+00:00)
Title: stop canvasRenderTextLayer blocking browser UI

Convert textLayerTimer to use setInterval instead of setTimeout to keep browser responsive while the text selection divs are added to the DOM.

A page with a large amount of text can block the browser for several seconds while the the text selection markup is added to the DOM.

This implementation adds a single div every millisecond so that the browser UI does not block and scrolling remains smooth.