[Mac] ComplexTextController is slow with large numbers of text runs.
<http://webkit.org/b/114875>
<rdar://problem/13337036>

Reviewed by Dan Bernstein.

Instead of iterating over the text runs in indexOfCurrentRun() to figure out the leftmost glyph,
create a lookup table of [run# -> distance in glyphs] at ComplexTextController construction time.

This avoids O(n^2) behavior in indexOfCurrentRun().

* platform/graphics/mac/ComplexTextController.cpp:
(WebCore::ComplexTextController::ComplexTextController):
(WebCore::ComplexTextController::indexOfCurrentRun):
* platform/graphics/mac/ComplexTextController.h:
(ComplexTextController):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148750 268f45cc-cd09-0410-ab3c-d52691b4dbfc