[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
andersca at apple.com
andersca at apple.com
Wed Dec 22 13:53:53 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 294efd03137c8ec1439bd07088bb75ce87e7a226
Author: andersca at apple.com <andersca at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Sep 29 00:13:54 2010 +0000
Paint the plug-in backing store into the WebProcess backing store
https://bugs.webkit.org/show_bug.cgi?id=46768
Reviewed by Sam Weinig.
* DerivedSources.make:
Add PluginProxy.
* Platform/CoreIPC/MessageID.h:
Add PluginProxy message class.
* PluginProcess/PluginControllerProxy.cpp:
(WebKit::PluginControllerProxy::paint):
Let the web process know that we've painted.
* WebKit2.xcodeproj/project.pbxproj:
Add new files.
* WebProcess/Plugins/PluginProcessConnection.cpp:
(WebKit::PluginProcessConnection::didReceiveMessage):
Pass the message on to a plug-in proxy.
* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::paint):
Paint our backing store into the graphics context.
(WebKit::PluginProxy::controller):
Add notImplemented().
(WebKit::PluginProxy::update):
Blit the plug-in backing store into the local backing store and tell the plug-in
controller that we want to repaint.
* WebProcess/Plugins/PluginProxy.messages.in: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68612 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index 3b95912..76904a7 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,40 @@
+2010-09-28 Anders Carlsson <andersca at apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Paint the plug-in backing store into the WebProcess backing store
+ https://bugs.webkit.org/show_bug.cgi?id=46768
+
+ * DerivedSources.make:
+ Add PluginProxy.
+
+ * Platform/CoreIPC/MessageID.h:
+ Add PluginProxy message class.
+
+ * PluginProcess/PluginControllerProxy.cpp:
+ (WebKit::PluginControllerProxy::paint):
+ Let the web process know that we've painted.
+
+ * WebKit2.xcodeproj/project.pbxproj:
+ Add new files.
+
+ * WebProcess/Plugins/PluginProcessConnection.cpp:
+ (WebKit::PluginProcessConnection::didReceiveMessage):
+ Pass the message on to a plug-in proxy.
+
+ * WebProcess/Plugins/PluginProxy.cpp:
+ (WebKit::PluginProxy::paint):
+ Paint our backing store into the graphics context.
+
+ (WebKit::PluginProxy::controller):
+ Add notImplemented().
+
+ (WebKit::PluginProxy::update):
+ Blit the plug-in backing store into the local backing store and tell the plug-in
+ controller that we want to repaint.
+
+ * WebProcess/Plugins/PluginProxy.messages.in: Added.
+
2010-09-28 Jenn Braithwaite <jennb at chromium.org>
Reviewed by Dmitry Titov.
diff --git a/WebKit2/DerivedSources.make b/WebKit2/DerivedSources.make
index fb6b2e9..4c1bf98 100644
--- a/WebKit2/DerivedSources.make
+++ b/WebKit2/DerivedSources.make
@@ -1,5 +1,6 @@
VPATH = \
$(WebKit2)/PluginProcess \
+ $(WebKit2)/WebProcess/Plugins \
$(WebKit2)/WebProcess/WebPage \
$(WebKit2)/UIProcess/Plugins \
#
@@ -8,6 +9,7 @@ MESSAGE_RECEIVERS = \
PluginControllerProxy \
PluginProcess \
PluginProcessProxy \
+ PluginProxy \
WebPage \
WebProcessConnection \
#
diff --git a/WebKit2/Platform/CoreIPC/MessageID.h b/WebKit2/Platform/CoreIPC/MessageID.h
index 4a22eca..91b085e 100644
--- a/WebKit2/Platform/CoreIPC/MessageID.h
+++ b/WebKit2/Platform/CoreIPC/MessageID.h
@@ -55,6 +55,9 @@ enum MessageClass {
// Messages sent by the web process to the plug-in process.
MessageClassWebProcessConnection,
MessageClassPluginControllerProxy,
+
+ // Messages sent by the plug-in process to the web process.
+ MessageClassPluginProxy,
};
template<typename> struct MessageKindTraits { };
diff --git a/WebKit2/PluginProcess/PluginControllerProxy.cpp b/WebKit2/PluginProcess/PluginControllerProxy.cpp
index 0c90d22..f1a127c 100644
--- a/WebKit2/PluginProcess/PluginControllerProxy.cpp
+++ b/WebKit2/PluginProcess/PluginControllerProxy.cpp
@@ -31,6 +31,9 @@
#include "NetscapePlugin.h"
#include "NotImplemented.h"
#include "PluginProcess.h"
+#include "PluginProxyMessages.h"
+#include "WebCoreArgumentCoders.h"
+#include "WebProcessConnection.h"
#include <WebCore/GraphicsContext.h>
#include <wtf/text/WTFString.h>
@@ -93,7 +96,7 @@ void PluginControllerProxy::paint()
ASSERT(m_plugin);
m_plugin->paint(graphicsContext.get(), dirtyRect);
- // FIXME: Let the web process know that we've painted.
+ m_connection->connection()->send(Messages::PluginProxy::Update(dirtyRect), m_pluginInstanceID);
}
void PluginControllerProxy::invalidate(const IntRect& rect)
diff --git a/WebKit2/WebKit2.xcodeproj/project.pbxproj b/WebKit2/WebKit2.xcodeproj/project.pbxproj
index b984184..ec5aa08 100644
--- a/WebKit2/WebKit2.xcodeproj/project.pbxproj
+++ b/WebKit2/WebKit2.xcodeproj/project.pbxproj
@@ -113,6 +113,9 @@
1A8EF9421252AE8400F7067F /* PluginControllerProxy.messages.in in Resources */ = {isa = PBXBuildFile; fileRef = 1A8EF9411252AE8400F7067F /* PluginControllerProxy.messages.in */; };
1A8EF96E1252AF6B00F7067F /* PluginControllerProxyMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8EF96C1252AF6B00F7067F /* PluginControllerProxyMessageReceiver.cpp */; };
1A8EF96F1252AF6B00F7067F /* PluginControllerProxyMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8EF96D1252AF6B00F7067F /* PluginControllerProxyMessages.h */; };
+ 1A8EFA5C1252B7CE00F7067F /* PluginProxy.messages.in in Resources */ = {isa = PBXBuildFile; fileRef = 1A8EFA5B1252B7CE00F7067F /* PluginProxy.messages.in */; };
+ 1A8EFA701252B84100F7067F /* PluginProxyMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8EFA6E1252B84100F7067F /* PluginProxyMessageReceiver.cpp */; };
+ 1A8EFA711252B84100F7067F /* PluginProxyMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8EFA6F1252B84100F7067F /* PluginProxyMessages.h */; };
1AA1CC5D100FA1A10078DEBC /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AA1CC5C100FA1A10078DEBC /* QuartzCore.framework */; };
1AA1CD07100FA1BA0078DEBC /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AA1CD06100FA1BA0078DEBC /* Carbon.framework */; };
1AA56F2911E92BC80061B882 /* PluginController.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AA56F2811E92BC80061B882 /* PluginController.h */; };
@@ -547,6 +550,9 @@
1A8EF9411252AE8400F7067F /* PluginControllerProxy.messages.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PluginControllerProxy.messages.in; sourceTree = "<group>"; };
1A8EF96C1252AF6B00F7067F /* PluginControllerProxyMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PluginControllerProxyMessageReceiver.cpp; path = ../../../Debug/DerivedSources/WebKit2/PluginControllerProxyMessageReceiver.cpp; sourceTree = "<group>"; };
1A8EF96D1252AF6B00F7067F /* PluginControllerProxyMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PluginControllerProxyMessages.h; path = ../../../Debug/DerivedSources/WebKit2/PluginControllerProxyMessages.h; sourceTree = "<group>"; };
+ 1A8EFA5B1252B7CE00F7067F /* PluginProxy.messages.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PluginProxy.messages.in; sourceTree = "<group>"; };
+ 1A8EFA6E1252B84100F7067F /* PluginProxyMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PluginProxyMessageReceiver.cpp; sourceTree = "<group>"; };
+ 1A8EFA6F1252B84100F7067F /* PluginProxyMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PluginProxyMessages.h; sourceTree = "<group>"; };
1AA1C79A100E7FC50078DEBC /* WebCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = WebCore.framework; sourceTree = BUILT_PRODUCTS_DIR; };
1AA1C7DE100E846E0078DEBC /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = JavaScriptCore.framework; sourceTree = BUILT_PRODUCTS_DIR; };
1AA1CC5C100FA1A10078DEBC /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = /System/Library/Frameworks/QuartzCore.framework; sourceTree = "<absolute>"; };
@@ -1034,6 +1040,7 @@
1A0EC90D124C0AF5007EF4A5 /* PluginProcessConnectionManager.h */,
1A043DC0124FF87500FFBFB5 /* PluginProxy.cpp */,
1A043DBF124FF87500FFBFB5 /* PluginProxy.h */,
+ 1A8EFA5B1252B7CE00F7067F /* PluginProxy.messages.in */,
1A6FB7AC11E64B6800DB1371 /* PluginView.cpp */,
1A6FB7AD11E64B6800DB1371 /* PluginView.h */,
);
@@ -1667,6 +1674,8 @@
1A0EC6BE124BBD9B007EF4A5 /* PluginProcessMessages.h */,
1A043B5B124D5E9D00FFBFB5 /* PluginProcessProxyMessageReceiver.cpp */,
1A043B5C124D5E9D00FFBFB5 /* PluginProcessProxyMessages.h */,
+ 1A8EFA6E1252B84100F7067F /* PluginProxyMessageReceiver.cpp */,
+ 1A8EFA6F1252B84100F7067F /* PluginProxyMessages.h */,
C0CE729E1247E71D00BC0EC4 /* WebPageMessageReceiver.cpp */,
C0CE729F1247E71D00BC0EC4 /* WebPageMessages.h */,
1A043F6712514D8B00FFBFB5 /* WebProcessConnectionMessageReceiver.cpp */,
@@ -1897,6 +1906,7 @@
1A8EF4CB1252403700F7067F /* PluginControllerProxy.h in Headers */,
C09AE5E9125257C20025825D /* WKNativeEvent.h in Headers */,
1A8EF96F1252AF6B00F7067F /* PluginControllerProxyMessages.h in Headers */,
+ 1A8EFA711252B84100F7067F /* PluginProxyMessages.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -1984,6 +1994,7 @@
1A043B4D124D5E3600FFBFB5 /* PluginProcessProxy.messages.in in Resources */,
1A043F5A12514CF300FFBFB5 /* WebProcessConnection.messages.in in Resources */,
1A8EF9421252AE8400F7067F /* PluginControllerProxy.messages.in in Resources */,
+ 1A8EFA5C1252B7CE00F7067F /* PluginProxy.messages.in in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -2189,6 +2200,7 @@
1A8EF4CC1252403700F7067F /* PluginControllerProxy.cpp in Sources */,
C02BFF1E1251502E009CCBEA /* NativeWebKeyboardEventMac.mm in Sources */,
1A8EF96E1252AF6B00F7067F /* PluginControllerProxyMessageReceiver.cpp in Sources */,
+ 1A8EFA701252B84100F7067F /* PluginProxyMessageReceiver.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
diff --git a/WebKit2/WebProcess/Plugins/PluginProcessConnection.cpp b/WebKit2/WebProcess/Plugins/PluginProcessConnection.cpp
index 5c9ec1e..11a67c0 100644
--- a/WebKit2/WebProcess/Plugins/PluginProcessConnection.cpp
+++ b/WebKit2/WebProcess/Plugins/PluginProcessConnection.cpp
@@ -70,7 +70,8 @@ void PluginProcessConnection::removePluginProxy(PluginProxy* plugin)
void PluginProcessConnection::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments)
{
- // FIXME: Implement.
+ PluginProxy* pluginProxy = m_plugins.get(arguments->destinationID());
+ pluginProxy->didReceivePluginProxyMessage(connection, messageID, arguments);
}
void PluginProcessConnection::didClose(CoreIPC::Connection*)
diff --git a/WebKit2/WebProcess/Plugins/PluginProxy.cpp b/WebKit2/WebProcess/Plugins/PluginProxy.cpp
index 0cd0716..0e9e8a2 100644
--- a/WebKit2/WebProcess/Plugins/PluginProxy.cpp
+++ b/WebKit2/WebProcess/Plugins/PluginProxy.cpp
@@ -34,6 +34,7 @@
#include "PluginProcessConnection.h"
#include "WebCoreArgumentCoders.h"
#include "WebProcessConnectionMessages.h"
+#include <WebCore/GraphicsContext.h>
using namespace WebCore;
@@ -105,9 +106,20 @@ void PluginProxy::destroy()
m_connection->removePluginProxy(this);
}
-void PluginProxy::paint(GraphicsContext*, const IntRect& dirtyRect)
+void PluginProxy::paint(GraphicsContext* graphicsContext, const IntRect& dirtyRect)
{
- notImplemented();
+ if (!m_backingStore)
+ return;
+
+ IntRect dirtyRectInPluginCoordinates = dirtyRect;
+ dirtyRectInPluginCoordinates.move(-m_frameRect.x(), -m_frameRect.y());
+
+ graphicsContext->save();
+
+ graphicsContext->translate(m_frameRect.x(), m_frameRect.y());
+ m_backingStore->paint(graphicsContext, dirtyRectInPluginCoordinates);
+
+ graphicsContext->restore();
}
#if PLATFORM(MAC)
@@ -264,12 +276,24 @@ void PluginProxy::windowVisibilityChanged(bool)
PluginController* PluginProxy::controller()
{
+ notImplemented();
return 0;
}
-void PluginProxy::didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*)
+void PluginProxy::update(const IntRect& paintedRect)
{
- notImplemented();
+ IntRect paintedRectPluginCoordinates = paintedRect;
+ paintedRectPluginCoordinates.move(-m_frameRect.x(), -m_frameRect.y());
+
+ if (m_backingStore) {
+ // Blit the plug-in backing store into our own backing store.
+ OwnPtr<WebCore::GraphicsContext> graphicsContext = m_backingStore->createGraphicsContext();
+
+ m_pluginBackingStore->paint(graphicsContext.get(), paintedRectPluginCoordinates);
+ }
+
+ // Ask the controller to invalidate the rect for us.
+ m_pluginController->invalidate(paintedRectPluginCoordinates);
}
} // namespace WebKit
diff --git a/WebKit2/WebProcess/Plugins/PluginProxy.h b/WebKit2/WebProcess/Plugins/PluginProxy.h
index c122802..f485322 100644
--- a/WebKit2/WebProcess/Plugins/PluginProxy.h
+++ b/WebKit2/WebProcess/Plugins/PluginProxy.h
@@ -36,7 +36,7 @@ namespace WebKit {
class BackingStore;
class PluginProcessConnection;
-class PluginProxy : public Plugin, public CoreIPC::Connection::MessageReceiver {
+class PluginProxy : public Plugin {
public:
static PassRefPtr<PluginProxy> create(PassRefPtr<PluginProcessConnection>);
~PluginProxy();
@@ -44,6 +44,8 @@ public:
uint64_t pluginInstanceID() const { return m_pluginInstanceID; }
void pluginProcessCrashed();
+ void didReceivePluginProxyMessage(CoreIPC::Connection*, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments);
+
private:
explicit PluginProxy(PassRefPtr<PluginProcessConnection>);
@@ -81,8 +83,8 @@ private:
virtual PluginController* controller();
- // CoreIPC::Connection::MessageReceiver
- virtual void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);
+ // Message handlers.
+ void update(const WebCore::IntRect& paintedRect);
RefPtr<PluginProcessConnection> m_connection;
uint64_t m_pluginInstanceID;
diff --git a/WebKit2/WebProcess/Plugins/PluginProxy.messages.in b/WebKit2/WebProcess/Plugins/PluginProxy.messages.in
new file mode 100644
index 0000000..148c318
--- /dev/null
+++ b/WebKit2/WebProcess/Plugins/PluginProxy.messages.in
@@ -0,0 +1,30 @@
+# Copyright (C) 2010 Apple Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR
+# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#if ENABLE(PLUGIN_PROCESS)
+
+messages -> PluginProxy {
+ # Called when the plug-in has painted into its backing store.
+ Update(WebCore::IntRect paintedRect)
+}
+
+#endif
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list