mozilla/pdf.js — pull request #1839 by jviereck (2012-06-23 14:30:35+00:00)
Title: Speedup textLayer creation

Use a canvas to measure the width of the text layer div instead of using the slow offsetWidth property. This patch still adds only one div at the time, but as it's faster, it should be possible to adjust multiple divs at the time.