Are TextRuns always sorted?

Dirk Mueller mueller at kde.org
Thu Aug 7 21:06:33 CEST 2003


On Don, 07 Aug 2003, Leo Savernik wrote:

> Indirectly, yes. What I'm looking for now is the fastest possible way to map a
> (NodeImpl, offset) pair to the InlineBox containing (I ported this over from 
> safari, see[1]).

I've seen your post. Many thanks for the work, I'll look into it soon. 

> large blocks. But it's much more complicated as expected, because not every 
> RenderObject has an associated InlineBox.

there is not much to win here. without the overhead of maintaining an extra 
index its unlikely that you'll ever be able to implement a binary search for 
that. Linear-search on the paragraph should be fast enough for now. Yes, it 
will be slow for pathological cases, but don't make it a problem before it 
becomes one. To get the selection code up to speed I don't think this has to 
be the fast path. 


-- 
Dirk


More information about the Khtml-devel mailing list