[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

jhoneycutt at apple.com jhoneycutt at apple.com
Thu Apr 8 00:31:17 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit e7b303a302ab943925712c28ff601434f040b92c
Author: jhoneycutt at apple.com <jhoneycutt at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Dec 10 19:23:42 2009 +0000

    Pass more information about a plug-in to the PluginHalterDelegate
    
    Reviewed by Adam Roben.
    
    WebCore:
    
    * loader/EmptyClients.h:
    Remove this unused class.
    
    * page/HaltablePlugin.h:
    Add new functions to return the plug-in's name and whether it is
    windowed.
    
    * page/PluginHalter.cpp:
    (WebCore::PluginHalter::timerFired):
    Pass new arguments to the client.
    
    * page/PluginHalterClient.h:
    Add new parameters.
    
    * plugins/PluginView.cpp:
    (WebCore::PluginView::pluginName):
    Return the name from the PluginPackage.
    
    * plugins/PluginView.h:
    (WebCore::PluginView::isWindowed):
    
    WebKit/mac:
    
    * Plugins/WebBaseNetscapePluginView.mm:
    (WebHaltablePlugin::isWindowed):
    Return false - the Mac doesn't really have windowed plug-ins.
    (WebHaltablePlugin::pluginName):
    Return the name from the plug-in package.
    
    * WebCoreSupport/WebPluginHalterClient.h:
    Update for new parameters.
    
    * WebCoreSupport/WebPluginHalterClient.mm:
    (WebPluginHalterClient::shouldHaltPlugin):
    Ditto; pass them when making the delegate call.
    
    * WebView/WebUIDelegatePrivate.h:
    Update for new parameters.
    
    WebKit/win:
    
    * Interfaces/IWebPluginHalterDelegate.idl:
    Add new parameters.
    
    * WebCoreSupport/WebPluginHalterClient.cpp:
    (WebPluginHalterClient::shouldHaltPlugin):
    Update for new parameters. Pass them when making the delegate call.
    
    * WebCoreSupport/WebPluginHalterClient.h:
    Update for new parameters.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51953 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 6996d09..d94710a 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,30 @@
+2009-12-10  Jon Honeycutt  <jhoneycutt at apple.com>
+
+        Pass more information about a plug-in to the PluginHalterDelegate
+
+        Reviewed by Adam Roben.
+
+        * loader/EmptyClients.h:
+        Remove this unused class.
+
+        * page/HaltablePlugin.h:
+        Add new functions to return the plug-in's name and whether it is
+        windowed.
+
+        * page/PluginHalter.cpp:
+        (WebCore::PluginHalter::timerFired):
+        Pass new arguments to the client.
+
+        * page/PluginHalterClient.h:
+        Add new parameters.
+
+        * plugins/PluginView.cpp:
+        (WebCore::PluginView::pluginName):
+        Return the name from the PluginPackage.
+
+        * plugins/PluginView.h:
+        (WebCore::PluginView::isWindowed):
+
 2009-12-09  Brian Weinstein  <bweinstein at apple.com>
 
         Reviewed by Pavel Feldman.
diff --git a/WebCore/loader/EmptyClients.h b/WebCore/loader/EmptyClients.h
index 8f7a572..325498b 100644
--- a/WebCore/loader/EmptyClients.h
+++ b/WebCore/loader/EmptyClients.h
@@ -491,13 +491,6 @@ public:
     virtual void inspectorWindowObjectCleared() { }
 };
 
-class EmptyPluginHalterClient : public PluginHalterClient
-{
-public:
-    virtual bool shouldHaltPlugin(Node*) const { return false; }
-    virtual bool enabled() const { return false; }
-};
-
 }
 
 #endif // EmptyClients_h
diff --git a/WebCore/page/HaltablePlugin.h b/WebCore/page/HaltablePlugin.h
index a5fe0f4..0f4aa41 100644
--- a/WebCore/page/HaltablePlugin.h
+++ b/WebCore/page/HaltablePlugin.h
@@ -37,6 +37,8 @@ public:
     virtual void halt() = 0;
     virtual void restart() = 0;
     virtual Node* node() const = 0;
+    virtual bool isWindowed() const = 0;
+    virtual String pluginName() const = 0;
 };
 
 } // namespace WebCore
diff --git a/WebCore/page/PluginHalter.cpp b/WebCore/page/PluginHalter.cpp
index 63f5469..c0a6452 100644
--- a/WebCore/page/PluginHalter.cpp
+++ b/WebCore/page/PluginHalter.cpp
@@ -28,6 +28,7 @@
 #include "PluginHalter.h"
 
 #include "HaltablePlugin.h"
+#include "PlatformString.h"
 #include <wtf/CurrentTime.h>
 #include <wtf/Vector.h>
 
@@ -93,7 +94,7 @@ void PluginHalter::timerFired(Timer<PluginHalter>*)
             continue;
         }
 
-        if (m_client->shouldHaltPlugin(plugins[i]->node()))
+        if (m_client->shouldHaltPlugin(plugins[i]->node(), plugins[i]->isWindowed(), plugins[i]->pluginName()))
             plugins[i]->halt();
 
         m_plugins.remove(plugins[i]);
diff --git a/WebCore/page/PluginHalterClient.h b/WebCore/page/PluginHalterClient.h
index f77091f..0251547 100644
--- a/WebCore/page/PluginHalterClient.h
+++ b/WebCore/page/PluginHalterClient.h
@@ -29,12 +29,13 @@
 namespace WebCore {
 
 class Node;
+class String;
 
 class PluginHalterClient {
 public:
     virtual ~PluginHalterClient() { }
 
-    virtual bool shouldHaltPlugin(Node*) const = 0;
+    virtual bool shouldHaltPlugin(Node*, bool isWindowed, const String& pluginName) const = 0;
     virtual bool enabled() const = 0;
 };
 
diff --git a/WebCore/plugins/PluginView.cpp b/WebCore/plugins/PluginView.cpp
index ac210f6..8bd6aad 100644
--- a/WebCore/plugins/PluginView.cpp
+++ b/WebCore/plugins/PluginView.cpp
@@ -1241,4 +1241,9 @@ Node* PluginView::node() const
     return m_element;
 }
 
+String PluginView::pluginName() const
+{
+    return m_plugin->name();
+}
+
 } // namespace WebCore
diff --git a/WebCore/plugins/PluginView.h b/WebCore/plugins/PluginView.h
index 8f98b2c..5b4461d 100644
--- a/WebCore/plugins/PluginView.h
+++ b/WebCore/plugins/PluginView.h
@@ -203,6 +203,8 @@ namespace WebCore {
         virtual void halt();
         virtual void restart();
         virtual Node* node() const;
+        virtual bool isWindowed() const { return m_isWindowed; }
+        virtual String pluginName() const;
 
         bool isHalted() const { return m_isHalted; }
         bool hasBeenHalted() const { return m_hasBeenHalted; }
diff --git a/WebKit/mac/ChangeLog b/WebKit/mac/ChangeLog
index 80b5e30..a7670cb 100644
--- a/WebKit/mac/ChangeLog
+++ b/WebKit/mac/ChangeLog
@@ -1,3 +1,25 @@
+2009-12-10  Jon Honeycutt  <jhoneycutt at apple.com>
+
+        Pass more information about a plug-in to the PluginHalterDelegate
+
+        Reviewed by Adam Roben.
+
+        * Plugins/WebBaseNetscapePluginView.mm:
+        (WebHaltablePlugin::isWindowed):
+        Return false - the Mac doesn't really have windowed plug-ins.
+        (WebHaltablePlugin::pluginName):
+        Return the name from the plug-in package.
+
+        * WebCoreSupport/WebPluginHalterClient.h:
+        Update for new parameters.
+
+        * WebCoreSupport/WebPluginHalterClient.mm:
+        (WebPluginHalterClient::shouldHaltPlugin):
+        Ditto; pass them when making the delegate call.
+
+        * WebView/WebUIDelegatePrivate.h:
+        Update for new parameters.
+
 2009-12-08  Simon Fraser  <simon.fraser at apple.com>
 
         Reviewed by Dan Bernstein.
diff --git a/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm b/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm
index bba36e4..bf8b80b 100644
--- a/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm
+++ b/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm
@@ -79,6 +79,8 @@ private:
     virtual void halt();
     virtual void restart();
     virtual Node* node() const;
+    virtual bool isWindowed() const;
+    virtual String pluginName() const;
 
     WebBaseNetscapePluginView* m_view;
 };
@@ -98,6 +100,16 @@ Node* WebHaltablePlugin::node() const
     return [m_view element];
 }
 
+bool WebHaltablePlugin::isWindowed() const
+{
+    return false;
+}
+
+String WebHaltablePlugin::pluginName() const
+{
+    return [[m_view pluginPackage] name];
+}
+
 @implementation WebBaseNetscapePluginView
 
 + (void)initialize
diff --git a/WebKit/mac/WebCoreSupport/WebPluginHalterClient.h b/WebKit/mac/WebCoreSupport/WebPluginHalterClient.h
index 0bab4e3..a0d398d 100644
--- a/WebKit/mac/WebCoreSupport/WebPluginHalterClient.h
+++ b/WebKit/mac/WebCoreSupport/WebPluginHalterClient.h
@@ -27,6 +27,7 @@
 
 namespace WebCore {
     class Node;
+    class String;
 }
 
 @class WebView;
@@ -35,7 +36,7 @@ class WebPluginHalterClient : public WebCore::PluginHalterClient {
 public:
     WebPluginHalterClient(WebView *);
     
-    virtual bool shouldHaltPlugin(WebCore::Node*) const;
+    virtual bool shouldHaltPlugin(WebCore::Node*, bool, const WebCore::String&) const;
     virtual bool enabled() const;
     
 private:
diff --git a/WebKit/mac/WebCoreSupport/WebPluginHalterClient.mm b/WebKit/mac/WebCoreSupport/WebPluginHalterClient.mm
index b83e4c8..0b2bc26 100644
--- a/WebKit/mac/WebCoreSupport/WebPluginHalterClient.mm
+++ b/WebKit/mac/WebCoreSupport/WebPluginHalterClient.mm
@@ -37,10 +37,10 @@ WebPluginHalterClient::WebPluginHalterClient(WebView *webView)
     ASSERT_ARG(webView, webView);
 }
 
-bool WebPluginHalterClient::shouldHaltPlugin(Node* pluginNode) const
+bool WebPluginHalterClient::shouldHaltPlugin(Node* pluginNode, bool isWindowed, const String& pluginName) const
 {
-    ASSERT_ARG(pluginNode, pluginNode);    
-    return CallUIDelegateReturningBoolean(NO, m_webView, @selector(webView:shouldHaltPlugin:), kit(pluginNode));
+    ASSERT_ARG(pluginNode, pluginNode);
+    return CallUIDelegateReturningBoolean(NO, m_webView, @selector(webView:shouldHaltPlugin:isWindowed:pluginName:), kit(pluginNode), isWindowed, (NSString *)pluginName);
 }
 
 bool WebPluginHalterClient::enabled() const
diff --git a/WebKit/mac/WebView/WebUIDelegatePrivate.h b/WebKit/mac/WebView/WebUIDelegatePrivate.h
index 5739497..a130b18 100644
--- a/WebKit/mac/WebView/WebUIDelegatePrivate.h
+++ b/WebKit/mac/WebView/WebUIDelegatePrivate.h
@@ -114,7 +114,7 @@ enum {
 - (void)webView:(WebView *)sender willPopupMenu:(NSMenu *)menu;
 - (void)webView:(WebView *)sender contextMenuItemSelected:(NSMenuItem *)item forElement:(NSDictionary *)element;
 - (void)webView:(WebView *)sender saveFrameView:(WebFrameView *)frameView showingPanel:(BOOL)showingPanel;
-- (BOOL)webView:(WebView *)sender shouldHaltPlugin:(DOMNode *)pluginNode;
+- (BOOL)webView:(WebView *)sender shouldHaltPlugin:(DOMNode *)pluginNode isWindowed:(BOOL)isWindowed pluginName:(NSString *)pluginName;
 /*!
     @method webView:frame:exceededDatabaseQuotaForSecurityOrigin:database:
     @param sender The WebView sending the delegate method.
diff --git a/WebKit/win/ChangeLog b/WebKit/win/ChangeLog
index cec9cd9..95705a9 100644
--- a/WebKit/win/ChangeLog
+++ b/WebKit/win/ChangeLog
@@ -1,3 +1,19 @@
+2009-12-10  Jon Honeycutt  <jhoneycutt at apple.com>
+
+        Pass more information about a plug-in to the PluginHalterDelegate
+
+        Reviewed by Adam Roben.
+
+        * Interfaces/IWebPluginHalterDelegate.idl:
+        Add new parameters.
+
+        * WebCoreSupport/WebPluginHalterClient.cpp:
+        (WebPluginHalterClient::shouldHaltPlugin):
+        Update for new parameters. Pass them when making the delegate call.
+
+        * WebCoreSupport/WebPluginHalterClient.h:
+        Update for new parameters.
+
 2009-12-09  Brent Fulgham  <bfulgham at webkit.org>
 
         Revert incorrect commit-box update r51911.
diff --git a/WebKit/win/Interfaces/IWebPluginHalterDelegate.idl b/WebKit/win/Interfaces/IWebPluginHalterDelegate.idl
index f79e304..e113da8 100644
--- a/WebKit/win/Interfaces/IWebPluginHalterDelegate.idl
+++ b/WebKit/win/Interfaces/IWebPluginHalterDelegate.idl
@@ -39,5 +39,5 @@ interface IWebView;
 ]
 interface IWebPluginHalterDelegate : IUnknown
 {
-    HRESULT shouldHaltPlugin([in] IWebView* webView, [in] IDOMNode*, [out, retval] BOOL* result);
+    HRESULT shouldHaltPlugin([in] IWebView* webView, [in] IDOMNode*, [in] BOOL isWindowed, [in] BSTR pluginName, [out, retval] BOOL* result);
 }
diff --git a/WebKit/win/WebCoreSupport/WebPluginHalterClient.cpp b/WebKit/win/WebCoreSupport/WebPluginHalterClient.cpp
index 78daf8d..995b05d 100644
--- a/WebKit/win/WebCoreSupport/WebPluginHalterClient.cpp
+++ b/WebKit/win/WebCoreSupport/WebPluginHalterClient.cpp
@@ -32,7 +32,7 @@
 #include <WebCore/Node.h>
 #include <wtf/Assertions.h>
 
-using WebCore::Node;
+using namespace WebCore;
 
 WebPluginHalterClient::WebPluginHalterClient(WebView* webView)
     : m_webView(webView)
@@ -40,7 +40,7 @@ WebPluginHalterClient::WebPluginHalterClient(WebView* webView)
     ASSERT_ARG(webView, webView);
 }
 
-bool WebPluginHalterClient::shouldHaltPlugin(WebCore::Node* n) const
+bool WebPluginHalterClient::shouldHaltPlugin(Node* n, bool isWindowed, const String& pluginName) const
 {
     ASSERT_ARG(n, n);
 
@@ -51,7 +51,7 @@ bool WebPluginHalterClient::shouldHaltPlugin(WebCore::Node* n) const
     COMPtr<IDOMNode> domNode(AdoptCOM, DOMNode::createInstance(n));
 
     BOOL shouldHalt;
-    if (FAILED(d->shouldHaltPlugin(m_webView, domNode.get(), &shouldHalt)))
+    if (FAILED(d->shouldHaltPlugin(m_webView, domNode.get(), isWindowed, BString(pluginName), &shouldHalt)))
         return false;
 
     return shouldHalt;
diff --git a/WebKit/win/WebCoreSupport/WebPluginHalterClient.h b/WebKit/win/WebCoreSupport/WebPluginHalterClient.h
index 7d05fe9..da3d28a 100644
--- a/WebKit/win/WebCoreSupport/WebPluginHalterClient.h
+++ b/WebKit/win/WebCoreSupport/WebPluginHalterClient.h
@@ -30,6 +30,7 @@
 
 namespace WebCore {
     class Node;
+    class String;
 }
 
 class WebView;
@@ -38,7 +39,7 @@ class WebPluginHalterClient : public WebCore::PluginHalterClient {
 public:
     WebPluginHalterClient(WebView* webView);
 
-    virtual bool shouldHaltPlugin(WebCore::Node* n) const;
+    virtual bool shouldHaltPlugin(WebCore::Node* n, bool isWindowed, const WebCore::String& pluginName) const;
     virtual bool enabled() const;
 
 private:

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list