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

Maciej mjs at opensource.apple.com
Sun Jun 12 13:27:26 PDT 2005


mjs         05/06/12 13:27:26

  Modified:    .        ChangeLog
               WebView.subproj WebFrame.m
  Log:
          Reviewed by Chris Blumenberg.
  
  	- fixed <rdar://problem/4142247> REGRESSION: List to browse widgets at Apple website failed. Closing tab afterwards caused Safari crash
  	http://bugzilla.opendarwin.org/show_bug.cgi?id=3445
  
          * WebView.subproj/WebFrame.m:
          (-[WebFrame _transitionToCommitted:]): Stop loading the non-provisional data
  	source before swapping in the provisional.
          (-[WebFrame _continueLoadRequestAfterNavigationPolicy:formState:]): Stop only
  	the provisional load here, we would not want to stop loading if this navigation
  	later turns into a download or is cancelled before being committed.
          (-[WebFrame stopLoading]): Factored a bit.
          (-[WebFrame _cancelProvisionalLoad]): New method to stop only provisional load,
  	and cancel any pending policy deicions.
          (-[WebFrame _stopNonProvisionalLoadOnly]): New mthod that stops only the main
  	load.
  
  Revision  Changes    Path
  1.3187    +19 -0     WebKit/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/WebKit/ChangeLog,v
  retrieving revision 1.3186
  retrieving revision 1.3187
  diff -u -r1.3186 -r1.3187
  --- ChangeLog	11 Jun 2005 00:42:51 -0000	1.3186
  +++ ChangeLog	12 Jun 2005 20:27:24 -0000	1.3187
  @@ -1,3 +1,22 @@
  +2005-06-12  Maciej Stachowiak  <mjs at apple.com>
  +
  +        Reviewed by Chris Blumenberg.
  +
  +	- fixed <rdar://problem/4142247> REGRESSION: List to browse widgets at Apple website failed. Closing tab afterwards caused Safari crash
  +	http://bugzilla.opendarwin.org/show_bug.cgi?id=3445
  +	
  +        * WebView.subproj/WebFrame.m:
  +        (-[WebFrame _transitionToCommitted:]): Stop loading the non-provisional data
  +	source before swapping in the provisional.
  +        (-[WebFrame _continueLoadRequestAfterNavigationPolicy:formState:]): Stop only
  +	the provisional load here, we would not want to stop loading if this navigation
  +	later turns into a download or is cancelled before being committed.
  +        (-[WebFrame stopLoading]): Factored a bit.
  +        (-[WebFrame _cancelProvisionalLoad]): New method to stop only provisional load,
  +	and cancel any pending policy deicions.
  +        (-[WebFrame _stopNonProvisionalLoadOnly]): New mthod that stops only the main
  +	load.
  +
   2005-06-10  John Sullivan  <sullivan at apple.com>
   
           reviewed by Dave Harrison (first & second drafts) and Darin Adler (third draft)
  
  
  
  1.231     +22 -8     WebKit/WebView.subproj/WebFrame.m
  
  Index: WebFrame.m
  ===================================================================
  RCS file: /cvs/root/WebKit/WebView.subproj/WebFrame.m,v
  retrieving revision 1.230
  retrieving revision 1.231
  diff -u -r1.230 -r1.231
  --- WebFrame.m	5 Jun 2005 17:54:47 -0000	1.230
  +++ WebFrame.m	12 Jun 2005 20:27:26 -0000	1.231
  @@ -183,6 +183,8 @@
   - (WebHistoryItem *)_createItem: (BOOL)useOriginal;
   - (WebHistoryItem *)_createItemTreeWithTargetFrame:(WebFrame *)targetFrame clippedAtTarget:(BOOL)doClip;
   - (WebHistoryItem *)_currentBackForwardListItemToResetTo;
  +- (void)_cancelProvisionalLoad;
  +- (void)_stopNonProvisionalLoadOnly;
   @end
   
   @implementation WebFramePrivate
  @@ -765,6 +767,7 @@
               }
   
               // Set the committed data source on the frame.
  +            [self _stopNonProvisionalLoadOnly];
               [self _setDataSource:_private->provisionalDataSource];
                   
               [self _setProvisionalDataSource: nil];
  @@ -2325,7 +2328,7 @@
       WebFrameLoadType loadType = _private->policyLoadType;
       WebDataSource *dataSource = [_private->policyDataSource retain];
       
  -    [self stopLoading];
  +    [self _cancelProvisionalLoad];
       [self _setLoadType:loadType];
       [self _setProvisionalDataSource:dataSource];
       [dataSource release];
  @@ -2855,6 +2858,13 @@
       }
   }
   
  +- (void)_cancelProvisionalLoad
  +{
  +    [self _invalidatePendingPolicyDecisionCallingDefaultAction:YES];
  +    [_private->provisionalDataSource _stopLoading];
  +    [self _setProvisionalDataSource:nil];
  +}
  +
   - (void)stopLoading
   {
       // If this method is called from within this method, infinite recursion can occur (3442218). Avoid this.
  @@ -2862,15 +2872,19 @@
           return;
       }
       _private->isStoppingLoad = YES;
  -    
  -    [self _invalidatePendingPolicyDecisionCallingDefaultAction:YES];
  -
  -    [_private->provisionalDataSource _stopLoading];
  +    [self _cancelProvisionalLoad];
       [_private->dataSource _stopLoading];
  +    _private->isStoppingLoad = NO;
  +}
   
  -    // Release the provisional data source because there's no point in keeping it around since it is unused in this case.
  -    [self _setProvisionalDataSource:nil];
  -    
  +- (void)_stopNonProvisionalLoadOnly
  +{
  +    // If this method is called from within this method, infinite recursion can occur (3442218). Avoid this.
  +    if (_private->isStoppingLoad) {
  +        return;
  +    }
  +    _private->isStoppingLoad = YES;
  +    [_private->dataSource _stopLoading];
       _private->isStoppingLoad = NO;
   }
   
  
  
  



More information about the webkit-changes mailing list