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

John sullivan at opensource.apple.com
Fri Jun 17 08:06:58 PDT 2005


sullivan    05/06/17 08:06:58

  Modified:    .        ChangeLog
               WebView.subproj WebFrame.m
  Log:
          Reviewed by Chris.
  
          - fixed <rdar://problem/4151001> Reloading javascript-spawned window with no URL erases its contents
  
          * WebView.subproj/WebFrame.m:
          (-[WebFrame reload]):
          do nothing if URL is zero-length
  
  Revision  Changes    Path
  1.3196    +10 -0     WebKit/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/WebKit/ChangeLog,v
  retrieving revision 1.3195
  retrieving revision 1.3196
  diff -u -r1.3195 -r1.3196
  --- ChangeLog	14 Jun 2005 18:05:58 -0000	1.3195
  +++ ChangeLog	17 Jun 2005 15:06:55 -0000	1.3196
  @@ -1,3 +1,13 @@
  +2005-06-17  John Sullivan  <sullivan at apple.com>
  +
  +        Reviewed by Chris.
  +
  +        - fixed <rdar://problem/4151001> Reloading javascript-spawned window with no URL erases its contents
  +
  +        * WebView.subproj/WebFrame.m:
  +        (-[WebFrame reload]):
  +        do nothing if URL is zero-length
  +
   2005-06-14  John Sullivan  <sullivan at apple.com>
   
           Changes by Devin Lane.
  
  
  
  1.234     +6 -0      WebKit/WebView.subproj/WebFrame.m
  
  Index: WebFrame.m
  ===================================================================
  RCS file: /cvs/root/WebKit/WebView.subproj/WebFrame.m,v
  retrieving revision 1.233
  retrieving revision 1.234
  diff -u -r1.233 -r1.234
  --- WebFrame.m	14 Jun 2005 00:25:18 -0000	1.233
  +++ WebFrame.m	17 Jun 2005 15:06:58 -0000	1.234
  @@ -2890,6 +2890,12 @@
       }
   
       NSMutableURLRequest *initialRequest = [dataSource request];
  +    
  +    // If a window is created by javascript, its main frame can have an empty but non-nil URL.
  +    // Reloading in this case will lose the current contents (see 4151001).
  +    if ([[[[dataSource request] URL] absoluteString] length] == 0) {
  +        return;
  +    }
   
       // Replace error-page URL with the URL we were trying to reach.
       NSURL *unreachableURL = [initialRequest _webDataRequestUnreachableURL];
  
  
  



More information about the webkit-changes mailing list