[PATCH] empty text DOM::Node and length

Nicolas Deschildre ndeschildre at kdewebdev.org
Sun Jul 4 20:08:35 BST 2004


hi,

I was hunting a bug on the caret mode which makes a empty text DOM::Node 
(manually inserted, i need this for quanta's VPL) to have _two_ cursor 
positions.
The problem was located in RenderText::maxOffset() which was returning 1 
instead of 0.

After some search, i found that in appendRun() (bidi.cpp:373), the BidiRun was 
created with the wrong second parameter. the following line:
sruns->append( new BidiRun(start, eor.pos + 1, obj, context, dir) );
was the cause : remplacing it by 
sruns->append( new BidiRun(start, eor.pos, obj, context, dir) );
removed the bug.

I am not familiar at all with the khtml internals, i don't even know what 
exactly is  a bidiRun and i guess it is not so easy ;-) The "+1" must be 
needed, and removing it might break things down.

So does someone familiar with this can tell me how far i am from the 
solution? :-)

Thanks

Nicolas




More information about the kfm-devel mailing list