[webkit-changes] cvs commit: WebKit/WebView.subproj WebLoader.h WebLoader.m

Justin justing at opensource.apple.com
Wed Sep 28 14:05:02 PDT 2005


justing     05/09/28 14:05:01

  Modified:    .        ChangeLog
               WebCoreSupport.subproj WebSubresourceLoader.h
                        WebSubresourceLoader.m
               WebView.subproj WebLoader.h WebLoader.m
  Log:
          Reviewed by geoff
  
          Fixed <rdar://problem/4276596> multipart/x-mixed-replace: saved inline images appear only partially loaded
          Fixed <rdar://problem/4265439> progress bar should look complete even if there is some more multipart content being loaded
  
          * WebCoreSupport.subproj/WebSubresourceLoader.h:
          * WebCoreSupport.subproj/WebSubresourceLoader.m:
          (-[WebSubresourceLoader didReceiveResponse:]):
          Now calls signalFinish and saveResource.
  
          (-[WebSubresourceLoader signalFinish]):
          Added.  Does the part of didFinishLoading that signals to the WebDataSource and load delegates that the load is finished.
  
          (-[WebSubresourceLoader didFinishLoading]):
          * WebView.subproj/WebLoader.h:
          * WebView.subproj/WebLoader.m:
          (-[NSURLProtocol signalFinish]):
          Similar to above
  
          (-[NSURLProtocol didFinishLoading]):
  
  Revision  Changes    Path
  1.3336    +23 -0     WebKit/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/WebKit/ChangeLog,v
  retrieving revision 1.3335
  retrieving revision 1.3336
  diff -u -r1.3335 -r1.3336
  --- ChangeLog	28 Sep 2005 18:43:11 -0000	1.3335
  +++ ChangeLog	28 Sep 2005 21:04:47 -0000	1.3336
  @@ -1,3 +1,26 @@
  +2005-09-28  Justin Garcia  <justin.garcia at apple.com>
  +
  +        Reviewed by geoff
  +        
  +        Fixed <rdar://problem/4276596> multipart/x-mixed-replace: saved inline images appear only partially loaded
  +        Fixed <rdar://problem/4265439> progress bar should look complete even if there is some more multipart content being loaded
  +
  +        * WebCoreSupport.subproj/WebSubresourceLoader.h:
  +        * WebCoreSupport.subproj/WebSubresourceLoader.m:
  +        (-[WebSubresourceLoader didReceiveResponse:]):
  +        Now calls signalFinish and saveResource.
  +        
  +        (-[WebSubresourceLoader signalFinish]): 
  +        Added.  Does the part of didFinishLoading that signals to the WebDataSource and load delegates that the load is finished.
  +        
  +        (-[WebSubresourceLoader didFinishLoading]):
  +        * WebView.subproj/WebLoader.h:
  +        * WebView.subproj/WebLoader.m:
  +        (-[NSURLProtocol signalFinish]):
  +        Similar to above
  +        
  +        (-[NSURLProtocol didFinishLoading]):
  +
   2005-09-28  Adele Peterson  <adele at apple.com>
   
           Reviewed by John.
  
  
  
  1.20      +2 -0      WebKit/WebCoreSupport.subproj/WebSubresourceLoader.h
  
  Index: WebSubresourceLoader.h
  ===================================================================
  RCS file: /cvs/root/WebKit/WebCoreSupport.subproj/WebSubresourceLoader.h,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- WebSubresourceLoader.h	1 Jul 2005 05:20:47 -0000	1.19
  +++ WebSubresourceLoader.h	28 Sep 2005 21:04:57 -0000	1.20
  @@ -40,6 +40,8 @@
       id <WebCoreResourceLoader> coreLoader;
   }
   
  +- (void)signalFinish;
  +
   + (WebSubresourceLoader *)startLoadingResource:(id <WebCoreResourceLoader>)rLoader
                                          withURL:(NSURL *)URL 
                                    customHeaders:(NSDictionary *)customHeaders
  
  
  
  1.115     +17 -4     WebKit/WebCoreSupport.subproj/WebSubresourceLoader.m
  
  Index: WebSubresourceLoader.m
  ===================================================================
  RCS file: /cvs/root/WebKit/WebCoreSupport.subproj/WebSubresourceLoader.m,v
  retrieving revision 1.114
  retrieving revision 1.115
  diff -u -r1.114 -r1.115
  --- WebSubresourceLoader.m	8 Sep 2005 21:35:06 -0000	1.114
  +++ WebSubresourceLoader.m	28 Sep 2005 21:04:57 -0000	1.115
  @@ -178,7 +178,14 @@
       if (loadingMultipartContent && [[self resourceData] length]) {
           // A subresource loader does not load multipart sections progressively, deliver the previously received data to the coreLoader all at once
           [coreLoader addData:[self resourceData]];
  +        // Tells the dataSource to save the just completed section, necessary for saving/dragging multipart images
  +        [self saveResource];
  +        // Clears the data to make way for the next multipart section
           [self clearResourceData];
  +        
  +        // After the first multipart section is complete, signal to delegates that this load is "finished" 
  +        if (!signalledFinish)
  +            [self signalFinish];
       }
   }
   
  @@ -194,6 +201,13 @@
       [self release];
   }
   
  +- (void)signalFinish
  +{
  +    [dataSource _removeSubresourceLoader:self];
  +    [[dataSource _webView] _finishedLoadingResourceFromDataSource:dataSource];
  +    [super signalFinish];
  +}
  +
   - (void)didFinishLoading
   {
       // Calling _removeSubresourceLoader will likely result in a call to release, so we must retain.
  @@ -201,10 +215,9 @@
       
       [coreLoader finishWithData:[self resourceData]];
       
  -    [dataSource _removeSubresourceLoader:self];
  -    
  -    [[dataSource _webView] _finishedLoadingResourceFromDataSource:dataSource];
  -
  +    if (!signalledFinish)
  +        [self signalFinish];
  +        
       [super didFinishLoading];
   
       [self release];    
  
  
  
  1.45      +3 -0      WebKit/WebView.subproj/WebLoader.h
  
  Index: WebLoader.h
  ===================================================================
  RCS file: /cvs/root/WebKit/WebView.subproj/WebLoader.h,v
  retrieving revision 1.44
  retrieving revision 1.45
  diff -u -r1.44 -r1.45
  --- WebLoader.h	8 Sep 2005 21:35:08 -0000	1.44
  +++ WebLoader.h	28 Sep 2005 21:04:59 -0000	1.45
  @@ -50,6 +50,7 @@
       BOOL reachedTerminalState;
       BOOL loadingMultipartContent;
       BOOL supportsMultipartContent;
  +    BOOL signalledFinish;
   @private
       WebView *webView;
       NSURLResponse *response;
  @@ -71,6 +72,8 @@
   #endif
   }
   - (void)setSupportsMultipartContent:(BOOL)flag;
  +- (void)signalFinish;
  +- (void)saveResource;
   
   - (BOOL)loadWithRequest:(NSURLRequest *)request;
   
  
  
  
  1.97      +14 -6     WebKit/WebView.subproj/WebLoader.m
  
  Index: WebLoader.m
  ===================================================================
  RCS file: /cvs/root/WebKit/WebView.subproj/WebLoader.m,v
  retrieving revision 1.96
  retrieving revision 1.97
  diff -u -r1.96 -r1.97
  --- WebLoader.m	8 Sep 2005 21:35:08 -0000	1.96
  +++ WebLoader.m	28 Sep 2005 21:04:59 -0000	1.97
  @@ -547,6 +547,18 @@
       resourceData = [data mutableCopy];
   }
   
  +- (void)signalFinish
  +{
  +    signalledFinish = YES;
  +
  +    [webView _completeProgressForConnectionDelegate:self];    
  +    
  +    if (implementations.delegateImplementsDidFinishLoadingFromDataSource)
  +        [resourceLoadDelegate webView:webView resource:identifier didFinishLoadingFromDataSource:dataSource];
  +    else
  +        [[WebDefaultResourceLoadDelegate sharedResourceLoadDelegate] webView:webView resource:identifier didFinishLoadingFromDataSource:dataSource];
  +}
  +
   - (void)didFinishLoading
   {
       // If load has been cancelled after finishing (which could happen with a 
  @@ -559,12 +571,8 @@
   
       [self saveResource];
       
  -    [webView _completeProgressForConnectionDelegate:self];
  -
  -    if (implementations.delegateImplementsDidFinishLoadingFromDataSource)
  -        [resourceLoadDelegate webView:webView resource:identifier didFinishLoadingFromDataSource:dataSource];
  -    else
  -        [[WebDefaultResourceLoadDelegate sharedResourceLoadDelegate] webView:webView resource:identifier didFinishLoadingFromDataSource:dataSource];
  +    if (!signalledFinish)
  +        [self signalFinish];
   
       [self releaseResources];
   }
  
  
  



More information about the webkit-changes mailing list