[webkit-changes] cvs commit: WebKit/WebView.subproj WebDataSource.m WebMainResourceLoader.m

Justin justing at opensource.apple.com
Wed Sep 14 18:26:12 PDT 2005


justing     05/09/14 18:26:12

  Modified:    .        ChangeLog
               Misc.subproj WebKitErrorsPrivate.h
               Plugins.subproj WebPluginDocumentView.m
               WebView.subproj WebDataSource.m WebMainResourceLoader.m
  Log:
          Reviewed by john
  
          Fixes <rdar://problem/4237479> REGRESSION (Cambridge-Denver): old QuickTime movie continues to play sound after reload
          We were adding the movie to the document twice after the changes were added to handle fallback content.
          There are some errors for which we should not render fall back content
  
          * Misc.subproj/WebKitErrorsPrivate.h:
          Introduced WebKitErrorPlugInWillHandleLoad to represent the cancel we do
          to prevent loading plugin content twice
  
          * Plugins.subproj/WebPluginDocumentView.m:
          (-[WebPluginDocumentView dataSourceUpdated:]): Ditto
  
          * WebView.subproj/WebDataSource.m:
          (-[WebDataSource _receivedMainResourceError:complete:]):
          Don't handleFallbackContent on WebKitErrorPlugInWillHandleLoad or on a user cancel
  
  Revision  Changes    Path
  1.3321    +19 -0     WebKit/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/WebKit/ChangeLog,v
  retrieving revision 1.3320
  retrieving revision 1.3321
  diff -u -r1.3320 -r1.3321
  --- ChangeLog	14 Sep 2005 23:54:11 -0000	1.3320
  +++ ChangeLog	15 Sep 2005 01:26:09 -0000	1.3321
  @@ -1,3 +1,22 @@
  +2005-09-14  Justin Garcia  <justin.garcia at apple.com>
  +
  +        Reviewed by john
  +
  +        Fixes <rdar://problem/4237479> REGRESSION (Cambridge-Denver): old QuickTime movie continues to play sound after reload
  +        We were adding the movie to the document twice after the changes were added to handle fallback content.
  +        There are some errors for which we should not render fall back content
  +
  +        * Misc.subproj/WebKitErrorsPrivate.h:
  +        Introduced WebKitErrorPlugInWillHandleLoad to represent the cancel we do
  +        to prevent loading plugin content twice
  +        
  +        * Plugins.subproj/WebPluginDocumentView.m:
  +        (-[WebPluginDocumentView dataSourceUpdated:]): Ditto
  +        
  +        * WebView.subproj/WebDataSource.m:
  +        (-[WebDataSource _receivedMainResourceError:complete:]):
  +        Don't handleFallbackContent on WebKitErrorPlugInWillHandleLoad or on a user cancel
  +
   2005-09-14  Timothy Hatcher  <thatcher at apple.com>
   
           Reviewed by Eric.
  
  
  
  1.11      +2 -0      WebKit/Misc.subproj/WebKitErrorsPrivate.h
  
  Index: WebKitErrorsPrivate.h
  ===================================================================
  RCS file: /cvs/root/WebKit/Misc.subproj/WebKitErrorsPrivate.h,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- WebKitErrorsPrivate.h	5 Jun 2005 17:54:25 -0000	1.10
  +++ WebKitErrorsPrivate.h	15 Sep 2005 01:26:11 -0000	1.11
  @@ -29,6 +29,8 @@
   #import <WebKit/WebKitErrors.h>
   
   #define WebKitErrorPlugInCancelledConnection 203
  +// FIXME: WebKitErrorPlugInWillHandleLoad is used for the cancel we do to prevent loading plugin content twice.  See <rdar://problem/4258008>
  +#define WebKitErrorPlugInWillHandleLoad 204
   
   @interface NSError (WebKitExtras)
   + (NSError *)_webKitErrorWithCode:(int)code failingURL:(NSString *)URL;
  
  
  
  1.6       +2 -1      WebKit/Plugins.subproj/WebPluginDocumentView.m
  
  Index: WebPluginDocumentView.m
  ===================================================================
  RCS file: /cvs/root/WebKit/Plugins.subproj/WebPluginDocumentView.m,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- WebPluginDocumentView.m	5 Jun 2005 17:54:35 -0000	1.5
  +++ WebPluginDocumentView.m	15 Sep 2005 01:26:11 -0000	1.6
  @@ -105,7 +105,8 @@
   {
       // Cancel the load since WebKit plug-ins do their own loading.
       NSURLResponse *response = [dataSource response];
  -    NSError *error = [[NSError alloc] _initWithPluginErrorCode:WebKitErrorPlugInCancelledConnection
  +    // FIXME: See <rdar://problem/4258008>
  +    NSError *error = [[NSError alloc] _initWithPluginErrorCode:WebKitErrorPlugInWillHandleLoad
                                                       contentURL:[response URL]
                                                    pluginPageURL:nil
                                                       pluginName:[plugin name]
  
  
  
  1.211     +3 -1      WebKit/WebView.subproj/WebDataSource.m
  
  Index: WebDataSource.m
  ===================================================================
  RCS file: /cvs/root/WebKit/WebView.subproj/WebDataSource.m,v
  retrieving revision 1.210
  retrieving revision 1.211
  diff -u -r1.210 -r1.211
  --- WebDataSource.m	8 Sep 2005 21:35:06 -0000	1.210
  +++ WebDataSource.m	15 Sep 2005 01:26:12 -0000	1.211
  @@ -794,7 +794,9 @@
       if (isComplete) {
           // Can't call [self _bridge] because we might not have commited yet
           [[[self webFrame] _bridge] stop];
  -        [[[self webFrame] _bridge] mainResourceError];
  +        // FIXME: WebKitErrorPlugInWillHandleLoad is a workaround for the cancel we do to prevent loading plugin content twice.  See <rdar://problem/4258008>
  +        if ([error code] != NSURLErrorCancelled && [error code] != WebKitErrorPlugInWillHandleLoad)
  +            [[[self webFrame] _bridge] handleFallbackContent];
       }
   
       [[self webFrame] _receivedMainResourceError:error];
  
  
  
  1.274     +1 -1      WebKit/WebView.subproj/WebMainResourceLoader.m
  
  Index: WebMainResourceLoader.m
  ===================================================================
  RCS file: /cvs/root/WebKit/WebView.subproj/WebMainResourceLoader.m,v
  retrieving revision 1.273
  retrieving revision 1.274
  diff -u -r1.273 -r1.274
  --- WebMainResourceLoader.m	8 Sep 2005 21:35:08 -0000	1.273
  +++ WebMainResourceLoader.m	15 Sep 2005 01:26:12 -0000	1.274
  @@ -271,7 +271,7 @@
           int status = [(NSHTTPURLResponse *)r statusCode];
           if (status < 200 || status >= 300) {
               // Handle <object> fallback for error cases.
  -            [[[dataSource webFrame] _bridge] mainResourceError];
  +            [[[dataSource webFrame] _bridge] handleFallbackContent];
           }
       }
   
  
  
  



More information about the webkit-changes mailing list