There's no need for the bidi algorithm to be dependent on renderers. We should refactor the bidi algorithm so that a generic BidiClient can be hooked up to it. The bidi algorithm can then return BidiRuns to that client and use the client for iteration and directionality querying. Then the bidi algorithm can move to platform and be taken out of the rendering code.
I guess I forgot all about this bug when I filed bug 14626. I considered the BidiClient approach but ended up using templates because of performance concerns. *** This bug has been marked as a duplicate of 14626 ***