[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.15.1-1414-gc69ee75
jhoneycutt at apple.com
jhoneycutt at apple.com
Thu Oct 29 20:45:48 UTC 2009
The following commit has been merged in the webkit-1.1 branch:
commit 816d66eea279592d8e018164ab9e3580dd062035
Author: jhoneycutt at apple.com <jhoneycutt at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Oct 15 23:22:52 2009 +0000
Add SPI to determine whether a node is a halted plug-in.
Part of <rdar://problem/7273354> Halted plug-ins should restart on
mouseover
https://bugs.webkit.org/show_bug.cgi?id=30151
Reviewed by Darin Adler.
WebCore:
* plugins/PluginView.cpp:
(WebCore::PluginView::PluginView):
Initialize m_isHalted.
* plugins/PluginView.h:
(WebCore::PluginView::isHalted):
Return m_isHalted.
* plugins/win/PluginViewWin.cpp:
(WebCore::PluginView::halt):
Set m_isHalted to true.
(WebCore::PluginView::restart):
clear m_isHalted.
WebKit/win:
* Interfaces/IWebViewPrivate.idl:
Add isNodehaltedPlugin().
* WebView.cpp:
(WebView::isNodeHaltedPlugin):
From the IDOMNode, query for the DOMNode. From the DOMNode, get the
WebCore::Node. Get the node's renderer, and check whether it is a
RenderWidget. If so, get its Widget, and check whether it's a
PluginView. If so, return the result of PluginView::isHalted().
* WebView.h:
Declare isNodeHaltedPlugin().
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@49666 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index dd707ba..23ea144 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,28 @@
+2009-10-14 Jon Honeycutt <jhoneycutt at apple.com>
+
+ Add SPI to determine whether a node is a halted plug-in.
+
+ Part of <rdar://problem/7273354> Halted plug-ins should restart on
+ mouseover
+
+ https://bugs.webkit.org/show_bug.cgi?id=30151
+
+ Reviewed by Darin Adler.
+
+ * plugins/PluginView.cpp:
+ (WebCore::PluginView::PluginView):
+ Initialize m_isHalted.
+
+ * plugins/PluginView.h:
+ (WebCore::PluginView::isHalted):
+ Return m_isHalted.
+
+ * plugins/win/PluginViewWin.cpp:
+ (WebCore::PluginView::halt):
+ Set m_isHalted to true.
+ (WebCore::PluginView::restart):
+ clear m_isHalted.
+
2009-10-15 Zoltan Horvath <zoltan at webkit.org>
Reviewed by Oliver Hunt.
diff --git a/WebCore/plugins/PluginView.cpp b/WebCore/plugins/PluginView.cpp
index d8aac1a..d3cafe0 100644
--- a/WebCore/plugins/PluginView.cpp
+++ b/WebCore/plugins/PluginView.cpp
@@ -828,6 +828,7 @@ PluginView::PluginView(Frame* parentFrame, const IntSize& size, PluginPackage* p
, m_loadManually(loadManually)
, m_manualStream(0)
, m_isJavaScriptPaused(false)
+ , m_isHalted(false)
{
if (!m_plugin) {
m_status = PluginStatusCanNotFindPlugin;
diff --git a/WebCore/plugins/PluginView.h b/WebCore/plugins/PluginView.h
index 0d02f94..a826a4f 100644
--- a/WebCore/plugins/PluginView.h
+++ b/WebCore/plugins/PluginView.h
@@ -199,6 +199,8 @@ namespace WebCore {
virtual void restart();
virtual Node* node() const;
+ bool isHalted() const { return m_isHalted; }
+
static bool isCallingPlugin();
bool start();
@@ -342,6 +344,8 @@ private:
bool m_isJavaScriptPaused;
+ bool m_isHalted;
+
static PluginView* s_currentPluginView;
};
diff --git a/WebCore/plugins/win/PluginViewWin.cpp b/WebCore/plugins/win/PluginViewWin.cpp
index ccbf6f8..409f859 100644
--- a/WebCore/plugins/win/PluginViewWin.cpp
+++ b/WebCore/plugins/win/PluginViewWin.cpp
@@ -1019,12 +1019,17 @@ void PluginView::platformDestroy()
void PluginView::halt()
{
+ ASSERT(!m_isHalted);
+ ASSERT(m_isStarted);
+
#if !PLATFORM(QT)
// Show a screenshot of the plug-in.
OwnPtr<HBITMAP> nodeImage(m_parentFrame->nodeImage(m_element));
toRenderWidget(m_element->renderer())->showSubstituteImage(BitmapImage::create(nodeImage.get()));
#endif
+ m_isHalted = true;
+
stop();
platformDestroy();
}
@@ -1032,10 +1037,12 @@ void PluginView::halt()
void PluginView::restart()
{
ASSERT(!m_isStarted);
+ ASSERT(m_isHalted);
// Clear any substitute image.
toRenderWidget(m_element->renderer())->showSubstituteImage(0);
+ m_isHalted = false;
m_haveUpdatedPluginWidget = false;
start();
}
diff --git a/WebKit/win/ChangeLog b/WebKit/win/ChangeLog
index ec4e422..8e81027 100644
--- a/WebKit/win/ChangeLog
+++ b/WebKit/win/ChangeLog
@@ -1,3 +1,27 @@
+2009-10-14 Jon Honeycutt <jhoneycutt at apple.com>
+
+ Add SPI to determine whether a node is a halted plug-in.
+
+ Part of <rdar://problem/7273354> Halted plug-ins should restart on
+ mouseover
+
+ https://bugs.webkit.org/show_bug.cgi?id=30151
+
+ Reviewed by Darin Adler.
+
+ * Interfaces/IWebViewPrivate.idl:
+ Add isNodehaltedPlugin().
+
+ * WebView.cpp:
+ (WebView::isNodeHaltedPlugin):
+ From the IDOMNode, query for the DOMNode. From the DOMNode, get the
+ WebCore::Node. Get the node's renderer, and check whether it is a
+ RenderWidget. If so, get its Widget, and check whether it's a
+ PluginView. If so, return the result of PluginView::isHalted().
+
+ * WebView.h:
+ Declare isNodeHaltedPlugin().
+
2009-10-15 Daniel Bates <dbates at webkit.org>
Reviewed by Adam Roben.
diff --git a/WebKit/win/Interfaces/IWebViewPrivate.idl b/WebKit/win/Interfaces/IWebViewPrivate.idl
index 52d97dc..19236c9 100644
--- a/WebKit/win/Interfaces/IWebViewPrivate.idl
+++ b/WebKit/win/Interfaces/IWebViewPrivate.idl
@@ -216,4 +216,6 @@ interface IWebViewPrivate : IUnknown
HRESULT setHistoryDelegate([in] IWebHistoryDelegate* historyDelegate);
HRESULT historyDelegate([out,retval] IWebHistoryDelegate** historyDelegate);
HRESULT addVisitedLinks([in] BSTR* visitedURLs, [in] unsigned visitedURLCount);
+
+ HRESULT isNodeHaltedPlugin([in] IDOMNode*, [retval, out] BOOL*);
}
diff --git a/WebKit/win/WebView.cpp b/WebKit/win/WebView.cpp
index d6915ba..4d5fc58 100644
--- a/WebKit/win/WebView.cpp
+++ b/WebKit/win/WebView.cpp
@@ -100,6 +100,7 @@
#include <WebCore/ProgressTracker.h>
#include <WebCore/RenderTheme.h>
#include <WebCore/RenderView.h>
+#include <WebCore/RenderWidget.h>
#include <WebCore/ResourceHandle.h>
#include <WebCore/ResourceHandleClient.h>
#include <WebCore/ScriptValue.h>
@@ -5681,6 +5682,33 @@ HRESULT STDMETHODCALLTYPE WebView::pluginHalterDelegate(IWebPluginHalterDelegate
return m_pluginHalterDelegate.copyRefTo(d);
}
+HRESULT STDMETHODCALLTYPE WebView::isNodeHaltedPlugin(IDOMNode* domNode, BOOL* result)
+{
+ if (!domNode || !result)
+ return E_POINTER;
+
+ COMPtr<DOMNode> webKitDOMNode(Query, domNode);
+ if (!webKitDOMNode)
+ return E_FAIL;
+
+ Node* node = webKitDOMNode->node();
+ if (!node)
+ return E_FAIL;
+
+ *result = FALSE;
+
+ RenderObject* renderer = node->renderer();
+ if (!renderer || !renderer->isWidget())
+ return S_OK;
+
+ Widget* widget = toRenderWidget(renderer)->widget();
+ if (!widget || !widget->isPluginView())
+ return S_OK;
+
+ *result = static_cast<PluginView*>(widget)->isHalted();
+ return S_OK;
+}
+
class EnumTextMatches : public IEnumTextMatches
{
long m_ref;
diff --git a/WebKit/win/WebView.h b/WebKit/win/WebView.h
index b70ddc2..bcac157 100644
--- a/WebKit/win/WebView.h
+++ b/WebKit/win/WebView.h
@@ -766,6 +766,8 @@ public:
virtual HRESULT STDMETHODCALLTYPE historyDelegate(IWebHistoryDelegate** historyDelegate);
virtual HRESULT STDMETHODCALLTYPE addVisitedLinks(BSTR* visitedURLs, unsigned visitedURLCount);
+ virtual HRESULT STDMETHODCALLTYPE isNodeHaltedPlugin(IDOMNode*, BOOL*);
+
// WebView
bool shouldUseEmbeddedView(const WebCore::String& mimeType) const;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list