[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 06:13:26 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit f6f60d4be6da376cdfee8b3ee7eaa7679f51ab51
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu May 16 19:47:47 2002 +0000

    	Fixed 2925638.  Don't send last progress message from resourceDataDidBecomeAvailable,
    	it is sent from IFURLHandleResourceDidFinishLoading, avoiding duplication.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1167 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index d14309e..e1dca28 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,11 @@
+2002-05-16  Richard J. Williamson  <rjw at apple.com>
+
+	Fixed 2925638.  Don't send last progress message from resourceDataDidBecomeAvailable,
+	it is sent from IFURLHandleResourceDidFinishLoading, avoiding duplication.
+	
+	* kwq/KWQKloader.mm:
+	(-[URLLoadClient IFURLHandle:resourceDataDidBecomeAvailable:]):
+
 2002-05-15  Richard J. Williamson  <rjw at apple.com>
     
     Alerts, useful for validating that js handlers work.
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index d14309e..e1dca28 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,11 @@
+2002-05-16  Richard J. Williamson  <rjw at apple.com>
+
+	Fixed 2925638.  Don't send last progress message from resourceDataDidBecomeAvailable,
+	it is sent from IFURLHandleResourceDidFinishLoading, avoiding duplication.
+	
+	* kwq/KWQKloader.mm:
+	(-[URLLoadClient IFURLHandle:resourceDataDidBecomeAvailable:]):
+
 2002-05-15  Richard J. Williamson  <rjw at apple.com>
     
     Alerts, useful for validating that js handlers work.
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index d14309e..e1dca28 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,11 @@
+2002-05-16  Richard J. Williamson  <rjw at apple.com>
+
+	Fixed 2925638.  Don't send last progress message from resourceDataDidBecomeAvailable,
+	it is sent from IFURLHandleResourceDidFinishLoading, avoiding duplication.
+	
+	* kwq/KWQKloader.mm:
+	(-[URLLoadClient IFURLHandle:resourceDataDidBecomeAvailable:]):
+
 2002-05-15  Richard J. Williamson  <rjw at apple.com>
     
     Alerts, useful for validating that js handlers work.
diff --git a/WebCore/kwq/KWQKloader.mm b/WebCore/kwq/KWQKloader.mm
index 91e0a1e..be1a00a 100644
--- a/WebCore/kwq/KWQKloader.mm
+++ b/WebCore/kwq/KWQKloader.mm
@@ -1082,6 +1082,8 @@ void DocLoader::removeCachedObject( CachedObject* o ) const
 - (void)IFURLHandle:(IFURLHandle *)sender resourceDataDidBecomeAvailable:(NSData *)data
 {
     void *userData;
+	int contentLength = [sender contentLength];
+	int contentLengthReceived = [sender contentLengthReceived];
     
     userData = [[sender attributeForKey:IFURLHandleUserData] pointerValue];
     
@@ -1092,11 +1094,18 @@ void DocLoader::removeCachedObject( CachedObject* o ) const
 
     m_loader->slotData(job, (const char *)[data bytes], [data length]);    
 
+    // Don't send the last progress message, it will be sent via
+    // IFURLHandleResourceDidFinishLoading
+    if (contentLength == contentLengthReceived &&
+    	contentLength != -1){
+    	return;
+    }
+    
     id controller;
 
     IFLoadProgress *loadProgress = WCIFLoadProgressMake();
-    loadProgress->totalToLoad = [sender contentLength];
-    loadProgress->bytesSoFar = [sender contentLengthReceived];
+    loadProgress->totalToLoad = contentLength;
+    loadProgress->bytesSoFar = contentLengthReceived;
     
     controller = [m_dataSource controller];
     [controller _receivedProgress: (IFLoadProgress *)loadProgress forResource: QSTRING_TO_NSSTRING(urlString) fromDataSource: m_dataSource];
diff --git a/WebCore/kwq/KWQLoader.mm b/WebCore/kwq/KWQLoader.mm
index 91e0a1e..be1a00a 100644
--- a/WebCore/kwq/KWQLoader.mm
+++ b/WebCore/kwq/KWQLoader.mm
@@ -1082,6 +1082,8 @@ void DocLoader::removeCachedObject( CachedObject* o ) const
 - (void)IFURLHandle:(IFURLHandle *)sender resourceDataDidBecomeAvailable:(NSData *)data
 {
     void *userData;
+	int contentLength = [sender contentLength];
+	int contentLengthReceived = [sender contentLengthReceived];
     
     userData = [[sender attributeForKey:IFURLHandleUserData] pointerValue];
     
@@ -1092,11 +1094,18 @@ void DocLoader::removeCachedObject( CachedObject* o ) const
 
     m_loader->slotData(job, (const char *)[data bytes], [data length]);    
 
+    // Don't send the last progress message, it will be sent via
+    // IFURLHandleResourceDidFinishLoading
+    if (contentLength == contentLengthReceived &&
+    	contentLength != -1){
+    	return;
+    }
+    
     id controller;
 
     IFLoadProgress *loadProgress = WCIFLoadProgressMake();
-    loadProgress->totalToLoad = [sender contentLength];
-    loadProgress->bytesSoFar = [sender contentLengthReceived];
+    loadProgress->totalToLoad = contentLength;
+    loadProgress->bytesSoFar = contentLengthReceived;
     
     controller = [m_dataSource controller];
     [controller _receivedProgress: (IFLoadProgress *)loadProgress forResource: QSTRING_TO_NSSTRING(urlString) fromDataSource: m_dataSource];
diff --git a/WebCore/kwq/KWQLoaderImpl.mm b/WebCore/kwq/KWQLoaderImpl.mm
index 91e0a1e..be1a00a 100644
--- a/WebCore/kwq/KWQLoaderImpl.mm
+++ b/WebCore/kwq/KWQLoaderImpl.mm
@@ -1082,6 +1082,8 @@ void DocLoader::removeCachedObject( CachedObject* o ) const
 - (void)IFURLHandle:(IFURLHandle *)sender resourceDataDidBecomeAvailable:(NSData *)data
 {
     void *userData;
+	int contentLength = [sender contentLength];
+	int contentLengthReceived = [sender contentLengthReceived];
     
     userData = [[sender attributeForKey:IFURLHandleUserData] pointerValue];
     
@@ -1092,11 +1094,18 @@ void DocLoader::removeCachedObject( CachedObject* o ) const
 
     m_loader->slotData(job, (const char *)[data bytes], [data length]);    
 
+    // Don't send the last progress message, it will be sent via
+    // IFURLHandleResourceDidFinishLoading
+    if (contentLength == contentLengthReceived &&
+    	contentLength != -1){
+    	return;
+    }
+    
     id controller;
 
     IFLoadProgress *loadProgress = WCIFLoadProgressMake();
-    loadProgress->totalToLoad = [sender contentLength];
-    loadProgress->bytesSoFar = [sender contentLengthReceived];
+    loadProgress->totalToLoad = contentLength;
+    loadProgress->bytesSoFar = contentLengthReceived;
     
     controller = [m_dataSource controller];
     [controller _receivedProgress: (IFLoadProgress *)loadProgress forResource: QSTRING_TO_NSSTRING(urlString) fromDataSource: m_dataSource];
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 0424fe9..56e7794 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,5 +1,13 @@
 2002-05-16  Richard J. Williamson  <rjw at apple.com>
 
+	Fixed 2925638.  Don't send last progress message from resourceDataDidBecomeAvailable,
+	it is sent from IFURLHandleResourceDidFinishLoading, avoiding duplication.
+	
+	* WebView.subproj/IFMainURLHandleClient.mm:
+	(-[IFMainURLHandleClient IFURLHandle:resourceDataDidBecomeAvailable:]):
+
+2002-05-16  Richard J. Williamson  <rjw at apple.com>
+
 	Fix to fix for 0x7f to 0xa0.  I was being overly aggressive about
 	finding substitute glyphs.
 	
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 0424fe9..56e7794 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,5 +1,13 @@
 2002-05-16  Richard J. Williamson  <rjw at apple.com>
 
+	Fixed 2925638.  Don't send last progress message from resourceDataDidBecomeAvailable,
+	it is sent from IFURLHandleResourceDidFinishLoading, avoiding duplication.
+	
+	* WebView.subproj/IFMainURLHandleClient.mm:
+	(-[IFMainURLHandleClient IFURLHandle:resourceDataDidBecomeAvailable:]):
+
+2002-05-16  Richard J. Williamson  <rjw at apple.com>
+
 	Fix to fix for 0x7f to 0xa0.  I was being overly aggressive about
 	finding substitute glyphs.
 	
diff --git a/WebKit/WebView.subproj/IFMainURLHandleClient.mm b/WebKit/WebView.subproj/IFMainURLHandleClient.mm
index c6c00b2..1d3257a 100644
--- a/WebKit/WebView.subproj/IFMainURLHandleClient.mm
+++ b/WebKit/WebView.subproj/IFMainURLHandleClient.mm
@@ -112,6 +112,9 @@
 
 - (void)IFURLHandle:(IFURLHandle *)sender resourceDataDidBecomeAvailable:(NSData *)data
 {
+	int contentLength = [sender contentLength];
+	int contentLengthReceived = [sender contentLengthReceived];
+	
     WEBKITDEBUGLEVEL(WEBKIT_LOG_LOADING, "url = %s, data = %p, length %d\n", [[[sender url] absoluteString] cString], data, [data length]);
     
     // Check the mime type and ask the client for the content policy.
@@ -146,12 +149,19 @@
         [sender cancelLoadInBackground];
     }
     
-    WEBKITDEBUGLEVEL(WEBKIT_LOG_DOWNLOAD, "%d of %d", [sender contentLengthReceived], [sender contentLength]);
+    WEBKITDEBUGLEVEL(WEBKIT_LOG_DOWNLOAD, "%d of %d", contentLengthReceived, contentLength);
+    
+    // Don't send the last progress message, it will be sent via
+    // IFURLHandleResourceDidFinishLoading
+    if (contentLength == contentLengthReceived &&
+    	contentLength != -1){
+    	return;
+    }
     
     // update progress
     IFLoadProgress *loadProgress = [[IFLoadProgress alloc] init];
-    loadProgress->totalToLoad = [sender contentLength];
-    loadProgress->bytesSoFar = [sender contentLengthReceived];
+    loadProgress->totalToLoad = contentLength;
+    loadProgress->bytesSoFar = contentLengthReceived;
     [(IFBaseWebController *)[dataSource controller] _mainReceivedProgress: (IFLoadProgress *)loadProgress 
         forResource: [[sender url] absoluteString] fromDataSource: dataSource];
     [loadProgress release];
diff --git a/WebKit/WebView.subproj/WebMainResourceClient.m b/WebKit/WebView.subproj/WebMainResourceClient.m
index c6c00b2..1d3257a 100644
--- a/WebKit/WebView.subproj/WebMainResourceClient.m
+++ b/WebKit/WebView.subproj/WebMainResourceClient.m
@@ -112,6 +112,9 @@
 
 - (void)IFURLHandle:(IFURLHandle *)sender resourceDataDidBecomeAvailable:(NSData *)data
 {
+	int contentLength = [sender contentLength];
+	int contentLengthReceived = [sender contentLengthReceived];
+	
     WEBKITDEBUGLEVEL(WEBKIT_LOG_LOADING, "url = %s, data = %p, length %d\n", [[[sender url] absoluteString] cString], data, [data length]);
     
     // Check the mime type and ask the client for the content policy.
@@ -146,12 +149,19 @@
         [sender cancelLoadInBackground];
     }
     
-    WEBKITDEBUGLEVEL(WEBKIT_LOG_DOWNLOAD, "%d of %d", [sender contentLengthReceived], [sender contentLength]);
+    WEBKITDEBUGLEVEL(WEBKIT_LOG_DOWNLOAD, "%d of %d", contentLengthReceived, contentLength);
+    
+    // Don't send the last progress message, it will be sent via
+    // IFURLHandleResourceDidFinishLoading
+    if (contentLength == contentLengthReceived &&
+    	contentLength != -1){
+    	return;
+    }
     
     // update progress
     IFLoadProgress *loadProgress = [[IFLoadProgress alloc] init];
-    loadProgress->totalToLoad = [sender contentLength];
-    loadProgress->bytesSoFar = [sender contentLengthReceived];
+    loadProgress->totalToLoad = contentLength;
+    loadProgress->bytesSoFar = contentLengthReceived;
     [(IFBaseWebController *)[dataSource controller] _mainReceivedProgress: (IFLoadProgress *)loadProgress 
         forResource: [[sender url] absoluteString] fromDataSource: dataSource];
     [loadProgress release];
diff --git a/WebKit/WebView.subproj/WebMainResourceLoader.m b/WebKit/WebView.subproj/WebMainResourceLoader.m
index c6c00b2..1d3257a 100644
--- a/WebKit/WebView.subproj/WebMainResourceLoader.m
+++ b/WebKit/WebView.subproj/WebMainResourceLoader.m
@@ -112,6 +112,9 @@
 
 - (void)IFURLHandle:(IFURLHandle *)sender resourceDataDidBecomeAvailable:(NSData *)data
 {
+	int contentLength = [sender contentLength];
+	int contentLengthReceived = [sender contentLengthReceived];
+	
     WEBKITDEBUGLEVEL(WEBKIT_LOG_LOADING, "url = %s, data = %p, length %d\n", [[[sender url] absoluteString] cString], data, [data length]);
     
     // Check the mime type and ask the client for the content policy.
@@ -146,12 +149,19 @@
         [sender cancelLoadInBackground];
     }
     
-    WEBKITDEBUGLEVEL(WEBKIT_LOG_DOWNLOAD, "%d of %d", [sender contentLengthReceived], [sender contentLength]);
+    WEBKITDEBUGLEVEL(WEBKIT_LOG_DOWNLOAD, "%d of %d", contentLengthReceived, contentLength);
+    
+    // Don't send the last progress message, it will be sent via
+    // IFURLHandleResourceDidFinishLoading
+    if (contentLength == contentLengthReceived &&
+    	contentLength != -1){
+    	return;
+    }
     
     // update progress
     IFLoadProgress *loadProgress = [[IFLoadProgress alloc] init];
-    loadProgress->totalToLoad = [sender contentLength];
-    loadProgress->bytesSoFar = [sender contentLengthReceived];
+    loadProgress->totalToLoad = contentLength;
+    loadProgress->bytesSoFar = contentLengthReceived;
     [(IFBaseWebController *)[dataSource controller] _mainReceivedProgress: (IFLoadProgress *)loadProgress 
         forResource: [[sender url] absoluteString] fromDataSource: dataSource];
     [loadProgress release];

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list