[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

darin darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 06:48:24 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit c7a89cb8ae55c112319a370dafb9170d9e033f13
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Oct 9 18:45:59 2002 +0000

    WebCore:
    
    	- fixed 3069264 -- REGRESSION: windows created for links with
    	target=blank start out hidden (window menu only)
    
            * kwq/WebCoreBridge.h: Removed openNewWindowWithURL:referrer:frameName: and
    	added createWindowWithURL:referrer:frameName: and showWindow.
    
            * kwq/KWQKHTMLPartBrowserExtension.mm:
            (KHTMLPartBrowserExtension::createNewWindow): Call createWindowWithURL,
    	and then showWindow after the window is set up. Also change the code that
    	flips coordinates to always use the height of the first screen instead of
    	using the height of the screen the window is on, which sounds right, but
    	is wrong.
    
            * kwq/KWQKHTMLPartImpl.mm:
            (KWQKHTMLPartImpl::bridgeForFrameName): Call createWindowWithURL and then
    	showWindow in the case where we create a window.
            (KWQKHTMLPartImpl::urlSelected): Remove unused command-click code. The real
    	command-click code is in the browser now.
    
    WebKit:
    
    	WebKit support for creating windows and then showing them later
    	after setting them up.
    
            * WebCoreSupport.subproj/WebBridge.m:
            (-[WebBridge createWindowWithURL:referrer:frameName:]): Replaced the old
    	openNewWindowWithURL with this. It calls the new window operations delegate
    	method.
            (-[WebBridge showWindow]): Added. Calls the window operations delegate showWindow method.
            (-[WebBridge createChildFrameNamed:withURL:referrer:renderPart:allowsScrolling:marginWidth:marginHeight:]):
    	Call _createFrameNamed instead of createFrameNamed.
    
            * WebView.subproj/WebWindowOperationsDelegate.h: Replaced the openNewWindowWithURL
    	method with a new method named createWindowWithURL. Added showWindow and showWindowBehindFrontmost.
    
            * WebView.subproj/WebControllerPrivate.h: Renamed createFrameNamed to _createFrameNamed
    	and removed the data source parameter. Added _openNewWindowWithURL:referrer:behind:
    	for the convenience of those who used to call the window operations delegate directly
    	to open the window.
            * WebView.subproj/WebControllerPrivate.m:
            (-[WebController _createFrameNamed:inParent:allowsScrolling:]): Renamed, and removed
    	the data source parameter.
            (-[WebController _openNewWindowWithURL:referrer:behind:]): Added.
    
            * Plugins.subproj/WebBaseNetscapePluginView.m:
            (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:]):
            * WebView.subproj/WebDefaultContextMenuDelegate.m:
            (-[WebDefaultContextMenuDelegate openNewWindowWithURL:referrer:]):
            * WebView.subproj/WebFrame.m: (-[WebFrame frameNamed:]):
            * WebView.subproj/WebHTMLViewPrivate.m:
            (-[WebHTMLView _continueAfterClickPolicyForEvent:]):
    	Use a private WebController method instead of calling the delegate directly,
    	because it now takes two method calls to create and display a new window.
    
            * Misc.subproj/WebNSViewExtras.m:
            * WebCoreSupport.subproj/WebSubresourceClient.m:
            * WebView.subproj/WebController.m:
            * WebView.subproj/WebDataSource.m:
            * WebView.subproj/WebFramePrivate.m:
            * WebView.subproj/WebHTMLView.m:
            * WebView.subproj/WebMainResourceClient.m:
            * WebView.subproj/WebPreferences.m:
            * WebView.subproj/WebView.m:
            * WebView.subproj/WebViewPrivate.m:
    	Tweaked comments.
    
    WebBrowser:
    
    	WebBrowser support for creating windows and then showing them later
    	after setting them up.
    
            * BrowserDocumentController.h: Add a new policy, CreateHiddenWindow.
            * BrowserDocumentController.m:
            (-[BrowserDocumentController _goToEachURL:referrer:windowPolicy:]):
    	Pass NO for display if policy is CreateHiddenWindow.
            (-[BrowserDocumentController tryMultipleURLs:windowPolicy:]): Ditto.
    
            * BrowserWebController.m:
            (-[BrowserWebController createWindowWithURL:referrer:]): Added. Like
    	the old openNewWindowWithURL method, but uses CreateHiddenWindow.
            (-[BrowserWebController showWindow]): Added. Tells the window controller
    	to show the window.
            (-[BrowserWebController showWindowBehindFrontmost]): Added. Tells the
    	window controllers to show the window after telling the document that
    	the window should open behind the frontmost.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2291 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index 6b92935..daca6b9 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,5 +1,26 @@
 2002-10-09  Darin Adler  <darin at apple.com>
 
+	- fixed 3069264 -- REGRESSION: windows created for links with
+	target=blank start out hidden (window menu only)
+
+        * kwq/WebCoreBridge.h: Removed openNewWindowWithURL:referrer:frameName: and
+	added createWindowWithURL:referrer:frameName: and showWindow.
+
+        * kwq/KWQKHTMLPartBrowserExtension.mm:
+        (KHTMLPartBrowserExtension::createNewWindow): Call createWindowWithURL,
+	and then showWindow after the window is set up. Also change the code that
+	flips coordinates to always use the height of the first screen instead of
+	using the height of the screen the window is on, which sounds right, but
+	is wrong.
+
+        * kwq/KWQKHTMLPartImpl.mm:
+        (KWQKHTMLPartImpl::bridgeForFrameName): Call createWindowWithURL and then
+	showWindow in the case where we create a window.
+        (KWQKHTMLPartImpl::urlSelected): Remove unused command-click code. The real
+	command-click code is in the browser now.
+
+2002-10-09  Darin Adler  <darin at apple.com>
+
 	- fixed 3069749 -- crash in QString during third run of cvs-base
 
         * kwq/KWQString.mm:
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 6b92935..daca6b9 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,5 +1,26 @@
 2002-10-09  Darin Adler  <darin at apple.com>
 
+	- fixed 3069264 -- REGRESSION: windows created for links with
+	target=blank start out hidden (window menu only)
+
+        * kwq/WebCoreBridge.h: Removed openNewWindowWithURL:referrer:frameName: and
+	added createWindowWithURL:referrer:frameName: and showWindow.
+
+        * kwq/KWQKHTMLPartBrowserExtension.mm:
+        (KHTMLPartBrowserExtension::createNewWindow): Call createWindowWithURL,
+	and then showWindow after the window is set up. Also change the code that
+	flips coordinates to always use the height of the first screen instead of
+	using the height of the screen the window is on, which sounds right, but
+	is wrong.
+
+        * kwq/KWQKHTMLPartImpl.mm:
+        (KWQKHTMLPartImpl::bridgeForFrameName): Call createWindowWithURL and then
+	showWindow in the case where we create a window.
+        (KWQKHTMLPartImpl::urlSelected): Remove unused command-click code. The real
+	command-click code is in the browser now.
+
+2002-10-09  Darin Adler  <darin at apple.com>
+
 	- fixed 3069749 -- crash in QString during third run of cvs-base
 
         * kwq/KWQString.mm:
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 6b92935..daca6b9 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,5 +1,26 @@
 2002-10-09  Darin Adler  <darin at apple.com>
 
+	- fixed 3069264 -- REGRESSION: windows created for links with
+	target=blank start out hidden (window menu only)
+
+        * kwq/WebCoreBridge.h: Removed openNewWindowWithURL:referrer:frameName: and
+	added createWindowWithURL:referrer:frameName: and showWindow.
+
+        * kwq/KWQKHTMLPartBrowserExtension.mm:
+        (KHTMLPartBrowserExtension::createNewWindow): Call createWindowWithURL,
+	and then showWindow after the window is set up. Also change the code that
+	flips coordinates to always use the height of the first screen instead of
+	using the height of the screen the window is on, which sounds right, but
+	is wrong.
+
+        * kwq/KWQKHTMLPartImpl.mm:
+        (KWQKHTMLPartImpl::bridgeForFrameName): Call createWindowWithURL and then
+	showWindow in the case where we create a window.
+        (KWQKHTMLPartImpl::urlSelected): Remove unused command-click code. The real
+	command-click code is in the browser now.
+
+2002-10-09  Darin Adler  <darin at apple.com>
+
 	- fixed 3069749 -- crash in QString during third run of cvs-base
 
         * kwq/KWQString.mm:
diff --git a/WebCore/kwq/KWQKHTMLPart.mm b/WebCore/kwq/KWQKHTMLPart.mm
index eecc866..59071ee 100644
--- a/WebCore/kwq/KWQKHTMLPart.mm
+++ b/WebCore/kwq/KWQKHTMLPart.mm
@@ -118,7 +118,8 @@ WebCoreBridge *KWQKHTMLPartImpl::bridgeForFrameName(const QString &frameName)
 	    frame = [_bridge frameNamed:frameName.getNSString()];
 	}
         if (frame == nil) {
-	    frame = [_bridge openNewWindowWithURL:nil referrer:nil frameName:frameName.getNSString()];
+	    frame = [_bridge createWindowWithURL:nil referrer:nil frameName:frameName.getNSString()];
+            [frame showWindow];
         }
     }
     
@@ -168,12 +169,6 @@ void KWQKHTMLPartImpl::urlSelected(const KURL &url, int button, int state, const
         return;
     }
     
-    // Open new window on command-click
-    if (state & MetaButton) {
-        [_bridge openNewWindowWithURL:cocoaURL referrer:referrer(args) frameName:nil];
-        return;
-    }
-    
     WebCoreBridge *targetBridge = bridgeForFrameName(args.frameName);
 
     // FIXME: KHTML does this in openURL -- we should do this at that level so we don't
diff --git a/WebCore/kwq/KWQKHTMLPartBrowserExtension.mm b/WebCore/kwq/KWQKHTMLPartBrowserExtension.mm
index dbdfbc6..87c94e9 100644
--- a/WebCore/kwq/KWQKHTMLPartBrowserExtension.mm
+++ b/WebCore/kwq/KWQKHTMLPartBrowserExtension.mm
@@ -77,7 +77,7 @@ void KHTMLPartBrowserExtension::createNewWindow(const KURL &url,
     }
 
     NSURL *cocoaURL = url.isEmpty() ? nil : url.getNSURL();
-    bridge = [m_part->impl->bridge() openNewWindowWithURL:cocoaURL
+    bridge = [m_part->impl->bridge() createWindowWithURL:cocoaURL
          referrer:KWQKHTMLPartImpl::referrer(urlArgs)
          frameName:frameName];
     
@@ -98,8 +98,6 @@ void KHTMLPartBrowserExtension::createNewWindow(const KURL &url,
     }
     
     if (winArgs.xSet || winArgs.ySet || winArgs.widthSet || winArgs.heightSet) {
-	
-	NSRect screenFrame = [[[bridge window] screen] frame];
 	NSRect frame = [[bridge window] frame];
 	
 	if (winArgs.xSet) {
@@ -107,10 +105,11 @@ void KHTMLPartBrowserExtension::createNewWindow(const KURL &url,
 	}
 	
 	if (winArgs.ySet) {
-	    if (winArgs.heightSet) {
-		frame.origin.y = screenFrame.size.height - winArgs.y + frame.size.height - winArgs.height;
+	    float heightForFlip = NSMaxY([[[NSScreen screens] objectAtIndex:0] frame]);
+            if (winArgs.heightSet) {
+		frame.origin.y = heightForFlip - winArgs.y + frame.size.height - winArgs.height;
 	    } else {
-		frame.origin.y = screenFrame.size.height - winArgs.y;
+		frame.origin.y = heightForFlip - winArgs.y;
 	    }
 	}
 	
@@ -125,6 +124,8 @@ void KHTMLPartBrowserExtension::createNewWindow(const KURL &url,
 	[bridge setWindowFrame:frame];
     }
     
+    [bridge showWindow];
+    
     *partResult = [bridge part];
 }
 
diff --git a/WebCore/kwq/KWQKHTMLPartImpl.mm b/WebCore/kwq/KWQKHTMLPartImpl.mm
index eecc866..59071ee 100644
--- a/WebCore/kwq/KWQKHTMLPartImpl.mm
+++ b/WebCore/kwq/KWQKHTMLPartImpl.mm
@@ -118,7 +118,8 @@ WebCoreBridge *KWQKHTMLPartImpl::bridgeForFrameName(const QString &frameName)
 	    frame = [_bridge frameNamed:frameName.getNSString()];
 	}
         if (frame == nil) {
-	    frame = [_bridge openNewWindowWithURL:nil referrer:nil frameName:frameName.getNSString()];
+	    frame = [_bridge createWindowWithURL:nil referrer:nil frameName:frameName.getNSString()];
+            [frame showWindow];
         }
     }
     
@@ -168,12 +169,6 @@ void KWQKHTMLPartImpl::urlSelected(const KURL &url, int button, int state, const
         return;
     }
     
-    // Open new window on command-click
-    if (state & MetaButton) {
-        [_bridge openNewWindowWithURL:cocoaURL referrer:referrer(args) frameName:nil];
-        return;
-    }
-    
     WebCoreBridge *targetBridge = bridgeForFrameName(args.frameName);
 
     // FIXME: KHTML does this in openURL -- we should do this at that level so we don't
diff --git a/WebCore/kwq/WebCoreBridge.h b/WebCore/kwq/WebCoreBridge.h
index f7df692..983991e 100644
--- a/WebCore/kwq/WebCoreBridge.h
+++ b/WebCore/kwq/WebCoreBridge.h
@@ -154,7 +154,9 @@ typedef khtml::RenderPart KHTMLRenderPart;
 
 - (void)loadURL:(NSURL *)URL referrer:(NSString *)referrer;
 - (void)postWithURL:(NSURL *)URL referrer:(NSString *)referrer data:(NSData *)data contentType:(NSString *)contentType;
-- (WebCoreBridge *)openNewWindowWithURL:(NSURL *)URL referrer:(NSString *)referrer frameName:(NSString *)name;
+
+- (WebCoreBridge *)createWindowWithURL:(NSURL *)URL referrer:(NSString *)referrer frameName:(NSString *)name;
+- (void)showWindow;
 
 - (NSString *)userAgentForURL:(NSURL *)URL;
 
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 80a23a5..c7e27a7 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,5 +1,52 @@
 2002-10-09  Darin Adler  <darin at apple.com>
 
+	WebKit support for creating windows and then showing them later
+	after setting them up.
+
+        * WebCoreSupport.subproj/WebBridge.m:
+        (-[WebBridge createWindowWithURL:referrer:frameName:]): Replaced the old
+	openNewWindowWithURL with this. It calls the new window operations delegate
+	method.
+        (-[WebBridge showWindow]): Added. Calls the window operations delegate showWindow method.
+        (-[WebBridge createChildFrameNamed:withURL:referrer:renderPart:allowsScrolling:marginWidth:marginHeight:]):
+	Call _createFrameNamed instead of createFrameNamed.
+
+        * WebView.subproj/WebWindowOperationsDelegate.h: Replaced the openNewWindowWithURL
+	method with a new method named createWindowWithURL. Added showWindow and showWindowBehindFrontmost.
+
+        * WebView.subproj/WebControllerPrivate.h: Renamed createFrameNamed to _createFrameNamed
+	and removed the data source parameter. Added _openNewWindowWithURL:referrer:behind:
+	for the convenience of those who used to call the window operations delegate directly
+	to open the window.
+        * WebView.subproj/WebControllerPrivate.m:
+        (-[WebController _createFrameNamed:inParent:allowsScrolling:]): Renamed, and removed
+	the data source parameter.
+        (-[WebController _openNewWindowWithURL:referrer:behind:]): Added.
+
+        * Plugins.subproj/WebBaseNetscapePluginView.m:
+        (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:]):
+        * WebView.subproj/WebDefaultContextMenuDelegate.m:
+        (-[WebDefaultContextMenuDelegate openNewWindowWithURL:referrer:]):
+        * WebView.subproj/WebFrame.m: (-[WebFrame frameNamed:]):
+        * WebView.subproj/WebHTMLViewPrivate.m:
+        (-[WebHTMLView _continueAfterClickPolicyForEvent:]):
+	Use a private WebController method instead of calling the delegate directly,
+	because it now takes two method calls to create and display a new window.
+
+        * Misc.subproj/WebNSViewExtras.m:
+        * WebCoreSupport.subproj/WebSubresourceClient.m:
+        * WebView.subproj/WebController.m:
+        * WebView.subproj/WebDataSource.m:
+        * WebView.subproj/WebFramePrivate.m:
+        * WebView.subproj/WebHTMLView.m:
+        * WebView.subproj/WebMainResourceClient.m:
+        * WebView.subproj/WebPreferences.m:
+        * WebView.subproj/WebView.m:
+        * WebView.subproj/WebViewPrivate.m:
+	Tweaked comments.
+
+2002-10-09  Darin Adler  <darin at apple.com>
+
         * WebCoreSupport.subproj/WebImageRenderer.m:
         (-[WebImageRenderer drawClippedToValidInRect:fromRect:]):
 	Fix positioning of progressively loading images that are flipped.
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 80a23a5..c7e27a7 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,5 +1,52 @@
 2002-10-09  Darin Adler  <darin at apple.com>
 
+	WebKit support for creating windows and then showing them later
+	after setting them up.
+
+        * WebCoreSupport.subproj/WebBridge.m:
+        (-[WebBridge createWindowWithURL:referrer:frameName:]): Replaced the old
+	openNewWindowWithURL with this. It calls the new window operations delegate
+	method.
+        (-[WebBridge showWindow]): Added. Calls the window operations delegate showWindow method.
+        (-[WebBridge createChildFrameNamed:withURL:referrer:renderPart:allowsScrolling:marginWidth:marginHeight:]):
+	Call _createFrameNamed instead of createFrameNamed.
+
+        * WebView.subproj/WebWindowOperationsDelegate.h: Replaced the openNewWindowWithURL
+	method with a new method named createWindowWithURL. Added showWindow and showWindowBehindFrontmost.
+
+        * WebView.subproj/WebControllerPrivate.h: Renamed createFrameNamed to _createFrameNamed
+	and removed the data source parameter. Added _openNewWindowWithURL:referrer:behind:
+	for the convenience of those who used to call the window operations delegate directly
+	to open the window.
+        * WebView.subproj/WebControllerPrivate.m:
+        (-[WebController _createFrameNamed:inParent:allowsScrolling:]): Renamed, and removed
+	the data source parameter.
+        (-[WebController _openNewWindowWithURL:referrer:behind:]): Added.
+
+        * Plugins.subproj/WebBaseNetscapePluginView.m:
+        (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:]):
+        * WebView.subproj/WebDefaultContextMenuDelegate.m:
+        (-[WebDefaultContextMenuDelegate openNewWindowWithURL:referrer:]):
+        * WebView.subproj/WebFrame.m: (-[WebFrame frameNamed:]):
+        * WebView.subproj/WebHTMLViewPrivate.m:
+        (-[WebHTMLView _continueAfterClickPolicyForEvent:]):
+	Use a private WebController method instead of calling the delegate directly,
+	because it now takes two method calls to create and display a new window.
+
+        * Misc.subproj/WebNSViewExtras.m:
+        * WebCoreSupport.subproj/WebSubresourceClient.m:
+        * WebView.subproj/WebController.m:
+        * WebView.subproj/WebDataSource.m:
+        * WebView.subproj/WebFramePrivate.m:
+        * WebView.subproj/WebHTMLView.m:
+        * WebView.subproj/WebMainResourceClient.m:
+        * WebView.subproj/WebPreferences.m:
+        * WebView.subproj/WebView.m:
+        * WebView.subproj/WebViewPrivate.m:
+	Tweaked comments.
+
+2002-10-09  Darin Adler  <darin at apple.com>
+
         * WebCoreSupport.subproj/WebImageRenderer.m:
         (-[WebImageRenderer drawClippedToValidInRect:fromRect:]):
 	Fix positioning of progressively loading images that are flipped.
diff --git a/WebKit/Misc.subproj/WebNSViewExtras.m b/WebKit/Misc.subproj/WebNSViewExtras.m
index 50c129b..e19f09b 100644
--- a/WebKit/Misc.subproj/WebNSViewExtras.m
+++ b/WebKit/Misc.subproj/WebNSViewExtras.m
@@ -1,5 +1,5 @@
 /*
-        WebNSViewExtras.mm
+        WebNSViewExtras.m
         Copyright (c) 2002, Apple, Inc. All rights reserved.
 */
 
diff --git a/WebKit/Plugins.subproj/WebBaseNetscapePluginView.m b/WebKit/Plugins.subproj/WebBaseNetscapePluginView.m
index d256fc4..dd070aa 100644
--- a/WebKit/Plugins.subproj/WebBaseNetscapePluginView.m
+++ b/WebKit/Plugins.subproj/WebBaseNetscapePluginView.m
@@ -787,7 +787,7 @@
         frame = [[self webFrame] frameNamed:target];
         if(!frame){
             // FIXME: Why is it OK to just discard all the attributes in this case?
-            [[[self controller] windowOperationsDelegate] openNewWindowWithURL:URL referrer:nil behind:NO];
+            [[self controller] _openNewWindowWithURL:URL referrer:nil behind:NO];
             // FIXME: Need to send NPP_URLNotify at the right time.
             // FIXME: Need to name new frame
             if(notifyData){
diff --git a/WebKit/WebCoreSupport.subproj/WebBridge.m b/WebKit/WebCoreSupport.subproj/WebBridge.m
index ab85582..9cd16c9 100644
--- a/WebKit/WebCoreSupport.subproj/WebBridge.m
+++ b/WebKit/WebCoreSupport.subproj/WebBridge.m
@@ -1,5 +1,5 @@
 /*	
-    WebBridge.mm
+    WebBridge.m
     Copyright (c) 2002, Apple, Inc. All rights reserved.
 */
 
@@ -67,15 +67,20 @@
     return [[frame frameNamed:name] _bridge];
 }
 
-- (WebCoreBridge *)openNewWindowWithURL:(NSURL *)URL referrer:(NSString *)referrer frameName:(NSString *)name
+- (WebCoreBridge *)createWindowWithURL:(NSURL *)URL referrer:(NSString *)referrer frameName:(NSString *)name
 {
     ASSERT(frame != nil);
 
-    WebController *newController = [[[frame controller] windowOperationsDelegate] openNewWindowWithURL:URL referrer:referrer behind:NO];
+    WebController *newController = [[[frame controller] windowOperationsDelegate] createWindowWithURL:URL referrer:referrer];
     [newController _setTopLevelFrameName:name];
     return [[newController mainFrame] _bridge];
 }
 
+- (void)showWindow
+{
+    [[[frame controller] windowOperationsDelegate] showWindow];
+}
+
 - (BOOL)areToolbarsVisible
 {
     ASSERT(frame != nil);
@@ -290,7 +295,7 @@
     allowsScrolling:(BOOL)allowsScrolling marginWidth:(int)width marginHeight:(int)height
 {
     ASSERT(frame != nil);
-    WebFrame *newFrame = [[frame controller] createFrameNamed:frameName for:nil inParent:frame allowsScrolling:allowsScrolling];
+    WebFrame *newFrame = [[frame controller] _createFrameNamed:frameName inParent:frame allowsScrolling:allowsScrolling];
     if (newFrame == nil) {
         return nil;
     }
@@ -302,8 +307,7 @@
     
     [[newFrame _bridge] loadURL:URL referrer:referrer];
     
-    // Set the load type so this load doesn't end up in the back
-    // forward list.
+    // Set the load type so this load doesn't end up in the back/forward list.
     [newFrame _setLoadType:WebFrameLoadTypeInternal];
 
     return [newFrame _bridge];
diff --git a/WebKit/WebCoreSupport.subproj/WebSubresourceClient.m b/WebKit/WebCoreSupport.subproj/WebSubresourceClient.m
index 3269b1e..ef4c05c 100644
--- a/WebKit/WebCoreSupport.subproj/WebSubresourceClient.m
+++ b/WebKit/WebCoreSupport.subproj/WebSubresourceClient.m
@@ -1,5 +1,5 @@
 /*	
-    WebSubresourceClient.mm
+    WebSubresourceClient.m
     Copyright (c) 2002, Apple Computer, Inc. All rights reserved.
 */
 
diff --git a/WebKit/WebCoreSupport.subproj/WebSubresourceLoader.m b/WebKit/WebCoreSupport.subproj/WebSubresourceLoader.m
index 3269b1e..ef4c05c 100644
--- a/WebKit/WebCoreSupport.subproj/WebSubresourceLoader.m
+++ b/WebKit/WebCoreSupport.subproj/WebSubresourceLoader.m
@@ -1,5 +1,5 @@
 /*	
-    WebSubresourceClient.mm
+    WebSubresourceClient.m
     Copyright (c) 2002, Apple Computer, Inc. All rights reserved.
 */
 
diff --git a/WebKit/WebView.subproj/WebController.m b/WebKit/WebView.subproj/WebController.m
index b10de04..012b95e 100644
--- a/WebKit/WebView.subproj/WebController.m
+++ b/WebKit/WebView.subproj/WebController.m
@@ -1,5 +1,5 @@
 /*	
-    WebController.mm
+    WebController.m
     Copyright 2001, 2002 Apple, Inc. All rights reserved.
 */
 
diff --git a/WebKit/WebView.subproj/WebControllerPrivate.h b/WebKit/WebView.subproj/WebControllerPrivate.h
index a3456f2..97231ca 100644
--- a/WebKit/WebView.subproj/WebControllerPrivate.h
+++ b/WebKit/WebView.subproj/WebControllerPrivate.h
@@ -1,5 +1,5 @@
 /*	
-    WebController.mm
+    WebController.m
 	Copyright 2001, Apple, Inc. All rights reserved.
 */
 
@@ -13,13 +13,13 @@
 @public
     WebFrame *mainFrame;
     
-    id<WebWindowOperationsDelegate> windowContext;
-    id<WebResourceLoadDelegate> resourceProgressDelegate;
-    id<WebResourceLoadDelegate> downloadProgressDelegate;
-    id<WebContextMenuDelegate> contextMenuDelegate;
-    id<WebContextMenuDelegate> defaultContextMenuDelegate;
-    id<WebControllerPolicyDelegate> policyDelegate;
-    id<WebLocationChangeDelegate> locationChangeDelegate;
+    id <WebWindowOperationsDelegate> windowContext;
+    id <WebResourceLoadDelegate> resourceProgressDelegate;
+    id <WebResourceLoadDelegate> downloadProgressDelegate;
+    id <WebContextMenuDelegate> contextMenuDelegate;
+    id <WebContextMenuDelegate> defaultContextMenuDelegate;
+    id <WebControllerPolicyDelegate> policyDelegate;
+    id <WebLocationChangeDelegate> locationChangeDelegate;
     
     WebBackForwardList *backForwardList;
     BOOL useBackForwardList;
@@ -39,21 +39,16 @@
 
 @interface WebController (WebPrivate)
 
-/*
-        Called when a data source needs to create a frame.  This method encapsulates the
-        specifics of creating and initializing a view of the appropriate class.
-*/    
-- (WebFrame *)createFrameNamed: (NSString *)fname for: (WebDataSource *)child inParent: (WebFrame *)parent allowsScrolling: (BOOL)allowsScrolling;
+- (WebFrame *)_createFrameNamed:(NSString *)name inParent:(WebFrame *)parent allowsScrolling:(BOOL)allowsScrolling;
 
-
-- (id<WebContextMenuDelegate>)_defaultContextMenuDelegate;
-- (void)_receivedProgressForResourceHandle: (WebResourceHandle *)resourceHandle fromDataSource: (WebDataSource *)dataSource complete:(BOOL)isComplete;
-- (void)_receivedError: (WebError *)error forResourceHandle: (WebResourceHandle *)resourceHandle fromDataSource: (WebDataSource *)dataSource;
-- (void)_mainReceivedProgressForResourceHandle: (WebResourceHandle *)resourceHandle bytesSoFar:(unsigned)bytesSoFar fromDataSource: (WebDataSource *)dataSource complete:(BOOL)isComplete;
-- (void)_mainReceivedError: (WebError *)error forResourceHandle: (WebResourceHandle *)resourceHandle fromDataSource: (WebDataSource *)dataSource;
-- (void)_didStartLoading: (NSURL *)URL;
-- (void)_didStopLoading: (NSURL *)URL;
-+ (NSString *)_MIMETypeForFile: (NSString *)path;
+- (id <WebContextMenuDelegate>)_defaultContextMenuDelegate;
+- (void)_receivedProgressForResourceHandle:(WebResourceHandle *)resourceHandle fromDataSource:(WebDataSource *)dataSource complete:(BOOL)isComplete;
+- (void)_receivedError:(WebError *)error forResourceHandle:(WebResourceHandle *)resourceHandle fromDataSource:(WebDataSource *)dataSource;
+- (void)_mainReceivedProgressForResourceHandle:(WebResourceHandle *)resourceHandle bytesSoFar:(unsigned)bytesSoFar fromDataSource:(WebDataSource *)dataSource complete:(BOOL)isComplete;
+- (void)_mainReceivedError:(WebError *)error forResourceHandle:(WebResourceHandle *)resourceHandle fromDataSource:(WebDataSource *)dataSource;
+- (void)_didStartLoading:(NSURL *)URL;
+- (void)_didStopLoading:(NSURL *)URL;
++ (NSString *)_MIMETypeForFile:(NSString *)path;
 - (void)_downloadURL:(NSURL *)URL toPath:(NSString *)path;
 
 - (BOOL)_defersCallbacks;
@@ -62,4 +57,6 @@
 - (void)_setTopLevelFrameName:(NSString *)name;
 - (WebFrame *)_frameInThisWindowNamed:(NSString *)name;
 
+- (WebController *)_openNewWindowWithURL:(NSURL *)URL referrer:(NSString *)referrer behind:(BOOL)behind;
+
 @end
diff --git a/WebKit/WebView.subproj/WebControllerPrivate.m b/WebKit/WebView.subproj/WebControllerPrivate.m
index 11b620c..80b9cae 100644
--- a/WebKit/WebView.subproj/WebControllerPrivate.m
+++ b/WebKit/WebView.subproj/WebControllerPrivate.m
@@ -1,5 +1,5 @@
 /*	
-    WebControllerPrivate.mm
+    WebControllerPrivate.m
 	Copyright (c) 2001, 2002, Apple, Inc. All rights reserved.
 */
 
@@ -78,25 +78,20 @@
 
 @implementation WebController (WebPrivate)
 
-- (WebFrame *)createFrameNamed: (NSString *)fname for: (WebDataSource *)childDataSource inParent: (WebFrame *)parent allowsScrolling: (BOOL)allowsScrolling
+- (WebFrame *)_createFrameNamed:(NSString *)fname inParent:(WebFrame *)parent allowsScrolling:(BOOL)allowsScrolling
 {
-    WebView *childView;
-    WebFrame *newFrame;
+    WebView *childView = [[WebView alloc] initWithFrame:NSMakeRect(0,0,0,0)];
 
-    childView = [[WebView alloc] initWithFrame: NSMakeRect(0,0,0,0)];
-
-    newFrame = [[WebFrame alloc] initWithName: fname webView: childView provisionalDataSource: childDataSource controller: self];
-
-    [parent _addChild: newFrame];
+    [childView _setController:self];
+    [childView setAllowsScrolling:allowsScrolling];
     
-    [newFrame release];
+    WebFrame *newFrame = [[WebFrame alloc] initWithName:fname webView:childView provisionalDataSource:nil controller:self];
 
-    [childView _setController: self];
-    [childDataSource _setController: self];
+    [childView release];
 
-    [childView setAllowsScrolling: allowsScrolling];
+    [parent _addChild:newFrame];
     
-    [childView release];
+    [newFrame release];
         
     return newFrame;
 }
@@ -255,4 +250,15 @@
     }
 }
 
+- (WebController *)_openNewWindowWithURL:(NSURL *)URL referrer:(NSString *)referrer behind:(BOOL)behind
+{
+    WebController *newWindowController = [[self windowOperationsDelegate] createWindowWithURL:URL referrer:referrer];
+    if (behind) {
+        [[newWindowController windowOperationsDelegate] showWindowBehindFrontmost];
+    } else {
+        [[newWindowController windowOperationsDelegate] showWindow];
+    }
+    return newWindowController;
+}
+
 @end
diff --git a/WebKit/WebView.subproj/WebDataSource.m b/WebKit/WebView.subproj/WebDataSource.m
index eab0ec4..0a6607e 100644
--- a/WebKit/WebView.subproj/WebDataSource.m
+++ b/WebKit/WebView.subproj/WebDataSource.m
@@ -1,5 +1,5 @@
 /*	
-        WebDataSource.mm
+        WebDataSource.m
 	Copyright 2001, 2002, Apple, Inc. All rights reserved.
 */
 
diff --git a/WebKit/WebView.subproj/WebDefaultContextMenuDelegate.m b/WebKit/WebView.subproj/WebDefaultContextMenuDelegate.m
index 9a83569..4ced3ea 100644
--- a/WebKit/WebView.subproj/WebDefaultContextMenuDelegate.m
+++ b/WebKit/WebView.subproj/WebDefaultContextMenuDelegate.m
@@ -100,7 +100,7 @@
 {
     WebFrame *webFrame = [element objectForKey:WebElementFrameKey];
     WebController *controller = [webFrame controller];
-    [[controller windowOperationsDelegate] openNewWindowWithURL:URL referrer:referrer behind:NO];
+    [controller _openNewWindowWithURL:URL referrer:referrer behind:NO];
 }
 
 - (void)downloadURL:(NSURL *)URL
diff --git a/WebKit/WebView.subproj/WebFrame.m b/WebKit/WebView.subproj/WebFrame.m
index 1094e0d..0f4955f 100644
--- a/WebKit/WebView.subproj/WebFrame.m
+++ b/WebKit/WebView.subproj/WebFrame.m
@@ -9,7 +9,7 @@
 
 #import <WebKit/WebBackForwardList.h>
 #import <WebKit/WebBridge.h>
-#import <WebKit/WebController.h>
+#import <WebKit/WebControllerPrivate.h>
 #import <WebKit/WebDataSourcePrivate.h>
 #import <WebKit/WebFramePrivate.h>
 #import <WebKit/WebHistoryItem.h>
@@ -241,9 +241,7 @@
     }
     
     if ([name isEqualToString:@"_blank"]) {
-        WebController *newController = [[[self controller] windowOperationsDelegate] openNewWindowWithURL:nil referrer:nil behind:NO];
-	[[[[newController windowOperationsDelegate] window] windowController] showWindow:nil];
-        return [newController mainFrame];
+        return [[[self controller] _openNewWindowWithURL:nil referrer:nil behind:NO] mainFrame];
     }
     
     // Now search the name space associated with this frame's controller.
diff --git a/WebKit/WebView.subproj/WebFramePrivate.m b/WebKit/WebView.subproj/WebFramePrivate.m
index 42fb6f9..da46c2b 100644
--- a/WebKit/WebView.subproj/WebFramePrivate.m
+++ b/WebKit/WebView.subproj/WebFramePrivate.m
@@ -1,5 +1,5 @@
 /*	
-    WebFramePrivate.mm
+    WebFramePrivate.m
 	    
     Copyright 2001, 2002, Apple Computer, Inc. All rights reserved.
 */
diff --git a/WebKit/WebView.subproj/WebFrameView.m b/WebKit/WebView.subproj/WebFrameView.m
index b6cea90..c1c8add 100644
--- a/WebKit/WebView.subproj/WebFrameView.m
+++ b/WebKit/WebView.subproj/WebFrameView.m
@@ -1,4 +1,4 @@
-/*	WebView.mm
+/*	WebView.m
 	Copyright 2001, 2002, Apple Computer, Inc. All rights reserved.
 */
 
diff --git a/WebKit/WebView.subproj/WebFrameViewPrivate.m b/WebKit/WebView.subproj/WebFrameViewPrivate.m
index 9f993a3..71280ed 100644
--- a/WebKit/WebView.subproj/WebFrameViewPrivate.m
+++ b/WebKit/WebView.subproj/WebFrameViewPrivate.m
@@ -1,4 +1,4 @@
-/*	WebViewPrivate.mm
+/*	WebViewPrivate.m
 	Copyright 2001, Apple, Inc. All rights reserved.
         
         Private header file.  This file may reference classes (both ObjectiveC and C++)
diff --git a/WebKit/WebView.subproj/WebHTMLView.m b/WebKit/WebView.subproj/WebHTMLView.m
index 9b12951..cc43a74 100644
--- a/WebKit/WebView.subproj/WebHTMLView.m
+++ b/WebKit/WebView.subproj/WebHTMLView.m
@@ -1,5 +1,5 @@
 /*	
-    WebHTMLView.mm
+    WebHTMLView.m
     Copyright 2002, Apple, Inc. All rights reserved.
 */
 
diff --git a/WebKit/WebView.subproj/WebHTMLViewPrivate.m b/WebKit/WebView.subproj/WebHTMLViewPrivate.m
index 867428c..458df4a 100644
--- a/WebKit/WebView.subproj/WebHTMLViewPrivate.m
+++ b/WebKit/WebView.subproj/WebHTMLViewPrivate.m
@@ -172,10 +172,10 @@ BOOL _modifierTrackingEnabled = FALSE;
         case WebClickPolicyShow:
             return YES;
         case WebClickPolicyOpenNewWindow:
-            [[controller windowOperationsDelegate] openNewWindowWithURL:URL referrer:nil behind:NO];
+            [controller _openNewWindowWithURL:URL referrer:nil behind:NO];
             break;
         case WebClickPolicyOpenNewWindowBehind:
-            [[controller windowOperationsDelegate] openNewWindowWithURL:URL referrer:nil behind:YES];
+            [controller _openNewWindowWithURL:URL referrer:nil behind:YES];
             break;
         case WebClickPolicySave:
         case WebClickPolicySaveAndOpenExternally:
diff --git a/WebKit/WebView.subproj/WebMainResourceClient.m b/WebKit/WebView.subproj/WebMainResourceClient.m
index 4674874..8596158 100644
--- a/WebKit/WebView.subproj/WebMainResourceClient.m
+++ b/WebKit/WebView.subproj/WebMainResourceClient.m
@@ -1,5 +1,5 @@
 /*	
-    WebMainResourceClient.mm
+    WebMainResourceClient.m
     Copyright (c) 2001, 2002, Apple Computer, Inc. All rights reserved.
 */
 
diff --git a/WebKit/WebView.subproj/WebMainResourceLoader.m b/WebKit/WebView.subproj/WebMainResourceLoader.m
index 4674874..8596158 100644
--- a/WebKit/WebView.subproj/WebMainResourceLoader.m
+++ b/WebKit/WebView.subproj/WebMainResourceLoader.m
@@ -1,5 +1,5 @@
 /*	
-    WebMainResourceClient.mm
+    WebMainResourceClient.m
     Copyright (c) 2001, 2002, Apple Computer, Inc. All rights reserved.
 */
 
diff --git a/WebKit/WebView.subproj/WebPreferences.m b/WebKit/WebView.subproj/WebPreferences.m
index b5822d3..049cfbc 100644
--- a/WebKit/WebView.subproj/WebPreferences.m
+++ b/WebKit/WebView.subproj/WebPreferences.m
@@ -1,5 +1,5 @@
 /*        
-        WebPreferences.mm
+        WebPreferences.m
         Copyright 2001, 2002, Apple Computer, Inc. All rights reserved.
 */
 
diff --git a/WebKit/WebView.subproj/WebUIDelegate.h b/WebKit/WebView.subproj/WebUIDelegate.h
index 7b15d41..17ba572 100644
--- a/WebKit/WebView.subproj/WebUIDelegate.h
+++ b/WebKit/WebView.subproj/WebUIDelegate.h
@@ -17,15 +17,35 @@
     windows and control aspects of existing windows.
 */
 @protocol WebWindowOperationsDelegate <NSObject>
+
 /*!
-    @method openNewWindowWithURL:referrer:
-    @abstract Open a new window and load the specified URL.
-    @param URL The URL to load.
+    @method createWindowWithURL:referrer:
+    @abstract Create a new window and begin to load the specified URL.
+    @discussion The newly created window is hidden, and the window operations delegate on the
+    new controllers will get a showWindow or showWindowBehindFrontmost call.
+    @param URL The URL to load, may be nil.
     @param referrer The referrer to use when loading the URL.
-    @param behind YES to open the window behind this one, NO to open it in front.
     @result The WebController for the WebView in the new window.
 */
-- (WebController *)openNewWindowWithURL:(NSURL *)URL referrer:(NSString *)referrer behind:(BOOL)behind;
+- (WebController *)createWindowWithURL:(NSURL *)URL referrer:(NSString *)referrer;
+
+/*!
+    @method showWindow
+    @abstract Show the window that contains the top level view of the controller,
+    ordering it frontmost.
+    @discussion This will only be called just after createWindowWithURL:referrer:
+    is used to create a new window.
+*/
+- (void)showWindow;
+
+/*!
+    @method showWindowBehindFrontmost
+    @abstract Show the window that contains the top level view of the controller,
+    ordering it behind the main window.
+    @discussion This will only be called just after createWindowWithURL:referrer:
+    is used to create a new window.
+*/
+- (void)showWindowBehindFrontmost;
 
 /*!
     @method setStatusText:
@@ -106,5 +126,3 @@
 - (NSWindow *)window;
 
 @end
-
-
diff --git a/WebKit/WebView.subproj/WebView.m b/WebKit/WebView.subproj/WebView.m
index b10de04..012b95e 100644
--- a/WebKit/WebView.subproj/WebView.m
+++ b/WebKit/WebView.subproj/WebView.m
@@ -1,5 +1,5 @@
 /*	
-    WebController.mm
+    WebController.m
     Copyright 2001, 2002 Apple, Inc. All rights reserved.
 */
 
diff --git a/WebKit/WebView.subproj/WebViewPrivate.h b/WebKit/WebView.subproj/WebViewPrivate.h
index a3456f2..97231ca 100644
--- a/WebKit/WebView.subproj/WebViewPrivate.h
+++ b/WebKit/WebView.subproj/WebViewPrivate.h
@@ -1,5 +1,5 @@
 /*	
-    WebController.mm
+    WebController.m
 	Copyright 2001, Apple, Inc. All rights reserved.
 */
 
@@ -13,13 +13,13 @@
 @public
     WebFrame *mainFrame;
     
-    id<WebWindowOperationsDelegate> windowContext;
-    id<WebResourceLoadDelegate> resourceProgressDelegate;
-    id<WebResourceLoadDelegate> downloadProgressDelegate;
-    id<WebContextMenuDelegate> contextMenuDelegate;
-    id<WebContextMenuDelegate> defaultContextMenuDelegate;
-    id<WebControllerPolicyDelegate> policyDelegate;
-    id<WebLocationChangeDelegate> locationChangeDelegate;
+    id <WebWindowOperationsDelegate> windowContext;
+    id <WebResourceLoadDelegate> resourceProgressDelegate;
+    id <WebResourceLoadDelegate> downloadProgressDelegate;
+    id <WebContextMenuDelegate> contextMenuDelegate;
+    id <WebContextMenuDelegate> defaultContextMenuDelegate;
+    id <WebControllerPolicyDelegate> policyDelegate;
+    id <WebLocationChangeDelegate> locationChangeDelegate;
     
     WebBackForwardList *backForwardList;
     BOOL useBackForwardList;
@@ -39,21 +39,16 @@
 
 @interface WebController (WebPrivate)
 
-/*
-        Called when a data source needs to create a frame.  This method encapsulates the
-        specifics of creating and initializing a view of the appropriate class.
-*/    
-- (WebFrame *)createFrameNamed: (NSString *)fname for: (WebDataSource *)child inParent: (WebFrame *)parent allowsScrolling: (BOOL)allowsScrolling;
+- (WebFrame *)_createFrameNamed:(NSString *)name inParent:(WebFrame *)parent allowsScrolling:(BOOL)allowsScrolling;
 
-
-- (id<WebContextMenuDelegate>)_defaultContextMenuDelegate;
-- (void)_receivedProgressForResourceHandle: (WebResourceHandle *)resourceHandle fromDataSource: (WebDataSource *)dataSource complete:(BOOL)isComplete;
-- (void)_receivedError: (WebError *)error forResourceHandle: (WebResourceHandle *)resourceHandle fromDataSource: (WebDataSource *)dataSource;
-- (void)_mainReceivedProgressForResourceHandle: (WebResourceHandle *)resourceHandle bytesSoFar:(unsigned)bytesSoFar fromDataSource: (WebDataSource *)dataSource complete:(BOOL)isComplete;
-- (void)_mainReceivedError: (WebError *)error forResourceHandle: (WebResourceHandle *)resourceHandle fromDataSource: (WebDataSource *)dataSource;
-- (void)_didStartLoading: (NSURL *)URL;
-- (void)_didStopLoading: (NSURL *)URL;
-+ (NSString *)_MIMETypeForFile: (NSString *)path;
+- (id <WebContextMenuDelegate>)_defaultContextMenuDelegate;
+- (void)_receivedProgressForResourceHandle:(WebResourceHandle *)resourceHandle fromDataSource:(WebDataSource *)dataSource complete:(BOOL)isComplete;
+- (void)_receivedError:(WebError *)error forResourceHandle:(WebResourceHandle *)resourceHandle fromDataSource:(WebDataSource *)dataSource;
+- (void)_mainReceivedProgressForResourceHandle:(WebResourceHandle *)resourceHandle bytesSoFar:(unsigned)bytesSoFar fromDataSource:(WebDataSource *)dataSource complete:(BOOL)isComplete;
+- (void)_mainReceivedError:(WebError *)error forResourceHandle:(WebResourceHandle *)resourceHandle fromDataSource:(WebDataSource *)dataSource;
+- (void)_didStartLoading:(NSURL *)URL;
+- (void)_didStopLoading:(NSURL *)URL;
++ (NSString *)_MIMETypeForFile:(NSString *)path;
 - (void)_downloadURL:(NSURL *)URL toPath:(NSString *)path;
 
 - (BOOL)_defersCallbacks;
@@ -62,4 +57,6 @@
 - (void)_setTopLevelFrameName:(NSString *)name;
 - (WebFrame *)_frameInThisWindowNamed:(NSString *)name;
 
+- (WebController *)_openNewWindowWithURL:(NSURL *)URL referrer:(NSString *)referrer behind:(BOOL)behind;
+
 @end
diff --git a/WebKit/WebView.subproj/WebViewPrivate.m b/WebKit/WebView.subproj/WebViewPrivate.m
index 11b620c..80b9cae 100644
--- a/WebKit/WebView.subproj/WebViewPrivate.m
+++ b/WebKit/WebView.subproj/WebViewPrivate.m
@@ -1,5 +1,5 @@
 /*	
-    WebControllerPrivate.mm
+    WebControllerPrivate.m
 	Copyright (c) 2001, 2002, Apple, Inc. All rights reserved.
 */
 
@@ -78,25 +78,20 @@
 
 @implementation WebController (WebPrivate)
 
-- (WebFrame *)createFrameNamed: (NSString *)fname for: (WebDataSource *)childDataSource inParent: (WebFrame *)parent allowsScrolling: (BOOL)allowsScrolling
+- (WebFrame *)_createFrameNamed:(NSString *)fname inParent:(WebFrame *)parent allowsScrolling:(BOOL)allowsScrolling
 {
-    WebView *childView;
-    WebFrame *newFrame;
+    WebView *childView = [[WebView alloc] initWithFrame:NSMakeRect(0,0,0,0)];
 
-    childView = [[WebView alloc] initWithFrame: NSMakeRect(0,0,0,0)];
-
-    newFrame = [[WebFrame alloc] initWithName: fname webView: childView provisionalDataSource: childDataSource controller: self];
-
-    [parent _addChild: newFrame];
+    [childView _setController:self];
+    [childView setAllowsScrolling:allowsScrolling];
     
-    [newFrame release];
+    WebFrame *newFrame = [[WebFrame alloc] initWithName:fname webView:childView provisionalDataSource:nil controller:self];
 
-    [childView _setController: self];
-    [childDataSource _setController: self];
+    [childView release];
 
-    [childView setAllowsScrolling: allowsScrolling];
+    [parent _addChild:newFrame];
     
-    [childView release];
+    [newFrame release];
         
     return newFrame;
 }
@@ -255,4 +250,15 @@
     }
 }
 
+- (WebController *)_openNewWindowWithURL:(NSURL *)URL referrer:(NSString *)referrer behind:(BOOL)behind
+{
+    WebController *newWindowController = [[self windowOperationsDelegate] createWindowWithURL:URL referrer:referrer];
+    if (behind) {
+        [[newWindowController windowOperationsDelegate] showWindowBehindFrontmost];
+    } else {
+        [[newWindowController windowOperationsDelegate] showWindow];
+    }
+    return newWindowController;
+}
+
 @end
diff --git a/WebKit/WebView.subproj/WebWindowOperationsDelegate.h b/WebKit/WebView.subproj/WebWindowOperationsDelegate.h
index 7b15d41..17ba572 100644
--- a/WebKit/WebView.subproj/WebWindowOperationsDelegate.h
+++ b/WebKit/WebView.subproj/WebWindowOperationsDelegate.h
@@ -17,15 +17,35 @@
     windows and control aspects of existing windows.
 */
 @protocol WebWindowOperationsDelegate <NSObject>
+
 /*!
-    @method openNewWindowWithURL:referrer:
-    @abstract Open a new window and load the specified URL.
-    @param URL The URL to load.
+    @method createWindowWithURL:referrer:
+    @abstract Create a new window and begin to load the specified URL.
+    @discussion The newly created window is hidden, and the window operations delegate on the
+    new controllers will get a showWindow or showWindowBehindFrontmost call.
+    @param URL The URL to load, may be nil.
     @param referrer The referrer to use when loading the URL.
-    @param behind YES to open the window behind this one, NO to open it in front.
     @result The WebController for the WebView in the new window.
 */
-- (WebController *)openNewWindowWithURL:(NSURL *)URL referrer:(NSString *)referrer behind:(BOOL)behind;
+- (WebController *)createWindowWithURL:(NSURL *)URL referrer:(NSString *)referrer;
+
+/*!
+    @method showWindow
+    @abstract Show the window that contains the top level view of the controller,
+    ordering it frontmost.
+    @discussion This will only be called just after createWindowWithURL:referrer:
+    is used to create a new window.
+*/
+- (void)showWindow;
+
+/*!
+    @method showWindowBehindFrontmost
+    @abstract Show the window that contains the top level view of the controller,
+    ordering it behind the main window.
+    @discussion This will only be called just after createWindowWithURL:referrer:
+    is used to create a new window.
+*/
+- (void)showWindowBehindFrontmost;
 
 /*!
     @method setStatusText:
@@ -106,5 +126,3 @@
 - (NSWindow *)window;
 
 @end
-
-

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list