SLOT( slotRedirection(KIO::Job*,const KURL&) ) );
d->m_bComplete = false;
+ d->m_bLoadingMainResource = true;
d->m_bLoadEventEmitted = false;
// delete old status bar msg's from kjs (if it _was_ activated on last URL)
return true;
}
+void KHTMLPart::didExplicitOpen()
+{
+ d->m_bComplete = false;
+ d->m_bLoadEventEmitted = false;
+}
+
+
bool KHTMLPart::closeURL()
{
if ( d->m_job )
}
d->m_bComplete = true; // to avoid emitting completed() in slotFinishedParsing() (David)
+ d->m_bLoadingMainResource = false;
d->m_bLoadEventEmitted = true; // don't want that one either
d->m_cachePolicy = KIO::CC_Verify; // Why here?
d->m_cacheId = 0;
d->m_bComplete = false;
d->m_bLoadEventEmitted = false;
+ d->m_bLoadingMainResource = true;
if(url.isValid()) {
#if APPLE_CHANGES
d->m_doc->setRestoreState(args.docState);
#endif
- d->m_doc->openInternal();
- d->m_doc->setParsing(true);
+ d->m_doc->implicitOpen();
// clear widget
if (d->m_view)
d->m_view->resizeContents( 0, 0 );
#if !APPLE_CHANGES
emit d->m_extension->enableAction( "print", true );
#endif
-
- d->m_doc->setParsing(true);
}
void KHTMLPart::write( const char *str, int len )
void KHTMLPart::end()
{
+ d->m_bLoadingMainResource = false;
+ endIfNotLoading();
+}
+
+void KHTMLPart::endIfNotLoading()
+{
+ if (d->m_bLoadingMainResource)
+ return;
+
// make sure nothing's left in there...
if (d->m_decoder)
write(d->m_decoder->flush());
void KHTMLPart::slotFinishedParsing()
{
d->m_doc->setParsing(false);
- disconnect(d->m_doc,SIGNAL(finishedParsing()),this,SLOT(slotFinishedParsing()));
if (!d->m_view)
return; // We are probably being destructed.
d->m_bLoadEventEmitted = true;
d->m_bUnloadEventEmitted = false;
if (d->m_doc)
- d->m_doc->close();
+ d->m_doc->implicitClose();
}
const KHTMLSettings *KHTMLPart::settings() const