Commit d8b64db1 authored by kenneth@webkit.org's avatar kenneth@webkit.org

2010-11-08 Kenneth Rohde Christiansen <kenneth@webkit.org>

        Reviewed by Andreas Kling.

        Send page scroll requests to the PageClient when scroll delegation is turned on
        https://bugs.webkit.org/show_bug.cgi?id=49171

        Implement the IPC and API required for making scroll delegation work
        with WebKit2. This is only used when you have tiling enabled.

        * UIProcess/API/qt/qwkpage.cpp:
        (QWKPagePrivate::pageDidRequestScroll):
        * UIProcess/API/qt/qwkpage.h:
        * UIProcess/API/qt/qwkpage_p.h:
        * UIProcess/PageClient.h:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::pageDidRequestScroll):
        * UIProcess/WebPageProxy.h:
        * UIProcess/WebPageProxy.messages.in:
        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
        (WebKit::WebChromeClient::delegatedScrollRequested):
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::pageDidRequestScroll):
        * WebProcess/WebPage/WebPage.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71600 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent a37b8c30
2010-11-08 Kenneth Rohde Christiansen <kenneth@webkit.org>
Reviewed by Andreas Kling.
Send page scroll requests to the PageClient when scroll delegation is turned on
https://bugs.webkit.org/show_bug.cgi?id=49171
Implement the IPC and API required for making scroll delegation work
with WebKit2. This is only used when you have tiling enabled.
* UIProcess/API/qt/qwkpage.cpp:
(QWKPagePrivate::pageDidRequestScroll):
* UIProcess/API/qt/qwkpage.h:
* UIProcess/API/qt/qwkpage_p.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::pageDidRequestScroll):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::delegatedScrollRequested):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::pageDidRequestScroll):
* WebProcess/WebPage/WebPage.h:
2010-11-08 Ivan Krstić <ike@apple.com>
Reviewed by Mark Rowe.
......
......@@ -98,6 +98,11 @@ void QWKPagePrivate::setViewportArguments(const ViewportArguments& args)
emit q->viewportChangeRequested();
}
void QWKPagePrivate::pageDidRequestScroll(const IntSize& delta)
{
emit q->scrollRequested(delta.width(), delta.height());
}
void QWKPagePrivate::didChangeContentsSize(const IntSize& newSize)
{
emit q->contentsSizeChanged(QSize(newSize));
......
......@@ -107,6 +107,7 @@ public:
Q_SIGNAL void initialLayoutCompleted();
Q_SIGNAL void urlChanged(const QUrl&);
Q_SIGNAL void contentsSizeChanged(const QSize&);
Q_SIGNAL void scrollRequested(int dx, int dy);
Q_SIGNAL void cursorChanged(const QCursor&);
Q_SIGNAL void viewportChangeRequested();
......
......@@ -48,6 +48,7 @@ public:
void pageDidEnterAcceleratedCompositing() { }
void pageDidLeaveAcceleratedCompositing() { }
#endif // USE(ACCELERATED_COMPOSITING)
virtual void pageDidRequestScroll(const WebCore::IntSize&);
virtual void processDidCrash() { }
virtual void didRelaunchProcess() { }
virtual void didChangeContentsSize(const WebCore::IntSize&);
......
......@@ -54,6 +54,9 @@ public:
virtual void takeFocus(bool direction) = 0;
virtual void toolTipChanged(const String&, const String&) = 0;
#if ENABLE(TILED_BACKING_STORE)
virtual void pageDidRequestScroll(const WebCore::IntSize&) = 0;
#endif
#if PLATFORM(QT)
virtual void didChangeContentsSize(const WebCore::IntSize&) = 0;
#endif
......
......@@ -1014,6 +1014,13 @@ void WebPageProxy::runBeforeUnloadConfirmPanel(const String& message, uint64_t f
shouldClose = m_uiClient.runBeforeUnloadConfirmPanel(this, message, process()->webFrame(frameID));
}
#if ENABLE(TILED_BACKING_STORE)
void WebPageProxy::pageDidRequestScroll(const IntSize& delta)
{
m_pageClient->pageDidRequestScroll(delta);
}
#endif
void WebPageProxy::didChangeViewportData(const ViewportArguments& args)
{
m_pageClient->setViewportArguments(args);
......
......@@ -296,6 +296,9 @@ private:
void runBeforeUnloadConfirmPanel(const String& message, uint64_t frameID, bool& shouldClose);
void didChangeViewportData(const WebCore::ViewportArguments&);
void pageDidScroll();
#if ENABLE(TILED_BACKING_STORE)
void pageDidRequestScroll(const WebCore::IntSize&);
#endif
#if PLATFORM(QT)
void didChangeContentsSize(const WebCore::IntSize&);
#endif
......
......@@ -50,6 +50,9 @@ messages -> WebPageProxy {
CanRunBeforeUnloadConfirmPanel() -> (bool canRun)
RunBeforeUnloadConfirmPanel(WTF::String message, uint64_t frameID) -> (bool shouldClose)
PageDidScroll()
#if ENABLE(TILED_BACKING_STORE)
PageDidRequestScroll(WebCore::IntSize delta)
#endif
#if PLATFORM(QT)
DidChangeContentsSize(WebCore::IntSize newSize)
#endif
......
......@@ -343,7 +343,7 @@ void WebChromeClient::scroll(const IntSize& scrollDelta, const IntRect& rectToSc
#if ENABLE(TILED_BACKING_STORE)
void WebChromeClient::delegatedScrollRequested(const IntSize& scrollDelta)
{
notImplemented();
m_page->pageDidRequestScroll(scrollDelta);
}
#endif
......
......@@ -488,6 +488,13 @@ void WebPage::pageDidScroll()
send(Messages::WebPageProxy::PageDidScroll());
}
#if ENABLE(TILED_BACKING_STORE)
void WebPage::pageDidRequestScroll(const IntSize& delta)
{
send(Messages::WebPageProxy::PageDidRequestScroll(delta));
}
#endif
WebContextMenu* WebPage::contextMenu()
{
if (!m_contextMenu)
......
......@@ -188,7 +188,10 @@ public:
FindController& findController() { return m_findController; }
void pageDidScroll();
#if ENABLE(TILED_BACKING_STORE)
void pageDidRequestScroll(const WebCore::IntSize& delta);
#endif
WebContextMenu* contextMenu();
private:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment