A hung webpage pretends to be responsive if you scroll
authorggaren@apple.com <ggaren@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Nov 2015 23:10:02 +0000 (23:10 +0000)
committerggaren@apple.com <ggaren@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Nov 2015 23:10:02 +0000 (23:10 +0000)
commitb8c6aca7723352479babe6ac81abaaf2248a311c
tree04a40b6fd8d12cfddcb1d5c6562ebde0b61231e4
parentcc5c6f28aeaaa56992f279d071b98ed7ee4df960
A hung webpage pretends to be responsive if you scroll
https://bugs.webkit.org/show_bug.cgi?id=151518

Reviewed by Sam Weinig.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::sendWheelEvent):
(WebKit::WebPageProxy::didReceiveEvent): Don't treat wheel events as
starting or stopping the responsiveness timer. Wheel events usually
process on the event dispatch thread, which responds even if the main
thread is hung.

Instead, send an out-of-band ping to the main thread to verify that
it is still responsive and we'll be able to paint and respond to clicks
after scrolling.

* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::sendMainThreadPing):
(WebKit::WebProcessProxy::didReceiveMainThreadPing):
* UIProcess/WebProcessProxy.h:
* UIProcess/WebProcessProxy.messages.in: UI process support for pinging
the main thread in the web process.

* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::mainThreadPing):
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in: Web process support for responding
to pings.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@192702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/WebPageProxy.cpp
Source/WebKit2/UIProcess/WebProcessProxy.cpp
Source/WebKit2/UIProcess/WebProcessProxy.h
Source/WebKit2/UIProcess/WebProcessProxy.messages.in
Source/WebKit2/WebProcess/WebProcess.cpp
Source/WebKit2/WebProcess/WebProcess.h
Source/WebKit2/WebProcess/WebProcess.messages.in