[webkit-changes] cvs commit: WebKit/Plugins.subproj WebPluginDocumentView.m

Tim tomernic at opensource.apple.com
Mon Dec 5 14:31:15 PST 2005


tomernic    05/12/05 14:31:15

  Modified:    .        ChangeLog
               Plugins.subproj WebPluginDocumentView.m
  Log:
          Reviewed by Dave Harrison, John Sullivan.
  
  	<rdar://problem/4364847> REGRESSION: QuickTime movies open without controller or don't open at all (5928)
  
  	I changed WebFrameView on 2005-11-29 so that it avoids creating duplicate WebPluginDocumentViews.
  	Unfortunately, this change caused a regression due to the fact that it subtly changed when plugins are
  	initialized.  Certain plugins (e.g. QuickTime) expect to be initialized after the WebPluginDocumentView
  	has been "committed" (inserted into the view hierarchy).
  
  	My fix is to ensure that the plugin is initialized where we previously would have created that second
  	WebPluginDocumentView -- that is, the plugin is created after the WebPluginDocumentView has been committed.
  
          * Plugins.subproj/WebPluginDocumentView.m:
          (-[WebPluginDocumentView setDataSource:]):
  	Don't initialize the plugin if the WebPluginDocumentView has not been inserted into the view hierarchy.
  	We assume here that a later call to -setDataSource: will pass this conditional, once the WebDocumentView
  	has been committed.
  
  Revision  Changes    Path
  1.3381    +20 -0     WebKit/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/WebKit/ChangeLog,v
  retrieving revision 1.3380
  retrieving revision 1.3381
  diff -u -r1.3380 -r1.3381
  --- ChangeLog	2 Dec 2005 22:53:23 -0000	1.3380
  +++ ChangeLog	5 Dec 2005 22:31:02 -0000	1.3381
  @@ -1,3 +1,23 @@
  +2005-12-04  Tim Omernick  <timo at apple.com>
  +
  +        Reviewed by Dave Harrison, John Sullivan.
  +
  +	<rdar://problem/4364847> REGRESSION: QuickTime movies open without controller or don't open at all (5928)
  +
  +	I changed WebFrameView on 2005-11-29 so that it avoids creating duplicate WebPluginDocumentViews.
  +	Unfortunately, this change caused a regression due to the fact that it subtly changed when plugins are
  +	initialized.  Certain plugins (e.g. QuickTime) expect to be initialized after the WebPluginDocumentView
  +	has been "committed" (inserted into the view hierarchy).
  +
  +	My fix is to ensure that the plugin is initialized where we previously would have created that second
  +	WebPluginDocumentView -- that is, the plugin is created after the WebPluginDocumentView has been committed.
  +	
  +        * Plugins.subproj/WebPluginDocumentView.m:
  +        (-[WebPluginDocumentView setDataSource:]):
  +	Don't initialize the plugin if the WebPluginDocumentView has not been inserted into the view hierarchy.
  +	We assume here that a later call to -setDataSource: will pass this conditional, once the WebDocumentView
  +	has been committed.
  +	
   2005-12-02  Justin Garcia <justin.garcia at apple.com>
   
           <rdar://problem/4345030>
  
  
  
  1.7       +9 -2      WebKit/Plugins.subproj/WebPluginDocumentView.m
  
  Index: WebPluginDocumentView.m
  ===================================================================
  RCS file: /cvs/root/WebKit/Plugins.subproj/WebPluginDocumentView.m,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- WebPluginDocumentView.m	15 Sep 2005 01:26:11 -0000	1.6
  +++ WebPluginDocumentView.m	5 Dec 2005 22:31:15 -0000	1.7
  @@ -70,9 +70,16 @@
   - (void)setDataSource:(WebDataSource *)dataSource
   {
       // Since this class is a WebDocumentView and WebDocumentRepresentation, setDataSource: will be called twice. Do work only once.
  -    if (dataSourceHasBeenSet) {
  +    if (dataSourceHasBeenSet)
           return;
  -    }
  +    
  +    // As noted above, -setDataSource: will be called twice -- once for the WebDocumentRepresentation, once for the WebDocumentView.
  +    // We don't want to make the plugin until we know we're being committed as the WebDocumentView for the WebFrame.  This check is
  +    // to ensure that we've been added to the view hierarchy before attempting to create the plugin, as some plugins currently work
  +    // under this assumption.
  +    if (![self superview])
  +        return;
  +        
       dataSourceHasBeenSet = YES;
       
       NSURLResponse *response = [dataSource response];
  
  
  



More information about the webkit-changes mailing list