[webkit-changes] cvs commit: WebKit/WebCoreSupport.subproj
WebBridge.m
Adele
adele at opensource.apple.com
Mon Aug 8 17:41:12 PDT 2005
adele 05/08/08 17:41:12
Modified: . Tag: Safari-2-0-branch ChangeLog
WebCoreSupport.subproj Tag: Safari-2-0-branch WebBridge.m
Log:
Merged fix from TOT to Safari-2-0-branch
2005-08-01 Geoffrey Garen <ggaren at apple.com>
-fixed <rdar://problem/3572585> window.open fails if name param = the name of a window just closed in same function
Reviewed by darin.
Test cases added:
* manual-tests/open-after-close.html: Added.
* manual-tests/resources/open-after-close-popup.html: Added.
* WebCoreSupport.subproj/WebBridge.m:
(-[WebBridge closeWindowSoon]): We now remove a WebView from WebViewSets when the WebView is *scheduled* to close.
Revision Changes Path
No revision
No revision
1.3118.4.37 +18 -0 WebKit/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /cvs/root/WebKit/ChangeLog,v
retrieving revision 1.3118.4.36
retrieving revision 1.3118.4.37
diff -u -r1.3118.4.36 -r1.3118.4.37
--- ChangeLog 8 Aug 2005 23:51:43 -0000 1.3118.4.36
+++ ChangeLog 9 Aug 2005 00:41:07 -0000 1.3118.4.37
@@ -1,5 +1,23 @@
2005-08-08 Adele Peterson <adele at apple.com>
+ Merged fix from TOT to Safari-2-0-branch
+
+ 2005-08-01 Geoffrey Garen <ggaren at apple.com>
+
+ -fixed <rdar://problem/3572585> window.open fails if name param = the name of a window just closed in same function
+
+ Reviewed by darin.
+
+ Test cases added:
+
+ * manual-tests/open-after-close.html: Added.
+ * manual-tests/resources/open-after-close-popup.html: Added.
+
+ * WebCoreSupport.subproj/WebBridge.m:
+ (-[WebBridge closeWindowSoon]): We now remove a WebView from WebViewSets when the WebView is *scheduled* to close.
+
+2005-08-08 Adele Peterson <adele at apple.com>
+
Merged fix from TOT to Safari-2-0-branch
2005-08-04 Justin Garcia <justin.garcia at apple.com>
No revision
No revision
1.340.8.8 +14 -1 WebKit/WebCoreSupport.subproj/WebBridge.m
Index: WebBridge.m
===================================================================
RCS file: /cvs/root/WebKit/WebCoreSupport.subproj/WebBridge.m,v
retrieving revision 1.340.8.7
retrieving revision 1.340.8.8
diff -u -r1.340.8.7 -r1.340.8.8
--- WebBridge.m 2 Aug 2005 22:50:26 -0000 1.340.8.7
+++ WebBridge.m 9 Aug 2005 00:41:11 -0000 1.340.8.8
@@ -324,7 +324,20 @@
- (void)closeWindowSoon
{
- [[_frame webView] performSelector:@selector(_closeWindow) withObject:nil afterDelay:0.0];
+ WebView *parentWebView = [_frame webView];
+
+ // We need to remove the parent WebView from WebViewSets here, before it actually
+ // closes, to make sure that JavaScript code that executes before it closes
+ // can't find it. Otherwise, window.open will select a closed WebView instead of opening a new one.
+
+ // FIXME: This code assumes that the UI delegate will respond to a webViewClose
+ // message by actually closing the WebView. Safari guarantees this behavior, but other apps might not.
+ // This approach is an inherent limitation of not making a close execute immediately
+ // after a call to window.close.
+
+ [WebViewSets removeWebView:parentWebView fromSetNamed:[parentWebView groupName]];
+
+ [parentWebView performSelector:@selector(_closeWindow) withObject:nil afterDelay:0.0];
}
- (NSWindow *)window
More information about the webkit-changes
mailing list