[Qt] Wait for the UI process before re-enabling rendering during page load
authorjocelyn.turcotte@digia.com <jocelyn.turcotte@digia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 1 Oct 2012 11:17:39 +0000 (11:17 +0000)
committerjocelyn.turcotte@digia.com <jocelyn.turcotte@digia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 1 Oct 2012 11:17:39 +0000 (11:17 +0000)
commit1c773b7bfdde80626444d28dbc58cb0b6c302714
tree8876dfa60d640b9dfa1d8eb4167b7a64adeb6dac
parent6436e3332969dfeb7014b53e20c6cb2b646953c5
[Qt] Wait for the UI process before re-enabling rendering during page load
https://bugs.webkit.org/show_bug.cgi?id=97773

Reviewed by Kenneth Rohde Christiansen.

During page navigation, WebCore might ask asynchronously the UI process to
scroll to an anchor or restored history position and the UI process will
return the corresponding visible rect to be rendered by the web process.

To avoid rendering tiles for the invalidated area by the new page layout at
the wrong position, we should do an extra message round-trip to the UI
process before resuming the rendering.
Assuming that all messages are handled in order by both the web and UI process,
sending the round-trip request in the web process once we sent all scroll
requests, contents size and viewport attributes updates and then handling
the round-trip response, we make sure that final visible rect request have
been handled already.

* UIProcess/API/qt/raw/qrawwebview.cpp:
(QRawWebViewPrivate::pageTransitionViewportReady):
* UIProcess/API/qt/raw/qrawwebview_p_p.h:
(QRawWebViewPrivate):
* UIProcess/PageClient.h:
(PageClient):
* UIProcess/PageViewportController.cpp:
(WebKit::PageViewportController::pageTransitionViewportReady):
(WebKit):
* UIProcess/PageViewportController.h:
(PageViewportController):
* UIProcess/WebPageProxy.h:
(WebPageProxy):
* UIProcess/WebPageProxy.messages.in:
* UIProcess/qt/QtPageClient.cpp:
(WebKit::QtPageClient::pageTransitionViewportReady):
(WebKit):
* UIProcess/qt/QtPageClient.h:
(QtPageClient):
* UIProcess/qt/WebPageProxyQt.cpp:
(WebKit::WebPageProxy::commitPageTransitionViewport):
(WebKit):
(WebKit::WebPageProxy::pageTransitionViewportReady):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::WebFrameLoaderClient):
(WebKit::WebFrameLoaderClient::dispatchDidLayout):
(WebKit::WebFrameLoaderClient::frameLoadCompleted):
(WebKit::WebFrameLoaderClient::provisionalLoadStarted):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
(WebFrameLoaderClient):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didStartPageTransition):
(WebKit):
(WebKit::WebPage::didCompletePageTransition):
* WebProcess/WebPage/WebPage.h:
(WebPage):
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/qt/WebPageQt.cpp:
(WebKit::WebPage::commitPageTransitionViewport):
(WebKit):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@130029 268f45cc-cd09-0410-ab3c-d52691b4dbfc
17 files changed:
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/qt/raw/qrawwebview.cpp
Source/WebKit2/UIProcess/API/qt/raw/qrawwebview_p_p.h
Source/WebKit2/UIProcess/PageClient.h
Source/WebKit2/UIProcess/PageViewportController.cpp
Source/WebKit2/UIProcess/PageViewportController.h
Source/WebKit2/UIProcess/WebPageProxy.h
Source/WebKit2/UIProcess/WebPageProxy.messages.in
Source/WebKit2/UIProcess/qt/QtPageClient.cpp
Source/WebKit2/UIProcess/qt/QtPageClient.h
Source/WebKit2/UIProcess/qt/WebPageProxyQt.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h
Source/WebKit2/WebProcess/WebPage/WebPage.cpp
Source/WebKit2/WebProcess/WebPage/WebPage.h
Source/WebKit2/WebProcess/WebPage/WebPage.messages.in
Source/WebKit2/WebProcess/WebPage/qt/WebPageQt.cpp