[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 06:33:59 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit efc60dc96aff5b65193bae1d2796247244728fab
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Aug 22 22:37:32 2002 +0000

    i        Changed public string from #define to extern NSString.
    
            * WebKit.exp:
            * WebView.subproj/WebController.h:
            * WebView.subproj/WebController.m:
            * WebView.subproj/WebDefaultContextMenuHandler.m:
            (-[WebDefaultContextMenuHandler contextMenuItemsForElement:defaultMenuItems:]):
            (-[WebDefaultContextMenuHandler openNewWindowWithURL:]):
            (-[WebDefaultContextMenuHandler downloadURL:]):
            (-[WebDefaultContextMenuHandler openLinkInNewWindow:]):
            (-[WebDefaultContextMenuHandler downloadLinkToDisk:]):
            (-[WebDefaultContextMenuHandler copyLinkToClipboard:]):
            (-[WebDefaultContextMenuHandler openImageInNewWindow:]):
            (-[WebDefaultContextMenuHandler downloadImageToDisk:]):
            (-[WebDefaultContextMenuHandler copyImageToClipboard:]):
            (-[WebDefaultContextMenuHandler openFrameInNewWindow:]):
            * WebView.subproj/WebHTMLViewPrivate.m:
            (-[WebHTMLView _elementAtPoint:]):
            (-[WebHTMLView _continueAfterCheckingDragForEvent:]):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1902 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 2abe0fb..306de9e 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,25 @@
+2002-08-22  Richard Williamson (Local)  <rjw at apple.com>
+
+        Changed public string from #define to extern NSString.
+        
+        * WebKit.exp:
+        * WebView.subproj/WebController.h:
+        * WebView.subproj/WebController.m:
+        * WebView.subproj/WebDefaultContextMenuHandler.m:
+        (-[WebDefaultContextMenuHandler contextMenuItemsForElement:defaultMenuItems:]):
+        (-[WebDefaultContextMenuHandler openNewWindowWithURL:]):
+        (-[WebDefaultContextMenuHandler downloadURL:]):
+        (-[WebDefaultContextMenuHandler openLinkInNewWindow:]):
+        (-[WebDefaultContextMenuHandler downloadLinkToDisk:]):
+        (-[WebDefaultContextMenuHandler copyLinkToClipboard:]):
+        (-[WebDefaultContextMenuHandler openImageInNewWindow:]):
+        (-[WebDefaultContextMenuHandler downloadImageToDisk:]):
+        (-[WebDefaultContextMenuHandler copyImageToClipboard:]):
+        (-[WebDefaultContextMenuHandler openFrameInNewWindow:]):
+        * WebView.subproj/WebHTMLViewPrivate.m:
+        (-[WebHTMLView _elementAtPoint:]):
+        (-[WebHTMLView _continueAfterCheckingDragForEvent:]):
+
 2002-08-22  Ken Kocienda  <kocienda at apple.com>
 
 	Passing the main load's attributes to the subresource loads causes 
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 2abe0fb..306de9e 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,25 @@
+2002-08-22  Richard Williamson (Local)  <rjw at apple.com>
+
+        Changed public string from #define to extern NSString.
+        
+        * WebKit.exp:
+        * WebView.subproj/WebController.h:
+        * WebView.subproj/WebController.m:
+        * WebView.subproj/WebDefaultContextMenuHandler.m:
+        (-[WebDefaultContextMenuHandler contextMenuItemsForElement:defaultMenuItems:]):
+        (-[WebDefaultContextMenuHandler openNewWindowWithURL:]):
+        (-[WebDefaultContextMenuHandler downloadURL:]):
+        (-[WebDefaultContextMenuHandler openLinkInNewWindow:]):
+        (-[WebDefaultContextMenuHandler downloadLinkToDisk:]):
+        (-[WebDefaultContextMenuHandler copyLinkToClipboard:]):
+        (-[WebDefaultContextMenuHandler openImageInNewWindow:]):
+        (-[WebDefaultContextMenuHandler downloadImageToDisk:]):
+        (-[WebDefaultContextMenuHandler copyImageToClipboard:]):
+        (-[WebDefaultContextMenuHandler openFrameInNewWindow:]):
+        * WebView.subproj/WebHTMLViewPrivate.m:
+        (-[WebHTMLView _elementAtPoint:]):
+        (-[WebHTMLView _continueAfterCheckingDragForEvent:]):
+
 2002-08-22  Ken Kocienda  <kocienda at apple.com>
 
 	Passing the main load's attributes to the subresource loads causes 
diff --git a/WebKit/WebKit.exp b/WebKit/WebKit.exp
index db425c1..a7988f8 100644
--- a/WebKit/WebKit.exp
+++ b/WebKit/WebKit.exp
@@ -23,3 +23,8 @@
 .objc_class_name_WebTestController
 .objc_class_name_WebURLsWithTitles
 .objc_class_name_WebView
+_WebContextMenuElementLinkURLKey
+_WebContextMenuElementImageURLKey
+_WebContextMenuElementStringKey
+_WebContextMenuElementImageKey
+_WebContextMenuElementFrameKey
diff --git a/WebKit/WebView.subproj/WebController.h b/WebKit/WebView.subproj/WebController.h
index acc61dc..c4bbb0f 100644
--- a/WebKit/WebView.subproj/WebController.h
+++ b/WebKit/WebView.subproj/WebController.h
@@ -98,16 +98,21 @@
 @end
 
 
-#define WebContextLinkURL  @"WebContextLinkURL"
-#define WebContextImageURL @"WebContextImageURL"
-#define WebContextString   @"WebContextString"
-#define WebContextImage    @"WebContextImage"
-#define WebContextFrame    @"WebContextFrame"
-
-
 /*
    ============================================================================= 
+   WebContextMenuHandler determine what context menu items are visible over
+   a clicked element.
+   ============================================================================= 
 */
+
+// These strings are keys into the element dictionary provided in 
+// contextMenuItemsForElement.
+extern NSString *WebContextMenuElementLinkURLKey;
+extern NSString *WebContextMenuElementImageURLKey;
+extern NSString *WebContextMenuElementStringKey;
+extern NSString *WebContextMenuElementImageKey;
+extern NSString *WebContextMenuElementFrameKey;
+
 @protocol WebContextMenuHandler <NSObject>
 // Returns the array of NSMenuItems that will be displayed in the context menu 
 // for the dictionary representation of the clicked element.
diff --git a/WebKit/WebView.subproj/WebController.m b/WebKit/WebView.subproj/WebController.m
index 8a00a3b..a882af2 100644
--- a/WebKit/WebView.subproj/WebController.m
+++ b/WebKit/WebView.subproj/WebController.m
@@ -25,6 +25,12 @@
 
 #import <WebFoundation/WebFoundation.h>
 
+NSString * WebContextMenuElementLinkURLKey = @"WebContextLinkURL";
+NSString * WebContextMenuElementImageURLKey = @"WebContextImageURL";
+NSString * WebContextMenuElementStringKey = @"WebContextString";
+NSString * WebContextMenuElementImageKey = @"WebContextImage";
+NSString * WebContextMenuElementFrameKey = @"WebContextFrame";
+
 @implementation WebController
 
 - init
diff --git a/WebKit/WebView.subproj/WebDefaultContextMenuDelegate.m b/WebKit/WebView.subproj/WebDefaultContextMenuDelegate.m
index a34b8a9..04413d8 100644
--- a/WebKit/WebView.subproj/WebDefaultContextMenuDelegate.m
+++ b/WebKit/WebView.subproj/WebDefaultContextMenuDelegate.m
@@ -37,7 +37,7 @@
     [element release];
     element = [theElement retain];
 
-    linkURL = [element objectForKey:WebContextLinkURL];
+    linkURL = [element objectForKey:WebContextMenuElementLinkURLKey];
 
     if(linkURL){
     
@@ -54,7 +54,7 @@
                                    toArray:menuItems];
     }
 
-    imageURL = [element objectForKey:WebContextImageURL];
+    imageURL = [element objectForKey:WebContextMenuElementImageURLKey];
 
     if(imageURL){
         
@@ -78,7 +78,7 @@
 
     if(!imageURL && !linkURL){
     
-        WebFrame *webFrame = [element objectForKey:WebContextFrame];
+        WebFrame *webFrame = [element objectForKey:WebContextMenuElementFrameKey];
 
         if(![[webFrame dataSource] isMainDocument]){
             [[self class] addMenuItemWithTitle:NSLocalizedString(@"Open Frame in New Window", @"Open Frame in New Window context menu item") 				                action:@selector(openFrameInNewWindow:)
@@ -92,14 +92,14 @@
 
 - (void)openNewWindowWithURL:(NSURL *)URL
 {
-    WebFrame *webFrame = [element objectForKey:WebContextFrame];
+    WebFrame *webFrame = [element objectForKey:WebContextMenuElementFrameKey];
     WebController *controller = [webFrame controller];
     [[controller windowContext] openNewWindowWithURL:URL];
 }
 
 - (void)downloadURL:(NSURL *)URL
 {
-    WebFrame *webFrame = [element objectForKey:WebContextFrame];
+    WebFrame *webFrame = [element objectForKey:WebContextMenuElementFrameKey];
     WebController *controller = [webFrame controller];
     WebContentPolicy *contentPolicy = [[controller policyHandler] contentPolicyForMIMEType:@"application/octet-stream" URL:URL inFrame:webFrame];
     [controller _downloadURL:URL toPath:[contentPolicy path]];
@@ -107,18 +107,18 @@
 
 - (void)openLinkInNewWindow:(id)sender
 {
-    [self openNewWindowWithURL:[element objectForKey:WebContextLinkURL]];
+    [self openNewWindowWithURL:[element objectForKey:WebContextMenuElementLinkURLKey]];
 }
 
 - (void)downloadLinkToDisk:(id)sender
 {
-    [self downloadURL:[element objectForKey:WebContextLinkURL]];
+    [self downloadURL:[element objectForKey:WebContextMenuElementLinkURLKey]];
 }
 
 - (void)copyLinkToClipboard:(id)sender
 {
     NSPasteboard *pasteboard = [NSPasteboard generalPasteboard];
-    NSURL *URL = [element objectForKey:WebContextLinkURL];
+    NSURL *URL = [element objectForKey:WebContextMenuElementLinkURLKey];
     
     [pasteboard declareTypes:[NSArray arrayWithObjects:NSURLPboardType, NSStringPboardType, nil] owner:nil];
     [pasteboard setString:[URL absoluteString] forType:NSStringPboardType];
@@ -127,18 +127,18 @@
 
 - (void)openImageInNewWindow:(id)sender
 {
-    [self openNewWindowWithURL:[element objectForKey:WebContextImageURL]];
+    [self openNewWindowWithURL:[element objectForKey:WebContextMenuElementImageURLKey]];
 }
 
 - (void)downloadImageToDisk:(id)sender
 {
-    [self downloadURL:[element objectForKey:WebContextImageURL]];
+    [self downloadURL:[element objectForKey:WebContextMenuElementImageURLKey]];
 }
 
 - (void)copyImageToClipboard:(id)sender
 {
     NSPasteboard *pasteboard = [NSPasteboard generalPasteboard];
-    NSData *tiff = [[element objectForKey:WebContextImage] TIFFRepresentation];
+    NSData *tiff = [[element objectForKey:WebContextMenuElementImageKey] TIFFRepresentation];
     
     [pasteboard declareTypes:[NSArray arrayWithObject:NSTIFFPboardType] owner:nil];
     [pasteboard setData:tiff forType:NSTIFFPboardType];
@@ -146,7 +146,7 @@
 
 - (void)openFrameInNewWindow:(id)sender
 {
-    WebFrame *webFrame = [element objectForKey:WebContextFrame];
+    WebFrame *webFrame = [element objectForKey:WebContextMenuElementFrameKey];
     WebDataSource *dataSource = [webFrame dataSource];
     NSURL *URL = [dataSource URL];
     [self openNewWindowWithURL:URL];
diff --git a/WebKit/WebView.subproj/WebDefaultContextMenuHandler.m b/WebKit/WebView.subproj/WebDefaultContextMenuHandler.m
index a34b8a9..04413d8 100644
--- a/WebKit/WebView.subproj/WebDefaultContextMenuHandler.m
+++ b/WebKit/WebView.subproj/WebDefaultContextMenuHandler.m
@@ -37,7 +37,7 @@
     [element release];
     element = [theElement retain];
 
-    linkURL = [element objectForKey:WebContextLinkURL];
+    linkURL = [element objectForKey:WebContextMenuElementLinkURLKey];
 
     if(linkURL){
     
@@ -54,7 +54,7 @@
                                    toArray:menuItems];
     }
 
-    imageURL = [element objectForKey:WebContextImageURL];
+    imageURL = [element objectForKey:WebContextMenuElementImageURLKey];
 
     if(imageURL){
         
@@ -78,7 +78,7 @@
 
     if(!imageURL && !linkURL){
     
-        WebFrame *webFrame = [element objectForKey:WebContextFrame];
+        WebFrame *webFrame = [element objectForKey:WebContextMenuElementFrameKey];
 
         if(![[webFrame dataSource] isMainDocument]){
             [[self class] addMenuItemWithTitle:NSLocalizedString(@"Open Frame in New Window", @"Open Frame in New Window context menu item") 				                action:@selector(openFrameInNewWindow:)
@@ -92,14 +92,14 @@
 
 - (void)openNewWindowWithURL:(NSURL *)URL
 {
-    WebFrame *webFrame = [element objectForKey:WebContextFrame];
+    WebFrame *webFrame = [element objectForKey:WebContextMenuElementFrameKey];
     WebController *controller = [webFrame controller];
     [[controller windowContext] openNewWindowWithURL:URL];
 }
 
 - (void)downloadURL:(NSURL *)URL
 {
-    WebFrame *webFrame = [element objectForKey:WebContextFrame];
+    WebFrame *webFrame = [element objectForKey:WebContextMenuElementFrameKey];
     WebController *controller = [webFrame controller];
     WebContentPolicy *contentPolicy = [[controller policyHandler] contentPolicyForMIMEType:@"application/octet-stream" URL:URL inFrame:webFrame];
     [controller _downloadURL:URL toPath:[contentPolicy path]];
@@ -107,18 +107,18 @@
 
 - (void)openLinkInNewWindow:(id)sender
 {
-    [self openNewWindowWithURL:[element objectForKey:WebContextLinkURL]];
+    [self openNewWindowWithURL:[element objectForKey:WebContextMenuElementLinkURLKey]];
 }
 
 - (void)downloadLinkToDisk:(id)sender
 {
-    [self downloadURL:[element objectForKey:WebContextLinkURL]];
+    [self downloadURL:[element objectForKey:WebContextMenuElementLinkURLKey]];
 }
 
 - (void)copyLinkToClipboard:(id)sender
 {
     NSPasteboard *pasteboard = [NSPasteboard generalPasteboard];
-    NSURL *URL = [element objectForKey:WebContextLinkURL];
+    NSURL *URL = [element objectForKey:WebContextMenuElementLinkURLKey];
     
     [pasteboard declareTypes:[NSArray arrayWithObjects:NSURLPboardType, NSStringPboardType, nil] owner:nil];
     [pasteboard setString:[URL absoluteString] forType:NSStringPboardType];
@@ -127,18 +127,18 @@
 
 - (void)openImageInNewWindow:(id)sender
 {
-    [self openNewWindowWithURL:[element objectForKey:WebContextImageURL]];
+    [self openNewWindowWithURL:[element objectForKey:WebContextMenuElementImageURLKey]];
 }
 
 - (void)downloadImageToDisk:(id)sender
 {
-    [self downloadURL:[element objectForKey:WebContextImageURL]];
+    [self downloadURL:[element objectForKey:WebContextMenuElementImageURLKey]];
 }
 
 - (void)copyImageToClipboard:(id)sender
 {
     NSPasteboard *pasteboard = [NSPasteboard generalPasteboard];
-    NSData *tiff = [[element objectForKey:WebContextImage] TIFFRepresentation];
+    NSData *tiff = [[element objectForKey:WebContextMenuElementImageKey] TIFFRepresentation];
     
     [pasteboard declareTypes:[NSArray arrayWithObject:NSTIFFPboardType] owner:nil];
     [pasteboard setData:tiff forType:NSTIFFPboardType];
@@ -146,7 +146,7 @@
 
 - (void)openFrameInNewWindow:(id)sender
 {
-    WebFrame *webFrame = [element objectForKey:WebContextFrame];
+    WebFrame *webFrame = [element objectForKey:WebContextMenuElementFrameKey];
     WebDataSource *dataSource = [webFrame dataSource];
     NSURL *URL = [dataSource URL];
     [self openNewWindowWithURL:URL];
diff --git a/WebKit/WebView.subproj/WebHTMLViewPrivate.m b/WebKit/WebView.subproj/WebHTMLViewPrivate.m
index 3ddb48e..e44732e 100644
--- a/WebKit/WebView.subproj/WebHTMLViewPrivate.m
+++ b/WebKit/WebView.subproj/WebHTMLViewPrivate.m
@@ -106,19 +106,19 @@ BOOL _modifierTrackingEnabled = FALSE;
     NSDictionary *elementInfoWC = [[self _bridge] elementAtPoint:point];
     NSMutableDictionary *elementInfo = [NSMutableDictionary dictionary];
 
-    NSURL *linkURL =   [elementInfoWC objectForKey:WebCoreContextLinkURL];
-    NSURL *imageURL =  [elementInfoWC objectForKey:WebCoreContextImageURL];
-    NSString *string = [elementInfoWC objectForKey:WebCoreContextString];
-    NSImage *image =   [elementInfoWC objectForKey:WebCoreContextImage];
+    NSURL *linkURL =   [elementInfoWC objectForKey:WebContextMenuElementLinkURLKey];
+    NSURL *imageURL =  [elementInfoWC objectForKey:WebContextMenuElementImageURLKey];
+    NSString *string = [elementInfoWC objectForKey:WebContextMenuElementStringKey];
+    NSImage *image =   [elementInfoWC objectForKey:WebContextMenuElementImageKey];
 
-    if(linkURL)  [elementInfo setObject:linkURL  forKey:WebContextLinkURL];
-    if(imageURL) [elementInfo setObject:imageURL forKey:WebContextImageURL];
-    if(string)   [elementInfo setObject:string   forKey:WebContextString];
-    if(image)    [elementInfo setObject:image    forKey:WebContextImage];
+    if(linkURL)  [elementInfo setObject:linkURL  forKey:WebContextMenuElementLinkURLKey];
+    if(imageURL) [elementInfo setObject:imageURL forKey:WebContextMenuElementImageURLKey];
+    if(string)   [elementInfo setObject:string   forKey:WebContextMenuElementStringKey];
+    if(image)    [elementInfo setObject:image    forKey:WebContextMenuElementImageKey];
 
     WebView *webView = [self _web_parentWebView];
     WebFrame *webFrame = [[webView _controller] frameForView:webView];
-    [elementInfo setObject:webFrame forKey:WebContextFrame];
+    [elementInfo setObject:webFrame forKey:WebContextMenuElementFrameKey];
        
     return elementInfo;
 }
@@ -161,8 +161,8 @@ BOOL _modifierTrackingEnabled = FALSE;
 
         NSPoint point = [self convertPoint:[event locationInWindow] fromView:nil];
         NSDictionary *element = [self _elementAtPoint:point];
-        NSURL *imageURL = [element objectForKey:WebContextImageURL];
-        NSURL *linkURL = [element objectForKey:WebContextLinkURL];
+        NSURL *imageURL = [element objectForKey:WebContextMenuElementImageURLKey];
+        NSURL *linkURL = [element objectForKey:WebContextMenuElementLinkURLKey];
 
         if(linkURL || imageURL){
             [_private->draggedURL release];
diff --git a/WebKit/WebView.subproj/WebView.h b/WebKit/WebView.subproj/WebView.h
index acc61dc..c4bbb0f 100644
--- a/WebKit/WebView.subproj/WebView.h
+++ b/WebKit/WebView.subproj/WebView.h
@@ -98,16 +98,21 @@
 @end
 
 
-#define WebContextLinkURL  @"WebContextLinkURL"
-#define WebContextImageURL @"WebContextImageURL"
-#define WebContextString   @"WebContextString"
-#define WebContextImage    @"WebContextImage"
-#define WebContextFrame    @"WebContextFrame"
-
-
 /*
    ============================================================================= 
+   WebContextMenuHandler determine what context menu items are visible over
+   a clicked element.
+   ============================================================================= 
 */
+
+// These strings are keys into the element dictionary provided in 
+// contextMenuItemsForElement.
+extern NSString *WebContextMenuElementLinkURLKey;
+extern NSString *WebContextMenuElementImageURLKey;
+extern NSString *WebContextMenuElementStringKey;
+extern NSString *WebContextMenuElementImageKey;
+extern NSString *WebContextMenuElementFrameKey;
+
 @protocol WebContextMenuHandler <NSObject>
 // Returns the array of NSMenuItems that will be displayed in the context menu 
 // for the dictionary representation of the clicked element.
diff --git a/WebKit/WebView.subproj/WebView.m b/WebKit/WebView.subproj/WebView.m
index 8a00a3b..a882af2 100644
--- a/WebKit/WebView.subproj/WebView.m
+++ b/WebKit/WebView.subproj/WebView.m
@@ -25,6 +25,12 @@
 
 #import <WebFoundation/WebFoundation.h>
 
+NSString * WebContextMenuElementLinkURLKey = @"WebContextLinkURL";
+NSString * WebContextMenuElementImageURLKey = @"WebContextImageURL";
+NSString * WebContextMenuElementStringKey = @"WebContextString";
+NSString * WebContextMenuElementImageKey = @"WebContextImage";
+NSString * WebContextMenuElementFrameKey = @"WebContextFrame";
+
 @implementation WebController
 
 - init

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list