- 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
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@9407
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2005-06-17 John Sullivan <sullivan@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@apple.com>
Changes by Devin Lane.
}
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];