2011-02-05 Anders Carlsson <andersca@apple.com>
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 5 Feb 2011 22:28:02 +0000 (22:28 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 5 Feb 2011 22:28:02 +0000 (22:28 +0000)
commit4ada8b1ac922b8e650538231fd4f25cddf0b3656
tree9681e9075bca6f4acf3aea2508439cfcce32715f
parent927c50bd1faf70cfc931ab922fceb711886be257
2011-02-05  Anders Carlsson  <andersca@apple.com>

        Reviewed by Darin Adler.

        Need a way to resize and scroll the page at the same time
        https://bugs.webkit.org/show_bug.cgi?id=53814
        <rdar://problem/8498008>

        Export a function needed by WebKit2.

        * WebCore.exp.in:
2011-02-05  Anders Carlsson  <andersca@apple.com>

        Reviewed by Darin Adler.

        Need a way to resize and scroll the page at the same time
        https://bugs.webkit.org/show_bug.cgi?id=53814
        <rdar://problem/8498008>

        Add -[WKView setFrame:andScrollBy:].

        * UIProcess/API/mac/WKView.h:
        * UIProcess/API/mac/WKView.mm:
        (-[WKView setFrame:andScrollBy:]):
        Stash away the scroll offset and call setFrame:.

        (-[WKView _switchToDrawingAreaTypeIfNecessary:DrawingAreaInfo::]):
        (-[WKView _setDrawingAreaSize:]):
        * UIProcess/API/qt/qwkpage.cpp:
        (QWKPage::setViewportSize):
        DrawingAreaProxy::setSize now takes a scroll offset.

        * UIProcess/DrawingAreaProxy.cpp:
        (WebKit::DrawingAreaProxy::setSize):
        This now takes a scroll offset and stores it in m_scrollOffset.

        * UIProcess/DrawingAreaProxy.h:
        * UIProcess/DrawingAreaProxyImpl.cpp:
        (WebKit::DrawingAreaProxyImpl::sendSetSize):
        Send along the scroll offset and set it back to zero.

        * UIProcess/LayerBackedDrawingAreaProxy.cpp:
        (WebKit::LayerBackedDrawingAreaProxy::didSetSize):
        * UIProcess/TiledDrawingAreaProxy.cpp:
        (WebKit::TiledDrawingAreaProxy::didSetSize):
        * UIProcess/win/WebView.cpp:
        (WebKit::WebView::onSizeEvent):
        (WebKit::WebView::switchToDrawingAreaTypeIfNecessary):
        DrawingAreaProxy::setSize now takes a scroll offset.

        * WebProcess/WebPage/DrawingArea.h:
        (WebKit::DrawingArea::setSize):
        Add a scrollOffset parameter.

        * WebProcess/WebPage/DrawingArea.messages.in:
        Add a scroll offset parameter to the SetSize message.

        * WebProcess/WebPage/DrawingAreaImpl.cpp:
        (WebKit::DrawingAreaImpl::setSize):
        Call WebPage::scrollMainFrameIfNotAtMaxScrollPosition.

        * WebProcess/WebPage/DrawingAreaImpl.h:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::scrollMainFrameIfNotAtMaxScrollPosition):
        Compute a scroll offset and call setScrollPosition on the main frame view.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77751 268f45cc-cd09-0410-ab3c-d52691b4dbfc
18 files changed:
Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/mac/WKView.h
Source/WebKit2/UIProcess/API/mac/WKView.mm
Source/WebKit2/UIProcess/API/qt/qwkpage.cpp
Source/WebKit2/UIProcess/DrawingAreaProxy.cpp
Source/WebKit2/UIProcess/DrawingAreaProxy.h
Source/WebKit2/UIProcess/DrawingAreaProxyImpl.cpp
Source/WebKit2/UIProcess/LayerBackedDrawingAreaProxy.cpp
Source/WebKit2/UIProcess/TiledDrawingAreaProxy.cpp
Source/WebKit2/UIProcess/win/WebView.cpp
Source/WebKit2/WebProcess/WebPage/DrawingArea.h
Source/WebKit2/WebProcess/WebPage/DrawingArea.messages.in
Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.cpp
Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.h
Source/WebKit2/WebProcess/WebPage/WebPage.cpp
Source/WebKit2/WebProcess/WebPage/WebPage.h