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

rjw rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:38:41 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit d59dab2d71809bb0f5c91c431f148c637215cadc
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Apr 25 03:26:11 2003 +0000

    WebKit:
            Final API review changes.
    
            Renamed WebWindowOperationsDelegate to WebUIDelegate.
            Merged WebContextMenuDelegate into WebUIDelegate.
            Fixed crasher if history file doesn't exist.
    
            Reviewed by Ken.
    
            * History.subproj/WebHistory.h:
            * History.subproj/WebHistoryPrivate.m:
            (-[WebHistoryPrivate _loadHistoryGuts:URL:error:]):
            * Misc.subproj/WebKit.h:
            * Plugins.subproj/WebBaseNetscapePluginView.m:
            (-[WebBaseNetscapePluginView loadPluginRequest:]):
            (-[WebBaseNetscapePluginView status:]):
            * Plugins.subproj/WebPluginController.m:
            (-[WebPluginController showStatus:]):
            * WebCoreSupport.subproj/WebBridge.h:
            * WebCoreSupport.subproj/WebBridge.m:
            (-[WebBridge createWindowWithURL:frameName:]):
            (-[WebBridge showWindow]):
            (-[WebBridge areToolbarsVisible]):
            (-[WebBridge setToolbarsVisible:]):
            (-[WebBridge isStatusBarVisible]):
            (-[WebBridge setStatusBarVisible:]):
            (-[WebBridge setWindowFrame:]):
            (-[WebBridge windowFrame]):
            (-[WebBridge setWindowContentRect:]):
            (-[WebBridge windowContentRect]):
            (-[WebBridge setWindowIsResizable:]):
            (-[WebBridge windowIsResizable]):
            (-[WebBridge firstResponder]):
            (-[WebBridge makeFirstResponder:]):
            (-[WebBridge closeWindow]):
            (-[WebBridge runJavaScriptAlertPanelWithMessage:]):
            (-[WebBridge runJavaScriptConfirmPanelWithMessage:]):
            (-[WebBridge runJavaScriptTextInputPanelWithPrompt:defaultText:returningText:]):
            (-[WebBridge runOpenPanelForFileButtonWithResultListener:]):
            (-[WebBridge setStatusText:]):
            (-[WebBridge focusWindow]):
            * WebKit.exp:
            * WebKit.pbproj/project.pbxproj:
            * WebView.subproj/WebContextMenuDelegate.h: Removed.
            * WebView.subproj/WebDefaultContextMenuDelegate.h:
            * WebView.subproj/WebDefaultContextMenuDelegate.m:
            * WebView.subproj/WebDefaultUIDelegate.h:
            * WebView.subproj/WebDefaultUIDelegate.m:
            (+[WebDefaultUIDelegate sharedUIDelegate]):
            (-[WebDefaultUIDelegate dealloc]):
            * WebView.subproj/WebDefaultWindowOperationsDelegate.h: Removed.
            * WebView.subproj/WebDefaultWindowOperationsDelegate.m: Removed.
            * WebView.subproj/WebFrame.m:
            * WebView.subproj/WebFramePrivate.m:
            (-[WebFrame _continueLoadRequestAfterNewWindowPolicy:frameName:formState:]):
            * WebView.subproj/WebFrameView.m:
            * WebView.subproj/WebHTMLViewPrivate.m:
            * WebView.subproj/WebUIDelegate.h:
            * WebView.subproj/WebView.h:
            * WebView.subproj/WebView.m:
            (-[WebView setUIDelegate:]):
            (-[WebView UIDelegate]):
            (-[WebView downloadDelegate]):
            * WebView.subproj/WebViewPrivate.h:
            * WebView.subproj/WebViewPrivate.m:
            (-[WebViewPrivate init]):
            (-[WebViewPrivate dealloc]):
            (-[WebView _openNewWindowWithRequest:]):
            (-[WebView _menuForElement:]):
            (-[WebView _mouseDidMoveOverElement:modifierFlags:]):
            (-[WebView _UIDelegateForwarder]):
            * WebView.subproj/WebWindowOperationsDelegate.h: Removed.
    
    WebBrowser:
            Final API review changes.
    
            Renamed WebWindowOperationsDelegate to WebUIDelegate.
            Merged WebContextMenuDelegate into WebUIDelegate.
    
            Reviewed by Ken.
    
            * BrowserDocument.h:
            * BrowserDocument.m:
            * BrowserWebController.h:
            * BrowserWebController.m:
            (-[BrowserWebController initWithDocument:request:frameName:]):
            (-[BrowserWebController dealloc]):
            (-[BrowserWebController close]):
            * ContextMenuHandler.h: Removed.
            * ContextMenuHandler.m:
            * WebBrowser.pbproj/project.pbxproj:
    
    Tests:
            Final API review changes.
    
            Renamed WebWindowOperationsDelegate to WebUIDelegate.
            Merged WebContextMenuDelegate into WebUIDelegate.
    
            Reviewed by Ken.
    
            * ChangeLog:
            * DumpBackForward/main.m:
            (main):
            * SimpleViewer/DocumentController.m:
            (-[DocumentController loadURL:]):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@4183 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 47ae997..654451e 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,6 +1,80 @@
 2003-04-24  Richard Williamson   <rjw at apple.com>
 
         Final API review changes.
+        
+        Renamed WebWindowOperationsDelegate to WebUIDelegate.
+        Merged WebContextMenuDelegate into WebUIDelegate.
+        Fixed crasher if history file doesn't exist.
+        
+        Reviewed by Ken.
+
+        * History.subproj/WebHistory.h:
+        * History.subproj/WebHistoryPrivate.m:
+        (-[WebHistoryPrivate _loadHistoryGuts:URL:error:]):
+        * Misc.subproj/WebKit.h:
+        * Plugins.subproj/WebBaseNetscapePluginView.m:
+        (-[WebBaseNetscapePluginView loadPluginRequest:]):
+        (-[WebBaseNetscapePluginView status:]):
+        * Plugins.subproj/WebPluginController.m:
+        (-[WebPluginController showStatus:]):
+        * WebCoreSupport.subproj/WebBridge.h:
+        * WebCoreSupport.subproj/WebBridge.m:
+        (-[WebBridge createWindowWithURL:frameName:]):
+        (-[WebBridge showWindow]):
+        (-[WebBridge areToolbarsVisible]):
+        (-[WebBridge setToolbarsVisible:]):
+        (-[WebBridge isStatusBarVisible]):
+        (-[WebBridge setStatusBarVisible:]):
+        (-[WebBridge setWindowFrame:]):
+        (-[WebBridge windowFrame]):
+        (-[WebBridge setWindowContentRect:]):
+        (-[WebBridge windowContentRect]):
+        (-[WebBridge setWindowIsResizable:]):
+        (-[WebBridge windowIsResizable]):
+        (-[WebBridge firstResponder]):
+        (-[WebBridge makeFirstResponder:]):
+        (-[WebBridge closeWindow]):
+        (-[WebBridge runJavaScriptAlertPanelWithMessage:]):
+        (-[WebBridge runJavaScriptConfirmPanelWithMessage:]):
+        (-[WebBridge runJavaScriptTextInputPanelWithPrompt:defaultText:returningText:]):
+        (-[WebBridge runOpenPanelForFileButtonWithResultListener:]):
+        (-[WebBridge setStatusText:]):
+        (-[WebBridge focusWindow]):
+        * WebKit.exp:
+        * WebKit.pbproj/project.pbxproj:
+        * WebView.subproj/WebContextMenuDelegate.h: Removed.
+        * WebView.subproj/WebDefaultContextMenuDelegate.h:
+        * WebView.subproj/WebDefaultContextMenuDelegate.m:
+        * WebView.subproj/WebDefaultUIDelegate.h:
+        * WebView.subproj/WebDefaultUIDelegate.m:
+        (+[WebDefaultUIDelegate sharedUIDelegate]):
+        (-[WebDefaultUIDelegate dealloc]):
+        * WebView.subproj/WebDefaultWindowOperationsDelegate.h: Removed.
+        * WebView.subproj/WebDefaultWindowOperationsDelegate.m: Removed.
+        * WebView.subproj/WebFrame.m:
+        * WebView.subproj/WebFramePrivate.m:
+        (-[WebFrame _continueLoadRequestAfterNewWindowPolicy:frameName:formState:]):
+        * WebView.subproj/WebFrameView.m:
+        * WebView.subproj/WebHTMLViewPrivate.m:
+        * WebView.subproj/WebUIDelegate.h:
+        * WebView.subproj/WebView.h:
+        * WebView.subproj/WebView.m:
+        (-[WebView setUIDelegate:]):
+        (-[WebView UIDelegate]):
+        (-[WebView downloadDelegate]):
+        * WebView.subproj/WebViewPrivate.h:
+        * WebView.subproj/WebViewPrivate.m:
+        (-[WebViewPrivate init]):
+        (-[WebViewPrivate dealloc]):
+        (-[WebView _openNewWindowWithRequest:]):
+        (-[WebView _menuForElement:]):
+        (-[WebView _mouseDidMoveOverElement:modifierFlags:]):
+        (-[WebView _UIDelegateForwarder]):
+        * WebView.subproj/WebWindowOperationsDelegate.h: Removed.
+
+2003-04-24  Richard Williamson   <rjw at apple.com>
+
+        Final API review changes.
 
         * History.subproj/WebHistoryItem.h:
         * History.subproj/WebHistoryItem.m:
diff --git a/WebKit/History.subproj/WebHistory.h b/WebKit/History.subproj/WebHistory.h
index dfff218..5c93b8d 100644
--- a/WebKit/History.subproj/WebHistory.h
+++ b/WebKit/History.subproj/WebHistory.h
@@ -56,6 +56,7 @@ extern NSString *WebHistoryItemsKey;
 /*!
     @method loadFromURL:error:
     @param URL The URL to use to initialize the WebHistory.
+    @param error Set to nil or an NSError instance if an error occurred.
     @abstract The designated initializer for WebHistory.
     @result Returns an initialized WebHistory.
 */
@@ -64,6 +65,8 @@ extern NSString *WebHistoryItemsKey;
 /*!
     @method saveToURL:error:
     @discussion Save history to URL. It is the client's responsibility to call this at appropriate times.
+    @param URL The URL to use to save the WebHistory.
+    @param error Set to nil or an NSError instance if an error occurred.
     @result Returns YES if successful, NO otherwise.
 */
 - (BOOL)saveToURL:(NSURL *)URL error:(NSError **)error;
diff --git a/WebKit/History.subproj/WebHistoryPrivate.m b/WebKit/History.subproj/WebHistoryPrivate.m
index 1c71628..8a23194 100644
--- a/WebKit/History.subproj/WebHistoryPrivate.m
+++ b/WebKit/History.subproj/WebHistoryPrivate.m
@@ -351,13 +351,14 @@ NSString *DatesArrayKey = @"WebHistoryDates";
     int index;
     int limit;
     NSCalendarDate *ageLimitDate;
-    NSDictionary *fileAsDictionary;
+    NSDictionary *fileAsDictionary = nil;
     BOOL ageLimitPassed;
 
     *numberOfItemsLoaded = 0;
 
     NSData *data = [NSURLConnection sendSynchronousRequest:[NSURLRequest requestWithURL:URL] returningResponse:nil error:error];
-    fileAsDictionary = [NSPropertyListSerialization propertyListFromData:data mutabilityOption:NSPropertyListImmutable format:nil errorDescription:nil];
+    if (data && [data length] > 0)
+        fileAsDictionary = [NSPropertyListSerialization propertyListFromData:data mutabilityOption:NSPropertyListImmutable format:nil errorDescription:nil];
     if (fileAsDictionary == nil) {
         // Couldn't read a dictionary; let's see if we can read an old-style array instead
         NSArray *fileAsArray = [NSArray arrayWithContentsOfURL:URL];
diff --git a/WebKit/Misc.subproj/WebKit.h b/WebKit/Misc.subproj/WebKit.h
index e5ad50d..4653efa 100644
--- a/WebKit/Misc.subproj/WebKit.h
+++ b/WebKit/Misc.subproj/WebKit.h
@@ -4,7 +4,6 @@
 */
 
 #import <WebKit/WebBackForwardList.h>
-#import <WebKit/WebContextMenuDelegate.h>
 #import <WebKit/WebDataSource.h>
 #import <WebKit/WebDocument.h>
 #import <WebKit/WebDownload.h>
@@ -19,4 +18,4 @@
 #import <WebKit/WebResourceLoadDelegate.h>
 #import <WebKit/WebStandardPanels.h>
 #import <WebKit/WebView.h>
-#import <WebKit/WebWindowOperationsDelegate.h>
+#import <WebKit/WebUIDelegate.h>
diff --git a/WebKit/Plugins.subproj/WebBaseNetscapePluginView.m b/WebKit/Plugins.subproj/WebBaseNetscapePluginView.m
index 369a496..5b950c4 100644
--- a/WebKit/Plugins.subproj/WebBaseNetscapePluginView.m
+++ b/WebKit/Plugins.subproj/WebBaseNetscapePluginView.m
@@ -7,7 +7,7 @@
 
 #import <WebKit/WebBridge.h>
 #import <WebKit/WebDataSource.h>
-#import <WebKit/WebDefaultWindowOperationsDelegate.h>
+#import <WebKit/WebDefaultUIDelegate.h>
 #import <WebKit/WebFrame.h>
 #import <WebKit/WebFramePrivate.h> 
 #import <WebKit/WebFrameView.h>
@@ -18,7 +18,7 @@
 #import <WebKit/WebNetscapePluginPackage.h>
 #import <WebKit/WebPreferences.h>
 #import <WebKit/WebViewPrivate.h>
-#import <WebKit/WebWindowOperationsDelegate.h>
+#import <WebKit/WebUIDelegate.h>
 
 #import <WebFoundation/WebAssertions.h>
 #import <WebFoundation/NSURLRequestPrivate.h>
@@ -1135,14 +1135,14 @@ typedef struct {
     if (frame == nil) {
 	WebView *newController = nil;
 	WebView *currentController = [self controller];
-	id wd = [currentController windowOperationsDelegate];
+	id wd = [currentController UIDelegate];
 	if ([wd respondsToSelector:@selector(webView:createWindowWithRequest:)])
 	    newController = [wd webView:currentController createWindowWithRequest:nil];
 	else
-	    newController = [[WebDefaultWindowOperationsDelegate sharedWindowOperationsDelegate] webView:currentController createWindowWithRequest:nil];
+	    newController = [[WebDefaultUIDelegate sharedUIDelegate] webView:currentController createWindowWithRequest:nil];
         
 	[newController _setTopLevelFrameName:frameName];
-	[[newController _windowOperationsDelegateForwarder] webViewShowWindow:newController];
+	[[newController _UIDelegateForwarder] webViewShowWindow:newController];
 	frame = [newController mainFrame];
     }
 
@@ -1361,7 +1361,7 @@ typedef struct {
     NSString *status = (NSString *)CFStringCreateWithCString(NULL, message, kCFStringEncodingWindowsLatin1);
     LOG(Plugins, "NPN_Status: %@", status);
     WebView *wv = [self controller];
-    [[wv _windowOperationsDelegateForwarder] webView:wv setStatusText:status];
+    [[wv _UIDelegateForwarder] webView:wv setStatusText:status];
     [status release];
 }
 
diff --git a/WebKit/Plugins.subproj/WebPluginController.m b/WebKit/Plugins.subproj/WebPluginController.m
index 8ecd338..aec7457 100644
--- a/WebKit/Plugins.subproj/WebPluginController.m
+++ b/WebKit/Plugins.subproj/WebPluginController.m
@@ -17,7 +17,7 @@
 #import <WebKit/WebPlugin.h>
 #import <WebKit/WebPluginContainer.h>
 #import <WebKit/WebViewPrivate.h>
-#import <WebKit/WebWindowOperationsDelegate.h>
+#import <WebKit/WebUIDelegate.h>
 
 #import <WebFoundation/NSURLRequest.h>
 
@@ -131,7 +131,7 @@
         return;
     }
     WebView *v = [_HTMLView _webView];
-    [[v _windowOperationsDelegateForwarder] webView:v setStatusText:message];
+    [[v _UIDelegateForwarder] webView:v setStatusText:message];
 }
 
 @end
diff --git a/WebKit/WebCoreSupport.subproj/WebBridge.h b/WebKit/WebCoreSupport.subproj/WebBridge.h
index a9be60e..de84bbf 100644
--- a/WebKit/WebCoreSupport.subproj/WebBridge.h
+++ b/WebKit/WebCoreSupport.subproj/WebBridge.h
@@ -9,7 +9,7 @@
 #import <WebCore/WebCoreBridge.h>
 
 #import <WebKit/WebDataSource.h>
-#import <WebKit/WebWindowOperationsDelegate.h>
+#import <WebKit/WebUIDelegate.h>
 
 @interface WebBridge : WebCoreBridge <WebCoreBridge>
 {
diff --git a/WebKit/WebCoreSupport.subproj/WebBridge.m b/WebKit/WebCoreSupport.subproj/WebBridge.m
index d4e5c0b..230a2bb 100644
--- a/WebKit/WebCoreSupport.subproj/WebBridge.m
+++ b/WebKit/WebCoreSupport.subproj/WebBridge.m
@@ -11,7 +11,7 @@
 #import <WebKit/WebBaseResourceHandleDelegate.h>
 #import <WebKit/WebDataSourcePrivate.h>
 #import <WebKit/WebDefaultResourceLoadDelegate.h>
-#import <WebKit/WebDefaultWindowOperationsDelegate.h>
+#import <WebKit/WebDefaultUIDelegate.h>
 #import <WebKit/WebFileButton.h>
 #import <WebKit/WebFormDelegate.h>
 #import <WebKit/WebFramePrivate.h>
@@ -37,7 +37,7 @@
 #import <WebKit/WebResourceLoadDelegate.h>
 #import <WebKit/WebSubresourceClient.h>
 #import <WebKit/WebViewPrivate.h>
-#import <WebKit/WebWindowOperationsDelegate.h>
+#import <WebKit/WebUIDelegate.h>
 
 #import <WebFoundation/WebAssertions.h>
 
@@ -112,13 +112,13 @@
     }
 
     WebView *currentController = [frame webView];
-    id wd = [currentController windowOperationsDelegate];
+    id wd = [currentController UIDelegate];
     WebView *newController = nil;
     
     if ([wd respondsToSelector:@selector(webView:createWindowWithRequest:)])
         newController = [wd webView:currentController createWindowWithRequest:request];
     else
-        newController = [[WebDefaultWindowOperationsDelegate sharedWindowOperationsDelegate] webView:currentController createWindowWithRequest:request];
+        newController = [[WebDefaultUIDelegate sharedUIDelegate] webView:currentController createWindowWithRequest:request];
     [newController _setTopLevelFrameName:name];
     return [[newController mainFrame] _bridge];
 }
@@ -126,24 +126,24 @@
 - (void)showWindow
 {
     WebView *c = [frame webView];
-    [[c _windowOperationsDelegateForwarder] webViewShowWindow: c];
+    [[c _UIDelegateForwarder] webViewShowWindow: c];
 }
 
 - (BOOL)areToolbarsVisible
 {
     ASSERT(frame != nil);
     WebView *c = [frame webView];
-    id wd = [c windowOperationsDelegate];
+    id wd = [c UIDelegate];
     if ([wd respondsToSelector: @selector(webViewAreToolbarsVisible:)])
         return [wd webViewAreToolbarsVisible: c];
-    return [[WebDefaultWindowOperationsDelegate sharedWindowOperationsDelegate] webViewAreToolbarsVisible:c];
+    return [[WebDefaultUIDelegate sharedUIDelegate] webViewAreToolbarsVisible:c];
 }
 
 - (void)setToolbarsVisible:(BOOL)visible
 {
     ASSERT(frame != nil);
     WebView *c = [frame webView];
-    [[c _windowOperationsDelegateForwarder] webView:c setToolbarsVisible:visible];
+    [[c _UIDelegateForwarder] webView:c setToolbarsVisible:visible];
 }
 
 - (BOOL)areScrollbarsVisible
@@ -162,80 +162,80 @@
 {
     ASSERT(frame != nil);
     WebView *c = [frame webView];
-    id wd = [c windowOperationsDelegate];
+    id wd = [c UIDelegate];
     if ([wd respondsToSelector: @selector(webViewIsStatusBarVisible:)])
         return [wd webViewIsStatusBarVisible:c];
-    return [[WebDefaultWindowOperationsDelegate sharedWindowOperationsDelegate] webViewIsStatusBarVisible:c];
+    return [[WebDefaultUIDelegate sharedUIDelegate] webViewIsStatusBarVisible:c];
 }
 
 - (void)setStatusBarVisible:(BOOL)visible
 {
     ASSERT(frame != nil);
     WebView *c = [frame webView];
-    [[c _windowOperationsDelegateForwarder] webView:c setStatusBarVisible:visible];
+    [[c _UIDelegateForwarder] webView:c setStatusBarVisible:visible];
 }
 
 - (void)setWindowFrame:(NSRect)frameRect
 {
     ASSERT(frame != nil);
     WebView *webView = [frame webView];
-    [[webView _windowOperationsDelegateForwarder] webView:webView setFrame:frameRect];
+    [[webView _UIDelegateForwarder] webView:webView setFrame:frameRect];
 }
 
 - (NSRect)windowFrame
 {
     ASSERT(frame != nil);
     WebView *webView = [frame webView];
-    return [[webView _windowOperationsDelegateForwarder] webViewFrame:webView];
+    return [[webView _UIDelegateForwarder] webViewFrame:webView];
 }
 
 - (void)setWindowContentRect:(NSRect)contentRect
 {
     ASSERT(frame != nil);
     WebView *webView = [frame webView];
-    [[webView _windowOperationsDelegateForwarder] webView:webView setFrame:contentRect];
+    [[webView _UIDelegateForwarder] webView:webView setFrame:contentRect];
 }
 
 - (NSRect)windowContentRect
 {
     ASSERT(frame != nil);
     WebView *webView = [frame webView];
-    return [[webView _windowOperationsDelegateForwarder] webViewContentRect:webView];
+    return [[webView _UIDelegateForwarder] webViewContentRect:webView];
 }
 
 - (void)setWindowIsResizable:(BOOL)resizable
 {
     ASSERT(frame != nil);
     WebView *webView = [frame webView];
-    [[webView _windowOperationsDelegateForwarder] webView:webView setResizable:resizable];
+    [[webView _UIDelegateForwarder] webView:webView setResizable:resizable];
 }
 
 - (BOOL)windowIsResizable
 {
     ASSERT(frame != nil);
     WebView *webView = [frame webView];
-    return [[webView _windowOperationsDelegateForwarder] webViewIsResizable:webView];
+    return [[webView _UIDelegateForwarder] webViewIsResizable:webView];
 }
 
 - (NSResponder *)firstResponder
 {
     ASSERT(frame != nil);
     WebView *webView = [frame webView];
-    return [[webView _windowOperationsDelegateForwarder] webViewFirstResponderInWindow:webView];
+    return [[webView _UIDelegateForwarder] webViewFirstResponderInWindow:webView];
 }
 
 - (void)makeFirstResponder:(NSResponder *)view
 {
     ASSERT(frame != nil);
     WebView *webView = [frame webView];
-    [[webView _windowOperationsDelegateForwarder] webView:webView makeFirstResponderInWindow:view];
+    [[webView _UIDelegateForwarder] webView:webView makeFirstResponderInWindow:view];
 }
 
 - (void)closeWindow
 {
     ASSERT(frame != nil);
     WebView *webView = [frame webView];
-    [[webView _windowOperationsDelegateForwarder] webViewCloseWindow:webView];
+    [[webView _UIDelegateForwarder] webViewCloseWindow:webView];
 }
 
 
@@ -248,26 +248,26 @@
 - (void)runJavaScriptAlertPanelWithMessage:(NSString *)message
 {
     WebView *c = [frame webView];
-    [[c _windowOperationsDelegateForwarder] webView:c runJavaScriptAlertPanelWithMessage:message];
+    [[c _UIDelegateForwarder] webView:c runJavaScriptAlertPanelWithMessage:message];
 }
 
 - (BOOL)runJavaScriptConfirmPanelWithMessage:(NSString *)message
 {
     WebView *c = [frame webView];
-    id wd = [c windowOperationsDelegate];
+    id wd = [c UIDelegate];
     if ([wd respondsToSelector: @selector(webView:runJavaScriptConfirmPanelWithMessage:)])
         return [wd webView:c runJavaScriptConfirmPanelWithMessage:message];
-    return [[WebDefaultWindowOperationsDelegate sharedWindowOperationsDelegate] webView:c runJavaScriptConfirmPanelWithMessage:message];
+    return [[WebDefaultUIDelegate sharedUIDelegate] webView:c runJavaScriptConfirmPanelWithMessage:message];
 }
 
 - (BOOL)runJavaScriptTextInputPanelWithPrompt:(NSString *)prompt defaultText:(NSString *)defaultText returningText:(NSString **)result
 {
     WebView *c = [frame webView];
-    id wd = [c windowOperationsDelegate];
+    id wd = [c UIDelegate];
     if ([wd respondsToSelector: @selector(webView:runJavaScriptTextInputPanelWithPrompt:defaultText:)])
         *result = [wd webView:c runJavaScriptTextInputPanelWithPrompt:prompt defaultText:defaultText];
     else
-        *result = [[WebDefaultWindowOperationsDelegate sharedWindowOperationsDelegate] webView:c runJavaScriptTextInputPanelWithPrompt:prompt defaultText:defaultText];
+        *result = [[WebDefaultUIDelegate sharedUIDelegate] webView:c runJavaScriptTextInputPanelWithPrompt:prompt defaultText:defaultText];
     return *result != nil;
 }
 
@@ -279,7 +279,7 @@
 - (void)runOpenPanelForFileButtonWithResultListener:(id<WebOpenPanelResultListener>)resultListener
 {
     WebView *c = [frame webView];
-    [[c _windowOperationsDelegateForwarder] webView:c runOpenPanelForFileButtonWithResultListener:resultListener];
+    [[c _UIDelegateForwarder] webView:c runOpenPanelForFileButtonWithResultListener:resultListener];
 }
 
 
@@ -303,7 +303,7 @@
 {
     ASSERT(frame != nil);
     WebView *c = [frame webView];
-    [[c _windowOperationsDelegateForwarder] webView:c setStatusText:status];
+    [[c _UIDelegateForwarder] webView:c setStatusText:status];
 }
 
 - (void)receivedData:(NSData *)data withDataSource:(WebDataSource *)withDataSource
@@ -403,7 +403,7 @@
 
 - (void)focusWindow
 {
-    [[[frame webView] _windowOperationsDelegateForwarder] webViewFocusWindow:[frame webView]];
+    [[[frame webView] _UIDelegateForwarder] webViewFocusWindow:[frame webView]];
 }
 
 - (void)unfocusWindow
diff --git a/WebKit/WebKit.exp b/WebKit/WebKit.exp
index 18a3139..ae7b8f7 100644
--- a/WebKit/WebKit.exp
+++ b/WebKit/WebKit.exp
@@ -2,7 +2,6 @@
 .objc_class_name_WebCoreStatistics
 .objc_class_name_WebDataSource
 .objc_class_name_WebDebugDOMNode
-.objc_class_name_WebDefaultContextMenuDelegate
 .objc_class_name_WebDefaultPolicyDelegate
 .objc_class_name_WebDownload
 .objc_class_name_WebDynamicScrollBarsView
diff --git a/WebKit/WebKit.pbproj/project.pbxproj b/WebKit/WebKit.pbproj/project.pbxproj
index f9e733f..f4c87d1 100644
--- a/WebKit/WebKit.pbproj/project.pbxproj
+++ b/WebKit/WebKit.pbproj/project.pbxproj
@@ -256,7 +256,6 @@
 				F5C283740284676D018635CA,
 				65490EC903666E30000CED4B,
 				93154EF503A412E0008635CE,
-				5152FAD6033FC43400CA2ACD,
 				6523FAD1032DA06B005EFCFF,
 				3944608F020F50ED0ECA1767,
 				39446090020F50ED0ECA1767,
@@ -282,7 +281,6 @@
 				657D8FA10366687600FA1ED0,
 				35081DAA02B6D4E40ACA2ACA,
 				35081DAC02B6D4E40ACA2ACA,
-				511D5554033FD51000CA2ACD,
 				516F297003A6C45A00CA2D3A,
 				832B2D1603B10990009CF105,
 				8324709A03F32305003026AC,
@@ -295,7 +293,6 @@
 				F79B974A04019934036909D2,
 				700BC50D04144DA100A80182,
 				70BC9ED904144FC500A80182,
-				70BC9EDC0414514E00A80182,
 				84CA5F7F042685E800CA2ACA,
 				51A8B53004282B5900CA2D3A,
 				51A8B53404282BD200CA2D3A,
@@ -304,6 +301,8 @@
 				51443F9D0429392B00CA2D3A,
 				51443F9F0429392B00CA2D3A,
 				70ECD6CE043B727400A80181,
+				515E27CD0458C86500CA2D3A,
+				515E27D10458CA4B00CA2D3A,
 			);
 			isa = PBXHeadersBuildPhase;
 			runOnlyForDeploymentPostprocessing = 0;
@@ -414,13 +413,13 @@
 				F7FE633E040C4AFC03CA0DE6,
 				700BC50E04144DA100A80182,
 				70BC9ED704144F3200A80182,
-				70BC9EDD0414514E00A80182,
 				51A8B53104282B5900CA2D3A,
 				51A8B53504282BD200CA2D3A,
 				51A8B57C042834F700CA2D3A,
 				51A8B5800428353A00CA2D3A,
 				51443F9E0429392B00CA2D3A,
 				70ECD6CF043B727400A80181,
+				515E27D20458CA4B00CA2D3A,
 			);
 			isa = PBXSourcesBuildPhase;
 			runOnlyForDeploymentPostprocessing = 0;
@@ -1055,22 +1054,6 @@
 //512
 //513
 //514
-		511D5553033FD51000CA2ACD = {
-			fileEncoding = 4;
-			isa = PBXFileReference;
-			name = WebWindowOperationsDelegate.h;
-			path = WebView.subproj/WebWindowOperationsDelegate.h;
-			refType = 2;
-		};
-		511D5554033FD51000CA2ACD = {
-			fileRef = 511D5553033FD51000CA2ACD;
-			isa = PBXBuildFile;
-			settings = {
-				ATTRIBUTES = (
-					Public,
-				);
-			};
-		};
 		513D422E034CF55A00CA2ACD = {
 			fileEncoding = 30;
 			isa = PBXFileReference;
@@ -1120,22 +1103,6 @@
 				);
 			};
 		};
-		5152FAD5033FC43400CA2ACD = {
-			fileEncoding = 4;
-			isa = PBXFileReference;
-			name = WebContextMenuDelegate.h;
-			path = WebView.subproj/WebContextMenuDelegate.h;
-			refType = 2;
-		};
-		5152FAD6033FC43400CA2ACD = {
-			fileRef = 5152FAD5033FC43400CA2ACD;
-			isa = PBXBuildFile;
-			settings = {
-				ATTRIBUTES = (
-					Public,
-				);
-			};
-		};
 		5152FADD033FC50400CA2ACD = {
 			fileEncoding = 4;
 			isa = PBXFileReference;
@@ -1209,6 +1176,45 @@
 				);
 			};
 		};
+		515E27CC0458C86500CA2D3A = {
+			fileEncoding = 30;
+			isa = PBXFileReference;
+			path = WebUIDelegate.h;
+			refType = 4;
+		};
+		515E27CD0458C86500CA2D3A = {
+			fileRef = 515E27CC0458C86500CA2D3A;
+			isa = PBXBuildFile;
+			settings = {
+				ATTRIBUTES = (
+					Public,
+				);
+			};
+		};
+		515E27CF0458CA4B00CA2D3A = {
+			fileEncoding = 30;
+			isa = PBXFileReference;
+			path = WebDefaultUIDelegate.h;
+			refType = 4;
+		};
+		515E27D00458CA4B00CA2D3A = {
+			fileEncoding = 30;
+			isa = PBXFileReference;
+			path = WebDefaultUIDelegate.m;
+			refType = 4;
+		};
+		515E27D10458CA4B00CA2D3A = {
+			fileRef = 515E27CF0458CA4B00CA2D3A;
+			isa = PBXBuildFile;
+			settings = {
+			};
+		};
+		515E27D20458CA4B00CA2D3A = {
+			fileRef = 515E27D00458CA4B00CA2D3A;
+			isa = PBXBuildFile;
+			settings = {
+			};
+		};
 		516F296F03A6C45A00CA2D3A = {
 			fileEncoding = 30;
 			isa = PBXFileReference;
@@ -1660,30 +1666,6 @@
 			settings = {
 			};
 		};
-		70BC9EDA0414514E00A80182 = {
-			fileEncoding = 4;
-			isa = PBXFileReference;
-			path = WebDefaultWindowOperationsDelegate.h;
-			refType = 4;
-		};
-		70BC9EDB0414514E00A80182 = {
-			fileEncoding = 4;
-			isa = PBXFileReference;
-			path = WebDefaultWindowOperationsDelegate.m;
-			refType = 4;
-		};
-		70BC9EDC0414514E00A80182 = {
-			fileRef = 70BC9EDA0414514E00A80182;
-			isa = PBXBuildFile;
-			settings = {
-			};
-		};
-		70BC9EDD0414514E00A80182 = {
-			fileRef = 70BC9EDB0414514E00A80182;
-			isa = PBXBuildFile;
-			settings = {
-			};
-		};
 		70ECD6CC043B727400A80181 = {
 			fileEncoding = 30;
 			isa = PBXFileReference;
@@ -2426,7 +2408,6 @@
 				51F6866D0366057300CA2D3A,
 				933D659903413FF2008635CE,
 				933D659A03413FF2008635CE,
-				5152FAD5033FC43400CA2ACD,
 				6523FACF032DA06B005EFCFF,
 				6523FAD0032DA06B005EFCFF,
 				70ECD6CC043B727400A80181,
@@ -2443,8 +2424,8 @@
 				5152FAE0033FC50400CA2ACD,
 				700BC50B04144DA100A80182,
 				700BC50C04144DA100A80182,
-				70BC9EDA0414514E00A80182,
-				70BC9EDB0414514E00A80182,
+				515E27CF0458CA4B00CA2D3A,
+				515E27D00458CA4B00CA2D3A,
 				35081DAE02B6D4F50ACA2ACA,
 				3944606B020F50ED0ECA1767,
 				3944606C020F50ED0ECA1767,
@@ -2469,11 +2450,11 @@
 				F5AEBB3D024A527601C1A526,
 				9CAE9D070252A4130ECA16EA,
 				513D422E034CF55A00CA2ACD,
+				515E27CC0458C86500CA2D3A,
 				51A8B579042834F700CA2D3A,
 				51A8B57A042834F700CA2D3A,
 				51A8B57D0428353A00CA2D3A,
 				51A8B57E0428353A00CA2D3A,
-				511D5553033FD51000CA2ACD,
 			);
 			isa = PBXGroup;
 			name = WebView;
diff --git a/WebKit/WebView.subproj/WebContextMenuDelegate.h b/WebKit/WebView.subproj/WebContextMenuDelegate.h
deleted file mode 100644
index 968f0f0..0000000
--- a/WebKit/WebView.subproj/WebContextMenuDelegate.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*	
-        WebContextMenuDelegate.h
-	Copyright 2001, 2002, Apple Computer, Inc.
-
-        Public header file.
-*/
-
- at class WebView;
-
-/*!
-    @category WebContextMenuDelegate
-    @discussion WebContextMenuDelegate determine what context menu items are visible over
-    a clicked element.
-*/
-
-/*!
-    @enum WebMenuItemTag
-    @discussion Each menu item in the default menu items array passed in
-    contextMenuItemsForElement:defaultMenuItems: has its tag set to one of the WebMenuItemTags.
-    When iterating through the default menu items array, use the tag to differentiate between them.
-*/
-
-enum {
-    WebMenuItemTagOpenLinkInNewWindow=1,
-    WebMenuItemTagDownloadLinkToDisk,
-    WebMenuItemTagCopyLinkToClipboard,
-    WebMenuItemTagOpenImageInNewWindow,
-    WebMenuItemTagDownloadImageToDisk,
-    WebMenuItemTagCopyImageToClipboard,
-    WebMenuItemTagOpenFrameInNewWindow,
-    WebMenuItemTagCopy
-};
-
- at interface NSObject (WebContextMenuDelegate)
-
-/*!
-    @method contextMenuItemsForElement:defaultMenuItems:
-    @abstract Returns the menu items to display in an element's contextual menu.
-    @param controller The WebController requesting the context menus.
-    @param element A dictionary representation of the clicked element.
-    @param defaultMenuItems An array of default NSMenuItems to include in all contextual menus.
-    @result An array of NSMenuItems to include in the contextual menu.
-*/
-- (NSArray *)webView:(WebView *)webView contextMenuItemsForElement:(NSDictionary *)element defaultMenuItems:(NSArray *)defaultMenuItems;
-
- at end
-
-
-
diff --git a/WebKit/WebView.subproj/WebDefaultContextMenuDelegate.h b/WebKit/WebView.subproj/WebDefaultContextMenuDelegate.h
index 24765cc..2eafb2d 100644
--- a/WebKit/WebView.subproj/WebDefaultContextMenuDelegate.h
+++ b/WebKit/WebView.subproj/WebDefaultContextMenuDelegate.h
@@ -8,11 +8,7 @@
 
 #import <Foundation/Foundation.h>
 
+#import <WebKit/WebDefaultUIDelegate.h>
 
-
- at interface WebDefaultContextMenuDelegate : NSObject
-{
-    NSDictionary *element;
-}
-+ (WebDefaultContextMenuDelegate *)sharedContextMenuDelegate;
+ at interface WebDefaultUIDelegate (WebContextMenu)
 @end
diff --git a/WebKit/WebView.subproj/WebDefaultContextMenuDelegate.m b/WebKit/WebView.subproj/WebDefaultContextMenuDelegate.m
index 6cfb10e..7d0c8f9 100644
--- a/WebKit/WebView.subproj/WebDefaultContextMenuDelegate.m
+++ b/WebKit/WebView.subproj/WebDefaultContextMenuDelegate.m
@@ -2,18 +2,16 @@
       WebDefaultContextMenuDelegate.m
       Copyright 2002, Apple, Inc. All rights reserved.
 */
-
-#import <WebKit/WebContextMenuDelegate.h>
-
 #import <WebKit/WebBridge.h>
 #import <WebKit/WebDataSourcePrivate.h>
 #import <WebKit/WebDefaultContextMenuDelegate.h>
+#import <WebKit/WebDefaultUIDelegate.h>
 #import <WebKit/WebFramePrivate.h>
 #import <WebKit/WebNSPasteboardExtras.h>
 #import <WebKit/WebFrameView.h>
 #import <WebKit/WebPolicyDelegate.h>
 #import <WebKit/WebViewPrivate.h>
-#import <WebKit/WebWindowOperationsDelegate.h>
+#import <WebKit/WebUIDelegate.h>
 
 
 #import <WebFoundation/WebLocalizableStrings.h>
@@ -21,25 +19,7 @@
 #import <WebFoundation/NSURLRequest.h>
 #import <WebFoundation/NSURLRequestPrivate.h>
 
- at implementation WebDefaultContextMenuDelegate
-
-static WebDefaultContextMenuDelegate *sharedDelegate = nil;
-
-// Return a object with vanilla implementations of the protocol's methods
-// Note this feature relies on our default delegate being stateless
-+ (WebDefaultContextMenuDelegate *)sharedContextMenuDelegate
-{
-    if (!sharedDelegate) {
-        sharedDelegate = [[WebDefaultContextMenuDelegate alloc] init];
-    }
-    return sharedDelegate;
-}
-
-- (void)dealloc
-{
-    [element release];
-    [super dealloc];
-}
+ at implementation WebDefaultUIDelegate (WebContextMenu)
 
 - (NSMenuItem *)menuItemWithTag:(int)tag
 {
diff --git a/WebKit/WebView.subproj/WebDefaultUIDelegate.h b/WebKit/WebView.subproj/WebDefaultUIDelegate.h
index c951702..453d95f 100644
--- a/WebKit/WebView.subproj/WebDefaultUIDelegate.h
+++ b/WebKit/WebView.subproj/WebDefaultUIDelegate.h
@@ -8,6 +8,10 @@
 #import <Foundation/Foundation.h>
 
 
- at interface WebDefaultWindowOperationsDelegate : NSObject
-+ (WebDefaultWindowOperationsDelegate *)sharedWindowOperationsDelegate;
+ at interface WebDefaultUIDelegate : NSObject
+{
+    NSDictionary *element;
+}
+
++ (WebDefaultUIDelegate *)sharedUIDelegate;
 @end
diff --git a/WebKit/WebView.subproj/WebDefaultUIDelegate.m b/WebKit/WebView.subproj/WebDefaultUIDelegate.m
index 3563b00..be46aba 100644
--- a/WebKit/WebView.subproj/WebDefaultUIDelegate.m
+++ b/WebKit/WebView.subproj/WebDefaultUIDelegate.m
@@ -6,32 +6,37 @@
 
 #import <WebFoundation/NSURLRequest.h>
 
-#import <WebKit/WebDefaultWindowOperationsDelegate.h>
+#import <WebKit/WebDefaultUIDelegate.h>
 #import <WebKit/WebJavaScriptTextInputPanel.h>
 #import <WebKit/WebView.h>
-#import <WebKit/WebWindowOperationsDelegate.h>
+#import <WebKit/WebUIDelegate.h>
 
 @interface NSApplication (DeclarationStolenFromAppKit)
 - (void)_cycleWindowsReversed:(BOOL)reversed;
 @end
 
- at implementation WebDefaultWindowOperationsDelegate
+ at implementation WebDefaultUIDelegate
 
-static WebDefaultWindowOperationsDelegate *sharedDelegate = nil;
+static WebDefaultUIDelegate *sharedDelegate = nil;
 
 // Return a object with vanilla implementations of the protocol's methods
 // Note this feature relies on our default delegate being stateless.  This
-// is probably an invalid assumption for the WebWindowOperationsDelegate.
+// is probably an invalid assumption for the WebUIDelegate.
 // If we add any real functionality to this default delegate we probably
 // won't be able to use a singleton.
-+ (WebDefaultWindowOperationsDelegate *)sharedWindowOperationsDelegate
++ (WebDefaultUIDelegate *)sharedUIDelegate
 {
     if (!sharedDelegate) {
-        sharedDelegate = [[WebDefaultWindowOperationsDelegate alloc] init];
+        sharedDelegate = [[WebDefaultUIDelegate alloc] init];
     }
     return sharedDelegate;
 }
 
+- (void)dealloc
+{
+    [element release];
+    [super dealloc];
+}
 
 - (WebView *)webView: (WebView *)wv createWindowWithRequest:(NSURLRequest *)request
 {
diff --git a/WebKit/WebView.subproj/WebDefaultWindowOperationsDelegate.h b/WebKit/WebView.subproj/WebDefaultWindowOperationsDelegate.h
deleted file mode 100644
index c951702..0000000
--- a/WebKit/WebView.subproj/WebDefaultWindowOperationsDelegate.h
+++ /dev/null
@@ -1,13 +0,0 @@
-/*	
-    WebDefaultPolicyDelegate.h
-    Copyright 2003, Apple Computer, Inc.
-    
-    Private header file.
-*/
-
-#import <Foundation/Foundation.h>
-
-
- at interface WebDefaultWindowOperationsDelegate : NSObject
-+ (WebDefaultWindowOperationsDelegate *)sharedWindowOperationsDelegate;
- at end
diff --git a/WebKit/WebView.subproj/WebDefaultWindowOperationsDelegate.m b/WebKit/WebView.subproj/WebDefaultWindowOperationsDelegate.m
deleted file mode 100644
index 3563b00..0000000
--- a/WebKit/WebView.subproj/WebDefaultWindowOperationsDelegate.m
+++ /dev/null
@@ -1,168 +0,0 @@
-/*	
-    WebDefaultPolicyDelegate.m
-    Copyright 2003, Apple Computer, Inc.
-*/
-#import <Cocoa/Cocoa.h>
-
-#import <WebFoundation/NSURLRequest.h>
-
-#import <WebKit/WebDefaultWindowOperationsDelegate.h>
-#import <WebKit/WebJavaScriptTextInputPanel.h>
-#import <WebKit/WebView.h>
-#import <WebKit/WebWindowOperationsDelegate.h>
-
- at interface NSApplication (DeclarationStolenFromAppKit)
-- (void)_cycleWindowsReversed:(BOOL)reversed;
- at end
-
- at implementation WebDefaultWindowOperationsDelegate
-
-static WebDefaultWindowOperationsDelegate *sharedDelegate = nil;
-
-// Return a object with vanilla implementations of the protocol's methods
-// Note this feature relies on our default delegate being stateless.  This
-// is probably an invalid assumption for the WebWindowOperationsDelegate.
-// If we add any real functionality to this default delegate we probably
-// won't be able to use a singleton.
-+ (WebDefaultWindowOperationsDelegate *)sharedWindowOperationsDelegate
-{
-    if (!sharedDelegate) {
-        sharedDelegate = [[WebDefaultWindowOperationsDelegate alloc] init];
-    }
-    return sharedDelegate;
-}
-
-
-- (WebView *)webView: (WebView *)wv createWindowWithRequest:(NSURLRequest *)request
-{
-    return nil;
-}
-
-- (void)webViewShowWindow: (WebView *)wv
-{
-}
-
-- (void)webViewCloseWindow: (WebView *)wv
-{
-    [[wv window] close];
-}
-
-- (void)webViewFocusWindow: (WebView *)wv
-{
-    [[wv window] makeKeyAndOrderFront:wv];
-}
-
-- (void)webViewUnfocusWindow: (WebView *)wv
-{
-    if ([[wv window] isKeyWindow] || [[[wv window] attachedSheet] isKeyWindow]) {
-	[NSApp _cycleWindowsReversed:FALSE];
-    }
-}
-
-- (NSResponder *)webViewFirstResponderInWindow: (WebView *)wv;
-{
-    return [[wv window] firstResponder];
-}
-
-- (void)webView: (WebView *)wv makeFirstResponderInWindow:(NSResponder *)responder
-{
-    [[wv window] makeFirstResponder:responder];
-}
-
-- (void)webView: (WebView *)wv setStatusText:(NSString *)text
-{
-}
-
-- (NSString *)webViewStatusText: (WebView *)wv
-{
-    return nil;
-}
-
-- (void)webView: (WebView *)wv mouseDidMoveOverElement:(NSDictionary *)elementInformation modifierFlags:(unsigned int)modifierFlags
-{
-}
-
-- (BOOL)webViewAreToolbarsVisible: (WebView *)wv
-{
-    return NO;
-}
-
-- (void)webView: (WebView *)wv setToolbarsVisible:(BOOL)visible
-{
-}
-
-- (BOOL)webViewIsStatusBarVisible: (WebView *)wv
-{
-    return NO;
-}
-
-- (void)webView: (WebView *)wv setStatusBarVisible:(BOOL)visible
-{
-}
-
-- (BOOL)webViewIsResizable: (WebView *)wv
-{
-    return [[wv window] showsResizeIndicator];
-}
-
-- (void)webView: (WebView *)wv setResizable:(BOOL)resizable;
-{
-    // FIXME: This doesn't actually change the resizability of the window,
-    // only visibility of the indicator.
-    [[wv window] setShowsResizeIndicator:resizable];
-}
-
-- (void)webView: (WebView *)wv setFrame:(NSRect)frame
-{
-    [[wv window] setFrame:frame display:YES];
-}
-
-- (NSRect)webViewFrame: (WebView *)wv
-{
-    NSWindow *window = [wv window];
-    return window == nil ? NSZeroRect : [window frame];
-}
-
-- (void)webView:(WebView *)webView setContentRect:(NSRect)contentRect
-{
-    [self webView:webView setFrame:[NSWindow frameRectForContentRect:contentRect styleMask:[[webView window] styleMask]]];
-}
-
-- (NSRect)webViewContentRect:(WebView *)webView
-{
-    NSWindow *window = [webView window];
-    return window == nil ? NSZeroRect : [NSWindow contentRectForFrameRect:[window frame] styleMask:[window styleMask]];
-}
-
-- (void)webView: (WebView *)wv runJavaScriptAlertPanelWithMessage:(NSString *)message
-{
-    // FIXME: We want a default here, but that would add localized strings.
-}
-
-- (BOOL)webView: (WebView *)wv runJavaScriptConfirmPanelWithMessage:(NSString *)message
-{
-    // FIXME: We want a default here, but that would add localized strings.
-    return NO;
-}
-
-- (NSString *)webView: (WebView *)wv runJavaScriptTextInputPanelWithPrompt:(NSString *)prompt defaultText:(NSString *)defaultText
-{
-    WebJavaScriptTextInputPanel *panel = [[WebJavaScriptTextInputPanel alloc] initWithPrompt:prompt text:defaultText];
-    [panel showWindow:nil];
-    NSString *result;
-    if ([NSApp runModalForWindow:[panel window]]) {
-        result = [panel text];
-    } else {
-	result = nil;
-    }
-    [[panel window] close];
-    [panel release];
-    return result;
-}
-
-- (void)webView: (WebView *)wv runOpenPanelForFileButtonWithResultListener:(id<WebOpenPanelResultListener>)resultListener
-{
-    // FIXME: We want a default here, but that would add localized strings.
-}
-
- at end
diff --git a/WebKit/WebView.subproj/WebFrame.m b/WebKit/WebView.subproj/WebFrame.m
index bcc8bdb..aa75885 100644
--- a/WebKit/WebView.subproj/WebFrame.m
+++ b/WebKit/WebView.subproj/WebFrame.m
@@ -20,7 +20,7 @@
 #import <WebKit/WebKitLogging.h>
 #import <WebKit/WebLocationChangeDelegate.h>
 #import <WebKit/WebViewPrivate.h>
-#import <WebKit/WebWindowOperationsDelegate.h>
+#import <WebKit/WebUIDelegate.h>
 
 #import <WebFoundation/NSURLRequest.h>
 #import <WebFoundation/WebNSURLExtras.h>
diff --git a/WebKit/WebView.subproj/WebFramePrivate.m b/WebKit/WebView.subproj/WebFramePrivate.m
index 6e2a0d8..ca87ebb 100644
--- a/WebKit/WebView.subproj/WebFramePrivate.m
+++ b/WebKit/WebView.subproj/WebFramePrivate.m
@@ -11,7 +11,7 @@
 #import <WebKit/WebDataProtocol.h>
 #import <WebKit/WebDataSource.h>
 #import <WebKit/WebDataSourcePrivate.h>
-#import <WebKit/WebDefaultWindowOperationsDelegate.h>
+#import <WebKit/WebDefaultUIDelegate.h>
 #import <WebKit/WebDocument.h>
 #import <WebKit/WebDynamicScrollBarsView.h>
 #import <WebKit/WebFormDelegate.h>
@@ -1557,14 +1557,14 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
     
     WebView *controller = nil;
     WebView *currentController = [self webView];
-    id wd = [currentController windowOperationsDelegate];
+    id wd = [currentController UIDelegate];
     if ([wd respondsToSelector:@selector(webView:createWindowWithRequest:)])
 	controller = [wd webView:currentController createWindowWithRequest:nil];
     else
-        controller = [[WebDefaultWindowOperationsDelegate sharedWindowOperationsDelegate] webView:currentController createWindowWithRequest:nil];
+        controller = [[WebDefaultUIDelegate sharedUIDelegate] webView:currentController createWindowWithRequest:nil];
         
     [controller _setTopLevelFrameName:frameName];
-    [[controller _windowOperationsDelegateForwarder] webViewShowWindow:controller];
+    [[controller _UIDelegateForwarder] webViewShowWindow:controller];
     WebFrame *frame = [controller mainFrame];
 
     [frame _loadRequest:request triggeringAction:nil loadType:WebFrameLoadTypeStandard formState:formState];
diff --git a/WebKit/WebView.subproj/WebFrameView.m b/WebKit/WebView.subproj/WebFrameView.m
index 27919a0..75f78fb 100644
--- a/WebKit/WebView.subproj/WebFrameView.m
+++ b/WebKit/WebView.subproj/WebFrameView.m
@@ -23,7 +23,6 @@
 #import <WebKit/WebTextView.h>
 #import <WebKit/WebViewFactory.h>
 #import <WebKit/WebViewPrivate.h>
-#import <WebKit/WebWindowOperationsDelegate.h>
 
 #import <WebFoundation/WebNSDictionaryExtras.h>
 #import <WebFoundation/WebNSURLExtras.h>
diff --git a/WebKit/WebView.subproj/WebHTMLViewPrivate.m b/WebKit/WebView.subproj/WebHTMLViewPrivate.m
index df08ff7..b819eff 100644
--- a/WebKit/WebView.subproj/WebHTMLViewPrivate.m
+++ b/WebKit/WebView.subproj/WebHTMLViewPrivate.m
@@ -14,7 +14,6 @@
 #import <WebCore/WebCoreFirstResponderChanges.h>
 
 #import <WebKit/WebBridge.h>
-#import <WebKit/WebContextMenuDelegate.h>
 #import <WebKit/WebDataSourcePrivate.h>
 #import <WebKit/WebFramePrivate.h>
 #import <WebKit/WebFrameViewPrivate.h>
@@ -28,8 +27,8 @@
 #import <WebKit/WebPolicyDelegate.h>
 #import <WebKit/WebPreferences.h>
 #import <WebKit/WebStringTruncator.h>
+#import <WebKit/WebUIDelegate.h>
 #import <WebKit/WebViewPrivate.h>
-#import <WebKit/WebWindowOperationsDelegate.h>
 
 // Imported for direct call to class_poseAs.  Should be removed
 // if we ever drop posing hacks.
diff --git a/WebKit/WebView.subproj/WebUIDelegate.h b/WebKit/WebView.subproj/WebUIDelegate.h
index fba85d0..84d2a64 100644
--- a/WebKit/WebView.subproj/WebUIDelegate.h
+++ b/WebKit/WebView.subproj/WebUIDelegate.h
@@ -1,5 +1,5 @@
 /*
-        WebWindowOperationsDelegate.h
+        WebUIDelegate.h
         Copyright 2001, 2002, Apple Computer, Inc.
         
         Public header file.
@@ -9,11 +9,28 @@
 #import <WebFoundation/NSURLRequest.h>
 
 /*!
+ at enum WebMenuItemTag
+ @discussion Each menu item in the default menu items array passed in
+ contextMenuItemsForElement:defaultMenuItems: has its tag set to one of the WebMenuItemTags.
+ When iterating through the default menu items array, use the tag to differentiate between them.
+ */
+
+enum {
+    WebMenuItemTagOpenLinkInNewWindow=1,
+    WebMenuItemTagDownloadLinkToDisk,
+    WebMenuItemTagCopyLinkToClipboard,
+    WebMenuItemTagOpenImageInNewWindow,
+    WebMenuItemTagDownloadImageToDisk,
+    WebMenuItemTagCopyImageToClipboard,
+    WebMenuItemTagOpenFrameInNewWindow,
+    WebMenuItemTagCopy
+};
+
+/*!
     @protocol WebOpenPanelResultListener
     @discussion This protocol is used to call back with the results of
     the file open panel requested by runOpenPanelForFileButtonWithResultListener:
 */
-
 @protocol WebOpenPanelResultListener <NSObject>
 
 /*!
@@ -34,19 +51,19 @@
 @class WebView;
 
 /*!
-    @category WebWindowOperationsDelegate
-    @discussion A class that implements WebWindowOperationsDelegate provides
+    @category WebUIDelegate
+    @discussion A class that implements WebUIDelegate provides
     window-related methods that may be used by Javascript, plugins and
     other aspects of web pages. These methods are used to open new
     windows and control aspects of existing windows.
 */
- at interface NSObject (WebWindowOperationsDelegate)
+ at interface NSObject (WebUIDelegate)
 
 /*!
     @method createWindowWithRequest:
     @abstract Create a new window and begin to load the specified request.
     @discussion The newly created window is hidden, and the window operations delegate on the
-    new controllers will get a showWindow call.
+    new WebViews will get a showWindow call.
     @param request The request to load.
     @result The WebView for the new window.
 */
@@ -54,7 +71,7 @@
 
 /*!
     @method showWindow
-    @abstract Show the window that contains the top level view of the controller,
+    @abstract Show the window that contains the top level view of the WebView,
     ordering it frontmost.
     @discussion This will only be called just after createWindowWithRequest:
     is used to create a new window.
@@ -66,7 +83,7 @@
     @abstract Close the current window. 
     @discussion Clients showing multiple views in one window may
     choose to close only the one corresponding to this
-    controller. Other clients may choose to ignore this method
+    WebView. Other clients may choose to ignore this method
     entirely.
 */
 - (void)webViewCloseWindow:(WebView *)webView;
@@ -75,7 +92,7 @@
     @method focusWindow
     @abstract Focus the current window (i.e. makeKeyAndOrderFront:).
     @discussion Clients showing multiple views in one window may want to
-    also do something to focus the one corresponding to this controller.
+    also do something to focus the one corresponding to this WebView.
 */
 - (void)webViewFocusWindow:(WebView *)webView;
 
@@ -83,7 +100,7 @@
     @method unfocusWindow
     @abstract Unfocus the current window.
     @discussion Clients showing multiple views in one window may want to
-    also do something to unfocus the one corresponding to this controller.
+    also do something to unfocus the one corresponding to this WebView.
 */
 - (void)webViewUnfocusWindow:(WebView *)webView;
 
@@ -91,7 +108,7 @@
     @method firstResponderInWindow
     @abstract Get the first responder for this window.
     @discussion This method should return the focused control in the
-    controller's view, if any. If the view is out of the window
+    WebView's view, if any. If the view is out of the window
     hierarchy, this might return something than calling firstResponder
     on the real NSWindow would. It's OK to return either nil or the
     real first responder if some control not in the window has focus.
@@ -103,8 +120,8 @@
     @abstract Set the first responder for this window.
     @param responder The responder to make first (will always be a view)
     @discussion responder will always be a view that is in the view
-    subhierarchy of the top-level web view for this controller. If the
-    controller's top level view is currently out of the view
+    subhierarchy of the top-level web view for this WebView. If the
+    WebView's top level view is currently out of the view
     hierarchy, it may be desirable to save the first responder
     elsewhere, or possibly ignore this call.
 */
@@ -126,15 +143,6 @@
 - (NSString *)webViewStatusText:(WebView *)webView ;
 
 /*!
-    @method mouseDidMoveOverElement:modifierFlags:
-    @abstract Update the window's feedback for mousing over links to reflect a new item the mouse is over
-    or new modifier flags.
-    @param elementInformation Dictionary that describes the element that the mouse is over, or nil.
-    @param modifierFlags The modifier flags as in NSEvent.
-*/
-- (void)webView: (WebView *)webView mouseDidMoveOverElement:(NSDictionary *)elementInformation modifierFlags:(unsigned int)modifierFlags;
-
-/*!
     @method areToolbarsVisible
     @abstract Determine whether the window's toolbars are currently visible
     @discussion This method should return YES if the window has any
@@ -267,5 +275,25 @@
     value so that it can be handled with a sheet.
 */
 - (void)webView: (WebView *)webView runOpenPanelForFileButtonWithResultListener:(id<WebOpenPanelResultListener>)resultListener;
-   
+
+/*!
+    @method mouseDidMoveOverElement:modifierFlags:
+    @abstract Update the window's feedback for mousing over links to reflect a new item the mouse is over
+    or new modifier flags.
+    @param elementInformation Dictionary that describes the element that the mouse is over, or nil.
+    @param modifierFlags The modifier flags as in NSEvent.
+*/
+- (void)webView: (WebView *)webView mouseDidMoveOverElement:(NSDictionary *)elementInformation modifierFlags:(unsigned int)modifierFlags;
+
+/*!
+    @method contextMenuItemsForElement:defaultMenuItems:
+    @abstract Returns the menu items to display in an element's contextual menu.
+    @param WebView The WebWebView requesting the context menus.
+    @param element A dictionary representation of the clicked element.
+    @param defaultMenuItems An array of default NSMenuItems to include in all contextual menus.
+    @result An array of NSMenuItems to include in the contextual menu.
+*/
+- (NSArray *)webView:(WebView *)webView contextMenuItemsForElement:(NSDictionary *)element defaultMenuItems:(NSArray *)defaultMenuItems;
+
+
 @end
diff --git a/WebKit/WebView.subproj/WebView.h b/WebKit/WebView.subproj/WebView.h
index d780f31..ef49206 100644
--- a/WebKit/WebView.subproj/WebView.h
+++ b/WebKit/WebView.subproj/WebView.h
@@ -19,7 +19,7 @@
 
 
 // These strings are keys into the element dictionary provided in
-// the WebContextMenuDelegate's contextMenuItemsForElement and the WebControllerPolicyDelegate's clickPolicyForElement.
+// the WebContextMenuDelegate's contextMenuItemsForElement and the WebwebViewPolicyDelegate's clickPolicyForElement.
 
 extern NSString *WebElementFrameKey;		// WebFrame of the element
 extern NSString *WebElementImageAltStringKey;	// NSString of the ALT attribute of the image element
@@ -50,21 +50,17 @@ extern NSString *WebElementLinkLabelKey;	// NSString of the text within the anch
     [mainFrame loadRequest:request];
     </pre>
     
-    WebViews have the following delegates:  WebWindowOperationsDelegate,
-    WebResourceLoadDelegate, WebContextMenuDelegate, WebLocationChangeDelegate,
-    and WebPolicyDelegate.
+    WebViews have the following delegates:  WebUIDelegate, WebResourceLoadDelegate,
+    WebFrameLoadDelegate, and WebPolicyDelegate.
     
-    WebKit depends on the WebView's WebWindowOperationsDelegate for all window
+    WebKit depends on the WebView's WebUIDelegate for all window
     related management, including opening new windows and controlling the user interface
     elements in those windows.
     
     WebResourceLoadDelegate is used to monitor the progress of resources as they are
     loaded.  This delegate may be used to present users with a progress monitor.
     
-    WebView's WebContextMenuDelegate can customize the context menus that appear
-    over content managed by the WebKit.
-    
-    The WebLocationChangeDelegate receives messages when the URL in a WebFrame is
+    The WebFrameLoadDelegate receives messages when the URL in a WebFrame is
     changed.
     
     WebView's WebPolicyDelegate can make determinations about how
@@ -93,41 +89,41 @@ extern NSString *WebElementLinkLabelKey;	// NSString of the text within the anch
     way that still ends up creating a new WebView.
     @param frame The frame used to create the view.
     @param frameName The name to use for the top level frame. May be nil.
-    @param groupName The name of the controller set to which this controller will be added.  May be nil.
+    @param groupName The name of the webView set to which this webView will be added.  May be nil.
     @result Returns an initialized WebView.
 */
 - initWithFrame: (NSRect)frame frameName: (NSString *)frameName groupName: (NSString *)groupName;
 
 /*!
-    @method setWindowOperationsDelegate:
-    @abstract Set the controller's WebWindowOperationsDelegate.
-    @param delegate The WebWindowOperationsDelegate to set as the delegate.
+    @method setUIDelegate:
+    @abstract Set the WebView's WebUIDelegate.
+    @param delegate The WebUIDelegate to set as the delegate.
 */    
-- (void)setWindowOperationsDelegate: (id)delegate;
+- (void)setUIDelegate: (id)delegate;
 
 /*!
-    @method windowOperationsDelegate
-    @abstract Return the controller's WebWindowOperationsDelegate.
-    @result The controller's WebWindowOperationsDelegate.
+    @method UIDelegate
+    @abstract Return the WebView's WebUIDelegate.
+    @result The WebView's WebUIDelegate.
 */
-- (id)windowOperationsDelegate;
+- (id)UIDelegate;
 
 /*!
     @method setResourceLoadDelegate:
-    @abstract Set the controller's WebResourceLoadDelegate load delegate.
+    @abstract Set the WebView's WebResourceLoadDelegate load delegate.
     @param delegate The WebResourceLoadDelegate to set as the load delegate.
 */
 - (void)setResourceLoadDelegate: (id)delegate;
 
 /*!
     @method resourceLoadDelegate
-    @result Return the controller's WebResourceLoadDelegate.
+    @result Return the WebView's WebResourceLoadDelegate.
 */    
 - (id)resourceLoadDelegate;
 
 /*!
     @method setDownloadDelegate:
-    @abstract Set the controller's WebDownloadDelegate.
+    @abstract Set the WebView's WebDownloadDelegate.
     @discussion The download delegate is retained by WebDownload when any downloads are in progress.
     @param delegate The WebDownloadDelegate to set as the download delegate.
 */    
@@ -135,50 +131,36 @@ extern NSString *WebElementLinkLabelKey;	// NSString of the text within the anch
 
 /*!
     @method downloadDelegate
-    @abstract Return the controller's WebDownloadDelegate.
-    @result The controller's WebDownloadDelegate.
+    @abstract Return the WebView's WebDownloadDelegate.
+    @result The WebView's WebDownloadDelegate.
 */    
 - (id)downloadDelegate;
 
 /*!
-    @method setContextMenuDelegate:
-    @abstract Set the controller's WebContextMenuDelegate.
-    @param delegate The WebContextMenuDelegate to set as the delegate.
-*/    
-- (void)setContextMenuDelegate: (id)delegate;
-
-/*!
-    @method contextMenuDelegate
-    @abstract Return the controller's WebContextMenuDelegate.
-    @result The controller's WebContextMenuDelegate.
-*/    
-- (id)contextMenuDelegate;
-
-/*!
     @method setLocationChangeDelegate:
-    @abstract Set the controller's WebLocationChangeDelegate delegate.
+    @abstract Set the WebView's WebLocationChangeDelegate delegate.
     @param delegate The WebLocationChangeDelegate to set as the delegate.
 */    
 - (void)setLocationChangeDelegate: (id)delegate;
 
 /*!
     @method locationChangeDelegate
-    @abstract Return the controller's WebLocationChangeDelegate delegate.
-    @result The controller's WebLocationChangeDelegate delegate.
+    @abstract Return the WebView's WebLocationChangeDelegate delegate.
+    @result The WebView's WebLocationChangeDelegate delegate.
 */    
 - (id)locationChangeDelegate;
 
 /*!
     @method setPolicyDelegate:
-    @abstract Set the controller's WebPolicyDelegate delegate.
+    @abstract Set the WebView's WebPolicyDelegate delegate.
     @param delegate The WebPolicyDelegate to set as the delegate.
 */    
 - (void)setPolicyDelegate: (id)delegate;
 
 /*!
     @method policyDelegate
-    @abstract Return the controller's WebPolicyDelegate.
-    @result The controller's WebPolicyDelegate.
+    @abstract Return the WebView's WebPolicyDelegate.
+    @result The WebView's WebPolicyDelegate.
 */    
 - (id)policyDelegate;
 
@@ -193,13 +175,13 @@ extern NSString *WebElementLinkLabelKey;	// NSString of the text within the anch
 
 /*!
     @method backForwardList
-    @result The backforward list for this controller.
+    @result The backforward list for this webView.
 */    
 - (WebBackForwardList *)backForwardList;
 
 /*!
     @method setUseBackForwardList:
-    @abstract Enable or disable the use of a backforward list for this controller.
+    @abstract Enable or disable the use of a backforward list for this webView.
     @param flag Turns use of the back forward list on or off
 */    
 - (void)setMaintainsBackForwardList: (BOOL)flag;
@@ -227,7 +209,7 @@ extern NSString *WebElementLinkLabelKey;	// NSString of the text within the anch
 
 /*!
     @method setTextSizeMultiplier:
-    @abstract Change the size of the text rendering in views managed by this controller.
+    @abstract Change the size of the text rendering in views managed by this webView.
     @param multiplier A fractional percentage value, 1.0 is 100%.
 */    
 - (void)setTextSizeMultiplier:(float)multiplier;
@@ -256,9 +238,9 @@ extern NSString *WebElementLinkLabelKey;	// NSString of the text within the anch
 /*!
     @method setCustomUserAgent:
     @abstract Set the user agent. 
-    @discussion Setting this means that the controller should use this user-agent string
+    @discussion Setting this means that the webView should use this user-agent string
     instead of constructing a user-agent string for each URL. Setting it to nil
-    causes the controller to construct the user-agent string for each URL
+    causes the webView to construct the user-agent string for each URL
     for best results rendering web pages.
     @param userAgentString The user agent description
 */
@@ -294,7 +276,7 @@ extern NSString *WebElementLinkLabelKey;	// NSString of the text within the anch
     what's specified in a web page's header or HTTP response.
     The text encoding automatically goes back to the default when the top level frame
     changes to a new location.
-    Setting the text encoding name to nil makes the controller use default encoding rules.
+    Setting the text encoding name to nil makes the webView use default encoding rules.
     @param encoding The text encoding name to use to display a page or nil.
 */
 - (void)setCustomTextEncodingName:(NSString *)encodingName;
@@ -314,14 +296,14 @@ extern NSString *WebElementLinkLabelKey;	// NSString of the text within the anch
 
 /*!
     @method setPreferences:
-    @param preferences The preferences to use for the controller.
-    @abstract Override the standard setting for the controller. 
+    @param preferences The preferences to use for the webView.
+    @abstract Override the standard setting for the webView. 
 */
 - (void)setPreferences: (WebPreferences *)prefs;
 
 /*!
     @method preferences
-    @result Returns the preferences used by this controller.
+    @result Returns the preferences used by this webView.
     @discussion This method will return [WebPreferences standardPreferences] if no
     other instance of WebPreferences has been set.
 */
diff --git a/WebKit/WebView.subproj/WebView.m b/WebKit/WebView.subproj/WebView.m
index 67b1465..21a1ea6 100644
--- a/WebKit/WebView.subproj/WebView.m
+++ b/WebKit/WebView.subproj/WebView.m
@@ -4,7 +4,6 @@
 */
 #import <WebKit/WebBackForwardList.h>
 #import <WebKit/WebBridge.h>
-#import <WebKit/WebContextMenuDelegate.h>
 #import <WebKit/WebControllerSets.h>
 #import <WebKit/WebDataSourcePrivate.h>
 #import <WebKit/WebDefaultPolicyDelegate.h>
@@ -28,7 +27,7 @@
 #import <WebKit/WebTextView.h>
 #import <WebKit/WebTextRepresentation.h>
 #import <WebKit/WebViewPrivate.h>
-#import <WebKit/WebWindowOperationsDelegate.h>
+#import <WebKit/WebUIDelegate.h>
 
 #import <WebFoundation/WebAssertions.h>
 #import <WebFoundation/WebNSUserDefaultsExtras.h>
@@ -154,16 +153,16 @@ NSString *WebElementLinkTitleKey = 		@"WebElementLinkTitle";
     return _private->preferences ? _private->preferences : [WebPreferences standardPreferences];
 }
 
-- (void)setWindowOperationsDelegate:delegate
+- (void)setUIDelegate:delegate
 {
-    _private->windowContext = delegate;
-    [_private->windowOperationsDelegateForwarder release];
-    _private->windowOperationsDelegateForwarder = nil;
+    _private->UIDelegate = delegate;
+    [_private->UIDelegateForwarder release];
+    _private->UIDelegateForwarder = nil;
 }
 
-- windowOperationsDelegate
+- UIDelegate
 {
-    return _private->windowContext;
+    return _private->UIDelegate;
 }
 
 - (void)setResourceLoadDelegate: delegate
@@ -192,18 +191,6 @@ NSString *WebElementLinkTitleKey = 		@"WebElementLinkTitle";
     return _private->downloadDelegate;
 }
 
-- (void)setContextMenuDelegate: delegate
-{
-    _private->contextMenuDelegate = delegate;
-    [_private->contextMenuDelegateForwarder release];
-    _private->contextMenuDelegateForwarder = nil;
-}
-
-- contextMenuDelegate
-{
-    return _private->contextMenuDelegate;
-}
-
 - (void)setPolicyDelegate:delegate
 {
     _private->policyDelegate = delegate;
diff --git a/WebKit/WebView.subproj/WebViewPrivate.h b/WebKit/WebView.subproj/WebViewPrivate.h
index c3f33c5..401f615 100644
--- a/WebKit/WebView.subproj/WebViewPrivate.h
+++ b/WebKit/WebView.subproj/WebViewPrivate.h
@@ -31,21 +31,17 @@ typedef struct _WebResourceDelegateImplementationCache {
 @public
     WebFrame *mainFrame;
     
-    id windowContext;
-    id windowOperationsDelegateForwarder;
+    id UIDelegate;
+    id UIDelegateForwarder;
     id resourceProgressDelegate;
     id resourceProgressDelegateForwarder;
     id downloadDelegate;
-    id contextMenuDelegate;
-    id contextMenuDelegateForwarder;
     id policyDelegate;
     id policyDelegateForwarder;
     id locationChangeDelegate;
     id locationChangeDelegateForwarder;
     id <WebFormDelegate> formDelegate;
     
-    id defaultContextMenuDelegate;
-
     WebBackForwardList *backForwardList;
     BOOL useBackForwardList;
     
@@ -165,8 +161,7 @@ Could be worth adding to the API.
 - (void)_cacheResourceLoadDelegateImplementations;
 - (WebResourceDelegateImplementationCache)_resourceLoadDelegateImplementations;
 - _policyDelegateForwarder;
-- _contextMenuDelegateForwarder;
-- _windowOperationsDelegateForwarder;
+- _UIDelegateForwarder;
 
 - (void)_registerDraggedTypes;
 @end
diff --git a/WebKit/WebView.subproj/WebViewPrivate.m b/WebKit/WebView.subproj/WebViewPrivate.m
index c89697f..6161532 100644
--- a/WebKit/WebView.subproj/WebViewPrivate.m
+++ b/WebKit/WebView.subproj/WebViewPrivate.m
@@ -4,14 +4,12 @@
 */
 
 #import <WebKit/WebBackForwardList.h>
-#import <WebKit/WebContextMenuDelegate.h>
 #import <WebKit/WebControllerSets.h>
 #import <WebKit/WebDataSourcePrivate.h>
-#import <WebKit/WebDefaultContextMenuDelegate.h>
 #import <WebKit/WebDefaultLocationChangeDelegate.h>
 #import <WebKit/WebDefaultPolicyDelegate.h>
 #import <WebKit/WebDefaultResourceLoadDelegate.h>
-#import <WebKit/WebDefaultWindowOperationsDelegate.h>
+#import <WebKit/WebDefaultUIDelegate.h>
 #import <WebKit/WebDownloadPrivate.h>
 #import <WebKit/WebFormDelegatePrivate.h>
 #import <WebKit/WebFramePrivate.h>
@@ -23,7 +21,7 @@
 #import <WebKit/WebResourceLoadDelegate.h>
 #import <WebKit/WebStandardPanelsPrivate.h>
 #import <WebKit/WebViewPrivate.h>
-#import <WebKit/WebWindowOperationsDelegate.h>
+#import <WebKit/WebUIDelegate.h>
 
 #import <WebFoundation/WebAssertions.h>
 
@@ -40,7 +38,6 @@
 - init 
 {
     backForwardList = [[WebBackForwardList alloc] init];
-    defaultContextMenuDelegate = [[WebDefaultContextMenuDelegate alloc] init];
     textSizeMultiplier = 1;
 
     settings = [[WebCoreSettings alloc] init];
@@ -73,7 +70,6 @@
     [mainFrame _controllerWillBeDeallocated];
     
     [mainFrame release];
-    [defaultContextMenuDelegate release];
     [backForwardList release];
     [applicationNameForUserAgent release];
     [userAgentOverride release];
@@ -89,9 +85,8 @@
     [hostWindow release];
     
     [policyDelegateForwarder release];
-    [contextMenuDelegateForwarder release];
     [resourceProgressDelegateForwarder release];
-    [windowOperationsDelegateForwarder release];
+    [UIDelegateForwarder release];
     [locationChangeDelegateForwarder release];
     
     [super dealloc];
@@ -294,29 +289,29 @@
 
 - (WebView *)_openNewWindowWithRequest:(NSURLRequest *)request
 {
-    id wd = [self windowOperationsDelegate];
+    id wd = [self UIDelegate];
     WebView *newWindowController = nil;
     if ([wd respondsToSelector:@selector(webView:createWindowWithRequest:)])
         newWindowController = [wd webView:self createWindowWithRequest:request];
     else {
-        newWindowController = [[WebDefaultWindowOperationsDelegate sharedWindowOperationsDelegate] webView:self createWindowWithRequest: request];
+        newWindowController = [[WebDefaultUIDelegate sharedUIDelegate] webView:self createWindowWithRequest: request];
     }
 
-    [[newWindowController _windowOperationsDelegateForwarder] webViewShowWindow: self];
+    [[newWindowController _UIDelegateForwarder] webViewShowWindow: self];
 
     return newWindowController;
 }
 
 - (NSMenu *)_menuForElement:(NSDictionary *)element
 {
-    NSArray *defaultMenuItems = [_private->defaultContextMenuDelegate
+    NSArray *defaultMenuItems = [[WebDefaultUIDelegate sharedUIDelegate]
           webView:self contextMenuItemsForElement:element defaultMenuItems:nil];
     NSArray *menuItems = defaultMenuItems;
     NSMenu *menu = nil;
     unsigned i;
 
-    if (_private->contextMenuDelegate) {
-        id cd = _private->contextMenuDelegate;
+    if (_private->UIDelegate) {
+        id cd = _private->UIDelegate;
         
         if ([cd respondsToSelector:@selector(webView:contextMenuItemsForElement:defaultMenuItems:)])
             menuItems = [cd webView:self contextMenuItemsForElement:element defaultMenuItems:defaultMenuItems];
@@ -340,7 +335,7 @@
     // for that case.
     
     if (dictionary && _private->lastElementWasNonNil) {
-        [[self _windowOperationsDelegateForwarder] webView:self mouseDidMoveOverElement:dictionary modifierFlags:modifierFlags];
+        [[self _UIDelegateForwarder] webView:self mouseDidMoveOverElement:dictionary modifierFlags:modifierFlags];
     }
     _private->lastElementWasNonNil = dictionary != nil;
 }
@@ -500,18 +495,11 @@
     return _private->policyDelegateForwarder;
 }
 
-- _contextMenuDelegateForwarder
+- _UIDelegateForwarder
 {
-    if (!_private->contextMenuDelegateForwarder)
-        _private->contextMenuDelegateForwarder = [[_WebSafeForwarder alloc] initWithTarget: [self contextMenuDelegate] defaultTarget: [WebDefaultContextMenuDelegate sharedContextMenuDelegate] templateClass: [WebDefaultContextMenuDelegate class]];
-    return _private->contextMenuDelegateForwarder;
-}
-
-- _windowOperationsDelegateForwarder
-{
-    if (!_private->windowOperationsDelegateForwarder)
-        _private->windowOperationsDelegateForwarder = [[_WebSafeForwarder alloc] initWithTarget: [self windowOperationsDelegate] defaultTarget: [WebDefaultWindowOperationsDelegate sharedWindowOperationsDelegate] templateClass: [WebDefaultWindowOperationsDelegate class]];
-    return _private->windowOperationsDelegateForwarder;
+    if (!_private->UIDelegateForwarder)
+        _private->UIDelegateForwarder = [[_WebSafeForwarder alloc] initWithTarget: [self UIDelegate] defaultTarget: [WebDefaultUIDelegate sharedUIDelegate] templateClass: [WebDefaultUIDelegate class]];
+    return _private->UIDelegateForwarder;
 }
 
 
diff --git a/WebKit/WebView.subproj/WebWindowOperationsDelegate.h b/WebKit/WebView.subproj/WebWindowOperationsDelegate.h
deleted file mode 100644
index fba85d0..0000000
--- a/WebKit/WebView.subproj/WebWindowOperationsDelegate.h
+++ /dev/null
@@ -1,271 +0,0 @@
-/*
-        WebWindowOperationsDelegate.h
-        Copyright 2001, 2002, Apple Computer, Inc.
-        
-        Public header file.
-*/
-
-#import <Cocoa/Cocoa.h>
-#import <WebFoundation/NSURLRequest.h>
-
-/*!
-    @protocol WebOpenPanelResultListener
-    @discussion This protocol is used to call back with the results of
-    the file open panel requested by runOpenPanelForFileButtonWithResultListener:
-*/
-
- at protocol WebOpenPanelResultListener <NSObject>
-
-/*!
-    @method chooseFilename:
-    @abstract Call this method to return a filename from the file open panel.
-    @param fileName
-*/
-- (void)chooseFilename:(NSString *)fileName;
-
-/*!
-    @method cancel
-    @abstract Call this method to indicate that the file open panel was cancelled.
-*/
-- (void)cancel;
-
- at end
-
- at class WebView;
-
-/*!
-    @category WebWindowOperationsDelegate
-    @discussion A class that implements WebWindowOperationsDelegate provides
-    window-related methods that may be used by Javascript, plugins and
-    other aspects of web pages. These methods are used to open new
-    windows and control aspects of existing windows.
-*/
- at interface NSObject (WebWindowOperationsDelegate)
-
-/*!
-    @method createWindowWithRequest:
-    @abstract Create a new window and begin to load the specified request.
-    @discussion The newly created window is hidden, and the window operations delegate on the
-    new controllers will get a showWindow call.
-    @param request The request to load.
-    @result The WebView for the new window.
-*/
-- (WebView *)webView:(WebView *)webView createWindowWithRequest:(NSURLRequest *)request;
-
-/*!
-    @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 createWindowWithRequest:
-    is used to create a new window.
-*/
-- (void)webViewShowWindow:(WebView *)webView;
-
-/*!
-    @method closeWindow
-    @abstract Close the current window. 
-    @discussion Clients showing multiple views in one window may
-    choose to close only the one corresponding to this
-    controller. Other clients may choose to ignore this method
-    entirely.
-*/
-- (void)webViewCloseWindow:(WebView *)webView;
-
-/*!
-    @method focusWindow
-    @abstract Focus the current window (i.e. makeKeyAndOrderFront:).
-    @discussion Clients showing multiple views in one window may want to
-    also do something to focus the one corresponding to this controller.
-*/
-- (void)webViewFocusWindow:(WebView *)webView;
-
-/*!
-    @method unfocusWindow
-    @abstract Unfocus the current window.
-    @discussion Clients showing multiple views in one window may want to
-    also do something to unfocus the one corresponding to this controller.
-*/
-- (void)webViewUnfocusWindow:(WebView *)webView;
-
-/*!
-    @method firstResponderInWindow
-    @abstract Get the first responder for this window.
-    @discussion This method should return the focused control in the
-    controller's view, if any. If the view is out of the window
-    hierarchy, this might return something than calling firstResponder
-    on the real NSWindow would. It's OK to return either nil or the
-    real first responder if some control not in the window has focus.
-*/
-- (NSResponder *)webViewFirstResponderInWindow:(WebView *)webView;
-
-/*!
-    @method makeFirstResponderInWindow:
-    @abstract Set the first responder for this window.
-    @param responder The responder to make first (will always be a view)
-    @discussion responder will always be a view that is in the view
-    subhierarchy of the top-level web view for this controller. If the
-    controller's top level view is currently out of the view
-    hierarchy, it may be desirable to save the first responder
-    elsewhere, or possibly ignore this call.
-*/
-- (void)webView: (WebView *)webView makeFirstResponderInWindow:(NSResponder *)responder;
-
-
-/*!
-    @method setStatusText:
-    @abstract Set the window's status display, if any, to the specified string.
-    @param text The status text to set
-*/
-- (void)webView: (WebView *)webView setStatusText:(NSString *)text;
-
-/*!
-    @method statusText
-    @abstract Get the currently displayed status text.
-    @result The status text
-*/
-- (NSString *)webViewStatusText:(WebView *)webView ;
-
-/*!
-    @method mouseDidMoveOverElement:modifierFlags:
-    @abstract Update the window's feedback for mousing over links to reflect a new item the mouse is over
-    or new modifier flags.
-    @param elementInformation Dictionary that describes the element that the mouse is over, or nil.
-    @param modifierFlags The modifier flags as in NSEvent.
-*/
-- (void)webView: (WebView *)webView mouseDidMoveOverElement:(NSDictionary *)elementInformation modifierFlags:(unsigned int)modifierFlags;
-
-/*!
-    @method areToolbarsVisible
-    @abstract Determine whether the window's toolbars are currently visible
-    @discussion This method should return YES if the window has any
-    toolbars that are currently on, besides the status bar. If the app
-    has more than one toolbar per window, for example a regular
-    command toolbar and a favorites bar, it should return YES from
-    this method if at least one is on.
-    @result YES if at least one toolbar is visible, otherwise NO.
-*/
-- (BOOL)webViewAreToolbarsVisible: (WebView *)webView;
-
-/*!
-    @method setToolbarsVisible:
-    @abstract Set whether the window's toolbars are currently visible.
-    @param visible New value for toolbar visibility
-    @discussion Setting this to YES should turn on all toolbars
-    (except for a possible status bar). Setting it to NO should turn
-    off all toolbars (with the same exception).
-*/
-- (void)webView: (WebView *)webView setToolbarsVisible:(BOOL)visible;
-
-/*!
-    @method isStatusBarVisible
-    @abstract Determine whether the status bar is visible.
-    @result YES if the status bar is visible, otherwise NO.
-*/
-- (BOOL)webViewIsStatusBarVisible: (WebView *)webView;
-
-/*!
-    @method setStatusBarVisible:
-    @abstract Set whether the status bar is currently visible.
-    @param visible The new visibility value
-    @discussion Setting this to YES should show the status bar,
-    setting it to NO should hide it.
-*/
-- (void)webView: (WebView *)webView setStatusBarVisible:(BOOL)visible;
-
-/*!
-    @method isResizable
-    @abstract Determine whether the window is resizable or not.
-    @result YES if resizable, NO if not.
-    @discussion If there are multiple views in the same window, they
-    have have their own separate resize controls and this may need to
-    be handled specially.
-*/
-- (BOOL)webViewIsResizable: (WebView *)webView;
-
-/*!
-    @method setResizable:
-    @abstract Set the window to resizable or not
-    @param resizable YES if the window should be made resizable, NO if not.
-    @discussion If there are multiple views in the same window, they
-    have have their own separate resize controls and this may need to
-    be handled specially.
-*/
-- (void)webView: (WebView *)webView setResizable:(BOOL)resizable;
-
-/*!
-    @method setFrame:
-    @abstract Set the window's frame rect
-    @param frame The new window frame size
-    @discussion Even though a caller could set the frame directly using the NSWindow,
-    this method is provided so implementors of this protocol can do special
-    things on programmatic move/resize, like avoiding autosaving of the size.
-*/
-- (void)webView: (WebView *)webView setFrame:(NSRect)frame;
-
-/*!
-    @method frame
-    @abstract REturn the window's frame rect
-    @discussion 
-*/
-- (NSRect)webViewFrame: (WebView *)webView;
-
-/*!
-    @method webView:setContentRect:
-    @abstract Set the window's content rect
-    @param frame The new window content rect
-    @discussion Even though a caller could set the content rect
-    directly using the NSWindow, this method is provided so
-    implementors of this protocol can do special things on
-    programmatic move/resize, like avoiding autosaving of the size.
-*/
-- (void)webView:(WebView *)webView setContentRect:(NSRect)contentRect;
-
-/*!
-    @method webViewContentRect:
-    @abstract Return the window's content rect
-    @discussion 
-*/
-- (NSRect)webViewContentRect:(WebView *)webView;
-
-/*!
-    @method runJavaScriptAlertPanelWithMessage:
-    @abstract Display a JavaScript alert panel
-    @param message The message to display
-    @discussion Clients should visually indicate that this panel comes
-    from JavaScript. The panel should have a single OK button.
-*/
-- (void)webView: (WebView *)webView runJavaScriptAlertPanelWithMessage:(NSString *)message;
-
-/*!
-    @method runJavaScriptAlertPanelWithMessage:
-    @abstract Display a JavaScript confirm panel
-    @param message The message to display
-    @result YES if the user hit OK, no if the user chose Cancel.
-    @discussion Clients should visually indicate that this panel comes
-    from JavaScript. The panel should have two buttons, e.g. "OK" and
-    "Cancel".
-*/
-- (BOOL)webView: (WebView *)webView runJavaScriptConfirmPanelWithMessage:(NSString *)message;
-
-/*!
-    @method runJavaScriptTextInputPanelWithPrompt:defaultText:
-    @abstract Display a JavaScript text input panel
-    @param message The message to display
-    @param defaultText The initial text for the text entry area.
-    @result The typed text if the user hit OK, otherwise nil.
-    @discussion Clients should visually indicate that this panel comes
-    from JavaScript. The panel should have two buttons, e.g. "OK" and
-    "Cancel", and an area to type text.
-*/
-- (NSString *)webView: (WebView *)webView runJavaScriptTextInputPanelWithPrompt:(NSString *)prompt defaultText:(NSString *)defaultText;
-
-/*!
-    @method runOpenPanelForFileButtonWithResultListener:
-    @abstract Display a file open panel for a file input control.
-    @param resultListener The object to call back with the results.
-    @discussion This method is passed a callback object instead of giving a return
-    value so that it can be handled with a sheet.
-*/
-- (void)webView: (WebView *)webView runOpenPanelForFileButtonWithResultListener:(id<WebOpenPanelResultListener>)resultListener;
-   
- at end

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list