WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
v4 of the consolidation of patches for qtwebkit-2.1
0001-Backport-of-all-necessary-fixes-for-43852.patch (text/plain), 25.09 KB, created by
Ademar Reis
on 2010-12-02 13:43:17 PST
(
hide
)
Description:
v4 of the consolidation of patches for qtwebkit-2.1
Filename:
MIME Type:
Creator:
Ademar Reis
Created:
2010-12-02 13:43:17 PST
Size:
25.09 KB
patch
obsolete
>From e1e8e1a8e1c32e5290754c04db278b95191e6cab Mon Sep 17 00:00:00 2001 >From: Ademar de Souza Reis Jr <ademar.reis@openbossa.org> >Date: Wed, 1 Dec 2010 12:01:51 -0300 >Subject: [PATCH] Backport of all necessary fixes for #43852 > >This is a consolidation of all necessary patches we need to fix #43852: > >[Qt] resizeToContent seems to trigger infinite resize on some pages >https://bugs.webkit.org/show_bug.cgi?id=43852 > >Original work on the patch consolidation was done by >Nancy Piedra <nancy.piedra@nokia.com> >--- > WebCore/ChangeLog | 50 ++++++++++++++++++++++ > WebCore/loader/EmptyClients.h | 3 + > WebCore/page/Chrome.cpp | 7 +++ > WebCore/page/Chrome.h | 3 + > WebCore/page/ChromeClient.h | 3 + > WebCore/page/DOMWindow.cpp | 17 ++++---- > WebCore/page/FrameView.cpp | 15 ++++++- > WebCore/page/FrameView.h | 3 +- > WebCore/page/Settings.cpp | 6 +++ > WebCore/page/Settings.h | 4 ++ > WebCore/platform/HostWindow.h | 5 ++ > WebCore/platform/ScrollView.cpp | 24 ++++++++-- > WebCore/platform/ScrollView.h | 10 +++- > WebKit/qt/Api/qgraphicswebview.cpp | 4 ++ > WebKit/qt/Api/qwebpage.cpp | 19 ++++++++ > WebKit/qt/Api/qwebpage.h | 1 + > WebKit/qt/ChangeLog | 25 +++++++++++ > WebKit/qt/WebCoreSupport/ChromeClientQt.cpp | 7 +++ > WebKit/qt/WebCoreSupport/ChromeClientQt.h | 4 +- > WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp | 12 +++++ > WebKit/qt/symbian/eabi/QtWebKitu.def | 2 +- > 21 files changed, 203 insertions(+), 21 deletions(-) > >diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog >index 7c13d8f..89fe8dd 100644 >--- a/WebCore/ChangeLog >+++ b/WebCore/ChangeLog >@@ -1,3 +1,53 @@ >+2010-12-01 Ademar de Souza Reis Jr <ademar.reis@openbossa.org> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Backport of all necessary fixes for #43852 >+ >+ This is a consolidation of all necessary patches we need to fix #43852: >+ >+ [Qt] resizeToContent seems to trigger infinite resize on some pages >+ https://bugs.webkit.org/show_bug.cgi?id=43852 >+ >+ Original work on the patch consolidation was done by Nancy Piedra <nancy.piedra@nokia.com> >+ >+ [Qt] resizeToContent seems to trigger infinite resize on some pages >+ https://bugs.webkit.org/show_bug.cgi?id=43852 >+ >+ * loader/EmptyClients.h: >+ (WebCore::EmptyChromeClient::delegatedScrollRequested): >+ * page/Chrome.cpp: >+ (WebCore::Chrome::delegatedScrollRequested): >+ * page/Chrome.h: >+ * page/ChromeClient.h: >+ * page/DOMWindow.cpp: >+ (WebCore::DOMWindow::innerHeight): >+ (WebCore::DOMWindow::innerWidth): >+ (WebCore::DOMWindow::screenX): >+ (WebCore::DOMWindow::screenY): >+ * page/FrameView.cpp: >+ (WebCore::FrameView::delegatesScrolling): >+ (WebCore::FrameView::avoidScrollbarCreation): >+ * page/FrameView.h: >+ * page/Settings.cpp: >+ (WebCore::Settings::Settings): >+ (WebCore::Settings::setShouldDelegateScrolling): >+ * page/Settings.h: >+ (WebCore::Settings::shouldDelegateScrolling): >+ * platform/HostWindow.h: >+ * platform/ScrollView.cpp: >+ (WebCore::ScrollView::visibleContentRect): >+ (WebCore::ScrollView::setScrollPosition): >+ (WebCore::ScrollView::updateScrollbars): >+ (WebCore::ScrollView::wheelEvent): >+ * platform/ScrollView.h: >+ (WebCore::ScrollView::delegatesScrolling): >+ (WebCore::ScrollView::avoidScrollbarCreation): >+ (WebCore::ScrollView::actualVisibleContentRect): >+ (WebCore::ScrollView::setActualVisibleContentRect): >+ (WebCore::ScrollView::scrollPosition): >+ (WebCore::ScrollView::scrollOffset): >+ > 2010-08-25 Dawit Alemayehu <adawit@kde.org> > > Reviewed by Ariya Hidayat. >diff --git a/WebCore/loader/EmptyClients.h b/WebCore/loader/EmptyClients.h >index 9938bbc..74e1602 100644 >--- a/WebCore/loader/EmptyClients.h >+++ b/WebCore/loader/EmptyClients.h >@@ -118,6 +118,9 @@ public: > virtual void invalidateContentsAndWindow(const IntRect&, bool) { } > virtual void invalidateContentsForSlowScroll(const IntRect&, bool) {}; > virtual void scroll(const IntSize&, const IntRect&, const IntRect&) { } >+#if ENABLE(TILED_BACKING_STORE) >+ virtual void delegatedScrollRequested(const IntSize&) { } >+#endif > > virtual IntPoint screenToWindow(const IntPoint& p) const { return p; } > virtual IntRect windowToScreen(const IntRect& r) const { return r; } >diff --git a/WebCore/page/Chrome.cpp b/WebCore/page/Chrome.cpp >index dac077d..a868123 100644 >--- a/WebCore/page/Chrome.cpp >+++ b/WebCore/page/Chrome.cpp >@@ -87,6 +87,13 @@ void Chrome::scroll(const IntSize& scrollDelta, const IntRect& rectToScroll, con > m_client->scroll(scrollDelta, rectToScroll, clipRect); > } > >+#if ENABLE(TILED_BACKING_STORE) >+void Chrome::delegatedScrollRequested(const IntSize& scrollDelta) >+{ >+ m_client->delegatedScrollRequested(scrollDelta); >+} >+#endif >+ > IntPoint Chrome::screenToWindow(const IntPoint& point) const > { > return m_client->screenToWindow(point); >diff --git a/WebCore/page/Chrome.h b/WebCore/page/Chrome.h >index beafb35..a4d499b 100644 >--- a/WebCore/page/Chrome.h >+++ b/WebCore/page/Chrome.h >@@ -66,6 +66,9 @@ namespace WebCore { > virtual void invalidateContentsAndWindow(const IntRect&, bool); > virtual void invalidateContentsForSlowScroll(const IntRect&, bool); > virtual void scroll(const IntSize&, const IntRect&, const IntRect&); >+#if ENABLE(TILED_BACKING_STORE) >+ virtual void delegatedScrollRequested(const IntSize& scrollDelta); >+#endif > virtual IntPoint screenToWindow(const IntPoint&) const; > virtual IntRect windowToScreen(const IntRect&) const; > virtual PlatformPageClient platformPageClient() const; >diff --git a/WebCore/page/ChromeClient.h b/WebCore/page/ChromeClient.h >index 9080dda..94df90f 100644 >--- a/WebCore/page/ChromeClient.h >+++ b/WebCore/page/ChromeClient.h >@@ -132,6 +132,9 @@ namespace WebCore { > virtual void invalidateContentsAndWindow(const IntRect&, bool) = 0; > virtual void invalidateContentsForSlowScroll(const IntRect&, bool) = 0; > virtual void scroll(const IntSize&, const IntRect&, const IntRect&) = 0; >+#if ENABLE(TILED_BACKING_STORE) >+ virtual void delegatedScrollRequested(const IntSize&) = 0; >+#endif > virtual IntPoint screenToWindow(const IntPoint&) const = 0; > virtual IntRect windowToScreen(const IntRect&) const = 0; > virtual PlatformPageClient platformPageClient() const = 0; >diff --git a/WebCore/page/DOMWindow.cpp b/WebCore/page/DOMWindow.cpp >index ad635a6..0772919 100644 >--- a/WebCore/page/DOMWindow.cpp >+++ b/WebCore/page/DOMWindow.cpp >@@ -1005,8 +1005,7 @@ int DOMWindow::innerHeight() const > FrameView* view = m_frame->view(); > if (!view) > return 0; >- >- return static_cast<int>(view->height() / view->pageZoomFactor()); >+ return static_cast<int>(view->actualVisibleContentRect().height() / view->pageZoomFactor()); > } > > int DOMWindow::innerWidth() const >@@ -1018,7 +1017,7 @@ int DOMWindow::innerWidth() const > if (!view) > return 0; > >- return static_cast<int>(view->width() / view->pageZoomFactor()); >+ return static_cast<int>(view->actualVisibleContentRect().width() / view->pageZoomFactor()); > } > > int DOMWindow::screenX() const >@@ -1026,11 +1025,11 @@ int DOMWindow::screenX() const > if (!m_frame) > return 0; > >- Page* page = m_frame->page(); >- if (!page) >+ FrameView* view = m_frame->view(); >+ if (!view) > return 0; > >- return static_cast<int>(page->chrome()->windowRect().x()); >+ return static_cast<int>(view->actualVisibleContentRect().x() / view->pageZoomFactor()); > } > > int DOMWindow::screenY() const >@@ -1038,11 +1037,11 @@ int DOMWindow::screenY() const > if (!m_frame) > return 0; > >- Page* page = m_frame->page(); >- if (!page) >+ FrameView* view = m_frame->view(); >+ if (!view) > return 0; > >- return static_cast<int>(page->chrome()->windowRect().y()); >+ return static_cast<int>(view->actualVisibleContentRect().y() / view->pageZoomFactor()); > } > > int DOMWindow::scrollX() const >diff --git a/WebCore/page/FrameView.cpp b/WebCore/page/FrameView.cpp >index e64a846..61cbd69 100644 >--- a/WebCore/page/FrameView.cpp >+++ b/WebCore/page/FrameView.cpp >@@ -340,7 +340,17 @@ void FrameView::setMarginHeight(int h) > m_margins.setHeight(h); > } > >-bool FrameView::avoidScrollbarCreation() >+bool FrameView::delegatesScrolling() const >+{ >+ ASSERT(m_frame); >+ >+ if (parent()) >+ return false; >+ >+ return m_frame->settings() && m_frame->settings()->shouldDelegateScrolling(); >+} >+ >+bool FrameView::avoidScrollbarCreation() const > { > ASSERT(m_frame); > >@@ -1714,6 +1724,9 @@ IntRect FrameView::windowClipRect(bool clipToContents) const > { > ASSERT(m_frame->view() == this); > >+ if (paintsEntireContents()) >+ return IntRect(IntPoint(0, 0), contentsSize()); >+ > // Set our clip rect to be our contents. > IntRect clipRect = contentsToWindow(visibleContentRect(!clipToContents)); > if (!m_frame || !m_frame->document() || !m_frame->document()->ownerElement()) >diff --git a/WebCore/page/FrameView.h b/WebCore/page/FrameView.h >index 003fa7f..7e63257 100644 >--- a/WebCore/page/FrameView.h >+++ b/WebCore/page/FrameView.h >@@ -77,7 +77,8 @@ public: > > virtual PassRefPtr<Scrollbar> createScrollbar(ScrollbarOrientation); > >- virtual bool avoidScrollbarCreation(); >+ virtual bool delegatesScrolling() const; >+ virtual bool avoidScrollbarCreation() const; > > virtual void setContentsSize(const IntSize&); > >diff --git a/WebCore/page/Settings.cpp b/WebCore/page/Settings.cpp >index 3a942ed..48420b7 100644 >--- a/WebCore/page/Settings.cpp >+++ b/WebCore/page/Settings.cpp >@@ -86,6 +86,7 @@ Settings::Settings(Page* page) > , m_javaScriptCanOpenWindowsAutomatically(false) > , m_javaScriptCanAccessClipboard(false) > , m_shouldPrintBackgrounds(false) >+ , m_shouldDelegateScrolling(false) > , m_textAreasAreResizable(false) > #if ENABLE(DASHBOARD_SUPPORT) > , m_usesDashboardBackwardCompatibilityMode(false) >@@ -339,6 +340,11 @@ void Settings::setShouldPrintBackgrounds(bool shouldPrintBackgrounds) > m_shouldPrintBackgrounds = shouldPrintBackgrounds; > } > >+void Settings::setShouldDelegateScrolling(bool shouldDelegateScrolling) >+{ >+ m_shouldDelegateScrolling = shouldDelegateScrolling; >+} >+ > void Settings::setTextAreasAreResizable(bool textAreasAreResizable) > { > if (m_textAreasAreResizable == textAreasAreResizable) >diff --git a/WebCore/page/Settings.h b/WebCore/page/Settings.h >index b42fe02..9d28149 100644 >--- a/WebCore/page/Settings.h >+++ b/WebCore/page/Settings.h >@@ -161,6 +161,9 @@ namespace WebCore { > void setShouldPrintBackgrounds(bool); > bool shouldPrintBackgrounds() const { return m_shouldPrintBackgrounds; } > >+ void setShouldDelegateScrolling(bool); >+ bool shouldDelegateScrolling() const { return m_shouldDelegateScrolling; } >+ > void setTextAreasAreResizable(bool); > bool textAreasAreResizable() const { return m_textAreasAreResizable; } > >@@ -355,6 +358,7 @@ namespace WebCore { > bool m_javaScriptCanOpenWindowsAutomatically : 1; > bool m_javaScriptCanAccessClipboard : 1; > bool m_shouldPrintBackgrounds : 1; >+ bool m_shouldDelegateScrolling : 1; > bool m_textAreasAreResizable : 1; > #if ENABLE(DASHBOARD_SUPPORT) > bool m_usesDashboardBackwardCompatibilityMode : 1; >diff --git a/WebCore/platform/HostWindow.h b/WebCore/platform/HostWindow.h >index b0ee653..0d64e32 100644 >--- a/WebCore/platform/HostWindow.h >+++ b/WebCore/platform/HostWindow.h >@@ -48,6 +48,11 @@ public: > > // Requests the host invalidate the contents, not the window. This is the slow path for scrolling. > virtual void invalidateContentsForSlowScroll(const IntRect& updateRect, bool immediate) = 0; >+ >+#if ENABLE(TILED_BACKING_STORE) >+ // Requests the host to do the actual scrolling. This is only used in combination with a tiled backing store. >+ virtual void delegatedScrollRequested(const IntSize& scrollDelta) = 0; >+#endif > > // Methods for doing coordinate conversions to and from screen coordinates. > virtual IntPoint screenToWindow(const IntPoint&) const = 0; >diff --git a/WebCore/platform/ScrollView.cpp b/WebCore/platform/ScrollView.cpp >index b39ddc1..2a1aa08 100644 >--- a/WebCore/platform/ScrollView.cpp >+++ b/WebCore/platform/ScrollView.cpp >@@ -206,6 +206,10 @@ IntRect ScrollView::visibleContentRect(bool includeScrollbars) const > { > if (platformWidget()) > return platformVisibleContentRect(includeScrollbars); >+ >+ if (paintsEntireContents()) >+ return IntRect(IntPoint(0, 0), contentsSize()); >+ > return IntRect(IntPoint(m_scrollOffset.width(), m_scrollOffset.height()), > IntSize(max(0, width() - (verticalScrollbar() && !includeScrollbars ? verticalScrollbar()->width() : 0)), > max(0, height() - (horizontalScrollbar() && !includeScrollbars ? horizontalScrollbar()->height() : 0)))); >@@ -306,6 +310,15 @@ void ScrollView::setScrollPosition(const IntPoint& scrollPoint) > return; > } > >+#if ENABLE(TILED_BACKING_STORE) >+ if (delegatesScrolling()) { >+ hostWindow()->delegatedScrollRequested(IntSize(scrollPoint.x(), scrollPoint.y())); >+ if (!m_actualVisibleContentRect.isEmpty()) >+ m_actualVisibleContentRect.setLocation(scrollPoint); >+ return; >+ } >+#endif >+ > IntPoint newScrollPosition = scrollPoint.shrunkTo(maximumScrollPosition()); > newScrollPosition.clampNegativeToZero(); > >@@ -334,7 +347,7 @@ static const unsigned cMaxUpdateScrollbarsPass = 2; > > void ScrollView::updateScrollbars(const IntSize& desiredOffset) > { >- if (m_inUpdateScrollbars || prohibitsScrolling() || platformWidget()) >+ if (m_inUpdateScrollbars || prohibitsScrolling() || delegatesScrolling() || platformWidget()) > return; > > // If we came in here with the view already needing a layout, then go ahead and do that >@@ -789,11 +802,12 @@ void ScrollView::paint(GraphicsContext* context, const IntRect& rect) > context->translate(x(), y()); > documentDirtyRect.move(-x(), -y()); > >- context->translate(-scrollX(), -scrollY()); >- documentDirtyRect.move(scrollX(), scrollY()); >- >- context->clip(visibleContentRect()); >+ if (!paintsEntireContents()) { >+ context->translate(-scrollX(), -scrollY()); >+ documentDirtyRect.move(scrollX(), scrollY()); > >+ context->clip(visibleContentRect()); >+ } > paintContents(context, documentDirtyRect); > > context->restore(); >diff --git a/WebCore/platform/ScrollView.h b/WebCore/platform/ScrollView.h >index b7827b8..1833041 100644 >--- a/WebCore/platform/ScrollView.h >+++ b/WebCore/platform/ScrollView.h >@@ -100,7 +100,8 @@ public: > virtual void setCanHaveScrollbars(bool); > bool canHaveScrollbars() const { return horizontalScrollbarMode() != ScrollbarAlwaysOff || verticalScrollbarMode() != ScrollbarAlwaysOff; } > >- virtual bool avoidScrollbarCreation() { return false; } >+ virtual bool delegatesScrolling() const { return false;} >+ virtual bool avoidScrollbarCreation() const { return false; } > > // By default you only receive paint events for the area that is visible. In the case of using a > // tiled backing store, this function can be set, so that the view paints the entire contents. >@@ -123,6 +124,8 @@ public: > // and height. By default the scrollbars themselves are excluded from this rectangle, but an optional boolean argument allows them to be > // included. > IntRect visibleContentRect(bool includeScrollbars = false) const; >+ IntRect actualVisibleContentRect() const { return m_actualVisibleContentRect.isEmpty() ? visibleContentRect() : m_actualVisibleContentRect; } >+ void setActualVisibleContentRect(const IntRect& actualVisibleContentRect) { m_actualVisibleContentRect = actualVisibleContentRect; } > int visibleWidth() const { return visibleContentRect().width(); } > int visibleHeight() const { return visibleContentRect().height(); } > >@@ -143,8 +146,8 @@ public: > virtual void setContentsSize(const IntSize&); > > // Functions for querying the current scrolled position (both as a point, a size, or as individual X and Y values). >- IntPoint scrollPosition() const { return visibleContentRect().location(); } >- IntSize scrollOffset() const { return visibleContentRect().location() - IntPoint(); } // Gets the scrolled position as an IntSize. Convenient for adding to other sizes. >+ IntPoint scrollPosition() const { return actualVisibleContentRect().location(); } >+ IntSize scrollOffset() const { return actualVisibleContentRect().location() - IntPoint(); } // Gets the scrolled position as an IntSize. Convenient for adding to other sizes. > IntPoint maximumScrollPosition() const; // The maximum position we can be scrolled to. > int scrollX() const { return scrollPosition().x(); } > int scrollY() const { return scrollPosition().y(); } >@@ -278,6 +281,7 @@ private: > // whether it is safe to blit on scroll. > bool m_canBlitOnScroll; > >+ IntRect m_actualVisibleContentRect; > IntSize m_scrollOffset; // FIXME: Would rather store this as a position, but we will wait to make this change until more code is shared. > IntSize m_fixedLayoutSize; > IntSize m_contentsSize; >diff --git a/WebKit/qt/Api/qgraphicswebview.cpp b/WebKit/qt/Api/qgraphicswebview.cpp >index f957cc2..8cac0f8 100644 >--- a/WebKit/qt/Api/qgraphicswebview.cpp >+++ b/WebKit/qt/Api/qgraphicswebview.cpp >@@ -143,6 +143,8 @@ void QGraphicsWebViewPrivate::updateResizesToContentsForPage() > QObject::disconnect(page->mainFrame(), SIGNAL(contentsSizeChanged(QSize)), > q, SLOT(_q_contentsSizeChanged(const QSize&))); > } >+ page->d->page->settings()->setShouldDelegateScrolling(resizesToContents); >+ page->d->page->mainFrame()->view()->setPaintsEntireContents(resizesToContents); > } > > void QGraphicsWebViewPrivate::_q_contentsSizeChanged(const QSize& size) >@@ -420,6 +422,8 @@ void QGraphicsWebViewPrivate::detachCurrentPage() > if (!page) > return; > >+ page->d->page->settings()->setShouldDelegateScrolling(false); >+ > #if QT_VERSION >= 0x040600 > page->d->view.clear(); > #else >diff --git a/WebKit/qt/Api/qwebpage.cpp b/WebKit/qt/Api/qwebpage.cpp >index 1b34e94..43c49fa 100644 >--- a/WebKit/qt/Api/qwebpage.cpp >+++ b/WebKit/qt/Api/qwebpage.cpp >@@ -2600,6 +2600,25 @@ void QWebPage::setPreferredContentsSize(const QSize& size) const > > view->layout(); > } >+/* >+ This function is to be called after any (animated) scroll/pan has ended, in the case the application handles the >+ scrolling/panning of the web contents. This is commonly used in combination with tiling where is it common for >+ the application to pan the actual view, which then resizes itself to the size of the contents. >+ >+ \note Calling this function makes WebKit stop trying to calculate the visibleContentRect. To turn that on >+ again, call this method with an empty rect. >+ >+ \sa QGraphicsWebView::resizesToContents, QWebSettings::TiledBackingStoreEnabled >+*/ >+void QWebPage::setActualVisibleContentRect(const QRect& rect) const >+{ >+ QWebFrame* frame = mainFrame(); >+ if (!frame->d->frame || !frame->d->frame->view()) >+ return; >+ >+ WebCore::FrameView* view = frame->d->frame->view(); >+ view->setActualVisibleContentRect(rect); >+} > > /*! > \fn bool QWebPage::acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &request, QWebPage::NavigationType type) >diff --git a/WebKit/qt/Api/qwebpage.h b/WebKit/qt/Api/qwebpage.h >index 80d334f..6cf185a 100644 >--- a/WebKit/qt/Api/qwebpage.h >+++ b/WebKit/qt/Api/qwebpage.h >@@ -279,6 +279,7 @@ public: > > QSize preferredContentsSize() const; > void setPreferredContentsSize(const QSize &size) const; >+ void setActualVisibleContentRect(const QRect& rect) const; > > virtual bool event(QEvent*); > bool focusNextPrevChild(bool next); >diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog >index fea0d71..3d75832 100644 >--- a/WebKit/qt/ChangeLog >+++ b/WebKit/qt/ChangeLog >@@ -1,3 +1,28 @@ >+2010-12-01 Ademar de Souza Reis Jr <ademar.reis@openbossa.org> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Backport of all necessary fixes for #43852 >+ >+ This is a consolidation of all necessary patches we need to fix #43852: >+ >+ [Qt] resizeToContent seems to trigger infinite resize on some pages >+ https://bugs.webkit.org/show_bug.cgi?id=43852 >+ >+ Original work on the patch consolidation was done by Nancy Piedra <nancy.piedra@nokia.com> >+ >+ * Api/qgraphicswebview.cpp: >+ (QGraphicsWebViewPrivate::updateResizesToContentsForPage): >+ (QGraphicsWebViewPrivate::detachCurrentPage): >+ * Api/qwebpage.cpp: >+ (QWebPage::setActualVisibleContentRect): >+ * Api/qwebpage.h: >+ * WebCoreSupport/ChromeClientQt.cpp: >+ (WebCore::ChromeClientQt::delegatedScrollRequested): >+ * WebCoreSupport/ChromeClientQt.h: >+ * WebCoreSupport/FrameLoaderClientQt.cpp: >+ (WebCore::FrameLoaderClientQt::transitionToCommittedForNewPage): >+ > 2010-11-23 Simon Hausmann <simon.hausmann@nokia.com> > > Reviewed by Tor Arne Vestbø. >diff --git a/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp b/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp >index 916907b..46cbcb2 100644 >--- a/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp >+++ b/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp >@@ -406,6 +406,13 @@ void ChromeClientQt::scroll(const IntSize& delta, const IntRect& scrollViewRect, > emit m_webPage->scrollRequested(delta.width(), delta.height(), scrollViewRect); > } > >+#if ENABLE(TILED_BACKING_STORE) >+void ChromeClientQt::delegatedScrollRequested(const IntSize& delta) >+{ >+ emit m_webPage->scrollRequested(delta.width(), delta.height(), QRect(QPoint(0, 0), m_webPage->viewportSize())); >+} >+#endif >+ > IntRect ChromeClientQt::windowToScreen(const IntRect& rect) const > { > notImplemented(); >diff --git a/WebKit/qt/WebCoreSupport/ChromeClientQt.h b/WebKit/qt/WebCoreSupport/ChromeClientQt.h >index 3bed62b..36b0887 100644 >--- a/WebKit/qt/WebCoreSupport/ChromeClientQt.h >+++ b/WebKit/qt/WebCoreSupport/ChromeClientQt.h >@@ -114,7 +114,9 @@ namespace WebCore { > virtual void invalidateContentsAndWindow(const IntRect&, bool); > virtual void invalidateContentsForSlowScroll(const IntRect&, bool); > virtual void scroll(const IntSize& scrollDelta, const IntRect& rectToScroll, const IntRect& clipRect); >- >+#if ENABLE(TILED_BACKING_STORE) >+ virtual void delegatedScrollRequested(const IntSize& scrollDelta); >+#endif > virtual IntPoint screenToWindow(const IntPoint&) const; > virtual IntRect windowToScreen(const IntRect&) const; > virtual PlatformPageClient platformPageClient() const; >diff --git a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp >index 7808375..9426bdc 100644 >--- a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp >+++ b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp >@@ -265,12 +265,24 @@ 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(), > preferredLayoutSize.isValid(), > hScrollbar, hLock, > vScrollbar, vLock); >+ >+ bool isMainFrame = m_frame == m_frame->page()->mainFrame(); >+ if (isMainFrame && page->d->client) >+ m_frame->view()->setPaintsEntireContents(page->d->client->viewResizesToContentsEnabled()); >+ >+ // The HistoryController will update the scroll position later if needed. >+ if (m_frame->view()->paintsEntireContents()) >+ m_frame->view()->setActualVisibleContentRect(IntRect(IntPoint::zero(), currentVisibleContentSize)); >+ else >+ m_frame->view()->setActualVisibleContentRect(IntRect()); > } > > >diff --git a/WebKit/qt/symbian/eabi/QtWebKitu.def b/WebKit/qt/symbian/eabi/QtWebKitu.def >index 912c7c2..bb2726c 100644 >--- a/WebKit/qt/symbian/eabi/QtWebKitu.def >+++ b/WebKit/qt/symbian/eabi/QtWebKitu.def >@@ -831,7 +831,7 @@ EXPORTS > _ZN23DumpRenderTreeSupportQt28dumpUserGestureInFrameLoaderEb @ 830 NONAME ABSENT > _ZNK8QWebPage19supportsContentTypeERK7QString @ 831 NONAME ABSENT > _ZNK8QWebPage21supportedContentTypesEv @ 832 NONAME ABSENT >- _ZNK8QWebPage27setActualVisibleContentRectERK5QRect @ 833 NONAME ABSENT >+ _ZNK8QWebPage27setActualVisibleContentRectERK5QRect @ 833 NONAME > _ZN8QWebPage20setFeaturePermissionEP9QWebFrameNS_7FeatureENS_16PermissionPolicyE @ 834 NONAME > _ZN8QWebPage26featurePermissionRequestedEP9QWebFrameNS_7FeatureE @ 835 NONAME > _ZN8QWebPage32featurePermissionRequestCanceledEP9QWebFrameNS_7FeatureE @ 836 NONAME >-- >1.7.2.3 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 43852
:
73479
|
74448
|
74650
|
75219
|
75270
|
75273
|
75411
|
96977
|
99566
|
100576
|
100675
|
101385
|
105772
|
107057
|
107178
|
107273
|
107647
|
107654
|
107655
|
107863
|
107866
|
107867
|
107946