summaryrefslogtreecommitdiffstats
path: root/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp')
-rw-r--r--WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
index 5c6364e..bf6e75a 100644
--- a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
+++ b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
@@ -274,6 +274,8 @@ void FrameLoaderClientQt::transitionToCommittedForNewPage()
bool hLock = hScrollbar != ScrollbarAuto;
bool vLock = vScrollbar != ScrollbarAuto;
+ IntSize currentVisibleContentSize = m_frame->view() ? m_frame->view()->actualVisibleContentRect().size() : IntSize();
+
m_frame->createView(m_webFrame->page()->viewportSize(),
backgroundColor, !backgroundColor.alpha(),
preferredLayoutSize.isValid() ? IntSize(preferredLayoutSize) : IntSize(),
@@ -282,8 +284,13 @@ void FrameLoaderClientQt::transitionToCommittedForNewPage()
vScrollbar, vLock);
bool isMainFrame = m_frame == m_frame->page()->mainFrame();
- if (isMainFrame && page->d->client)
+ if (isMainFrame && page->d->client) {
m_frame->view()->setPaintsEntireContents(page->d->client->viewResizesToContentsEnabled());
+ m_frame->view()->setDelegatesScrolling(page->d->client->viewResizesToContentsEnabled());
+ }
+
+ // The HistoryController will update the scroll position later if needed.
+ m_frame->view()->setActualVisibleContentRect(IntRect(IntPoint::zero(), currentVisibleContentSize));
}
void FrameLoaderClientQt::dispatchDidBecomeFrameset(bool)