Commit c5050644 authored by andersca@apple.com's avatar andersca@apple.com
Browse files

2011-01-18 Anders Carlsson <andersca@apple.com>

        Reviewed by Sam Weinig.

        Add PageClient::scrollView
        https://bugs.webkit.org/show_bug.cgi?id=52663

        * UIProcess/API/mac/PageClientImpl.h:
        * UIProcess/API/mac/PageClientImpl.mm:
        (WebKit::PageClientImpl::scrollView):
        * UIProcess/API/qt/qwkpage.cpp:
        (QWKPagePrivate::scrollView):
        * UIProcess/API/qt/qwkpage_p.h:
        * UIProcess/PageClient.h:
        * UIProcess/win/WebView.cpp:
        (WebKit::PageClientImpl::scrollView):
        * UIProcess/win/WebView.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76062 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 3ca0a74d
2011-01-18 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
Add PageClient::scrollView
https://bugs.webkit.org/show_bug.cgi?id=52663
* UIProcess/API/mac/PageClientImpl.h:
* UIProcess/API/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::scrollView):
* UIProcess/API/qt/qwkpage.cpp:
(QWKPagePrivate::scrollView):
* UIProcess/API/qt/qwkpage_p.h:
* UIProcess/PageClient.h:
* UIProcess/win/WebView.cpp:
(WebKit::PageClientImpl::scrollView):
* UIProcess/win/WebView.h:
2011-01-18 Anders Carlsson <andersca@apple.com>
 
Reviewed by Sam Weinig.
......@@ -51,6 +51,7 @@ private:
virtual PassOwnPtr<DrawingAreaProxy> createDrawingAreaProxy();
virtual void setViewNeedsDisplay(const WebCore::IntRect&);
virtual void displayView();
virtual void scrollView(const WebCore::IntRect& scrollRect, const WebCore::IntSize& scrollOffset);
virtual WebCore::IntSize viewSize();
virtual bool isViewWindowActive();
......
......@@ -133,6 +133,12 @@ void PageClientImpl::displayView()
[m_wkView displayIfNeeded];
}
void PageClientImpl::scrollView(const IntRect& scrollRect, const IntSize& scrollOffset)
{
// FIXME: Actually scroll the view contents.
setViewNeedsDisplay(scrollRect);
}
IntSize PageClientImpl::viewSize()
{
return IntSize([m_wkView bounds].size);
......
......@@ -147,6 +147,11 @@ void QWKPagePrivate::displayView()
// FIXME: Implement.
}
void QWKPagePrivate::scrollView(const WebCore::IntRect& scrollRect, const WebCore::IntSize& scrollOffset)
{
// FIXME: Implement.
}
WebCore::IntSize QWKPagePrivate::viewSize()
{
// FIXME: Implement.
......
......@@ -47,6 +47,7 @@ public:
virtual PassOwnPtr<WebKit::DrawingAreaProxy> createDrawingAreaProxy();
virtual void setViewNeedsDisplay(const WebCore::IntRect&);
virtual void displayView();
virtual void scrollView(const WebCore::IntRect& scrollRect, const WebCore::IntSize& scrollOffset);
virtual WebCore::IntSize viewSize();
virtual bool isViewWindowActive();
......
......@@ -58,6 +58,9 @@ public:
// Tell the view to immediately display its invalid rect.
virtual void displayView() = 0;
// Tell the view to scroll scrollRect by scrollOffset.
virtual void scrollView(const WebCore::IntRect& scrollRect, const WebCore::IntSize& scrollOffset) = 0;
// Return the size of the view the page is associated with.
virtual WebCore::IntSize viewSize() = 0;
......
......@@ -591,6 +591,12 @@ void WebView::displayView()
::UpdateWindow(m_window);
}
void PageClientImpl::scrollView(const IntRect& scrollRect, const IntSize& scrollOffset)
{
// FIXME: Actually scroll the view contents.
setViewNeedsDisplay(scrollRect);
}
WebCore::IntSize WebView::viewSize()
{
RECT clientRect;
......
......@@ -107,6 +107,7 @@ private:
virtual PassOwnPtr<DrawingAreaProxy> createDrawingAreaProxy();
virtual void setViewNeedsDisplay(const WebCore::IntRect&);
virtual void displayView();
virtual void scrollView(const WebCore::IntRect& scrollRect, const WebCore::IntSize& scrollOffset);
virtual WebCore::IntSize viewSize();
virtual bool isViewWindowActive();
......
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