patch to bug 82243: cannot dynamically add applets...

Paul Temple paul.temple at gmx.net
Tue Feb 8 00:57:23 GMT 2005


Eventually tracked down that bug and found out - from the 
comments and looking at cvs annotations - that this problem is 
known for a long, long time... Example:

--- <render_block.cpp:v 1.2 2003-04-23 mueller> ---
// We are adding another block child... if the current last child 
is an anonymous box
// then it needs to be closed.
// ### get rid of the closing thing altogether this will only 
work during initial parsing
if (lastChild() && lastChild()->isAnonymous()) {
    lastChild()->close();
}
--- </render_block.cpp> ---

In order to make the applet work, we need to call 
NodeImpl::closeRenderer() after NodeImpl::attach().

I added one such call to NodeBaseImpl::appendChild(..) and yes: 
it worked!

But as the attach() calls are spread all over that file - I think 
the methods appendChild, replaceChild, removeChild and 
insertBefore could share most of their code - we need to add the 
closeRenderer() at least to insertBefore and replaceChild.

Does anyone know if there are any side effects if we add those 
closeRenderer() lines? I'm really new to khtml and don't know 
its structure enough. I suspect this bug would have been fixed a 
long time ago if it really was that easy.




More information about the kfm-devel mailing list