Changeset 85502 in webkit
- Timestamp:
- May 2, 2011 12:24:26 PM (13 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r85493 r85502 1 2011-05-02 Jeff Miller <jeffm@apple.com> 2 3 Reviewed by Adam Roben. 4 5 WebKit2 thinks the web process is unresponsive when a plugin displays a context menu 6 https://bugs.webkit.org/show_bug.cgi?id=59124 7 <rdar://problem/9318600> 8 9 This is the Windows version of <https://bugs.webkit.org/show_bug.cgi?id=58943>. 10 11 Since we have no control over how long a plugin will take to handle an event, we need 12 to tell the UI process to stop its responsive timer when we're about to send an event 13 to the plugin. The downside of doing this is that if the plugin does become unresponsive, 14 the user won't know this immediately until they click on the web page again. At that point, 15 if the web process is unresponsive because of a hung plugin, the responsiveness timer will fire. 16 17 We're only doing this on Windows currently when running plugins in the web process (Anders fixed 18 bug 58943 in a different way when running plugins in a separate plugin process on the Mac). 19 20 * PluginProcess/PluginControllerProxy.cpp: 21 (WebKit::PluginControllerProxy::willSendEventToPlugin): Added, not used when running plugins in a separate process. 22 * PluginProcess/PluginControllerProxy.h: Added willSendEventToPlugin(). 23 24 * UIProcess/WebPageProxy.cpp: 25 (WebKit::WebPageProxy::stopResponsivenessTimer): Added. 26 * UIProcess/WebPageProxy.h: Added stopResponsivenessTimer(). 27 * UIProcess/WebPageProxy.messages.in: Added StopResponsivenessTimer message. 28 29 * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp: 30 (WebKit::NetscapePlugin::platformPaint): Tell our controller when we're about to send an event to the plugin. 31 (WebKit::NetscapePlugin::platformHandleMouseEvent): Ditto. 32 (WebKit::NetscapePlugin::platformHandleMouseEnterEvent): Ditto. 33 (WebKit::NetscapePlugin::platformHandleMouseLeaveEvent): Ditto. 34 35 * WebProcess/Plugins/PluginController.h: Added willSendEventToPlugin(). 36 * WebProcess/Plugins/PluginView.cpp: 37 (WebKit::PluginView::willSendEventToPlugin): Added, tell the UI process to stop its responsiveness timer. 38 * WebProcess/Plugins/PluginView.h: Added willSendEventToPlugin(). 39 1 40 2011-04-29 Steve Falkenburg <sfalken@apple.com> 2 41 -
trunk/Source/WebKit2/PluginProcess/PluginControllerProxy.cpp
r84318 r85502 294 294 } 295 295 296 void PluginControllerProxy::willSendEventToPlugin() 297 { 298 // This is only used when running plugins in the web process. 299 ASSERT_NOT_REACHED(); 300 } 301 296 302 #if PLATFORM(MAC) 297 303 void PluginControllerProxy::setComplexTextInputEnabled(bool complexTextInputEnabled) -
trunk/Source/WebKit2/PluginProcess/PluginControllerProxy.h
r84318 r85502 91 91 virtual bool isAcceleratedCompositingEnabled(); 92 92 virtual void pluginProcessCrashed(); 93 virtual void willSendEventToPlugin(); 93 94 94 95 #if PLATFORM(MAC) -
trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp
r85439 r85502 2652 2652 } 2653 2653 2654 void WebPageProxy::stopResponsivenessTimer() 2655 { 2656 process()->responsivenessTimer()->stop(); 2657 } 2658 2654 2659 void WebPageProxy::voidCallback(uint64_t callbackID) 2655 2660 { -
trunk/Source/WebKit2/UIProcess/WebPageProxy.h
r85356 r85502 691 691 692 692 void didReceiveEvent(uint32_t opaqueType, bool handled); 693 void stopResponsivenessTimer(); 693 694 694 695 void voidCallback(uint64_t); -
trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in
r85120 r85502 34 34 DidChangeViewportData(WebCore::ViewportArguments arguments) 35 35 DidReceiveEvent(uint32_t type, bool handled) 36 StopResponsivenessTimer() 36 37 SetCursor(WebCore::Cursor cursor) 37 38 SetStatusText(WTF::String statusText) -
trunk/Source/WebKit2/WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp
r84638 r85502 178 178 } 179 179 180 m_pluginController->willSendEventToPlugin(); 181 180 182 // FIXME: Support transparent plugins. 181 183 LocalWindowsContext windowsContext(context, dirtyRect, false); … … 285 287 return false; 286 288 289 m_pluginController->willSendEventToPlugin(); 290 287 291 NPEvent npEvent = toNP(event); 288 292 NPP_HandleEvent(&npEvent); … … 312 316 return false; 313 317 318 m_pluginController->willSendEventToPlugin(); 319 314 320 NPEvent npEvent = toNP(event); 315 321 NPP_HandleEvent(&npEvent); … … 323 329 if (m_isWindowed) 324 330 return false; 331 332 m_pluginController->willSendEventToPlugin(); 325 333 326 334 NPEvent npEvent = toNP(event); -
trunk/Source/WebKit2/WebProcess/Plugins/PluginController.h
r78915 r85502 84 84 virtual void pluginProcessCrashed() = 0; 85 85 86 // Tells the controller that we're about to dispatch an event to the plug-in. 87 virtual void willSendEventToPlugin() = 0; 88 86 89 #if PLATFORM(WIN) 87 90 // The window to use as the parent of the plugin's window. -
trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp
r85442 r85502 991 991 } 992 992 993 void PluginView::willSendEventToPlugin() 994 { 995 // If we're sending an event to a plug-in, we can't control how long the plug-in 996 // takes to process it (e.g. it may display a context menu), so we tell the UI process 997 // to stop the responsiveness timer in this case. 998 m_webPage->send(Messages::WebPageProxy::StopResponsivenessTimer()); 999 } 1000 993 1001 #if PLATFORM(WIN) 994 1002 HWND PluginView::nativeParentWindow() -
trunk/Source/WebKit2/WebProcess/Plugins/PluginView.h
r79058 r85502 130 130 virtual bool isAcceleratedCompositingEnabled(); 131 131 virtual void pluginProcessCrashed(); 132 virtual void willSendEventToPlugin(); 132 133 #if PLATFORM(WIN) 133 134 virtual HWND nativeParentWindow();
Note: See TracChangeset
for help on using the changeset viewer.