[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kfm-devel
Subject:    Re: part objects unneccessarily multi-created?
From:       Dirk Mueller <mueller () kde ! org>
Date:       2001-08-03 7:49:41
[Download RAW message or body]

On Fre, 03 Aug 2001, Malte Starostik wrote:

> reaktivate's debug output made me suspucious about multiple instances of 
> KPart objects being created for a single <object> tag.
> RenderPartObject::updateWidget() which calls KHTMLPart::requestObject() to 
> create the part is called from RenderPartObject::close() as well as 
> HTMLEmbedElementImpl::attach() resp. HTMLObjectElementImpl::applyChanges(). 
> What is the reason for this?

No specific one I guess. The reason is that this code is mainly wrong 
designed, as it tries to handle several completely different situations 
with same code. i.e. <OBJECT>, which has child tags and a required 
close-tag, and <EMBED>, which IIRC has no child tags and no associated close 
tag. So you have to call updateWidget() from attach for the <EMBED> tag and 
updateWidget() from close() for the <OBJECT> tag, but both end up in the 
same code and doing nasty things in the opposite case. 

you could try adding an if(id() == ID_EMBED) etc. clause to 
attach()/close() and see what breaks. 

if the part is really regenerated from applyChanges() then thats clearly a 
bug. 


Dirk

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic