Reviewed by Darin.
authorkdecker <kdecker@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 6 Mar 2005 03:36:59 +0000 (03:36 +0000)
committerkdecker <kdecker@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 6 Mar 2005 03:36:59 +0000 (03:36 +0000)
Fixed: <rdar://problem/4038529> Infinite progress bar loading webcams and other sites that use multipart/x-mixed-replace

The previous patch I landed prevented us from loading multipart/x-mixed-replace but did not always update the progress bar accordingly.
        This stops websites from having seemingly infinite progress in the browser UI.

        * WebCoreSupport.subproj/WebSubresourceClient.m:
        (-[WebSubresourceClient didReceiveResponse:]): If this is "multipart/x-mixed-replace", remove the WebBaseResourceHandleDelegate client from
        the datasource's subresource array, otherwise -[WebDataSource isLoading] incorrectly returns YES.   Also it's possible at this point in
         time we're done loading now (loaded everything else except for the multipart/x-mixed-replace content) so go ahead and check to see if
         in fact we're complete.
        * WebView.subproj/WebMainResourceClient.m:
        (-[WebMainResourceClient connection:didReceiveResponse:]): ditto

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8800 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKit/ChangeLog
WebKit/WebCoreSupport.subproj/WebSubresourceClient.m
WebKit/WebCoreSupport.subproj/WebSubresourceLoader.m
WebKit/WebView.subproj/WebMainResourceClient.m
WebKit/WebView.subproj/WebMainResourceLoader.m

index 002749fa8fcab5f92fd13d49613debb633ee64a8..5a056608fab11e759cbe9258181d51539557b1e6 100644 (file)
@@ -1,3 +1,20 @@
+2005-03-05  Kevin Decker  <kdecker@apple.com>
+
+        Reviewed by Darin.
+
+       Fixed: <rdar://problem/4038529> Infinite progress bar loading webcams and other sites that use multipart/x-mixed-replace
+
+       The previous patch I landed prevented us from loading multipart/x-mixed-replace but did not always update the progress bar accordingly.  
+        This stops websites from having seemingly infinite progress in the browser UI.  
+
+        * WebCoreSupport.subproj/WebSubresourceClient.m:
+        (-[WebSubresourceClient didReceiveResponse:]): If this is "multipart/x-mixed-replace", remove the WebBaseResourceHandleDelegate client from 
+        the datasource's subresource array, otherwise -[WebDataSource isLoading] incorrectly returns YES.   Also it's possible at this point in
+         time we're done loading now (loaded everything else except for the multipart/x-mixed-replace content) so go ahead and check to see if 
+         in fact we're complete. 
+        * WebView.subproj/WebMainResourceClient.m:
+        (-[WebMainResourceClient connection:didReceiveResponse:]): ditto
+
 2005-03-05  Richard Williamson   <rjw@apple.com>
 
        Fixed panther build problem.  Shouldn't include
index 01d910c9f3d290108d52f2394bc7cac999afef7c..9fc1816d8ad3b3d333bb14528cea7b9f6c381943 100644 (file)
     // essentially an infinite load and therefore a memory leak. Both this code and code in 
     // WebMainRecoureClient must be removed once multipart/x-mixed-replace is fully implemented. 
     if ([[r MIMEType] isEqualToString:@"multipart/x-mixed-replace"]) {
+        [dataSource _removeSubresourceClient:self];
+        [[[dataSource _webView] mainFrame] _checkLoadComplete];
         [self cancelWithError:[NSError _webKitErrorWithDomain:NSURLErrorDomain
                                                          code:NSURLErrorUnsupportedURL
                                                           URL:[r URL]]];
index 01d910c9f3d290108d52f2394bc7cac999afef7c..9fc1816d8ad3b3d333bb14528cea7b9f6c381943 100644 (file)
     // essentially an infinite load and therefore a memory leak. Both this code and code in 
     // WebMainRecoureClient must be removed once multipart/x-mixed-replace is fully implemented. 
     if ([[r MIMEType] isEqualToString:@"multipart/x-mixed-replace"]) {
+        [dataSource _removeSubresourceClient:self];
+        [[[dataSource _webView] mainFrame] _checkLoadComplete];
         [self cancelWithError:[NSError _webKitErrorWithDomain:NSURLErrorDomain
                                                          code:NSURLErrorUnsupportedURL
                                                           URL:[r URL]]];
index 1350b6e3c1cc2a4086594497577ff32a87fd73ba..f3e7c72a8a818bb60e850c287820e82462be8d44 100644 (file)
     // essentially an infinite load and therefore a memory leak. Both this code and code in
     // SubresourceClient must be removed once multipart/x-mixed-replace is fully implemented. 
     if ([[r MIMEType] isEqualToString:@"multipart/x-mixed-replace"]) {
+        [dataSource _removeSubresourceClient:self];
+        [[[dataSource _webView] mainFrame] _checkLoadComplete];
         [self cancelWithError:[NSError _webKitErrorWithDomain:NSURLErrorDomain
                                                          code:NSURLErrorUnsupportedURL
                                                           URL:[r URL]]];
index 1350b6e3c1cc2a4086594497577ff32a87fd73ba..f3e7c72a8a818bb60e850c287820e82462be8d44 100644 (file)
     // essentially an infinite load and therefore a memory leak. Both this code and code in
     // SubresourceClient must be removed once multipart/x-mixed-replace is fully implemented. 
     if ([[r MIMEType] isEqualToString:@"multipart/x-mixed-replace"]) {
+        [dataSource _removeSubresourceClient:self];
+        [[[dataSource _webView] mainFrame] _checkLoadComplete];
         [self cancelWithError:[NSError _webKitErrorWithDomain:NSURLErrorDomain
                                                          code:NSURLErrorUnsupportedURL
                                                           URL:[r URL]]];