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

cblu cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 06:14:01 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 3603f168ae345dc88b56f2530578f87aa0026a19
Author: cblu <cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue May 21 01:19:44 2002 +0000

            Added support for plug-ins to send URL requests to certain targets.
    
            Added frameNamed to IFWebFrame.
    
            * Plugins.subproj/IFPluginView.mm:
            (-[IFPluginView getURLNotify:target:notifyData:]):
            (-[IFPluginView postURLNotify:target:len:buf:file:notifyData:]):
            * WebView.subproj/IFWebFrame.h:
            * WebView.subproj/IFWebFrame.mm:
            (-[IFWebFrame frameNamed:]):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1185 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 29af2c1..998ed96 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,16 @@
+2002-05-20  Chris Blumenberg  <cblu at apple.com>
+
+	Added support for plug-ins to send URL requests to certain targets.
+
+	Added frameNamed to IFWebFrame.
+
+	* Plugins.subproj/IFPluginView.mm:
+	(-[IFPluginView getURLNotify:target:notifyData:]):
+	(-[IFPluginView postURLNotify:target:len:buf:file:notifyData:]):
+	* WebView.subproj/IFWebFrame.h:
+	* WebView.subproj/IFWebFrame.mm:
+	(-[IFWebFrame frameNamed:]):
+
 2002-05-20  Kenneth Kocienda  <kocienda at apple.com>
 
 	* Misc.subproj/WebKitDebug.h: Now includes <sys/time.h> to prevent possible
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 29af2c1..998ed96 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,16 @@
+2002-05-20  Chris Blumenberg  <cblu at apple.com>
+
+	Added support for plug-ins to send URL requests to certain targets.
+
+	Added frameNamed to IFWebFrame.
+
+	* Plugins.subproj/IFPluginView.mm:
+	(-[IFPluginView getURLNotify:target:notifyData:]):
+	(-[IFPluginView postURLNotify:target:len:buf:file:notifyData:]):
+	* WebView.subproj/IFWebFrame.h:
+	* WebView.subproj/IFWebFrame.mm:
+	(-[IFWebFrame frameNamed:]):
+
 2002-05-20  Kenneth Kocienda  <kocienda at apple.com>
 
 	* Misc.subproj/WebKitDebug.h: Now includes <sys/time.h> to prevent possible
diff --git a/WebKit/Plugins.subproj/IFPluginView.mm b/WebKit/Plugins.subproj/IFPluginView.mm
index e498bb1..587d561 100644
--- a/WebKit/Plugins.subproj/IFPluginView.mm
+++ b/WebKit/Plugins.subproj/IFPluginView.mm
@@ -560,6 +560,7 @@ static char *newCString(NSString *string)
     NSURL *requestedURL;
     IFPluginStream *stream;
     IFWebDataSource *dataSource;
+    IFWebFrame *frame;
     
     WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPN_GetURLNotify: %s target: %s\n", url, target);
  
@@ -577,15 +578,16 @@ static char *newCString(NSString *string)
         }
     
     }else{
-        if(webController){
-            // FIXME: Need to send to proper target
-            dataSource = [[[IFWebDataSource alloc] initWithURL:requestedURL] autorelease];
-            [[webController mainFrame] setProvisionalDataSource:dataSource];
-            [[webController mainFrame] startLoading];
-            // FIXME: Need to send NPP_URLNotify
+        dataSource = [[[IFWebDataSource alloc] initWithURL:requestedURL] autorelease];
+        frame = [webFrame frameNamed:[NSString stringWithCString:target]];
+        if(frame){
+            [frame setProvisionalDataSource:dataSource];
+            [frame startLoading];
+        }else{
+            //FIXME: Create new window here (2931449)
         }
+        // FIXME: Need to send NPP_URLNotify
     }
-        
     return NPERR_NO_ERROR;
 }
 
@@ -602,7 +604,8 @@ static char *newCString(NSString *string)
     NSData *postData;
     IFWebDataSource *dataSource;
     IFPluginStream *stream;
-        
+    IFWebFrame *frame;
+            
     WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "postURLNotify: %s\n", url);
  
     requestedURL = [self URLForString:[NSString stringWithCString:url]];
@@ -612,7 +615,6 @@ static char *newCString(NSString *string)
     
     if(file){
         // FIXME: Need function to convert from carbon path to posix
-        // FIXME: security issues here?
         postData = [NSData dataWithContentsOfFile:nil];
     }else{
         postData = [NSData dataWithBytes:buf length:len];
@@ -630,15 +632,16 @@ static char *newCString(NSString *string)
             [stream release];
         }  
     }else{
-        if(webController){
-            // FIXME: Need to send to proper target
-            dataSource = [[[IFWebDataSource alloc] initWithURL:requestedURL attributes:attributes] autorelease];
-            [[webController mainFrame] setProvisionalDataSource:dataSource];
-            [[webController mainFrame] startLoading];
-            // FIXME: Need to send NPP_URLNotify
+        dataSource = [[[IFWebDataSource alloc] initWithURL:requestedURL attributes:attributes] autorelease];
+        frame = [webFrame frameNamed:[NSString stringWithCString:target]];
+        if(frame){
+            [frame setProvisionalDataSource:dataSource];
+            [frame startLoading];
+        }else{
+            //FIXME: Create new window here (2931449)
         }
+        // FIXME: Need to send NPP_URLNotify
     }
-        
     return NPERR_NO_ERROR;
 }
 
diff --git a/WebKit/Plugins.subproj/WebPluginView.m b/WebKit/Plugins.subproj/WebPluginView.m
index e498bb1..587d561 100644
--- a/WebKit/Plugins.subproj/WebPluginView.m
+++ b/WebKit/Plugins.subproj/WebPluginView.m
@@ -560,6 +560,7 @@ static char *newCString(NSString *string)
     NSURL *requestedURL;
     IFPluginStream *stream;
     IFWebDataSource *dataSource;
+    IFWebFrame *frame;
     
     WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "NPN_GetURLNotify: %s target: %s\n", url, target);
  
@@ -577,15 +578,16 @@ static char *newCString(NSString *string)
         }
     
     }else{
-        if(webController){
-            // FIXME: Need to send to proper target
-            dataSource = [[[IFWebDataSource alloc] initWithURL:requestedURL] autorelease];
-            [[webController mainFrame] setProvisionalDataSource:dataSource];
-            [[webController mainFrame] startLoading];
-            // FIXME: Need to send NPP_URLNotify
+        dataSource = [[[IFWebDataSource alloc] initWithURL:requestedURL] autorelease];
+        frame = [webFrame frameNamed:[NSString stringWithCString:target]];
+        if(frame){
+            [frame setProvisionalDataSource:dataSource];
+            [frame startLoading];
+        }else{
+            //FIXME: Create new window here (2931449)
         }
+        // FIXME: Need to send NPP_URLNotify
     }
-        
     return NPERR_NO_ERROR;
 }
 
@@ -602,7 +604,8 @@ static char *newCString(NSString *string)
     NSData *postData;
     IFWebDataSource *dataSource;
     IFPluginStream *stream;
-        
+    IFWebFrame *frame;
+            
     WEBKITDEBUGLEVEL(WEBKIT_LOG_PLUGINS, "postURLNotify: %s\n", url);
  
     requestedURL = [self URLForString:[NSString stringWithCString:url]];
@@ -612,7 +615,6 @@ static char *newCString(NSString *string)
     
     if(file){
         // FIXME: Need function to convert from carbon path to posix
-        // FIXME: security issues here?
         postData = [NSData dataWithContentsOfFile:nil];
     }else{
         postData = [NSData dataWithBytes:buf length:len];
@@ -630,15 +632,16 @@ static char *newCString(NSString *string)
             [stream release];
         }  
     }else{
-        if(webController){
-            // FIXME: Need to send to proper target
-            dataSource = [[[IFWebDataSource alloc] initWithURL:requestedURL attributes:attributes] autorelease];
-            [[webController mainFrame] setProvisionalDataSource:dataSource];
-            [[webController mainFrame] startLoading];
-            // FIXME: Need to send NPP_URLNotify
+        dataSource = [[[IFWebDataSource alloc] initWithURL:requestedURL attributes:attributes] autorelease];
+        frame = [webFrame frameNamed:[NSString stringWithCString:target]];
+        if(frame){
+            [frame setProvisionalDataSource:dataSource];
+            [frame startLoading];
+        }else{
+            //FIXME: Create new window here (2931449)
         }
+        // FIXME: Need to send NPP_URLNotify
     }
-        
     return NPERR_NO_ERROR;
 }
 
diff --git a/WebKit/WebView.subproj/IFWebFrame.h b/WebKit/WebView.subproj/IFWebFrame.h
index 7f64570..98500d8 100644
--- a/WebKit/WebView.subproj/IFWebFrame.h
+++ b/WebKit/WebView.subproj/IFWebFrame.h
@@ -81,4 +81,12 @@
 */
 - (void)reset;
 
+/*
+    This method returns a frame with the given name. frameNamed returns self 
+    for _self and _current, the parent frame for _parent and the main frame for _top. 
+    frameNamed returns self for _parent and _top if the receiver it is the mainFrame. 
+    nil is returned if a frame with the given name is not found.
+*/
+- (IFWebFrame *)frameNamed:(NSString *)name;
+
 @end
diff --git a/WebKit/WebView.subproj/IFWebFrame.mm b/WebKit/WebView.subproj/IFWebFrame.mm
index 1ba960f..19b2109 100644
--- a/WebKit/WebView.subproj/IFWebFrame.mm
+++ b/WebKit/WebView.subproj/IFWebFrame.mm
@@ -197,4 +197,23 @@
     [_private setView: nil];
 }
 
- at end
+- (IFWebFrame *)frameNamed:(NSString *)name
+{
+    if([name isEqualToString:@"_self"] || [name isEqualToString:@"_current"])
+        return self;
+    
+    else if([name isEqualToString:@"_top"])
+        return [[self controller] mainFrame];
+        
+    else if([name isEqualToString:@"_parent"]){
+        if([[self dataSource] parent]){
+            return [[[self dataSource] parent] webFrame];
+        }else{
+            return self;
+        }
+    }else{
+        return [[self controller] frameNamed:name];
+    }
+}
+
+ at end
\ No newline at end of file
diff --git a/WebKit/WebView.subproj/WebFrame.h b/WebKit/WebView.subproj/WebFrame.h
index 7f64570..98500d8 100644
--- a/WebKit/WebView.subproj/WebFrame.h
+++ b/WebKit/WebView.subproj/WebFrame.h
@@ -81,4 +81,12 @@
 */
 - (void)reset;
 
+/*
+    This method returns a frame with the given name. frameNamed returns self 
+    for _self and _current, the parent frame for _parent and the main frame for _top. 
+    frameNamed returns self for _parent and _top if the receiver it is the mainFrame. 
+    nil is returned if a frame with the given name is not found.
+*/
+- (IFWebFrame *)frameNamed:(NSString *)name;
+
 @end
diff --git a/WebKit/WebView.subproj/WebFrame.m b/WebKit/WebView.subproj/WebFrame.m
index 1ba960f..19b2109 100644
--- a/WebKit/WebView.subproj/WebFrame.m
+++ b/WebKit/WebView.subproj/WebFrame.m
@@ -197,4 +197,23 @@
     [_private setView: nil];
 }
 
- at end
+- (IFWebFrame *)frameNamed:(NSString *)name
+{
+    if([name isEqualToString:@"_self"] || [name isEqualToString:@"_current"])
+        return self;
+    
+    else if([name isEqualToString:@"_top"])
+        return [[self controller] mainFrame];
+        
+    else if([name isEqualToString:@"_parent"]){
+        if([[self dataSource] parent]){
+            return [[[self dataSource] parent] webFrame];
+        }else{
+            return self;
+        }
+    }else{
+        return [[self controller] frameNamed:name];
+    }
+}
+
+ at end
\ No newline at end of file

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list