[webkit-changes] cvs commit: WebKit/WebCoreSupport.subproj WebBridge.m

Geoffrey ggaren at opensource.apple.com
Mon Aug 1 17:51:30 PDT 2005


ggaren      05/08/01 17:51:29

  Modified:    .        ChangeLog
               .        ChangeLog
               WebCoreSupport.subproj WebBridge.m
  Added:       manual-tests open-after-close.html
               manual-tests/resources open-after-close-popup.html
  Log:
  WebCore:
  	-landed layout tests for fix to <rdar://problem/3572585> window.open fails if name param = the name of a window just closed in same function
  
          Fix reviewed by darin.
  
          Test cases added:
  
          * manual-tests/open-after-close.html: Added.
          * manual-tests/resources/open-after-close-popup.html: Added.
  
  WebKit:
  	-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
  1.4515    +9 -0      WebCore/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/WebCore/ChangeLog,v
  retrieving revision 1.4514
  retrieving revision 1.4515
  diff -u -r1.4514 -r1.4515
  --- ChangeLog	1 Aug 2005 21:23:38 -0000	1.4514
  +++ ChangeLog	2 Aug 2005 00:51:22 -0000	1.4515
  @@ -1,3 +1,12 @@
  +2005-08-01  Geoffrey Garen  <ggaren at apple.com>
  +
  +        Reviewed by NOBODY (OOPS!).
  +
  +        Test cases added: (NONE)
  +
  +        * manual-tests/open-after-close.html: Added.
  +        * manual-tests/resources/open-after-close-popup.html: Added.
  +
   2005-08-01  David Hyatt  <hyatt at apple.com>
   
   	Fix bugzilla bug 4219, crash because we tried to do the fake paint
  
  
  
  1.1                  WebCore/manual-tests/open-after-close.html
  
  Index: open-after-close.html
  ===================================================================
  <html>
  <script>
  	var url = "resources/open-after-close-popup.html";
  			
  	function test() {
  		var w = window.open(url, 'popup', "height=200, width=200, top=100, left=100");
  		w.close();
  		window.open(url, 'popup', "height=200, width=200, top=100, left=100");
  	}
  </script>
  <body onload="test()">
  <p>This test checks for a regression against rdar://problem/3572585: window.open fails if name param = the name of a window just closed in same function.</p>
  <p>If the test passes, you will see a "PASS" message open in a new window.</p>
  <hr>
  </body>
  </html>
  
  
  
  1.1                  WebCore/manual-tests/resources/open-after-close-popup.html
  
  Index: open-after-close-popup.html
  ===================================================================
  <html>
      <body>
          PASS: window.open succeeded after window.close using same name.
      </body>
  </html>
  
  
  
  1.3276    +7 -0      WebKit/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/WebKit/ChangeLog,v
  retrieving revision 1.3275
  retrieving revision 1.3276
  diff -u -r1.3275 -r1.3276
  --- ChangeLog	1 Aug 2005 21:31:04 -0000	1.3275
  +++ ChangeLog	2 Aug 2005 00:51:26 -0000	1.3276
  @@ -1,3 +1,10 @@
  +2005-08-01  Geoffrey Garen  <ggaren at apple.com>
  +
  +        Reviewed by NOBODY (OOPS!).
  +
  +        * WebCoreSupport.subproj/WebBridge.m:
  +        (-[WebBridge closeWindowSoon]):
  +
   2005-08-01  John Sullivan  <sullivan at apple.com>
   
           * PublicHeaderChangesFromTiger.txt:
  
  
  
  1.366     +14 -1     WebKit/WebCoreSupport.subproj/WebBridge.m
  
  Index: WebBridge.m
  ===================================================================
  RCS file: /cvs/root/WebKit/WebCoreSupport.subproj/WebBridge.m,v
  retrieving revision 1.365
  retrieving revision 1.366
  diff -u -r1.365 -r1.366
  --- WebBridge.m	30 Jul 2005 03:00:27 -0000	1.365
  +++ WebBridge.m	2 Aug 2005 00:51:29 -0000	1.366
  @@ -347,7 +347,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