--- /dev/null
+<html>
+ <head>
+ <link rel="stylesheet" href="fake.css" type="text/css" >
+ <script>
+ if (window.layoutTestController) {
+ layoutTestController.dumpAsText();
+ }
+ function testForm() {
+ if (document.LoginForm)
+ {
+ alert("Test passed: " + document.LoginForm);
+ }
+ else
+ {
+ alert("Test failed: " + document.LoginForm);
+ }
+ }
+ </script>
+ </head>
+
+<body onLoad="testForm();">
+<form name="LoginForm">
+<embed src="" type="application/x-shockwave-flash"></embed>
+</form>
+</body>
+</html>
+2005-05-27 Adele Peterson <adele@apple.com>
+
+ Reviewed by Darin.
+
+ fix for <rdar://problem/4121747> Cannot log into Cingular.com account page (load event delivered while still processing incoming data)
+
+ * khtml/misc/loader.cpp:
+ (DocLoader::DocLoader): Initialized m_loadInProgress to false.
+ (DocLoader::setLoadInProgress): Added.
+ (Loader::slotFinished): sets the m_loadInProgress flag to reflect the fact that we're not really done loading this request until we emit the signal with the request status.
+ (Loader::numRequests): If there's a load in progress, we increment the number of requests so it doesn't seem like the load is done.
+ * khtml/misc/loader.h: (khtml::DocLoader::loadInProgress): Added.
+
+ Test cases added:
+ * layout-tests/fast/loader/loadInProgress.html: Added
+ * layout-tests/fast/loader/loadInProgress-expected.html: Added
+
2005-05-27 Darin Adler <darin@apple.com>
Reviewed by Vicki.
m_showAnimations = KHTMLSettings::KAnimationEnabled;
m_part = part;
m_doc = doc;
+ m_loadInProgress = false;
#if APPLE_CHANGES
Cache::init();
m_docObjects.removeRef( o );
}
+void DocLoader::setLoadInProgress(bool load)
+{
+ m_loadInProgress = load;
+}
+
// ------------------------------------------------------------------------------------------
Loader::Loader() : QObject()
if ( !r )
return;
-
+
if (j->error() || j->isErrorPage())
{
kdDebug(6060) << "Loader::slotFinished, with error. job->error()= " << j->error() << " job->isErrorPage()=" << j->isErrorPage() << endl;
}
else
{
- r->object->data(r->m_buffer, true);
-
+ r->object->data(r->m_buffer, true);
emit requestDone( r->m_docLoader, r->object );
time_t expireDate = j->queryMetaData("expire-date").toLong();
kdDebug(6060) << "Loader::slotFinished, url = " << j->url().url() << " expires " << ctime(&expireDate) << endl;
callback->handleError();
}
else {
+ docLoader->setLoadInProgress(true);
r->object->error( job->error(), job->errorText().ascii() );
+ docLoader->setLoadInProgress(false);
emit requestFailed( docLoader, object );
Cache::removeCacheEntry( object );
}
}
else {
+ docLoader->setLoadInProgress(true);
object->data(r->m_buffer, true);
-
r->object->setAllData(allData);
-
+ docLoader->setLoadInProgress(false);
+
// Let the background image decoder trigger the done signal.
if (!backgroundImageDecoding)
emit requestDone( docLoader, object );
res++;
#endif
+ if (dl->loadInProgress())
+ res++;
+
return res;
}
void setCachePolicy( KIO::CacheControl cachePolicy );
void setShowAnimations( KHTMLSettings::KAnimationAdvice );
void removeCachedObject( CachedObject*) const;
+
+ void setLoadInProgress(bool);
+ bool loadInProgress() const { return m_loadInProgress; }
private:
bool needReload(const KURL &fullUrl);
KHTMLSettings::KAnimationAdvice m_showAnimations : 2;
KHTMLPart* m_part;
DOM::DocumentImpl* m_doc;
+ bool m_loadInProgress;
};
/**