[PATCH] empty text DOM::Node and length

Nicolas Deschildre ndeschildre at kdewebdev.org
Mon Jul 5 19:36:06 BST 2004


On Monday 05 July 2004 19:35, Germain Garand wrote:
> Le Dimanche 04 Juillet 2004 20:08, Nicolas Deschildre a écrit :
> > 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.
>
> it would have some undesirabl
> side effects, thoug
>
> :-)
> :
> > 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.
>
> bidiRun are used to reorder inline objects'content according to the unicode
> bidirectional algorithm rules.
>
> Can you try:
>   sruns->append( new BidiRun(start, (obj->length() ? eor.pos+1 : 0), obj,
> context, dir) );

It fixes the bug, and khtml acts as usual ;-) Thanks!

I guess we can say there is no side effects as AFAIK empty text DOM::Node 
shouldn't exists (except if added manually).

So is it ok to commit?

Nicolas

>
> Greetings,
> Germain




More information about the kfm-devel mailing list