Revert the parts of r162629 that add a new pluginLoadPolicy and the context menu...
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 28 Jan 2014 00:07:30 +0000 (00:07 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 28 Jan 2014 00:07:30 +0000 (00:07 +0000)
We're leaving the parts that make us use PDFPlugin instead of showing the blocked
plugin indicator intact, though.

* UIProcess/API/APILoaderClient.h:
(API::LoaderClient::pluginLoadPolicy):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageLoaderClient):
* UIProcess/API/C/WKPageLoaderClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::findPlugin):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/Plugins/PDF/PDFPlugin.h:
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::PDFPlugin):
(WebKit::PDFPlugin::handleContextMenuEvent):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::createPlugin):
(WebKit::WebPage::canPluginHandleResponse):

* WebKitTestRunner/TestController.cpp:
(WTR::TestController::createWebViewWithOptions):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@162883 268f45cc-cd09-0410-ab3c-d52691b4dbfc

12 files changed:
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/APILoaderClient.h
Source/WebKit2/UIProcess/API/C/WKPage.cpp
Source/WebKit2/UIProcess/API/C/WKPageLoaderClient.h
Source/WebKit2/UIProcess/WebPageProxy.cpp
Source/WebKit2/UIProcess/WebPageProxy.h
Source/WebKit2/UIProcess/WebPageProxy.messages.in
Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.h
Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.mm
Source/WebKit2/WebProcess/WebPage/WebPage.cpp
Tools/ChangeLog
Tools/WebKitTestRunner/TestController.cpp

index fc554c8..7986373 100644 (file)
@@ -1,3 +1,27 @@
+2014-01-27  Tim Horton  <timothy_horton@apple.com>
+
+        Revert the parts of r162629 that add a new pluginLoadPolicy and the context menu item.
+
+        We're leaving the parts that make us use PDFPlugin instead of showing the blocked
+        plugin indicator intact, though.
+
+        * UIProcess/API/APILoaderClient.h:
+        (API::LoaderClient::pluginLoadPolicy):
+        * UIProcess/API/C/WKPage.cpp:
+        (WKPageSetPageLoaderClient):
+        * UIProcess/API/C/WKPageLoaderClient.h:
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::findPlugin):
+        * UIProcess/WebPageProxy.h:
+        * UIProcess/WebPageProxy.messages.in:
+        * WebProcess/Plugins/PDF/PDFPlugin.h:
+        * WebProcess/Plugins/PDF/PDFPlugin.mm:
+        (WebKit::PDFPlugin::PDFPlugin):
+        (WebKit::PDFPlugin::handleContextMenuEvent):
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::createPlugin):
+        (WebKit::WebPage::canPluginHandleResponse):
+
 2014-01-27  Anders Carlsson  <andersca@apple.com>
 
         Add a WKContentView initializer that takes a WKWebViewConfiguration
index 9532811..f7d68b1 100644 (file)
@@ -91,7 +91,7 @@ public:
     virtual void willGoToBackForwardListItem(WebKit::WebPageProxy*, WebKit::WebBackForwardListItem*, API::Object*) { }
 
 #if ENABLE(NETSCAPE_PLUGIN_API)
-    virtual WebKit::PluginModuleLoadPolicy pluginLoadPolicy(WebKit::WebPageProxy*, WebKit::PluginModuleLoadPolicy currentPluginLoadPolicy, WebKit::ImmutableDictionary*, WTF::String& unavailabilityDescription, WTF::String& useBlockedPluginTitle) { return currentPluginLoadPolicy; }
+    virtual WebKit::PluginModuleLoadPolicy pluginLoadPolicy(WebKit::WebPageProxy*, WebKit::PluginModuleLoadPolicy currentPluginLoadPolicy, WebKit::ImmutableDictionary*, WTF::String& unavailabilityDescription) { return currentPluginLoadPolicy; }
     virtual void didFailToInitializePlugin(WebKit::WebPageProxy*, WebKit::ImmutableDictionary*) { }
     virtual void didBlockInsecurePluginVersion(WebKit::WebPageProxy*, WebKit::ImmutableDictionary*) { }
 #endif // ENABLE(NETSCAPE_PLUGIN_API)
index f639ad2..c3a042b 100644 (file)
@@ -931,28 +931,20 @@ void WKPageSetPageLoaderClient(WKPageRef pageRef, const WKPageLoaderClientBase*
                 m_client.pluginDidFail(toAPI(page), kWKErrorCodeInsecurePlugInVersion, toAPI(pluginInformation), m_client.base.clientInfo);
         }
 
-        virtual PluginModuleLoadPolicy pluginLoadPolicy(WebPageProxy* page, PluginModuleLoadPolicy currentPluginLoadPolicy, ImmutableDictionary* pluginInformation, String& unavailabilityDescription, String& useBlockedPluginTitle) override
+        virtual PluginModuleLoadPolicy pluginLoadPolicy(WebPageProxy* page, PluginModuleLoadPolicy currentPluginLoadPolicy, ImmutableDictionary* pluginInformation, String& unavailabilityDescription) override
         {
             WKStringRef unavailabilityDescriptionOut = 0;
-            WKStringRef useBlockedPluginTitleOut = 0;
             PluginModuleLoadPolicy loadPolicy = currentPluginLoadPolicy;
 
             if (m_client.pluginLoadPolicy_deprecatedForUseWithV2)
                 loadPolicy = toPluginModuleLoadPolicy(m_client.pluginLoadPolicy_deprecatedForUseWithV2(toAPI(page), toWKPluginLoadPolicy(currentPluginLoadPolicy), toAPI(pluginInformation), m_client.base.clientInfo));
-            else if (m_client.pluginLoadPolicy_deprecatedForUseWithV3)
-                loadPolicy = toPluginModuleLoadPolicy(m_client.pluginLoadPolicy_deprecatedForUseWithV3(toAPI(page), toWKPluginLoadPolicy(currentPluginLoadPolicy), toAPI(pluginInformation), &unavailabilityDescriptionOut, m_client.base.clientInfo));
             else if (m_client.pluginLoadPolicy)
-                loadPolicy = toPluginModuleLoadPolicy(m_client.pluginLoadPolicy(toAPI(page), toWKPluginLoadPolicy(currentPluginLoadPolicy), toAPI(pluginInformation), &unavailabilityDescriptionOut, &useBlockedPluginTitleOut, m_client.base.clientInfo));
+                loadPolicy = toPluginModuleLoadPolicy(m_client.pluginLoadPolicy(toAPI(page), toWKPluginLoadPolicy(currentPluginLoadPolicy), toAPI(pluginInformation), &unavailabilityDescriptionOut, m_client.base.clientInfo));
 
             if (unavailabilityDescriptionOut) {
                 RefPtr<API::String> webUnavailabilityDescription = adoptRef(toImpl(unavailabilityDescriptionOut));
                 unavailabilityDescription = webUnavailabilityDescription->string();
             }
-
-            if (useBlockedPluginTitleOut) {
-                RefPtr<API::String> webUseBlockedPluginTitle = adoptRef(toImpl(useBlockedPluginTitleOut));
-                useBlockedPluginTitle = webUseBlockedPluginTitle->string();
-            }
             
             return loadPolicy;
         }
index fbcf5e2..751fd04 100644 (file)
@@ -71,7 +71,7 @@ typedef void (*WKPageDidChangeBackForwardListCallback)(WKPageRef page, WKBackFor
 typedef bool (*WKPageShouldGoToBackForwardListItemCallback)(WKPageRef page, WKBackForwardListItemRef item, const void *clientInfo);
 typedef void (*WKPageWillGoToBackForwardListItemCallback)(WKPageRef page, WKBackForwardListItemRef item, WKTypeRef userData, const void *clientInfo);
 typedef void (*WKPageDidLayoutCallback)(WKPageRef page, WKLayoutMilestones milestones, WKTypeRef userData, const void *clientInfo);
-typedef WKPluginLoadPolicy (*WKPagePluginLoadPolicyCallback)(WKPageRef page, WKPluginLoadPolicy currentPluginLoadPolicy, WKDictionaryRef pluginInfoDictionary, WKStringRef* unavailabilityDescription, WKStringRef* useBlockedPluginTitle, const void* clientInfo);
+typedef WKPluginLoadPolicy (*WKPagePluginLoadPolicyCallback)(WKPageRef page, WKPluginLoadPolicy currentPluginLoadPolicy, WKDictionaryRef pluginInfoDictionary, WKStringRef* unavailabilityDescription, const void* clientInfo);
 typedef void (*WKPagePluginDidFailCallback)(WKPageRef page, WKErrorCode errorCode, WKDictionaryRef pluginInfoDictionary, const void* clientInfo);
 typedef WKWebGLLoadPolicy (*WKPageWebGLLoadPolicyCallback)(WKPageRef page, WKStringRef url, const void* clientInfo);
 
@@ -79,7 +79,6 @@ typedef WKWebGLLoadPolicy (*WKPageWebGLLoadPolicyCallback)(WKPageRef page, WKStr
 typedef void (*WKPageDidFailToInitializePluginCallback_deprecatedForUseWithV0)(WKPageRef page, WKStringRef mimeType, const void* clientInfo);
 typedef void (*WKPagePluginDidFailCallback_deprecatedForUseWithV1)(WKPageRef page, WKErrorCode errorCode, WKStringRef mimeType, WKStringRef pluginIdentifier, WKStringRef pluginVersion, const void* clientInfo);
 typedef WKPluginLoadPolicy (*WKPagePluginLoadPolicyCallback_deprecatedForUseWithV2)(WKPageRef page, WKPluginLoadPolicy currentPluginLoadPolicy, WKDictionaryRef pluginInfoDictionary, const void* clientInfo);
-typedef WKPluginLoadPolicy (*WKPagePluginLoadPolicyCallback_deprecatedForUseWithV3)(WKPageRef page, WKPluginLoadPolicy currentPluginLoadPolicy, WKDictionaryRef pluginInfoDictionary, WKStringRef* unavailabilityDescription, const void* clientInfo);
 
 typedef struct WKPageLoaderClientBase {
     int                                                                 version;
@@ -272,7 +271,7 @@ typedef struct WKPageLoaderClientV3 {
     WKPagePluginDidFailCallback                                         pluginDidFail;
 
     // Version 3.
-    WKPagePluginLoadPolicyCallback_deprecatedForUseWithV3               pluginLoadPolicy_deprecatedForUseWithV3;
+    WKPagePluginLoadPolicyCallback                                      pluginLoadPolicy;
 } WKPageLoaderClientV3;
 
 typedef struct WKPageLoaderClientV4 {
@@ -328,11 +327,10 @@ typedef struct WKPageLoaderClientV4 {
     WKPagePluginDidFailCallback                                         pluginDidFail;
     
     // Version 3.
-    WKPagePluginLoadPolicyCallback_deprecatedForUseWithV3               pluginLoadPolicy_deprecatedForUseWithV3;
+    WKPagePluginLoadPolicyCallback                                      pluginLoadPolicy;
     
-    // Version 4.
+    // Version 4
     WKPageWebGLLoadPolicyCallback                                       webGLLoadPolicy;
-    WKPagePluginLoadPolicyCallback                                      pluginLoadPolicy;
 } WKPageLoaderClientV4;
 
 // FIXME: These should be deprecated.
index 129c983..09550df 100644 (file)
@@ -1338,7 +1338,7 @@ void WebPageProxy::handleKeyboardEvent(const NativeWebKeyboardEvent& event)
 }
 
 #if ENABLE(NETSCAPE_PLUGIN_API)
-void WebPageProxy::findPlugin(const String& mimeType, uint32_t processType, const String& urlString, const String& frameURLString, const String& pageURLString, bool allowOnlyApplicationPlugins, uint64_t& pluginProcessToken, String& newMimeType, uint32_t& pluginLoadPolicy, String& unavailabilityDescription, String& useBlockedPluginTitle)
+void WebPageProxy::findPlugin(const String& mimeType, uint32_t processType, const String& urlString, const String& frameURLString, const String& pageURLString, bool allowOnlyApplicationPlugins, uint64_t& pluginProcessToken, String& newMimeType, uint32_t& pluginLoadPolicy, String& unavailabilityDescription)
 {
     MESSAGE_CHECK_URL(urlString);
 
@@ -1356,12 +1356,11 @@ void WebPageProxy::findPlugin(const String& mimeType, uint32_t processType, cons
 
 #if PLATFORM(MAC)
     RefPtr<ImmutableDictionary> pluginInformation = createPluginInformationDictionary(plugin, frameURLString, String(), pageURLString, String(), String());
-    pluginLoadPolicy = m_loaderClient->pluginLoadPolicy(this, static_cast<PluginModuleLoadPolicy>(pluginLoadPolicy), pluginInformation.get(), unavailabilityDescription, useBlockedPluginTitle);
+    pluginLoadPolicy = m_loaderClient->pluginLoadPolicy(this, static_cast<PluginModuleLoadPolicy>(pluginLoadPolicy), pluginInformation.get(), unavailabilityDescription);
 #else
     UNUSED_PARAM(frameURLString);
     UNUSED_PARAM(pageURLString);
     UNUSED_PARAM(unavailabilityDescription);
-    UNUSED_PARAM(useBlockedPluginTitle);
 #endif
 
     PluginProcessSandboxPolicy pluginProcessSandboxPolicy = PluginProcessSandboxPolicyNormal;
index 297433d..edeaebc 100644 (file)
@@ -1165,7 +1165,7 @@ private:
     void sendWheelEvent(const WebWheelEvent&);
 
 #if ENABLE(NETSCAPE_PLUGIN_API)
-    void findPlugin(const String& mimeType, uint32_t processType, const String& urlString, const String& frameURLString, const String& pageURLString, bool allowOnlyApplicationPlugins, uint64_t& pluginProcessToken, String& newMIMEType, uint32_t& pluginLoadPolicy, String& unavailabilityDescription, String& useBlockedPluginTitle);
+    void findPlugin(const String& mimeType, uint32_t processType, const String& urlString, const String& frameURLString, const String& pageURLString, bool allowOnlyApplicationPlugins, uint64_t& pluginProcessToken, String& newMIMEType, uint32_t& pluginLoadPolicy, String& unavailabilityDescription);
 #endif
 
     PageClient& m_pageClient;
index 2e24f71..eb8b3ed 100644 (file)
@@ -334,7 +334,7 @@ messages -> WebPageProxy {
 #endif
 
 #if ENABLE(NETSCAPE_PLUGIN_API)
-    FindPlugin(String mimeType, uint32_t processType, String urlString, String frameURLString, String pageURLString, bool allowOnlyApplicationPlugins) -> (uint64_t pluginProcessToken, String newMIMEType, uint32_t pluginLoadPolicy, String unavailabilityDescription, String useBlockedPluginTitle)
+    FindPlugin(String mimeType, uint32_t processType, String urlString, String frameURLString, String pageURLString, bool allowOnlyApplicationPlugins) -> (uint64_t pluginProcessToken, String newMIMEType, uint32_t pluginLoadPolicy, String unavailabilityDescription)
 #endif
 
     DidUpdateViewState()
index bdae47c..6a7e9b0 100644 (file)
@@ -46,9 +46,8 @@ OBJC_CLASS NSString;
 OBJC_CLASS PDFAnnotation;
 OBJC_CLASS PDFLayerController;
 OBJC_CLASS PDFSelection;
-OBJC_CLASS WKPDFLayerControllerDelegate;
 OBJC_CLASS WKPDFPluginAccessibilityObject;
-OBJC_CLASS WKPDFPluginContextMenuTarget;
+OBJC_CLASS WKPDFLayerControllerDelegate;
 
 namespace IPC {
 class DataReference;
@@ -89,7 +88,6 @@ public:
     void clickedLink(NSURL *);
     void saveToPDF();
     void openWithNativeApplication();
-    void openWithPlugin();
     void writeItemsToPasteboard(NSString *pasteboardName, NSArray *items, NSArray *types);
     void showDefinitionForAttributedString(NSAttributedString *, CGPoint);
     void performWebSearch(NSString *);
@@ -105,8 +103,6 @@ public:
     
     bool showContextMenuAtPoint(const WebCore::IntPoint&);
 
-    void setUsedInPlaceOfBlockedPlugin(bool value, const String& useBlockedPluginContextMenuTitle);
-
 private:
     explicit PDFPlugin(WebFrame*);
 
@@ -261,9 +257,6 @@ private:
 
     bool m_isPostScript;
     bool m_pdfDocumentWasMutated;
-    bool m_usedInPlaceOfBlockedPlugin;
-
-    String m_useBlockedPluginContextMenuTitle;
 
     WebCore::IntSize m_scrollOffset;
 
@@ -274,8 +267,7 @@ private:
     RetainPtr<CALayer> m_scrollCornerLayer;
     RetainPtr<PDFLayerController> m_pdfLayerController;
     RetainPtr<WKPDFPluginAccessibilityObject> m_accessibilityObject;
-    RetainPtr<WKPDFPluginContextMenuTarget> m_contextMenuTarget;
-
+    
     RefPtr<PDFPluginAnnotation> m_activeAnnotation;
     RefPtr<PDFPluginPasswordField> m_passwordField;
     RefPtr<WebCore::Element> m_annotationContainer;
index b9e9d83..ec8e52c 100644 (file)
@@ -55,7 +55,6 @@
 #import <QuartzCore/QuartzCore.h>
 #import <WebCore/ArchiveResource.h>
 #import <WebCore/Chrome.h>
-#import <WebCore/ChromeClient.h>
 #import <WebCore/Cursor.h>
 #import <WebCore/DocumentLoader.h>
 #import <WebCore/FocusController.h>
@@ -66,7 +65,6 @@
 #import <WebCore/GraphicsContext.h>
 #import <WebCore/HTMLElement.h>
 #import <WebCore/HTMLFormElement.h>
-#import <WebCore/HTMLPlugInElement.h>
 #import <WebCore/LocalizedStrings.h>
 #import <WebCore/MouseEvent.h>
 #import <WebCore/Page.h>
@@ -271,37 +269,6 @@ static const int defaultScrollMagnitudeThresholdForPageFlip = 20;
 
 @end
 
-@interface WKPDFPluginContextMenuTarget : NSObject
-{
-    WebKit::PDFPlugin* _pdfPlugin;
-}
-
-@property(assign) WebKit::PDFPlugin* pdfPlugin;
-
-- (id)initWithPDFPlugin:(WebKit::PDFPlugin *)plugin;
-
-@end
-
-@implementation WKPDFPluginContextMenuTarget
-
-@synthesize pdfPlugin = _pdfPlugin;
-
-- (id)initWithPDFPlugin:(WebKit::PDFPlugin *)plugin
-{
-    if (!(self = [super init]))
-        return nil;
-
-    _pdfPlugin = plugin;
-
-    return self;
-}
-
-- (void)useBlockedPlugin:(id)sender
-{
-    _pdfPlugin->openWithPlugin();
-}
-
-@end
 
 @interface WKPDFPluginScrollbarLayer : CALayer
 {
@@ -532,12 +499,10 @@ PDFPlugin::PDFPlugin(WebFrame* frame)
     : m_frame(frame)
     , m_isPostScript(false)
     , m_pdfDocumentWasMutated(false)
-    , m_usedInPlaceOfBlockedPlugin(false)
     , m_containerLayer(adoptNS([[CALayer alloc] init]))
     , m_contentLayer(adoptNS([[CALayer alloc] init]))
     , m_scrollCornerLayer(adoptNS([[WKPDFPluginScrollbarLayer alloc] initWithPDFPlugin:this]))
     , m_pdfLayerController(adoptNS([[pdfLayerControllerClass() alloc] init]))
-    , m_contextMenuTarget(adoptNS([[WKPDFPluginContextMenuTarget alloc] initWithPDFPlugin:this]))
     , m_pdfLayerControllerDelegate(adoptNS([[WKPDFLayerControllerDelegate alloc] initWithPDFPlugin:this]))
 {
     m_pdfLayerController.get().delegate = m_pdfLayerControllerDelegate.get();
@@ -1492,18 +1457,6 @@ bool PDFPlugin::handleContextMenuEvent(const WebMouseEvent& event)
     IntPoint point = frameView->contentsToScreen(IntRect(frameView->windowToContents(event.position()), IntSize())).location();
     
     if (NSMenu *nsMenu = [m_pdfLayerController menuForEvent:nsEventForWebMouseEvent(event)]) {
-        if (m_usedInPlaceOfBlockedPlugin) {
-            String title = useBlockedPlugInContextMenuTitle();
-
-            if (!m_useBlockedPluginContextMenuTitle.isEmpty())
-                title = m_useBlockedPluginContextMenuTitle;
-
-            NSMenuItem *useBlockedPluginItem = [[[NSMenuItem alloc] initWithTitle:title action:@selector(useBlockedPlugin:) keyEquivalent:@""] autorelease];
-
-            [useBlockedPluginItem setTarget:m_contextMenuTarget.get()];
-            [nsMenu insertItem:useBlockedPluginItem atIndex:0];
-            [nsMenu insertItem:[NSMenuItem separatorItem] atIndex:1];
-        }
         WKPopupContextMenu(nsMenu, point);
         return true;
     }
@@ -1690,11 +1643,6 @@ void PDFPlugin::openWithNativeApplication()
     webFrame()->page()->send(Messages::WebPageProxy::OpenPDFFromTemporaryFolderWithNativeApplication(m_temporaryPDFUUID));
 }
 
-void PDFPlugin::openWithPlugin()
-{
-    webFrame()->page()->corePage()->chrome().client().unavailablePluginButtonClicked(pluginView()->pluginElement(), RenderEmbeddedObject::InsecurePluginVersion);
-}
-
 void PDFPlugin::writeItemsToPasteboard(NSString *pasteboardName, NSArray *items, NSArray *types)
 {
     Vector<String> pasteboardTypes;
@@ -1935,13 +1883,6 @@ NSObject *PDFPlugin::accessibilityObject() const
     return m_accessibilityObject.get();
 }
 
-
-void PDFPlugin::setUsedInPlaceOfBlockedPlugin(bool value, const String& useBlockedPluginContextMenuTitle)
-{
-    m_usedInPlaceOfBlockedPlugin = value;
-    m_useBlockedPluginContextMenuTitle = useBlockedPluginContextMenuTitle;
-}
-
 } // namespace WebKit
 
 #endif // ENABLE(PDFKIT_PLUGIN)
index ee0a66f..be1d1eb 100644 (file)
@@ -574,8 +574,7 @@ PassRefPtr<Plugin> WebPage::createPlugin(WebFrame* frame, HTMLPlugInElement* plu
     uint64_t pluginProcessToken;
     uint32_t pluginLoadPolicy;
     String unavailabilityDescription;
-    String useBlockedPluginTitle;
-    if (!sendSync(Messages::WebPageProxy::FindPlugin(parameters.mimeType, static_cast<uint32_t>(processType), parameters.url.string(), frameURLString, pageURLString, allowOnlyApplicationPlugins), Messages::WebPageProxy::FindPlugin::Reply(pluginProcessToken, newMIMEType, pluginLoadPolicy, unavailabilityDescription, useBlockedPluginTitle)))
+    if (!sendSync(Messages::WebPageProxy::FindPlugin(parameters.mimeType, static_cast<uint32_t>(processType), parameters.url.string(), frameURLString, pageURLString, allowOnlyApplicationPlugins), Messages::WebPageProxy::FindPlugin::Reply(pluginProcessToken, newMIMEType, pluginLoadPolicy, unavailabilityDescription)))
         return nullptr;
 
     bool isBlockedPlugin = static_cast<PluginModuleLoadPolicy>(pluginLoadPolicy) == PluginModuleBlocked;
@@ -585,7 +584,6 @@ PassRefPtr<Plugin> WebPage::createPlugin(WebFrame* frame, HTMLPlugInElement* plu
         String path = parameters.url.path();
         if (shouldUsePDFPlugin() && (MIMETypeRegistry::isPDFOrPostScriptMIMEType(parameters.mimeType) || (parameters.mimeType.isEmpty() && (path.endsWith(".pdf", false) || path.endsWith(".ps", false))))) {
             RefPtr<PDFPlugin> pdfPlugin = PDFPlugin::create(frame);
-            pdfPlugin->setUsedInPlaceOfBlockedPlugin(isBlockedPlugin, useBlockedPluginTitle);
             return pdfPlugin.release();
         }
 #else
@@ -3755,8 +3753,7 @@ bool WebPage::canPluginHandleResponse(const ResourceResponse& response)
     uint64_t pluginProcessToken;
     String newMIMEType;
     String unavailabilityDescription;
-    String useBlockedPluginTitle;
-    if (!sendSync(Messages::WebPageProxy::FindPlugin(response.mimeType(), PluginProcessTypeNormal, response.url().string(), response.url().string(), response.url().string(), allowOnlyApplicationPlugins), Messages::WebPageProxy::FindPlugin::Reply(pluginProcessToken, newMIMEType, pluginLoadPolicy, unavailabilityDescription, useBlockedPluginTitle)))
+    if (!sendSync(Messages::WebPageProxy::FindPlugin(response.mimeType(), PluginProcessTypeNormal, response.url().string(), response.url().string(), response.url().string(), allowOnlyApplicationPlugins), Messages::WebPageProxy::FindPlugin::Reply(pluginProcessToken, newMIMEType, pluginLoadPolicy, unavailabilityDescription)))
         return false;
 
     return pluginLoadPolicy != PluginModuleBlocked && pluginProcessToken;
index 55bcad8..3a87a86 100644 (file)
@@ -1,3 +1,13 @@
+2014-01-27  Tim Horton  <timothy_horton@apple.com>
+
+        Revert the parts of r162629 that add a new pluginLoadPolicy and the context menu item.
+
+        We're leaving the parts that make us use PDFPlugin instead of showing the blocked
+        plugin indicator intact, though.
+
+        * WebKitTestRunner/TestController.cpp:
+        (WTR::TestController::createWebViewWithOptions):
+
 2014-01-27  Andy Estes  <aestes@apple.com>
 
         Scrub WebKit API headers of WTF macros
index dd40979..bd0d36b 100644 (file)
@@ -459,9 +459,8 @@ void TestController::createWebViewWithOptions(WKDictionaryRef options)
         0, // didLayout
         0, // pluginLoadPolicy_deprecatedForUseWithV2
         0, // pluginDidFail
-        0, // pluginLoadPolicy_deprecatedForUseWithV3
+        0, // pluginLoadPolicy
         0, // webGLLoadPolicy
-        pluginLoadPolicy, // pluginLoadPolicy
     };
     WKPageSetPageLoaderClient(m_mainWebView->page(), &pageLoaderClient.base);