Commit 6dbcead3 authored by darin@apple.com's avatar darin@apple.com

2009-06-20 Darin Adler <darin@apple.com>

        Reviewed by Sam Weinig.

        <rdar://problem/6964221> Need more processing of pluginspage.

        * WebCoreSupport/WebFrameLoaderClient.cpp:
        (WebFrameLoaderClient::createPlugin): Check protocolInHTTPFamily.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44909 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 3c49db48
2009-06-20 Darin Adler <darin@apple.com>
Reviewed by Sam Weinig.
<rdar://problem/6964221> Need more processing of pluginspage.
* WebCoreSupport/WebFrameLoaderClient.cpp:
(WebFrameLoaderClient::createPlugin): Check protocolInHTTPFamily.
2009-06-19 Kenneth Rohde Christiansen <kenneth.christiansen@openbossa.org>
Reviewed by Steve Falkenburg.
......
/*
* Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
* Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
......@@ -666,12 +666,15 @@ Widget* WebFrameLoaderClient::createPlugin(const IntSize& pluginSize, HTMLPlugIn
RetainPtr<CFMutableDictionaryRef> userInfo(AdoptCF, CFDictionaryCreateMutable(0, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks));
unsigned count = (unsigned)paramNames.size();
for (unsigned i = 0; i < count; i++) {
size_t size = paramNames.size();
for (size_t i = 0; i < size; i++) {
if (paramNames[i] == "pluginspage") {
static CFStringRef key = MarshallingHelpers::LPCOLESTRToCFStringRef(WebKitErrorPlugInPageURLStringKey);
RetainPtr<CFStringRef> str(AdoptCF, paramValues[i].createCFString());
CFDictionarySetValue(userInfo.get(), key, str.get());
KURL pluginPageURL = frame->document()->completeURL(parseURL(paramValues[i]));
if (pluginPageURL.protocolInHTTPFamily()) {
static CFStringRef key = MarshallingHelpers::LPCOLESTRToCFStringRef(WebKitErrorPlugInPageURLStringKey);
RetainPtr<CFStringRef> str(AdoptCF, pluginPageURL.string().createCFString());
CFDictionarySetValue(userInfo.get(), key, str.get());
}
break;
}
}
......@@ -683,13 +686,13 @@ Widget* WebFrameLoaderClient::createPlugin(const IntSize& pluginSize, HTMLPlugIn
CFDictionarySetValue(userInfo.get(), key, str.get());
}
String pluginName;
if (pluginView->plugin())
pluginName = pluginView->plugin()->name();
if (!pluginName.isNull()) {
static CFStringRef key = MarshallingHelpers::LPCOLESTRToCFStringRef(WebKitErrorPlugInNameKey);
RetainPtr<CFStringRef> str(AdoptCF, pluginName.createCFString());
CFDictionarySetValue(userInfo.get(), key, str.get());
if (pluginView->plugin()) {
String pluginName = pluginView->plugin()->name();
if (!pluginName.isNull()) {
static CFStringRef key = MarshallingHelpers::LPCOLESTRToCFStringRef(WebKitErrorPlugInNameKey);
RetainPtr<CFStringRef> str(AdoptCF, pluginName.createCFString());
CFDictionarySetValue(userInfo.get(), key, str.get());
}
}
COMPtr<CFDictionaryPropertyBag> userInfoBag(AdoptCOM, CFDictionaryPropertyBag::createInstance());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment