Changeset 68612 in webkit
- Timestamp:
- Sep 28, 2010 5:13:54 PM (14 years ago)
- Location:
- trunk/WebKit2
- Files:
-
- 1 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit2/ChangeLog
r68610 r68612 1 2010-09-28 Anders Carlsson <andersca@apple.com> 2 3 Reviewed by Sam Weinig. 4 5 Paint the plug-in backing store into the WebProcess backing store 6 https://bugs.webkit.org/show_bug.cgi?id=46768 7 8 * DerivedSources.make: 9 Add PluginProxy. 10 11 * Platform/CoreIPC/MessageID.h: 12 Add PluginProxy message class. 13 14 * PluginProcess/PluginControllerProxy.cpp: 15 (WebKit::PluginControllerProxy::paint): 16 Let the web process know that we've painted. 17 18 * WebKit2.xcodeproj/project.pbxproj: 19 Add new files. 20 21 * WebProcess/Plugins/PluginProcessConnection.cpp: 22 (WebKit::PluginProcessConnection::didReceiveMessage): 23 Pass the message on to a plug-in proxy. 24 25 * WebProcess/Plugins/PluginProxy.cpp: 26 (WebKit::PluginProxy::paint): 27 Paint our backing store into the graphics context. 28 29 (WebKit::PluginProxy::controller): 30 Add notImplemented(). 31 32 (WebKit::PluginProxy::update): 33 Blit the plug-in backing store into the local backing store and tell the plug-in 34 controller that we want to repaint. 35 36 * WebProcess/Plugins/PluginProxy.messages.in: Added. 37 1 38 2010-09-28 Jenn Braithwaite <jennb@chromium.org> 2 39 -
trunk/WebKit2/DerivedSources.make
r68610 r68612 1 1 VPATH = \ 2 2 $(WebKit2)/PluginProcess \ 3 $(WebKit2)/WebProcess/Plugins \ 3 4 $(WebKit2)/WebProcess/WebPage \ 4 5 $(WebKit2)/UIProcess/Plugins \ … … 9 10 PluginProcess \ 10 11 PluginProcessProxy \ 12 PluginProxy \ 11 13 WebPage \ 12 14 WebProcessConnection \ -
trunk/WebKit2/Platform/CoreIPC/MessageID.h
r68610 r68612 56 56 MessageClassWebProcessConnection, 57 57 MessageClassPluginControllerProxy, 58 59 // Messages sent by the plug-in process to the web process. 60 MessageClassPluginProxy, 58 61 }; 59 62 -
trunk/WebKit2/PluginProcess/PluginControllerProxy.cpp
r68610 r68612 32 32 #include "NotImplemented.h" 33 33 #include "PluginProcess.h" 34 #include "PluginProxyMessages.h" 35 #include "WebCoreArgumentCoders.h" 36 #include "WebProcessConnection.h" 34 37 #include <WebCore/GraphicsContext.h> 35 38 #include <wtf/text/WTFString.h> … … 94 97 m_plugin->paint(graphicsContext.get(), dirtyRect); 95 98 96 // FIXME: Let the web process know that we've painted.99 m_connection->connection()->send(Messages::PluginProxy::Update(dirtyRect), m_pluginInstanceID); 97 100 } 98 101 -
trunk/WebKit2/WebKit2.xcodeproj/project.pbxproj
r68610 r68612 114 114 1A8EF96E1252AF6B00F7067F /* PluginControllerProxyMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8EF96C1252AF6B00F7067F /* PluginControllerProxyMessageReceiver.cpp */; }; 115 115 1A8EF96F1252AF6B00F7067F /* PluginControllerProxyMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8EF96D1252AF6B00F7067F /* PluginControllerProxyMessages.h */; }; 116 1A8EFA5C1252B7CE00F7067F /* PluginProxy.messages.in in Resources */ = {isa = PBXBuildFile; fileRef = 1A8EFA5B1252B7CE00F7067F /* PluginProxy.messages.in */; }; 117 1A8EFA701252B84100F7067F /* PluginProxyMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A8EFA6E1252B84100F7067F /* PluginProxyMessageReceiver.cpp */; }; 118 1A8EFA711252B84100F7067F /* PluginProxyMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8EFA6F1252B84100F7067F /* PluginProxyMessages.h */; }; 116 119 1AA1CC5D100FA1A10078DEBC /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AA1CC5C100FA1A10078DEBC /* QuartzCore.framework */; }; 117 120 1AA1CD07100FA1BA0078DEBC /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AA1CD06100FA1BA0078DEBC /* Carbon.framework */; }; … … 548 551 1A8EF96C1252AF6B00F7067F /* PluginControllerProxyMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PluginControllerProxyMessageReceiver.cpp; path = ../../../Debug/DerivedSources/WebKit2/PluginControllerProxyMessageReceiver.cpp; sourceTree = "<group>"; }; 549 552 1A8EF96D1252AF6B00F7067F /* PluginControllerProxyMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PluginControllerProxyMessages.h; path = ../../../Debug/DerivedSources/WebKit2/PluginControllerProxyMessages.h; sourceTree = "<group>"; }; 553 1A8EFA5B1252B7CE00F7067F /* PluginProxy.messages.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PluginProxy.messages.in; sourceTree = "<group>"; }; 554 1A8EFA6E1252B84100F7067F /* PluginProxyMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PluginProxyMessageReceiver.cpp; sourceTree = "<group>"; }; 555 1A8EFA6F1252B84100F7067F /* PluginProxyMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PluginProxyMessages.h; sourceTree = "<group>"; }; 550 556 1AA1C79A100E7FC50078DEBC /* WebCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = WebCore.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 551 557 1AA1C7DE100E846E0078DEBC /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = JavaScriptCore.framework; sourceTree = BUILT_PRODUCTS_DIR; }; … … 1035 1041 1A043DC0124FF87500FFBFB5 /* PluginProxy.cpp */, 1036 1042 1A043DBF124FF87500FFBFB5 /* PluginProxy.h */, 1043 1A8EFA5B1252B7CE00F7067F /* PluginProxy.messages.in */, 1037 1044 1A6FB7AC11E64B6800DB1371 /* PluginView.cpp */, 1038 1045 1A6FB7AD11E64B6800DB1371 /* PluginView.h */, … … 1668 1675 1A043B5B124D5E9D00FFBFB5 /* PluginProcessProxyMessageReceiver.cpp */, 1669 1676 1A043B5C124D5E9D00FFBFB5 /* PluginProcessProxyMessages.h */, 1677 1A8EFA6E1252B84100F7067F /* PluginProxyMessageReceiver.cpp */, 1678 1A8EFA6F1252B84100F7067F /* PluginProxyMessages.h */, 1670 1679 C0CE729E1247E71D00BC0EC4 /* WebPageMessageReceiver.cpp */, 1671 1680 C0CE729F1247E71D00BC0EC4 /* WebPageMessages.h */, … … 1898 1907 C09AE5E9125257C20025825D /* WKNativeEvent.h in Headers */, 1899 1908 1A8EF96F1252AF6B00F7067F /* PluginControllerProxyMessages.h in Headers */, 1909 1A8EFA711252B84100F7067F /* PluginProxyMessages.h in Headers */, 1900 1910 ); 1901 1911 runOnlyForDeploymentPostprocessing = 0; … … 1985 1995 1A043F5A12514CF300FFBFB5 /* WebProcessConnection.messages.in in Resources */, 1986 1996 1A8EF9421252AE8400F7067F /* PluginControllerProxy.messages.in in Resources */, 1997 1A8EFA5C1252B7CE00F7067F /* PluginProxy.messages.in in Resources */, 1987 1998 ); 1988 1999 runOnlyForDeploymentPostprocessing = 0; … … 2190 2201 C02BFF1E1251502E009CCBEA /* NativeWebKeyboardEventMac.mm in Sources */, 2191 2202 1A8EF96E1252AF6B00F7067F /* PluginControllerProxyMessageReceiver.cpp in Sources */, 2203 1A8EFA701252B84100F7067F /* PluginProxyMessageReceiver.cpp in Sources */, 2192 2204 ); 2193 2205 runOnlyForDeploymentPostprocessing = 0; -
trunk/WebKit2/WebProcess/Plugins/PluginProcessConnection.cpp
r68545 r68612 71 71 void PluginProcessConnection::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments) 72 72 { 73 // FIXME: Implement. 73 PluginProxy* pluginProxy = m_plugins.get(arguments->destinationID()); 74 pluginProxy->didReceivePluginProxyMessage(connection, messageID, arguments); 74 75 } 75 76 -
trunk/WebKit2/WebProcess/Plugins/PluginProxy.cpp
r68610 r68612 35 35 #include "WebCoreArgumentCoders.h" 36 36 #include "WebProcessConnectionMessages.h" 37 #include <WebCore/GraphicsContext.h> 37 38 38 39 using namespace WebCore; … … 106 107 } 107 108 108 void PluginProxy::paint(GraphicsContext*, const IntRect& dirtyRect) 109 { 110 notImplemented(); 109 void PluginProxy::paint(GraphicsContext* graphicsContext, const IntRect& dirtyRect) 110 { 111 if (!m_backingStore) 112 return; 113 114 IntRect dirtyRectInPluginCoordinates = dirtyRect; 115 dirtyRectInPluginCoordinates.move(-m_frameRect.x(), -m_frameRect.y()); 116 117 graphicsContext->save(); 118 119 graphicsContext->translate(m_frameRect.x(), m_frameRect.y()); 120 m_backingStore->paint(graphicsContext, dirtyRectInPluginCoordinates); 121 122 graphicsContext->restore(); 111 123 } 112 124 … … 265 277 PluginController* PluginProxy::controller() 266 278 { 279 notImplemented(); 267 280 return 0; 268 281 } 269 282 270 void PluginProxy::didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*) 271 { 272 notImplemented(); 283 void PluginProxy::update(const IntRect& paintedRect) 284 { 285 IntRect paintedRectPluginCoordinates = paintedRect; 286 paintedRectPluginCoordinates.move(-m_frameRect.x(), -m_frameRect.y()); 287 288 if (m_backingStore) { 289 // Blit the plug-in backing store into our own backing store. 290 OwnPtr<WebCore::GraphicsContext> graphicsContext = m_backingStore->createGraphicsContext(); 291 292 m_pluginBackingStore->paint(graphicsContext.get(), paintedRectPluginCoordinates); 293 } 294 295 // Ask the controller to invalidate the rect for us. 296 m_pluginController->invalidate(paintedRectPluginCoordinates); 273 297 } 274 298 -
trunk/WebKit2/WebProcess/Plugins/PluginProxy.h
r68610 r68612 37 37 class PluginProcessConnection; 38 38 39 class PluginProxy : public Plugin , public CoreIPC::Connection::MessageReceiver{39 class PluginProxy : public Plugin { 40 40 public: 41 41 static PassRefPtr<PluginProxy> create(PassRefPtr<PluginProcessConnection>); … … 44 44 uint64_t pluginInstanceID() const { return m_pluginInstanceID; } 45 45 void pluginProcessCrashed(); 46 47 void didReceivePluginProxyMessage(CoreIPC::Connection*, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments); 46 48 47 49 private: … … 82 84 virtual PluginController* controller(); 83 85 84 // CoreIPC::Connection::MessageReceiver85 v irtual void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);86 // Message handlers. 87 void update(const WebCore::IntRect& paintedRect); 86 88 87 89 RefPtr<PluginProcessConnection> m_connection;
Note: See TracChangeset
for help on using the changeset viewer.