[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 08:06:36 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 9eb3f568a4859e609ae597d5c0301797defba665
Author: cblu <cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Oct 28 19:15:56 2003 +0000

    	Fixed: <rdar://problem/3437959>: javascript: URLs don't work from Java (and other Cocoa plugins, if any)
    
            Reviewed by mjs.
    
            * Plugins.subproj/WebPluginController.m:
            (-[WebPluginController showURL:inFrame:]): support JS requests targeted only to the plug-in's frame.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@5284 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 22b2111..2e89c1d 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,12 @@
+2003-10-28  Chris Blumenberg  <cblu at apple.com>
+
+	Fixed: <rdar://problem/3437959>: javascript: URLs don't work from Java (and other Cocoa plugins, if any)
+
+        Reviewed by mjs.
+
+        * Plugins.subproj/WebPluginController.m:
+        (-[WebPluginController showURL:inFrame:]): support JS requests targeted only to the plug-in's frame.
+
 2003-10-27  John Sullivan  <sullivan at apple.com>
 
         - fixed 3441258 -- hysteresis to start dragging a link is too small; too easy to start drag
diff --git a/WebKit/Plugins.subproj/WebPluginController.m b/WebKit/Plugins.subproj/WebPluginController.m
index cbd0303..f0dd633 100644
--- a/WebKit/Plugins.subproj/WebPluginController.m
+++ b/WebKit/Plugins.subproj/WebPluginController.m
@@ -8,10 +8,9 @@
 
 #import <WebKit/WebPluginController.h>
 
-#import <WebKit/WebFrame.h>
+#import <WebKit/WebBridge.h>
 #import <WebKit/WebFramePrivate.h>
 #import <WebKit/WebFrameView.h>
-#import <WebKit/WebHTMLView.h>
 #import <WebKit/WebHTMLViewPrivate.h>
 #import <WebKit/WebKitLogging.h>
 #import <WebKit/WebPlugin.h>
@@ -19,6 +18,7 @@
 #import <WebKit/WebViewPrivate.h>
 #import <WebKit/WebUIDelegate.h>
 
+#import <Foundation/NSURL_NSURLExtras.h>
 #import <Foundation/NSURLRequest.h>
 
 @implementation WebPluginController
@@ -110,15 +110,24 @@
         ERROR("could not load URL %@ because plug-in has already been stopped", URL);
         return;
     }
-    NSURLRequest *request = [NSURLRequest requestWithURL:URL];
-    if (!request) {
-        ERROR("could not load URL %@", URL);
-        return;
-    }
     if (!target) {
         target = @"_top";
     }
-    [frame _loadRequest:request inFrameNamed:target];
+    NSString *JSString = [URL _web_scriptIfJavaScriptURL];
+    if (JSString) {
+        if ([frame findFrameNamed:target] != frame) {
+            ERROR("JavaScript requests can only be made on the frame that contains the plug-in");
+            return;
+        }
+        [[frame _bridge] stringByEvaluatingJavaScriptFromString:JSString];
+    } else {
+        NSURLRequest *request = [NSURLRequest requestWithURL:URL];
+        if (!request) {
+            ERROR("could not load URL %@", URL);
+            return;
+        }
+        [frame _loadRequest:request inFrameNamed:target];
+    }
 }
 
 - (void)showStatus:(NSString *)message

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list