[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.21-584-g1e41756

kdecker at apple.com kdecker at apple.com
Fri Feb 26 22:26:41 UTC 2010


The following commit has been merged in the webkit-1.1 branch:
commit 66d51277ba366d713e0725331c12e6ca88429d5c
Author: kdecker at apple.com <kdecker at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sun Feb 21 20:20:41 2010 +0000

            Reviewed by Sam Weinig.
    
            https://bugs.webkit.org/show_bug.cgi?id=35215
            <rdar://problem/7673157>
    
            The plugInViewWithArguments: API passes a dictionary of plugin arguments. One of the parameters
            is WebPlugInBaseURLKey, which is a key that represents the base URL of the document containing
            the plug-in's view. Instead of sending the base URL, code in  WebFrameLoaderClient::createPlugin
            would incorrectly pass the source URL of the plug-in resource.
    
            * WebCoreSupport/WebFrameLoaderClient.mm:
            (WebFrameLoaderClient::createPlugin): When building the plug-in arguments dictionary, pass the
            real base URL for the WebPlugInBaseURLKey key.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55063 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/mac/ChangeLog b/WebKit/mac/ChangeLog
index a217543..4a2364d 100644
--- a/WebKit/mac/ChangeLog
+++ b/WebKit/mac/ChangeLog
@@ -1,3 +1,19 @@
+2010-02-21  Kevin Decker  <kdecker at apple.com>
+
+        Reviewed by Sam Weinig.
+
+        https://bugs.webkit.org/show_bug.cgi?id=35215
+        <rdar://problem/7673157>
+        
+        The plugInViewWithArguments: API passes a dictionary of plugin arguments. One of the parameters
+        is WebPlugInBaseURLKey, which is a key that represents the base URL of the document containing
+        the plug-in's view. Instead of sending the base URL, code in  WebFrameLoaderClient::createPlugin
+        would incorrectly pass the source URL of the plug-in resource.
+
+        * WebCoreSupport/WebFrameLoaderClient.mm:
+        (WebFrameLoaderClient::createPlugin): When building the plug-in arguments dictionary, pass the
+        real base URL for the WebPlugInBaseURLKey key.
+
 2010-02-19  Maciej Stachowiak  <mjs at apple.com>
 
         Reviewed by David Levin.
diff --git a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
index 52a24b4..1e17a5f 100644
--- a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
+++ b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
@@ -1524,8 +1524,11 @@ PassRefPtr<Widget> WebFrameLoaderClient::createPlugin(const IntSize& size, HTMLP
 
     WebView *webView = getWebView(m_webFrame.get());
     SEL selector = @selector(webView:plugInViewWithArguments:);
-    NSURL *URL = url;
 
+    Document* document = core(m_webFrame.get())->document();
+    NSURL *baseURL = document->baseURL();
+    NSURL *pluginURL = url;
+    
     if ([[webView UIDelegate] respondsToSelector:selector]) {
         NSMutableDictionary *attributes = [[NSMutableDictionary alloc] initWithObjects:kit(paramValues) forKeys:kit(paramNames)];
         NSDictionary *arguments = [[NSDictionary alloc] initWithObjectsAndKeys:
@@ -1533,7 +1536,7 @@ PassRefPtr<Widget> WebFrameLoaderClient::createPlugin(const IntSize& size, HTMLP
             [NSNumber numberWithInt:loadManually ? WebPlugInModeFull : WebPlugInModeEmbed], WebPlugInModeKey,
             [NSNumber numberWithBool:!loadManually], WebPlugInShouldLoadMainResourceKey,
             kit(element), WebPlugInContainingElementKey,
-            URL, WebPlugInBaseURLKey, // URL might be nil, so add it last
+            baseURL, WebPlugInBaseURLKey,
             nil];
 
         NSView *view = CallUIDelegate(webView, selector, arguments);
@@ -1555,7 +1558,7 @@ PassRefPtr<Widget> WebFrameLoaderClient::createPlugin(const IntSize& size, HTMLP
         pluginPackage = [webView _pluginForMIMEType:mimeType];
     }
     
-    NSString *extension = [[URL path] pathExtension];
+    NSString *extension = [[pluginURL path] pathExtension];
 #if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
     // don't allow proxy plug-in selection by file extension
     if (element->hasTagName(videoTag) || element->hasTagName(audioTag))
@@ -1573,8 +1576,6 @@ PassRefPtr<Widget> WebFrameLoaderClient::createPlugin(const IntSize& size, HTMLP
 
     NSView *view = nil;
 
-    Document* document = core(m_webFrame.get())->document();
-    NSURL *baseURL = document->baseURL();
     if (pluginPackage) {
         if ([pluginPackage isKindOfClass:[WebPluginPackage class]])
             view = pluginView(m_webFrame.get(), (WebPluginPackage *)pluginPackage, kit(paramNames), kit(paramValues), baseURL, kit(element), loadManually);
@@ -1584,7 +1585,7 @@ PassRefPtr<Widget> WebFrameLoaderClient::createPlugin(const IntSize& size, HTMLP
             WebBaseNetscapePluginView *pluginView = [[[NETSCAPE_PLUGIN_VIEW alloc]
                 initWithFrame:NSMakeRect(0, 0, size.width(), size.height())
                 pluginPackage:(WebNetscapePluginPackage *)pluginPackage
-                URL:URL
+                URL:pluginURL
                 baseURL:baseURL
                 MIMEType:MIMEType
                 attributeKeys:kit(paramNames)
@@ -1606,7 +1607,7 @@ PassRefPtr<Widget> WebFrameLoaderClient::createPlugin(const IntSize& size, HTMLP
         if (!pluginPageURL.protocolInHTTPFamily())
             pluginPageURL = KURL();
         NSError *error = [[NSError alloc] _initWithPluginErrorCode:errorCode
-            contentURL:URL pluginPageURL:pluginPageURL pluginName:[pluginPackage name] MIMEType:MIMEType];
+            contentURL:pluginURL pluginPageURL:pluginPageURL pluginName:[pluginPackage name] MIMEType:MIMEType];
         WebNullPluginView *nullView = [[[WebNullPluginView alloc] initWithFrame:NSMakeRect(0, 0, size.width(), size.height())
             error:error DOMElement:kit(element)] autorelease];
         view = nullView;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list