[Qt][WK2] Forward the viewport visible area from the view instead of inferring it...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 11 Jul 2011 15:53:47 +0000 (15:53 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 11 Jul 2011 15:53:47 +0000 (15:53 +0000)
https://bugs.webkit.org/show_bug.cgi?id=64275

Patch by Benjamin Poulain <benjamin@webkit.org> on 2011-07-11
Reviewed by Simon Hausmann.

This patch refactors the way the viewport visible area is handled.
Previously, the TiledDrawingAreaProxy would ask for the visible rect
when painting or updating. This is reversed with this patch, and the viewport
informs the page of any change in the view area.

With this change, the TiledDrawingAreaProxy does not need to know about QTouchWebPage,
and can use the TouchViewInterface directly.

* UIProcess/API/qt/qtouchwebpage.cpp:
(QTouchWebPagePrivate::setViewportRect):
* UIProcess/API/qt/qtouchwebpage.h:
* UIProcess/API/qt/qtouchwebpage_p.h:
* UIProcess/API/qt/qtouchwebview.cpp:
(QTouchWebViewPrivate::scroll):
(QTouchWebViewPrivate::viewportRectUpdated):
(QTouchWebView::resizeEvent):
* UIProcess/API/qt/qtouchwebview.h:
* UIProcess/API/qt/qtouchwebview_p.h:
* UIProcess/PageClient.h:
* UIProcess/TiledDrawingAreaProxy.cpp:
(WebKit::TiledDrawingAreaProxy::invalidate):
(WebKit::TiledDrawingAreaProxy::paint):
(WebKit::TiledDrawingAreaProxy::setVisibleArea):
(WebKit::TiledDrawingAreaProxy::createTiles):
* UIProcess/TiledDrawingAreaProxy.h:
* UIProcess/WebPageProxy.h:
* UIProcess/qt/QtWebPageProxy.cpp:
* UIProcess/qt/QtWebPageProxy.h:
* UIProcess/qt/TiledDrawingAreaProxyQt.cpp:
(WebKit::TiledDrawingAreaProxy::updateWebView):
* UIProcess/qt/TouchViewInterface.cpp:
(WebKit::TouchViewInterface::contentSizeChanged):
* UIProcess/qt/TouchViewInterface.h:
* UIProcess/qt/WebPageProxyQt.cpp:
* UIProcess/qt/qtouchwebpageproxy.cpp:
(QTouchWebPageProxy::createDrawingAreaProxy):
(QTouchWebPageProxy::setVisibleArea):
* UIProcess/qt/qtouchwebpageproxy.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@90750 268f45cc-cd09-0410-ab3c-d52691b4dbfc

19 files changed:
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/qt/qtouchwebpage.cpp
Source/WebKit2/UIProcess/API/qt/qtouchwebpage.h
Source/WebKit2/UIProcess/API/qt/qtouchwebpage_p.h
Source/WebKit2/UIProcess/API/qt/qtouchwebview.cpp
Source/WebKit2/UIProcess/API/qt/qtouchwebview.h
Source/WebKit2/UIProcess/API/qt/qtouchwebview_p.h
Source/WebKit2/UIProcess/PageClient.h
Source/WebKit2/UIProcess/TiledDrawingAreaProxy.cpp
Source/WebKit2/UIProcess/TiledDrawingAreaProxy.h
Source/WebKit2/UIProcess/WebPageProxy.h
Source/WebKit2/UIProcess/qt/QtWebPageProxy.cpp
Source/WebKit2/UIProcess/qt/QtWebPageProxy.h
Source/WebKit2/UIProcess/qt/TiledDrawingAreaProxyQt.cpp
Source/WebKit2/UIProcess/qt/TouchViewInterface.cpp
Source/WebKit2/UIProcess/qt/TouchViewInterface.h
Source/WebKit2/UIProcess/qt/WebPageProxyQt.cpp
Source/WebKit2/UIProcess/qt/qtouchwebpageproxy.cpp
Source/WebKit2/UIProcess/qt/qtouchwebpageproxy.h

index d7c74dd..bfc6bf7 100644 (file)
@@ -1,3 +1,49 @@
+2011-07-11  Benjamin Poulain  <benjamin@webkit.org>
+
+        [Qt][WK2] Forward the viewport visible area from the view instead of inferring it from the TiledDrawingAreaProxy
+        https://bugs.webkit.org/show_bug.cgi?id=64275
+
+        Reviewed by Simon Hausmann.
+
+        This patch refactors the way the viewport visible area is handled.
+        Previously, the TiledDrawingAreaProxy would ask for the visible rect
+        when painting or updating. This is reversed with this patch, and the viewport
+        informs the page of any change in the view area.
+
+        With this change, the TiledDrawingAreaProxy does not need to know about QTouchWebPage,
+        and can use the TouchViewInterface directly.
+
+        * UIProcess/API/qt/qtouchwebpage.cpp:
+        (QTouchWebPagePrivate::setViewportRect):
+        * UIProcess/API/qt/qtouchwebpage.h:
+        * UIProcess/API/qt/qtouchwebpage_p.h:
+        * UIProcess/API/qt/qtouchwebview.cpp:
+        (QTouchWebViewPrivate::scroll):
+        (QTouchWebViewPrivate::viewportRectUpdated):
+        (QTouchWebView::resizeEvent):
+        * UIProcess/API/qt/qtouchwebview.h:
+        * UIProcess/API/qt/qtouchwebview_p.h:
+        * UIProcess/PageClient.h:
+        * UIProcess/TiledDrawingAreaProxy.cpp:
+        (WebKit::TiledDrawingAreaProxy::invalidate):
+        (WebKit::TiledDrawingAreaProxy::paint):
+        (WebKit::TiledDrawingAreaProxy::setVisibleArea):
+        (WebKit::TiledDrawingAreaProxy::createTiles):
+        * UIProcess/TiledDrawingAreaProxy.h:
+        * UIProcess/WebPageProxy.h:
+        * UIProcess/qt/QtWebPageProxy.cpp:
+        * UIProcess/qt/QtWebPageProxy.h:
+        * UIProcess/qt/TiledDrawingAreaProxyQt.cpp:
+        (WebKit::TiledDrawingAreaProxy::updateWebView):
+        * UIProcess/qt/TouchViewInterface.cpp:
+        (WebKit::TouchViewInterface::contentSizeChanged):
+        * UIProcess/qt/TouchViewInterface.h:
+        * UIProcess/qt/WebPageProxyQt.cpp:
+        * UIProcess/qt/qtouchwebpageproxy.cpp:
+        (QTouchWebPageProxy::createDrawingAreaProxy):
+        (QTouchWebPageProxy::setVisibleArea):
+        * UIProcess/qt/qtouchwebpageproxy.h:
+
 2011-07-11  Andreas Kling  <kling@webkit.org>
 
         [Qt][WK2] Move zoomable-area-for-point functionality to QTouchWebPageProxy
index 551092f..d6bfcd3 100644 (file)
@@ -153,21 +153,6 @@ QTouchWebPagePrivate::QTouchWebPagePrivate(QTouchWebPage* view)
 {
 }
 
-QRectF QTouchWebPage::visibleRect() const
-{
-    if (!scene())
-        return QRectF();
-
-    QList<QGraphicsView*> views = scene()->views();
-    if (views.isEmpty())
-        return QRectF();
-
-    QGraphicsView* graphicsView = views.at(0);
-    int xOffset = graphicsView->horizontalScrollBar()->value();
-    int yOffset = graphicsView->verticalScrollBar()->value();
-    return mapRectFromScene(QRectF(QPointF(xOffset, yOffset), graphicsView->viewport()->size()));
-}
-
 void QTouchWebPagePrivate::prepareScaleChange()
 {
     ASSERT(!m_isChangingScale);
@@ -196,4 +181,10 @@ void QTouchWebPagePrivate::setPage(QTouchWebPageProxy* page)
     QObject::connect(page, SIGNAL(focusNextPrevChild(bool)), q, SLOT(focusNextPrevChildCallback(bool)));
 }
 
+void QTouchWebPagePrivate::setViewportRect(const QRectF& viewportRect)
+{
+    const QRectF visibleArea = q->boundingRect().intersected(viewportRect);
+    page->setVisibleArea(visibleArea);
+}
+
 #include "moc_qtouchwebpage.cpp"
index a88ecc1..4dcd82d 100644 (file)
@@ -54,9 +54,6 @@ public:
     virtual void paint(QPainter*, const QStyleOptionGraphicsItem*, QWidget*);
     virtual bool event(QEvent*);
 
-    // FIXME: should not be public
-    virtual QRectF visibleRect() const;
-
 Q_SIGNALS:
     void urlChanged(const QUrl&);
     void titleChanged(const QString&);
index dff21bc..01dd17f 100644 (file)
@@ -25,8 +25,9 @@
 #include <QBasicTimer>
 #include "qtouchwebpage.h"
 
-class QTouchWebPage;
+class QRectF;
 class QString;
+class QTouchWebPage;
 class QTouchWebPageProxy;
 
 class QTouchWebPagePrivate {
@@ -37,7 +38,7 @@ public:
 
     void setPage(QTouchWebPageProxy*);
 
-    void setViewportSize(const QSizeF&);
+    void setViewportRect(const QRectF&);
 
     void prepareScaleChange();
     void commitScaleChange();
index 5bd1ff3..75965d7 100644 (file)
@@ -40,6 +40,14 @@ QTouchWebViewPrivate::QTouchWebViewPrivate(QTouchWebView* q)
 void QTouchWebViewPrivate::scroll(qreal deltaX, qreal deltaY)
 {
     pageView->moveBy(deltaX, deltaY);
+    viewportRectUpdated();
+}
+
+void QTouchWebViewPrivate::viewportRectUpdated()
+{
+    QTouchWebPagePrivate* const pageViewPrivate = QTouchWebPagePrivate::getPageViewPrivate(pageView.data());
+    const QRectF viewportRectInPageViewCoordinate = q->mapRectToItem(pageView.data(), q->boundingRect());
+    pageViewPrivate->setViewportRect(viewportRectInPageViewCoordinate);
 }
 
 QTouchWebView::QTouchWebView()
@@ -57,3 +65,9 @@ QTouchWebPage* QTouchWebView::page()
 {
     return d->pageView.data();
 }
+
+void QTouchWebView::resizeEvent(QGraphicsSceneResizeEvent* event)
+{
+    QGraphicsWidget::resizeEvent(event);
+    d->viewportRectUpdated();
+}
index 0e104b9..038580e 100644 (file)
@@ -43,6 +43,9 @@ public:
 
     QTouchWebPage *page();
 
+protected:
+    void resizeEvent(QGraphicsSceneResizeEvent*);
+
 private:
     friend class WebKit::TouchViewInterface;
     QTouchWebViewPrivate *d;
index 1e5adab..850c8c0 100644 (file)
@@ -33,6 +33,7 @@ class QTouchWebViewPrivate
 public:
     QTouchWebViewPrivate(QTouchWebView* q);
     void scroll(qreal deltaX, qreal deltaY);
+    void viewportRectUpdated();
 
     QTouchWebView* const q;
     QScopedPointer<QTouchWebPage> pageView;
index a657999..bee82ec 100644 (file)
@@ -107,8 +107,6 @@ public:
     virtual void didFindZoomableArea(const WebCore::IntRect&) = 0;
 
     virtual void startDrag(const WebCore::DragData&, PassRefPtr<ShareableBitmap> dragImage) = 0;
-
-    virtual WebCore::IntRect viewportVisibleRect() const = 0;
 #endif
 
     virtual void setCursor(const WebCore::Cursor&) = 0;
index 82388e4..98ff273 100644 (file)
@@ -181,7 +181,7 @@ void TiledDrawingAreaProxy::invalidate(const IntRect& contentsDirtyRect)
     TiledDrawingAreaTile::Coordinate topLeft = tileCoordinateForPoint(dirtyRect.location());
     TiledDrawingAreaTile::Coordinate bottomRight = tileCoordinateForPoint(innerBottomRight(dirtyRect));
 
-    IntRect coverRect = calculateCoverRect(m_previousVisibleRect);
+    IntRect coverRect = calculateCoverRect(m_visibleArea);
 
     Vector<TiledDrawingAreaTile::Coordinate> tilesToRemove;
 
@@ -265,8 +265,6 @@ bool TiledDrawingAreaProxy::paint(const IntRect& rect, PlatformDrawingContext co
             return false;
     }
 
-    adjustVisibleRect();
-
     GraphicsContext gc(context);
     gc.save();
 
@@ -292,14 +290,12 @@ bool TiledDrawingAreaProxy::paint(const IntRect& rect, PlatformDrawingContext co
     return true;
 }
 
-void TiledDrawingAreaProxy::adjustVisibleRect()
+void TiledDrawingAreaProxy::setVisibleArea(const WebCore::IntRect& visibleArea)
 {
-    IntRect visibleRect = mapFromContents(webViewVisibleRect());
-    if (m_previousVisibleRect == visibleRect)
-        return;
-    m_previousVisibleRect = visibleRect;
-
-    startTileCreationTimer();
+    if (m_visibleArea != visibleArea) {
+        m_visibleArea = visibleArea;
+        startTileCreationTimer();
+    }
 }
 
 void TiledDrawingAreaProxy::setContentsScale(float scale)
@@ -355,17 +351,14 @@ IntRect TiledDrawingAreaProxy::calculateCoverRect(const IntRect& visibleRect) co
 
 void TiledDrawingAreaProxy::createTiles()
 {
-    IntRect visibleRect = mapFromContents(webViewVisibleRect());
-    m_previousVisibleRect = visibleRect;
-
-    if (visibleRect.isEmpty())
+    if (m_visibleArea.isEmpty())
         return;
 
     // Resize tiles on edges in case the contents size has changed.
     bool didResizeTiles = resizeEdgeTiles();
 
     // Remove tiles outside out current maximum keep rect.
-    dropTilesOutsideRect(calculateKeepRect(visibleRect));
+    dropTilesOutsideRect(calculateKeepRect(m_visibleArea));
 
     // Search for the tile position closest to the viewport center that does not yet contain a tile.
     // Which position is considered the closest depends on the tileDistance function.
@@ -373,13 +366,13 @@ void TiledDrawingAreaProxy::createTiles()
     Vector<TiledDrawingAreaTile::Coordinate> tilesToCreate;
     unsigned requiredTileCount = 0;
     bool hasVisibleCheckers = false;
-    TiledDrawingAreaTile::Coordinate topLeft = tileCoordinateForPoint(visibleRect.location());
-    TiledDrawingAreaTile::Coordinate bottomRight = tileCoordinateForPoint(innerBottomRight(visibleRect));
+    TiledDrawingAreaTile::Coordinate topLeft = tileCoordinateForPoint(m_visibleArea.location());
+    TiledDrawingAreaTile::Coordinate bottomRight = tileCoordinateForPoint(innerBottomRight(m_visibleArea));
     for (unsigned yCoordinate = topLeft.y(); yCoordinate <= bottomRight.y(); ++yCoordinate) {
         for (unsigned xCoordinate = topLeft.x(); xCoordinate <= bottomRight.x(); ++xCoordinate) {
             TiledDrawingAreaTile::Coordinate currentCoordinate(xCoordinate, yCoordinate);
             // Distance is 0 for all currently visible tiles.
-            double distance = tileDistance(visibleRect, currentCoordinate);
+            double distance = tileDistance(m_visibleArea, currentCoordinate);
 
             RefPtr<TiledDrawingAreaTile> tile = tileAt(currentCoordinate);
             if (!distance && (!tile || !tile->isReadyToPaint()))
index ef21caf..d1e860a 100644 (file)
@@ -43,9 +43,6 @@
 #else
 class WKView;
 #endif
-#elif PLATFORM(QT)
-class QTouchWebPage;
-#include <QImage>
 #endif
 
 namespace WebKit {
@@ -59,7 +56,8 @@ typedef WKView PlatformWebView;
 class WebView;
 typedef WebView PlatformWebView;
 #elif PLATFORM(QT)
-typedef QTouchWebPage PlatformWebView;
+class TouchViewInterface;
+typedef TouchViewInterface PlatformWebView;
 #endif
 
 class TiledDrawingAreaProxy : public DrawingAreaProxy {
@@ -69,6 +67,7 @@ public:
     TiledDrawingAreaProxy(PlatformWebView*, WebPageProxy*);
     virtual ~TiledDrawingAreaProxy();
 
+    void setVisibleArea(const WebCore::IntRect& visibleRect);
     float contentsScale() const { return m_contentsScale; }
     void setContentsScale(float);
 
@@ -102,7 +101,6 @@ public:
 
 private:
     WebPageProxy* page();
-    WebCore::IntRect webViewVisibleRect();
     void updateWebView(const Vector<WebCore::IntRect>& paintedArea);
 
     // DrawingAreaProxy
@@ -115,8 +113,6 @@ private:
     virtual void tileUpdated(int tileID, const UpdateInfo& updateInfo, float scale, unsigned pendingUpdateCount);
     virtual void allTileUpdatesProcessed();
 
-    void adjustVisibleRect();
-
     void requestTileUpdate(int tileID, const WebCore::IntRect& dirtyRect);
 
     PassRefPtr<TiledDrawingAreaTile> createTile(const TiledDrawingAreaTile::Coordinate&);
@@ -170,7 +166,7 @@ private:
     WebCore::FloatSize m_keepAreaMultiplier;
     WebCore::FloatSize m_coverAreaMultiplier;
 
-    WebCore::IntRect m_previousVisibleRect;
+    WebCore::IntRect m_visibleArea;
     float m_contentsScale;
 
     friend class TiledDrawingAreaTile;
index 2e8610d..0e5877d 100644 (file)
@@ -510,7 +510,6 @@ public:
 
 #if PLATFORM(QT)
     void findZoomableAreaForPoint(const WebCore::IntPoint&);
-    WebCore::IntRect viewportVisibleRect();
 #endif
 
     void advanceToNextMisspelling(bool startBeforeSelection) const;
index f507b01..bea947e 100644 (file)
@@ -533,11 +533,6 @@ void QtWebPageProxy::processDidCrash()
     m_viewInterface->processDidCrash();
 }
 
-void QtWebPageProxy::setActualVisibleContentsRect(const QRect& rect) const
-{
-    m_webPageProxy->setActualVisibleContentRect(rect);
-}
-
 QWKPreferences* QtWebPageProxy::preferences() const
 {
     if (!m_preferences) {
@@ -768,12 +763,6 @@ void QtWebPageProxy::startDrag(const WebCore::DragData& dragData, PassRefPtr<Sha
     m_webPageProxy->dragEnded(clientPosition, globalPosition, dropActionToDragOperation(actualDropAction));
 }
 
-WebCore::IntRect QtWebPageProxy::viewportVisibleRect() const
-{
-    // FIXME: TODO
-    return IntRect();
-}
-
 void QtWebPageProxy::setPageIsVisible(bool isVisible)
 {
     m_webPageProxy->drawingArea()->setPageIsVisible(isVisible);
index 575fd2c..25ec12d 100644 (file)
@@ -110,7 +110,6 @@ public:
     virtual void didChangeContentsSize(const WebCore::IntSize&);
 
     virtual void startDrag(const WebCore::DragData&, PassRefPtr<ShareableBitmap> dragImage);
-    virtual WebCore::IntRect viewportVisibleRect() const;
     virtual void setCursor(const WebCore::Cursor&);
     virtual void toolTipChanged(const WTF::String&, const WTF::String&);
     virtual void registerEditCommand(PassRefPtr<WebKit::WebEditCommandProxy>, WebKit::WebPageProxy::UndoOrRedo);
@@ -169,8 +168,6 @@ public:
 
     QString title() const;
 
-    void setActualVisibleContentsRect(const QRect& rect) const;
-
     QAction* navigationAction(QtWebKit::NavigationAction) const;
 
     QAction* action(WebAction action) const;
index 04681a4..0923223 100644 (file)
 #include "TiledDrawingAreaProxy.h"
 
 #include "ShareableBitmap.h"
+#include "TouchViewInterface.h"
 #include "WKAPICast.h"
 #include "WebPageProxy.h"
 
-#include "qtouchwebpage.h"
-
 using namespace WebCore;
 
 #define TILE_DEBUG_LOG
@@ -45,12 +44,7 @@ void TiledDrawingAreaProxy::updateWebView(const Vector<IntRect>& paintedArea)
 
     unsigned size = paintedArea.size();
     for (unsigned n = 0; n < size; ++n)
-        m_webView->update(QRect(paintedArea[n]));
-}
-
-IntRect TiledDrawingAreaProxy::webViewVisibleRect()
-{
-    return enclosingIntRect(FloatRect(m_webView->visibleRect()));
+        static_cast<ViewInterface*>(m_webView)->setViewNeedsDisplay(QRect(paintedArea[n]));
 }
 
 WebPageProxy* TiledDrawingAreaProxy::page()
index 3e13a9f..4ca7856 100644 (file)
@@ -69,7 +69,13 @@ QSize TouchViewInterface::drawingAreaSize()
 
 void TouchViewInterface::contentSizeChanged(const QSize& newSize)
 {
+    // FIXME: the viewport should take care of:
+    // -resize the page
+    // -change the zoom level if needed
+    // -move the page back in viewport boundaries if needed
+    // -update the viewport rect
     m_pageView->resize(newSize);
+    m_viewportView->d->viewportRectUpdated();
 }
 
 bool TouchViewInterface::isActive()
index f568df9..832b968 100644 (file)
@@ -32,7 +32,6 @@ class TouchViewInterface : public ViewInterface
 {
 public:
     TouchViewInterface(QTouchWebView* viewportView, QTouchWebPage* pageView);
-    QTouchWebPage* pageView() const { return m_pageView; }
 
     void panGestureStarted();
     void panGestureRequestScroll(qreal deltaX, qreal deltaY);
index fc19ad4..f9714fb 100644 (file)
@@ -47,9 +47,4 @@ void WebPageProxy::loadRecentSearches(const String&, Vector<String>&)
     notImplemented();
 }
 
-WebCore::IntRect WebPageProxy::viewportVisibleRect()
-{
-    return m_pageClient->viewportVisibleRect();
-}
-
 } // namespace WebKit
index 9abcbda..ade127d 100644 (file)
@@ -39,7 +39,7 @@ QTouchWebPageProxy::QTouchWebPageProxy(TouchViewInterface* viewInterface, QWKCon
 
 PassOwnPtr<DrawingAreaProxy> QTouchWebPageProxy::createDrawingAreaProxy()
 {
-    return TiledDrawingAreaProxy::create(pageView(), m_webPageProxy.get());
+    return TiledDrawingAreaProxy::create(touchViewInterface(), m_webPageProxy.get());
 }
 
 void QTouchWebPageProxy::processDidCrash()
@@ -81,6 +81,17 @@ bool QTouchWebPageProxy::handleEvent(QEvent* ev)
     return QtWebPageProxy::handleEvent(ev);
 }
 
+void QTouchWebPageProxy::setVisibleArea(const QRectF& visibleArea)
+{
+    TiledDrawingAreaProxy* tiledDrawingArea = static_cast<TiledDrawingAreaProxy*>(m_webPageProxy->drawingArea());
+    QRect alignedVisibleArea = visibleArea.toAlignedRect();
+    tiledDrawingArea->setVisibleArea(alignedVisibleArea);
+
+    // FIXME: Once we support suspend and resume, this should be delayed until the page is active if the page is suspended.
+    IntRect contentVisibleArea = tiledDrawingArea->mapToContents(alignedVisibleArea);
+    m_webPageProxy->setActualVisibleContentRect(contentVisibleArea);
+}
+
 void QTouchWebPageProxy::setResizesToContentsUsingLayoutSize(const QSize& targetLayoutSize)
 {
     m_webPageProxy->setResizesToContentsUsingLayoutSize(targetLayoutSize);
index 4568f27..391f0f4 100644 (file)
@@ -26,7 +26,6 @@
 #include "QtPanGestureRecognizer.h"
 #include "QtWebPageProxy.h"
 #include "TouchViewInterface.h"
-#include "qtouchwebpage.h"
 #include <wtf/PassOwnPtr.h>
 
 using namespace WebKit;
@@ -38,6 +37,7 @@ public:
 
     virtual bool handleEvent(QEvent*);
 
+    void setVisibleArea(const QRectF&);
     void setResizesToContentsUsingLayoutSize(const QSize& targetLayoutSize);
     void findZoomableAreaForPoint(const QPoint&);
 
@@ -54,7 +54,6 @@ private:
     virtual void didFindZoomableArea(const WebCore::IntRect&);
 
     TouchViewInterface* touchViewInterface() const { return static_cast<TouchViewInterface*>(m_viewInterface); }
-    QTouchWebPage* pageView() const { return static_cast<QTouchWebPage*>(touchViewInterface()->pageView()); }
 
     void touchEvent(QTouchEvent*);