AW: AW: bugfix KHTMLPart::started(KIO::Job *job)
Grimm, Cornelius
grimm at valudo.de
Tue Sep 9 09:05:19 BST 2003
Hi,
I have another bug fix suggestion...
In khtml_part.cpp replace the last line of slotLoaderRequestDone():
< checkCompleted();
with:
> if(d->m_doc && d->m_doc->docLoader() == dl)
> checkCompleted();
That would fix the problem, that sometimes the completed() signal is sent
before the page is completely loaded.
For more information please see my last mail (attached).
Cornelius
> -----Ursprüngliche Nachricht-----
> Von: Grimm, Cornelius
> Gesendet: Dienstag, 2. September 2003 11:17
> An: 'kfm-devel at kde.org'
> Betreff: AW: AW: bugfix KHTMLPart::started(KIO::Job *job)
>
>
> Hi,
>
> > > Now, if "slotLoaderRequestDone()" get's called _before_
> the document
> > > exists, checkComplete does the completion stuff. And the
> document is
> > > created in begin(), which is called when the first piece of
> > data arrives.
> > > This might happen later than the call of
> "slotLoaderRequestDone()".
> >
> > Do you use a user stylesheet? Otherwise I cannot imagine why
> > slotLoaderRequestDone would be called before the document
> > exists, but it
> > would be interesting to find out why and then fix it.
>
> I found out why.
>
> In the init() function of KHTMLPart we connect to the
> requestDone() signal
> of the global loader object returned by khtml::Cache::loader().
>
> So the slot slotLoaderRequestDone() of KHTMLPart gets called
> whenever any
> other request is complete, even in completely different
> KHTMLPart windows
> within this application.
>
> The implementation of slotLoaderRequestDone() should only call
> checkCompleted() if the khtml::DocLoader belongs to this
> KHTMLPart, but I
> don't know how to check this (because the document which
> knows about it's
> loader might be non-existent when the request failed, or not?).
>
> Cornelius
>
More information about the kfm-devel
mailing list