[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

rjw rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 05:59:33 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit d5e576a550ee83fcb60a43583ca225b1934615ab
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Mar 29 23:05:50 2002 +0000

            More fixes for cancelling.  Fixed some code that appears to have been
            mis-merged after the KDE 3 beta 2 landing.
    
            Fixes for cancelling.  Still need to think about a better
            solution than putting data sources in stopped mode.
    
            Temporary bandaid to get past extra release crasher.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@899 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index 3e74204..b75e7cf 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,10 @@
+2002-03-29  Richard Williamson  <rjw at apple.com>
+
+        More fixes for cancelling.  Fixed some code that appears to have been
+        mis-merged after the KDE 3 beta 2 landing.
+        
+	* src/kwq/KWQKloader.mm: (-[URLLoadClient initWithLoader:dataSource:])
+
 2002-03-29  Darin Adler  <darin at apple.com>
 
 	* src/kwq/KWQKloader.mm: (Cache::getStatistics), (Cache::flushAll):
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 3e74204..b75e7cf 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,10 @@
+2002-03-29  Richard Williamson  <rjw at apple.com>
+
+        More fixes for cancelling.  Fixed some code that appears to have been
+        mis-merged after the KDE 3 beta 2 landing.
+        
+	* src/kwq/KWQKloader.mm: (-[URLLoadClient initWithLoader:dataSource:])
+
 2002-03-29  Darin Adler  <darin at apple.com>
 
 	* src/kwq/KWQKloader.mm: (Cache::getStatistics), (Cache::flushAll):
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 3e74204..b75e7cf 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,10 @@
+2002-03-29  Richard Williamson  <rjw at apple.com>
+
+        More fixes for cancelling.  Fixed some code that appears to have been
+        mis-merged after the KDE 3 beta 2 landing.
+        
+	* src/kwq/KWQKloader.mm: (-[URLLoadClient initWithLoader:dataSource:])
+
 2002-03-29  Darin Adler  <darin at apple.com>
 
 	* src/kwq/KWQKloader.mm: (Cache::getStatistics), (Cache::flushAll):
diff --git a/WebCore/kwq/KWQKloader.mm b/WebCore/kwq/KWQKloader.mm
index e73bf57..15eea98 100644
--- a/WebCore/kwq/KWQKloader.mm
+++ b/WebCore/kwq/KWQKloader.mm
@@ -1006,13 +1006,19 @@ void DocLoader::removeCachedObject( CachedObject* o ) const
 {
     if ((self = [super init])) {
         m_loader = loader;
-        m_dataSource = dataSource;
+        m_dataSource = [dataSource retain];
         return self;
     }
     
     return nil;
 }
 
+- (void)dealloc
+{
+    [m_dataSource autorelease];
+    [super dealloc];
+}
+
 - (void)IFURLHandleResourceDidBeginLoading:(IFURLHandle *)sender
 {
     void *userData;
@@ -1176,39 +1182,22 @@ Loader::~Loader()
 #endif
 }
 
-#if APPLE_CHANGES
-// FIXME!  Clients need to be released when document is completely loaded.
-static NSMutableDictionary *clientForDocument = 0;
-#endif
 
 void Loader::load(DocLoader* dl, CachedObject *object, bool incremental = true)
 {
     Request *req = new Request(dl, object, incremental);
 
 #if APPLE_CHANGES
-    // All loads associated with a particular baseURL should share the same
-    // URLHandleClient.
     id client;
     
-    if (clientForDocument == 0)
-        clientForDocument = [[NSMutableDictionary alloc] init];
-    
-    // FIXME!  We need to remove cached clients when data source goes away.
     id dataSource = ((KHTMLPart *)(((DocLoader *)(object->loader()))->part()))->getDataSource();
-    NSNumber *key = [NSNumber numberWithUnsignedInt: (unsigned int)dataSource];
-    client = [clientForDocument objectForKey: key];
-    if (client == nil){
-        KWQDEBUGLEVEL2 (KWQ_LOG_LOADING, "Creating client for dataSource 0x%08x, url %s\n", dataSource, object->url().string().latin1());
-        client = [[[URLLoadClient alloc] initWithLoader:this dataSource: dataSource] autorelease];
-        [clientForDocument setObject: client forKey: key];
-    }
+    client = [[[URLLoadClient alloc] initWithLoader:this dataSource: dataSource] autorelease];
     req->client = client;
 #endif
 
     m_requestsPending.append(req);
     
-#if APPLE_CHANGES
-#else
+#ifndef APPLE_CHANGES
     emit requestStarted( req->m_docLoader, req->object );
 #endif
 
diff --git a/WebCore/kwq/KWQLoader.mm b/WebCore/kwq/KWQLoader.mm
index e73bf57..15eea98 100644
--- a/WebCore/kwq/KWQLoader.mm
+++ b/WebCore/kwq/KWQLoader.mm
@@ -1006,13 +1006,19 @@ void DocLoader::removeCachedObject( CachedObject* o ) const
 {
     if ((self = [super init])) {
         m_loader = loader;
-        m_dataSource = dataSource;
+        m_dataSource = [dataSource retain];
         return self;
     }
     
     return nil;
 }
 
+- (void)dealloc
+{
+    [m_dataSource autorelease];
+    [super dealloc];
+}
+
 - (void)IFURLHandleResourceDidBeginLoading:(IFURLHandle *)sender
 {
     void *userData;
@@ -1176,39 +1182,22 @@ Loader::~Loader()
 #endif
 }
 
-#if APPLE_CHANGES
-// FIXME!  Clients need to be released when document is completely loaded.
-static NSMutableDictionary *clientForDocument = 0;
-#endif
 
 void Loader::load(DocLoader* dl, CachedObject *object, bool incremental = true)
 {
     Request *req = new Request(dl, object, incremental);
 
 #if APPLE_CHANGES
-    // All loads associated with a particular baseURL should share the same
-    // URLHandleClient.
     id client;
     
-    if (clientForDocument == 0)
-        clientForDocument = [[NSMutableDictionary alloc] init];
-    
-    // FIXME!  We need to remove cached clients when data source goes away.
     id dataSource = ((KHTMLPart *)(((DocLoader *)(object->loader()))->part()))->getDataSource();
-    NSNumber *key = [NSNumber numberWithUnsignedInt: (unsigned int)dataSource];
-    client = [clientForDocument objectForKey: key];
-    if (client == nil){
-        KWQDEBUGLEVEL2 (KWQ_LOG_LOADING, "Creating client for dataSource 0x%08x, url %s\n", dataSource, object->url().string().latin1());
-        client = [[[URLLoadClient alloc] initWithLoader:this dataSource: dataSource] autorelease];
-        [clientForDocument setObject: client forKey: key];
-    }
+    client = [[[URLLoadClient alloc] initWithLoader:this dataSource: dataSource] autorelease];
     req->client = client;
 #endif
 
     m_requestsPending.append(req);
     
-#if APPLE_CHANGES
-#else
+#ifndef APPLE_CHANGES
     emit requestStarted( req->m_docLoader, req->object );
 #endif
 
diff --git a/WebCore/kwq/KWQLoaderImpl.mm b/WebCore/kwq/KWQLoaderImpl.mm
index e73bf57..15eea98 100644
--- a/WebCore/kwq/KWQLoaderImpl.mm
+++ b/WebCore/kwq/KWQLoaderImpl.mm
@@ -1006,13 +1006,19 @@ void DocLoader::removeCachedObject( CachedObject* o ) const
 {
     if ((self = [super init])) {
         m_loader = loader;
-        m_dataSource = dataSource;
+        m_dataSource = [dataSource retain];
         return self;
     }
     
     return nil;
 }
 
+- (void)dealloc
+{
+    [m_dataSource autorelease];
+    [super dealloc];
+}
+
 - (void)IFURLHandleResourceDidBeginLoading:(IFURLHandle *)sender
 {
     void *userData;
@@ -1176,39 +1182,22 @@ Loader::~Loader()
 #endif
 }
 
-#if APPLE_CHANGES
-// FIXME!  Clients need to be released when document is completely loaded.
-static NSMutableDictionary *clientForDocument = 0;
-#endif
 
 void Loader::load(DocLoader* dl, CachedObject *object, bool incremental = true)
 {
     Request *req = new Request(dl, object, incremental);
 
 #if APPLE_CHANGES
-    // All loads associated with a particular baseURL should share the same
-    // URLHandleClient.
     id client;
     
-    if (clientForDocument == 0)
-        clientForDocument = [[NSMutableDictionary alloc] init];
-    
-    // FIXME!  We need to remove cached clients when data source goes away.
     id dataSource = ((KHTMLPart *)(((DocLoader *)(object->loader()))->part()))->getDataSource();
-    NSNumber *key = [NSNumber numberWithUnsignedInt: (unsigned int)dataSource];
-    client = [clientForDocument objectForKey: key];
-    if (client == nil){
-        KWQDEBUGLEVEL2 (KWQ_LOG_LOADING, "Creating client for dataSource 0x%08x, url %s\n", dataSource, object->url().string().latin1());
-        client = [[[URLLoadClient alloc] initWithLoader:this dataSource: dataSource] autorelease];
-        [clientForDocument setObject: client forKey: key];
-    }
+    client = [[[URLLoadClient alloc] initWithLoader:this dataSource: dataSource] autorelease];
     req->client = client;
 #endif
 
     m_requestsPending.append(req);
     
-#if APPLE_CHANGES
-#else
+#ifndef APPLE_CHANGES
     emit requestStarted( req->m_docLoader, req->object );
 #endif
 
diff --git a/WebCore/src/kwq/KWQKloader.mm b/WebCore/src/kwq/KWQKloader.mm
index e73bf57..15eea98 100644
--- a/WebCore/src/kwq/KWQKloader.mm
+++ b/WebCore/src/kwq/KWQKloader.mm
@@ -1006,13 +1006,19 @@ void DocLoader::removeCachedObject( CachedObject* o ) const
 {
     if ((self = [super init])) {
         m_loader = loader;
-        m_dataSource = dataSource;
+        m_dataSource = [dataSource retain];
         return self;
     }
     
     return nil;
 }
 
+- (void)dealloc
+{
+    [m_dataSource autorelease];
+    [super dealloc];
+}
+
 - (void)IFURLHandleResourceDidBeginLoading:(IFURLHandle *)sender
 {
     void *userData;
@@ -1176,39 +1182,22 @@ Loader::~Loader()
 #endif
 }
 
-#if APPLE_CHANGES
-// FIXME!  Clients need to be released when document is completely loaded.
-static NSMutableDictionary *clientForDocument = 0;
-#endif
 
 void Loader::load(DocLoader* dl, CachedObject *object, bool incremental = true)
 {
     Request *req = new Request(dl, object, incremental);
 
 #if APPLE_CHANGES
-    // All loads associated with a particular baseURL should share the same
-    // URLHandleClient.
     id client;
     
-    if (clientForDocument == 0)
-        clientForDocument = [[NSMutableDictionary alloc] init];
-    
-    // FIXME!  We need to remove cached clients when data source goes away.
     id dataSource = ((KHTMLPart *)(((DocLoader *)(object->loader()))->part()))->getDataSource();
-    NSNumber *key = [NSNumber numberWithUnsignedInt: (unsigned int)dataSource];
-    client = [clientForDocument objectForKey: key];
-    if (client == nil){
-        KWQDEBUGLEVEL2 (KWQ_LOG_LOADING, "Creating client for dataSource 0x%08x, url %s\n", dataSource, object->url().string().latin1());
-        client = [[[URLLoadClient alloc] initWithLoader:this dataSource: dataSource] autorelease];
-        [clientForDocument setObject: client forKey: key];
-    }
+    client = [[[URLLoadClient alloc] initWithLoader:this dataSource: dataSource] autorelease];
     req->client = client;
 #endif
 
     m_requestsPending.append(req);
     
-#if APPLE_CHANGES
-#else
+#ifndef APPLE_CHANGES
     emit requestStarted( req->m_docLoader, req->object );
 #endif
 
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 7bbaf1a..47981c7 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,5 +1,21 @@
 2002-03-29  Richard Williamson  <rjw at apple.com>
 
+        Fixes for cancelling.  Still need to think about a better
+        solution than putting data sources in stopped mode.
+        
+	* WebView.subproj/IFBaseWebControllerPrivate.mm: (-[IFBaseWebController
+	_receivedProgress:forResource:fromDataSource:]), (-[IFBaseWebController
+	_mainReceivedProgress:forResource:fromDataSource:]), (-[IFBaseWebController
+	_receivedError:forResource:partialProgress:fromDataSource:]),
+	(-[IFBaseWebController
+	_mainReceivedError:forResource:partialProgress:fromDataSource:]):
+	* WebView.subproj/IFWebDataSourcePrivate.h:
+	* WebView.subproj/IFWebDataSourcePrivate.mm: (-[IFWebDataSource _startLoading:]),
+	(-[IFWebDataSource _isStopping]), (-[IFWebDataSource _stopLoading]):
+	* WebView.subproj/IFWebFrame.mm: (-[IFWebFrame setProvisionalDataSource:]):
+
+2002-03-29  Richard Williamson  <rjw at apple.com>
+
         Hooked up redirect.  Now we see many more ads.  :(
         Fixed cancel of main handle for document.
         Moved stop before start from frame to data source.
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 7bbaf1a..47981c7 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,5 +1,21 @@
 2002-03-29  Richard Williamson  <rjw at apple.com>
 
+        Fixes for cancelling.  Still need to think about a better
+        solution than putting data sources in stopped mode.
+        
+	* WebView.subproj/IFBaseWebControllerPrivate.mm: (-[IFBaseWebController
+	_receivedProgress:forResource:fromDataSource:]), (-[IFBaseWebController
+	_mainReceivedProgress:forResource:fromDataSource:]), (-[IFBaseWebController
+	_receivedError:forResource:partialProgress:fromDataSource:]),
+	(-[IFBaseWebController
+	_mainReceivedError:forResource:partialProgress:fromDataSource:]):
+	* WebView.subproj/IFWebDataSourcePrivate.h:
+	* WebView.subproj/IFWebDataSourcePrivate.mm: (-[IFWebDataSource _startLoading:]),
+	(-[IFWebDataSource _isStopping]), (-[IFWebDataSource _stopLoading]):
+	* WebView.subproj/IFWebFrame.mm: (-[IFWebFrame setProvisionalDataSource:]):
+
+2002-03-29  Richard Williamson  <rjw at apple.com>
+
         Hooked up redirect.  Now we see many more ads.  :(
         Fixed cancel of main handle for document.
         Moved stop before start from frame to data source.
diff --git a/WebKit/WebView.subproj/IFBaseWebControllerPrivate.mm b/WebKit/WebView.subproj/IFBaseWebControllerPrivate.mm
index 825cdf2..f58b707 100644
--- a/WebKit/WebView.subproj/IFBaseWebControllerPrivate.mm
+++ b/WebKit/WebView.subproj/IFBaseWebControllerPrivate.mm
@@ -7,6 +7,7 @@
 #import <WebKit/IFWebViewPrivate.h>
 #import <WebKit/IFWebFramePrivate.h>
 #import <WebKit/IFPreferencesPrivate.h>
+#import <WebKit/IFError.h>
 
 #include <KWQKHTMLPart.h>
 #include <rendering/render_frames.h>
@@ -39,14 +40,21 @@
     IFWebFrame *frame = [dataSource frame];
     
     WEBKIT_ASSERT (dataSource != nil);
-    WEBKIT_ASSERT (frame != nil);
 
     [self receivedProgress: progress forResource: resourceDescription fromDataSource: dataSource];
-
+    
+    if (progress->bytesSoFar == -1 && progress->totalToLoad == -1){
+	WEBKITDEBUGLEVEL1 (WEBKIT_LOG_LOADING, "cancelled resource = %s\n", [[[dataSource inputURL] absoluteString] cString]);
+        if (frame != nil)
+            [frame _checkLoadCompleteResource: resourceDescription error: [[[IFError alloc] initWithErrorCode: IFURLHandleResultCancelled] autorelease] isMainDocument: NO];
+        return;
+    }
     // This resouce has completed, so check if the load is complete for all frames.
-    if (progress->bytesSoFar == progress->totalToLoad){
-        [frame _transitionProvisionalToLayoutAcceptable];
-        [frame _checkLoadCompleteResource: resourceDescription error: nil isMainDocument: NO];
+    else if (progress->bytesSoFar == progress->totalToLoad){
+        if (frame != nil){
+            [frame _transitionProvisionalToLayoutAcceptable];
+            [frame _checkLoadCompleteResource: resourceDescription error: nil isMainDocument: NO];
+        }
     }
 }
 
@@ -55,14 +63,20 @@
     IFWebFrame *frame = [dataSource frame];
     
     WEBKIT_ASSERT (dataSource != nil);
-    WEBKIT_ASSERT (frame != nil);
 
     [self receivedProgress: progress forResource: resourceDescription fromDataSource: dataSource];
 
     if (progress->bytesSoFar == -1 && progress->totalToLoad == -1){
 	WEBKITDEBUGLEVEL1 (WEBKIT_LOG_LOADING, "cancelled resource = %s\n", [[[dataSource inputURL] absoluteString] cString]);
+        [dataSource _setPrimaryLoadComplete: YES];
+        if (frame != nil);
+            [frame _checkLoadCompleteResource: resourceDescription error: [[[IFError alloc] initWithErrorCode: IFURLHandleResultCancelled] autorelease] isMainDocument: YES];
+        return;
     }
 
+    if (frame == nil)
+        return;
+        
     // Check to see if this is these are the first bits of a provisional data source,
     // if so we need to transition the data source from provisional to committed.
     if([frame provisionalDataSource] == dataSource){
@@ -91,10 +105,13 @@
 {
     IFWebFrame *frame = [dataSource frame];
 
-    WEBKIT_ASSERT (frame != nil);
-
     [self receivedError: error forResource: resourceDescription partialProgress: progress fromDataSource: dataSource];
+
+    if ([dataSource _isStopping])
+        return;
     
+    WEBKIT_ASSERT (frame != nil);
+
     [frame _checkLoadCompleteResource: resourceDescription error: error isMainDocument: NO];
 }
 
@@ -103,10 +120,13 @@
 {
     IFWebFrame *frame = [dataSource frame];
 
-    WEBKIT_ASSERT (frame != nil);
-
     [self receivedError: error forResource: resourceDescription partialProgress: progress fromDataSource: dataSource];
     
+    if ([dataSource _isStopping])
+        return;
+    
+    WEBKIT_ASSERT (frame != nil);
+
     [dataSource _setPrimaryLoadComplete: YES];
 
     [frame _checkLoadCompleteResource: resourceDescription error: error isMainDocument: YES];
diff --git a/WebKit/WebView.subproj/IFWebDataSourcePrivate.h b/WebKit/WebView.subproj/IFWebDataSourcePrivate.h
index fb4b4be..63f8c12 100644
--- a/WebKit/WebView.subproj/IFWebDataSourcePrivate.h
+++ b/WebKit/WebView.subproj/IFWebDataSourcePrivate.h
@@ -46,6 +46,8 @@
     double loadingStartedTime;
     
     bool primaryLoadComplete;
+    
+    bool stopping;
 }
 
 - init;
@@ -60,6 +62,7 @@
 - (void)_startLoading: (BOOL)forceRefresh;
 
 - (void)_stopLoading;
+- (BOOL)_isStopping;
 - (void)_recursiveStopLoading;
 - (void)_addURLHandle: (IFURLHandle *)handle;
 - (void)_removeURLHandle: (IFURLHandle *)handle;
diff --git a/WebKit/WebView.subproj/IFWebDataSourcePrivate.mm b/WebKit/WebView.subproj/IFWebDataSourcePrivate.mm
index 4aa626b..aa0fe2d 100644
--- a/WebKit/WebView.subproj/IFWebDataSourcePrivate.mm
+++ b/WebKit/WebView.subproj/IFWebDataSourcePrivate.mm
@@ -85,8 +85,7 @@
     NSURL *theURL;
     KURL url = [[[self inputURL] absoluteString] cString];
 
-    // Stop loading any previous loads that may be currently active.
-    [self stopLoading];
+    WEBKIT_ASSERT ([self _isStopping] == NO);
     
     [self _setPrimaryLoadComplete: NO];
     
@@ -138,12 +137,20 @@
     [data->urlHandles removeObject: handle];
 }
 
+- (BOOL)_isStopping
+{
+    IFWebDataSourcePrivate *data = (IFWebDataSourcePrivate *)_dataSourcePrivate;
+    return data->stopping;
+}
+
 - (void)_stopLoading
 {
     IFWebDataSourcePrivate *data = (IFWebDataSourcePrivate *)_dataSourcePrivate;
     int i, count;
     IFURLHandle *handle;
 
+    data->stopping = YES;
+    
     [data->mainHandle cancelLoadInBackground];
     
     // Tell all handles to stop loading.
diff --git a/WebKit/WebView.subproj/IFWebFrame.mm b/WebKit/WebView.subproj/IFWebFrame.mm
index 63ae1a2..66f200a 100644
--- a/WebKit/WebView.subproj/IFWebFrame.mm
+++ b/WebKit/WebView.subproj/IFWebFrame.mm
@@ -118,6 +118,10 @@
     // KDE drop we should fix this dependency.
     WEBKIT_ASSERT ([self view] != nil);
 
+    if ([self _state] != IFWEBFRAMESTATE_COMPLETE){
+        [self stopLoading];
+    }
+    
     if (newDataSource != nil){
         if (![[self controller] locationWillChangeTo: [newDataSource inputURL] forFrame: self])
             return NO;
diff --git a/WebKit/WebView.subproj/WebDataSourcePrivate.h b/WebKit/WebView.subproj/WebDataSourcePrivate.h
index fb4b4be..63f8c12 100644
--- a/WebKit/WebView.subproj/WebDataSourcePrivate.h
+++ b/WebKit/WebView.subproj/WebDataSourcePrivate.h
@@ -46,6 +46,8 @@
     double loadingStartedTime;
     
     bool primaryLoadComplete;
+    
+    bool stopping;
 }
 
 - init;
@@ -60,6 +62,7 @@
 - (void)_startLoading: (BOOL)forceRefresh;
 
 - (void)_stopLoading;
+- (BOOL)_isStopping;
 - (void)_recursiveStopLoading;
 - (void)_addURLHandle: (IFURLHandle *)handle;
 - (void)_removeURLHandle: (IFURLHandle *)handle;
diff --git a/WebKit/WebView.subproj/WebDataSourcePrivate.m b/WebKit/WebView.subproj/WebDataSourcePrivate.m
index 4aa626b..aa0fe2d 100644
--- a/WebKit/WebView.subproj/WebDataSourcePrivate.m
+++ b/WebKit/WebView.subproj/WebDataSourcePrivate.m
@@ -85,8 +85,7 @@
     NSURL *theURL;
     KURL url = [[[self inputURL] absoluteString] cString];
 
-    // Stop loading any previous loads that may be currently active.
-    [self stopLoading];
+    WEBKIT_ASSERT ([self _isStopping] == NO);
     
     [self _setPrimaryLoadComplete: NO];
     
@@ -138,12 +137,20 @@
     [data->urlHandles removeObject: handle];
 }
 
+- (BOOL)_isStopping
+{
+    IFWebDataSourcePrivate *data = (IFWebDataSourcePrivate *)_dataSourcePrivate;
+    return data->stopping;
+}
+
 - (void)_stopLoading
 {
     IFWebDataSourcePrivate *data = (IFWebDataSourcePrivate *)_dataSourcePrivate;
     int i, count;
     IFURLHandle *handle;
 
+    data->stopping = YES;
+    
     [data->mainHandle cancelLoadInBackground];
     
     // Tell all handles to stop loading.
diff --git a/WebKit/WebView.subproj/WebFrame.m b/WebKit/WebView.subproj/WebFrame.m
index 63ae1a2..66f200a 100644
--- a/WebKit/WebView.subproj/WebFrame.m
+++ b/WebKit/WebView.subproj/WebFrame.m
@@ -118,6 +118,10 @@
     // KDE drop we should fix this dependency.
     WEBKIT_ASSERT ([self view] != nil);
 
+    if ([self _state] != IFWEBFRAMESTATE_COMPLETE){
+        [self stopLoading];
+    }
+    
     if (newDataSource != nil){
         if (![[self controller] locationWillChangeTo: [newDataSource inputURL] forFrame: self])
             return NO;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list