Are TextRuns always sorted?
Leo Savernik
l.savernik at aon.at
Thu Aug 14 22:26:28 CEST 2003
Am Donnerstag, 7. August 2003 20:09 schrieb Matt Newell:
[...]
> I've sent this patch before. It fixes one of the problems wrt text
> selection speed. In khtmlPart::htmlMouseMoveEvent, after the selection
> nodes are found, it currently does a linear search from the first node to
> either the end, or the second node, whichever comes first. This means that
> selecting from right to left on a large page causes an unnecessary
> traversal of the tree for every pixel that the mouse is moved. My patch
> finds the first common anscestor of each node, and then iterates through
> its children to see which comes first.
>
> Simply put, the worst case complexity of that function goes from O(n) to
> O(depth of tree).
Could you make this patch available (again), please? I'd like to incorporate
it into khtml.
More information about the Khtml-devel
mailing list