API call to replace parts in html

Kevin Krammer kevin.krammer at gmx.at
Mon May 10 08:40:00 BST 2004


On Monday 10 May 2004 00:09, Carsten Burghardt wrote:
> On Sunday 09 May 2004 12:37, Kevin Krammer wrote:
> > On Friday 07 May 2004 19:53, Carsten Burghardt wrote:
> > > Hi,
> > >
> > > when an email (html page in this case) is displayed in kmail that
> > > contains images and you selected an inline attachment style those
> > > images are displayed. They reference a tmp file (<img
> > > src="file://...>). Now if you use imap and activate load-on-demand
> > > those images exist but are empty. They get loaded one by one and with
> > > each image the email is completely repainted which is extremely ugly.
> >
> > Hmm, how is this handled in Konqueror?
> > KHTML loads images one-by-one as well when being used as the browser.
>
> But it doesn't reload them, doesn't it?

No, don' think so.
But it sounds like a similar situation: at the time the page is loaded the 
images are not available yet, but they get displayed once they are.
Perhaps this only works if the page loading and the image loading uses the 
same IO slave.

> > > So I want khtml to repaint the page once the image is complete so that
> > > it doesn't flicker that much. Is there anything that could be used for
> > > this? Replace the image, tell the node to repaint, tell the complete
> > > page to repaint, ...? A generic approach would be very good as this
> > > might also be used for other parts e.g. text attachments (<div> or <p>
> > > in this case AFAIK).
> >
> > DOM::Node::applyChanges() might work.
>
> OK, but how to get the changes into the page? I think I need something to
> either tell khtml to update the complete page or even better to only reload
> one part.

Maybe DOM::Document::updateRendering() helps.

Hmm, how about skipping the img elements on page creation and inserting them 
once the respective image becomes available?

Cheers,
Kevin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: signature
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20040510/20b0eda8/attachment.sig>


More information about the kfm-devel mailing list