Changeset 70162 in webkit
- Timestamp:
- Oct 20, 2010 12:37:57 PM (14 years ago)
- Location:
- trunk/WebKit2
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit2/ChangeLog
r70148 r70162 1 2010-10-20 Anders Carlsson <andersca@apple.com> 2 3 Reviewed by Darin Adler. 4 5 Out of process plug-ins are never asked to initially paint 6 https://bugs.webkit.org/show_bug.cgi?id=47993 7 <rdar://problem/8570342> 8 9 * Platform/CoreIPC/HandleMessage.h: 10 (CoreIPC::callMemberFunction): 11 Add new callMemberFunction overload. 12 13 * PluginProcess/PluginControllerProxy.cpp: 14 (WebKit::PluginControllerProxy::paintEntirePlugin): 15 Set the dirty rect to be the entire plug-in rect and then paint the plug-in. 16 17 * PluginProcess/PluginControllerProxy.messages.in: 18 Add PaintEntirePlugin message. 19 20 * WebProcess/Plugins/PluginProxy.cpp: 21 (WebKit::PluginProxy::PluginProxy): 22 Initialize m_pluginBackingStoreContainsValidData to false. 23 24 (WebKit::PluginProxy::paint): 25 If m_pluginBackingStoreContainsValidData is false, synchronously ask the plug-in to paint, 26 then blit the plug-in backing store into our own backing store. 27 28 (WebKit::PluginProxy::geometryDidChange): 29 Set m_pluginBackingStoreContainsValidData to false. 30 31 (WebKit::PluginProxy::update): 32 Set m_pluginBackingStoreContainsValidData to true if the plug-in has painted its entire area. 33 1 34 2010-10-19 Jessie Berlin <jberlin@apple.com> 2 35 -
trunk/WebKit2/Platform/CoreIPC/HandleMessage.h
r69329 r70162 55 55 56 56 // Dispatch functions with reply arguments. 57 58 template<typename C, typename MF> 59 void callMemberFunction(const Arguments0&, Arguments0&, C* object, MF function) 60 { 61 (object->*function)(); 62 } 57 63 58 64 template<typename C, typename MF, typename R1> -
trunk/WebKit2/PluginProcess/PluginControllerProxy.cpp
r70098 r70162 87 87 { 88 88 ASSERT(!m_dirtyRect.isEmpty()); 89 m_paintTimer.stop(); 89 90 90 91 if (!m_backingStore) … … 292 293 } 293 294 295 void PluginControllerProxy::paintEntirePlugin() 296 { 297 m_dirtyRect = m_frameRect; 298 paint(); 299 } 300 294 301 void PluginControllerProxy::setFocus(bool hasFocus) 295 302 { -
trunk/WebKit2/PluginProcess/PluginControllerProxy.h
r70098 r70162 95 95 void handleMouseLeaveEvent(const WebMouseEvent&, bool& handled); 96 96 void handleKeyboardEvent(const WebKeyboardEvent&, bool& handled); 97 void paintEntirePlugin(); 97 98 void setFocus(bool); 98 99 void didUpdate(); -
trunk/WebKit2/PluginProcess/PluginControllerProxy.messages.in
r70098 r70162 63 63 DidUpdate() 64 64 65 # Paint the entire plug-in. 66 PaintEntirePlugin() -> () 67 65 68 #if PLATFORM(MAC) 66 69 # Sent when the containing NSWindow's focus changes -
trunk/WebKit2/WebProcess/Plugins/PluginProxy.cpp
r70098 r70162 58 58 , m_pluginInstanceID(generatePluginInstanceID()) 59 59 , m_pluginController(0) 60 , m_pluginBackingStoreContainsValidData(false) 60 61 , m_isStarted(false) 61 62 , m_waitingForPaintInResponseToUpdate(false) … … 113 114 if (!m_backingStore) 114 115 return; 116 117 if (!m_pluginBackingStoreContainsValidData) { 118 m_connection->connection()->sendSync(Messages::PluginControllerProxy::PaintEntirePlugin(), Messages::PluginControllerProxy::PaintEntirePlugin::Reply(), m_pluginInstanceID, CoreIPC::Connection::NoTimeout); 119 120 // Blit the plug-in backing store into our own backing store. 121 OwnPtr<WebCore::GraphicsContext> graphicsContext = m_backingStore->createGraphicsContext(); 122 123 m_pluginBackingStore->paint(graphicsContext.get(), IntRect(0, 0, m_frameRect.width(), m_frameRect.height())); 124 125 m_pluginBackingStoreContainsValidData = true; 126 } 115 127 116 128 IntRect dirtyRectInPluginCoordinates = dirtyRect; … … 170 182 return; 171 183 } 184 185 m_pluginBackingStoreContainsValidData = false; 172 186 } 173 187 … … 346 360 void PluginProxy::update(const IntRect& paintedRect) 347 361 { 362 if (paintedRect == m_frameRect) 363 m_pluginBackingStoreContainsValidData = true; 364 348 365 IntRect paintedRectPluginCoordinates = paintedRect; 349 366 paintedRectPluginCoordinates.move(-m_frameRect.x(), -m_frameRect.y()); -
trunk/WebKit2/WebProcess/Plugins/PluginProxy.h
r70098 r70162 113 113 // that it's painted something in it, we'll blit from it to our own backing store. 114 114 RefPtr<BackingStore> m_pluginBackingStore; 115 116 // Whether all of the plug-in backing store contains valid data. 117 bool m_pluginBackingStoreContainsValidData; 115 118 116 119 bool m_isStarted;
Note: See TracChangeset
for help on using the changeset viewer.