Changeset 102765 in webkit


Ignore:
Timestamp:
Dec 14, 2011 4:50:02 AM (12 years ago)
Author:
caio.oliveira@openbossa.org
Message:

[Qt][WK2] Remove DrawingArea and QtWebPageEventHandler code from QtWebPageProxy
https://bugs.webkit.org/show_bug.cgi?id=74414

Reviewed by Simon Hausmann.

This also moves QtWebPageEventHandler to inside QQuickWebPagePrivate, to avoid
the WebPage having a backpointer to the QQuickWebView.

  • Target.pri:
  • UIProcess/API/qt/qquickwebpage.cpp:

(QQuickWebPage::geometryChanged):
(QQuickWebPage::event):
(QQuickWebPagePrivate::QQuickWebPagePrivate):
(QQuickWebPagePrivate::initialize):
(QQuickWebPagePrivate::setDrawingAreaSize):
(QQuickWebPagePrivate::paintToCurrentGLContext):
(QQuickWebPagePrivate::resetPaintNode):

  • UIProcess/API/qt/qquickwebpage_p.h:
  • UIProcess/API/qt/qquickwebpage_p_p.h:
  • UIProcess/API/qt/qquickwebview.cpp:

(QQuickWebViewPrivate::initialize):
(QQuickWebViewPrivate::initializeDesktop):
(QQuickWebViewPrivate::initializeTouch):
(QQuickWebViewPrivate::_q_resume):
(QQuickWebViewPrivate::processDidCrash):
(QQuickWebViewPrivate::didRelaunchProcess):
(QQuickWebViewPrivate::createDrawingAreaProxy):
(QQuickWebViewPrivate::updateVisibleContentRectAndScale):
(QQuickWebViewPrivate::_q_viewportTrajectoryVectorChanged):
(QQuickWebViewPrivate::updateViewportSize):

  • UIProcess/API/qt/qquickwebview_p_p.h:
  • UIProcess/qt/QtPageClient.cpp:

(QtPageClient::createDrawingAreaProxy):

  • UIProcess/qt/QtPageClient.h:

(QtPageClient::findStringInCustomRepresentation):
(QtPageClient::countStringMatchesInCustomRepresentation):

  • UIProcess/qt/QtWebPageEventHandler.cpp:

(QtWebPageEventHandler::QtWebPageEventHandler):
(QtWebPageEventHandler::startDrag):

  • UIProcess/qt/QtWebPageEventHandler.h:
  • UIProcess/qt/QtWebPageProxy.cpp:

(QtWebPageProxy::init):

  • UIProcess/qt/QtWebPageProxy.h:
Location:
trunk/Source/WebKit2
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r102724 r102765  
     12011-12-14  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
     2
     3        [Qt][WK2] Remove DrawingArea and QtWebPageEventHandler code from QtWebPageProxy
     4        https://bugs.webkit.org/show_bug.cgi?id=74414
     5
     6        Reviewed by Simon Hausmann.
     7
     8        This also moves QtWebPageEventHandler to inside QQuickWebPagePrivate, to avoid
     9        the WebPage having a backpointer to the QQuickWebView.
     10
     11        * Target.pri:
     12        * UIProcess/API/qt/qquickwebpage.cpp:
     13        (QQuickWebPage::geometryChanged):
     14        (QQuickWebPage::event):
     15        (QQuickWebPagePrivate::QQuickWebPagePrivate):
     16        (QQuickWebPagePrivate::initialize):
     17        (QQuickWebPagePrivate::setDrawingAreaSize):
     18        (QQuickWebPagePrivate::paintToCurrentGLContext):
     19        (QQuickWebPagePrivate::resetPaintNode):
     20        * UIProcess/API/qt/qquickwebpage_p.h:
     21        * UIProcess/API/qt/qquickwebpage_p_p.h:
     22        * UIProcess/API/qt/qquickwebview.cpp:
     23        (QQuickWebViewPrivate::initialize):
     24        (QQuickWebViewPrivate::initializeDesktop):
     25        (QQuickWebViewPrivate::initializeTouch):
     26        (QQuickWebViewPrivate::_q_resume):
     27        (QQuickWebViewPrivate::processDidCrash):
     28        (QQuickWebViewPrivate::didRelaunchProcess):
     29        (QQuickWebViewPrivate::createDrawingAreaProxy):
     30        (QQuickWebViewPrivate::updateVisibleContentRectAndScale):
     31        (QQuickWebViewPrivate::_q_viewportTrajectoryVectorChanged):
     32        (QQuickWebViewPrivate::updateViewportSize):
     33        * UIProcess/API/qt/qquickwebview_p_p.h:
     34        * UIProcess/qt/QtPageClient.cpp:
     35        (QtPageClient::createDrawingAreaProxy):
     36        * UIProcess/qt/QtPageClient.h:
     37        (QtPageClient::findStringInCustomRepresentation):
     38        (QtPageClient::countStringMatchesInCustomRepresentation):
     39        * UIProcess/qt/QtWebPageEventHandler.cpp:
     40        (QtWebPageEventHandler::QtWebPageEventHandler):
     41        (QtWebPageEventHandler::startDrag):
     42        * UIProcess/qt/QtWebPageEventHandler.h:
     43        * UIProcess/qt/QtWebPageProxy.cpp:
     44        (QtWebPageProxy::init):
     45        * UIProcess/qt/QtWebPageProxy.h:
     46
    1472011-12-13  Gustavo Noronha Silva  <gns@gnome.org>
    248
  • trunk/Source/WebKit2/Target.pri

    r102670 r102765  
    199199    UIProcess/Launcher/ProcessLauncher.h \
    200200    UIProcess/Launcher/ThreadLauncher.h \
     201    UIProcess/LayerTreeHostProxy.h \
    201202    UIProcess/Notifications/NotificationPermissionRequest.h \
    202203    UIProcess/Notifications/NotificationPermissionRequestManagerProxy.h \
  • trunk/Source/WebKit2/UIProcess/API/qt/qquickwebpage.cpp

    r102674 r102765  
    2222#include "qquickwebpage_p.h"
    2323
     24#include "LayerTreeHostProxy.h"
    2425#include "QtWebPageEventHandler.h"
    2526#include "QtWebPageProxy.h"
    2627#include "TransformationMatrix.h"
    2728#include "qquickwebpage_p_p.h"
    28 #include "qquickwebview_p.h"
    29 #include <QUrl>
    3029#include <QtQuick/QQuickCanvas>
    3130#include <QtQuick/QSGGeometryNode>
     
    143142    QQuickItem::geometryChanged(newGeometry, oldGeometry);
    144143    if (newGeometry.size() != oldGeometry.size())
    145         d->pageProxy->setDrawingAreaSize(newGeometry.size().toSize());
     144        d->setDrawingAreaSize(newGeometry.size().toSize());
    146145}
    147146
    148147bool QQuickWebPage::event(QEvent* ev)
    149148{
    150     if (d->pageProxy->eventHandler()->handleEvent(ev))
     149    if (d->eventHandler.data()->handleEvent(ev))
    151150        return true;
    152151    if (ev->type() == QEvent::InputMethod)
     
    161160}
    162161
    163 QQuickWebPagePrivate::QQuickWebPagePrivate(QQuickWebPage* view)
    164     : q(view)
    165     , pageProxy(0)
    166     , sgUpdateQueue(view)
     162QQuickWebPagePrivate::QQuickWebPagePrivate(QQuickWebPage* q)
     163    : q(q)
     164    , webPageProxy(0)
     165    , sgUpdateQueue(q)
    167166    , paintingIsInitialized(false)
    168167    , m_paintNode(0)
     
    170169}
    171170
    172 void QQuickWebPagePrivate::setPageProxy(QtWebPageProxy* pageProxy)
    173 {
    174     ASSERT(!this->pageProxy);
    175     ASSERT(pageProxy);
    176     this->pageProxy = pageProxy;
     171void QQuickWebPagePrivate::initialize(WebKit::WebPageProxy* webPageProxy)
     172{
     173    this->webPageProxy = webPageProxy;
     174    eventHandler.reset(new QtWebPageEventHandler(toAPI(webPageProxy), q));
    177175}
    178176
     
    189187}
    190188
     189void QQuickWebPagePrivate::setDrawingAreaSize(const QSize& size)
     190{
     191    DrawingAreaProxy* drawingArea = webPageProxy->drawingArea();
     192    if (!drawingArea)
     193        return;
     194    drawingArea->setSize(WebCore::IntSize(size), WebCore::IntSize());
     195}
     196
    191197void QQuickWebPagePrivate::paintToCurrentGLContext()
    192198{
     
    200206
    201207    if (!clipRect.isValid())
     208        return;
     209
     210    DrawingAreaProxy* drawingArea = webPageProxy->drawingArea();
     211    if (!drawingArea)
    202212        return;
    203213
     
    215225    ASSERT(!glGetError());
    216226
    217     pageProxy->renderToCurrentGLContext(transform, opacity);
     227    drawingArea->paintToCurrentGLContext(transform, opacity);
     228
    218229    glDisable(GL_SCISSOR_TEST);
    219230    ASSERT(!glGetError());
     
    316327{
    317328    m_paintNode = 0;
    318     pageProxy->purgeGLResources();
     329    DrawingAreaProxy* drawingArea = webPageProxy->drawingArea();
     330    if (drawingArea && drawingArea->layerTreeHostProxy())
     331        drawingArea->layerTreeHostProxy()->purgeGLResources();
    319332}
    320333
  • trunk/Source/WebKit2/UIProcess/API/qt/qquickwebpage_p.h

    r102445 r102765  
    2727#include <QtQuick/QQuickItem>
    2828
    29 class QQuickWebView;
    3029class QQuickWebPagePrivate;
    3130class QWebPreferences;
  • trunk/Source/WebKit2/UIProcess/API/qt/qquickwebpage_p_p.h

    r101683 r102765  
    2323
    2424#include "QtSGUpdateQueue.h"
    25 #include "QtWebPageProxy.h"
    2625#include "qquickwebpage_p.h"
    2726
    28 QT_BEGIN_NAMESPACE
    29 class QRectF;
    30 class QSGNode;
    31 class QString;
    32 QT_END_NAMESPACE
     27namespace WebKit {
     28class WebPageProxy;
     29class QtViewportInteractionEngine;
     30}
    3331
    34 class QQuickWebPage;
     32class QtWebPageEventHandler;
    3533
    3634class QQuickWebPagePrivate {
    3735public:
    38     QQuickWebPagePrivate(QQuickWebPage* view);
     36    QQuickWebPagePrivate(QQuickWebPage* q);
    3937    ~QQuickWebPagePrivate();
    4038
    41     void setPageProxy(QtWebPageProxy*);
     39    void initialize(WebKit::WebPageProxy*);
     40    void setDrawingAreaSize(const QSize&);
    4241
    4342    void paintToCurrentGLContext();
    4443    void resetPaintNode();
    4544
     45    QScopedPointer<QtWebPageEventHandler> eventHandler;
    4646    QQuickWebPage* const q;
    47     QtWebPageProxy* pageProxy;
     47    WebKit::WebPageProxy* webPageProxy;
    4848    WebKit::QtSGUpdateQueue sgUpdateQueue;
    4949    bool paintingIsInitialized;
  • trunk/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp

    r102680 r102765  
    2222#include "qquickwebview_p.h"
    2323
     24#include "DrawingAreaProxyImpl.h"
    2425#include "QtDialogRunner.h"
     26#include "QtWebPageEventHandler.h"
    2527#include "QtWebPageProxy.h"
    2628#include "UtilsQt.h"
     
    6668    QQuickWebPagePrivate* const pageViewPrivate = pageView.data()->d;
    6769    setPageProxy(new QtWebPageProxy(q_ptr, &pageClient, contextRef, pageGroupRef));
    68     pageViewPrivate->setPageProxy(pageProxy.data());
     70    pageViewPrivate->initialize(webPageProxy());
    6971
    7072    pageLoadClient.reset(new QtWebPageLoadClient(pageProxy->pageRef(), q_ptr));
    7173    pagePolicyClient.reset(new QtWebPagePolicyClient(pageProxy->pageRef(), q_ptr));
    7274    pageUIClient.reset(new QtWebPageUIClient(pageProxy->pageRef(), q_ptr));
    73     eventHandler.reset(new QtWebPageEventHandler(pageProxy->pageRef(), q_ptr));
    7475
    7576    // Any page setting should preferrable be set before creating the page, so set them here:
     
    7778    QWebPreferencesPrivate::get(pageProxy->preferences())->setAttribute(QWebPreferencesPrivate::AcceleratedCompositingEnabled, true);
    7879
    79     pageClient.initialize(q_ptr, pageProxy.data(), eventHandler.data(), &undoController);
     80    pageClient.initialize(q_ptr, pageProxy.data(), pageViewPrivate->eventHandler.data(), &undoController);
    8081
    8182    // Creates a page with the page creation parameters.
    82     pageProxy->init(eventHandler.data());
     83    pageProxy->init();
    8384
    8485    // Trigger setting of correct visibility flags after everything was allocated and initialized.
     
    112113    }
    113114    interactionEngine.reset(0);
    114     eventHandler->setViewportInteractionEngine(0);
     115    pageView->d->eventHandler->setViewportInteractionEngine(0);
    115116    enableMouseEvents();
    116117}
     
    119120{
    120121    interactionEngine.reset(new QtViewportInteractionEngine(viewport, pageView.data()));
    121     eventHandler->setViewportInteractionEngine(interactionEngine.data());
     122    pageView->d->eventHandler->setViewportInteractionEngine(interactionEngine.data());
    122123    disableMouseEvents();
    123124    QObject::connect(interactionEngine.data(), SIGNAL(contentSuspendRequested()), viewport, SLOT(_q_suspend()));
     
    163164    }
    164165
    165     updateVisibleContentRect();
     166    updateVisibleContentRectAndScale();
    166167}
    167168
     
    215216{
    216217    emit q_ptr->navigationStateChanged();
    217     eventHandler->resetGestureRecognizers();
     218    pageView->d->eventHandler->resetGestureRecognizers();
    218219    WebCore::KURL url(WebCore::ParsedURLString, webPageProxy()->urlAtProcessExit());
    219220    qWarning("WARNING: The web process experienced a crash on '%s'.", qPrintable(QUrl(url).toString(QUrl::RemoveUserInfo)));
     
    224225    emit q_ptr->navigationStateChanged();
    225226    qWarning("WARNING: The web process has been successfully restarted.");
    226     pageProxy->setDrawingAreaSize(viewSize());
    227 }
    228 
    229 void QQuickWebViewPrivate::updateVisibleContentRect()
    230 {
     227    pageView->d->setDrawingAreaSize(viewSize());
     228}
     229
     230PassOwnPtr<DrawingAreaProxy> QQuickWebViewPrivate::createDrawingAreaProxy()
     231{
     232    return DrawingAreaProxyImpl::create(webPageProxy());
     233}
     234
     235void QQuickWebViewPrivate::updateVisibleContentRectAndScale()
     236{
     237    DrawingAreaProxy* drawingArea = webPageProxy()->drawingArea();
     238    if (!drawingArea)
     239        return;
     240
    231241    Q_Q(QQuickWebView);
    232242    const QRectF visibleRectInPageViewCoordinates = q->mapRectToItem(pageView.data(), q->boundingRect()).intersected(pageView->boundingRect());
    233243    float scale = pageView->scale();
    234     pageProxy->setVisibleContentRectAndScale(visibleRectInPageViewCoordinates, scale);
     244
     245    QRect alignedVisibleContentRect = visibleRectInPageViewCoordinates.toAlignedRect();
     246    drawingArea->setVisibleContentsRectAndScale(alignedVisibleContentRect, scale);
     247
     248    // FIXME: Once we support suspend and resume, this should be delayed until the page is active if the page is suspended.
     249    webPageProxy()->setFixedVisibleContentRect(alignedVisibleContentRect);
    235250}
    236251
    237252void QQuickWebViewPrivate::_q_viewportTrajectoryVectorChanged(const QPointF& trajectoryVector)
    238253{
    239     pageProxy->setVisibleContentRectTrajectoryVector(trajectoryVector);
     254    DrawingAreaProxy* drawingArea = webPageProxy()->drawingArea();
     255    if (!drawingArea)
     256        return;
     257    drawingArea->setVisibleContentRectTrajectoryVector(trajectoryVector);
    240258}
    241259
     
    258276
    259277    interactionEngine->applyConstraints(computeViewportConstraints());
    260     updateVisibleContentRect();
     278    updateVisibleContentRectAndScale();
    261279}
    262280
  • trunk/Source/WebKit2/UIProcess/API/qt/qquickwebview_p_p.h

    r102680 r102765  
    2222#define qquickwebview_p_p_h
    2323
     24#include "DrawingAreaProxy.h"
    2425#include "QtPageClient.h"
    25 #include "QtWebPageEventHandler.h"
    2626#include "QtViewportInteractionEngine.h"
    2727#include "QtWebPageLoadClient.h"
     
    5151    Q_DECLARE_PUBLIC(QQuickWebView)
    5252    friend class QQuickWebViewExperimental;
     53    friend class QQuickWebPage;
    5354
    5455public:
     
    7576    QtViewportInteractionEngine::Constraints computeViewportConstraints();
    7677
    77     void updateVisibleContentRect();
     78    void updateVisibleContentRectAndScale();
    7879
    7980    void _q_suspend();
     
    101102    void processDidCrash();
    102103    void didRelaunchProcess();
    103 
     104    PassOwnPtr<DrawingAreaProxy> createDrawingAreaProxy();
    104105
    105106private:
     
    136137    QtWebUndoController undoController;
    137138
    138     QScopedPointer<QtWebPageEventHandler> eventHandler;
    139 
    140139    QScopedPointer<QtWebPageLoadClient> pageLoadClient;
    141140    QScopedPointer<QtWebPagePolicyClient> pagePolicyClient;
  • trunk/Source/WebKit2/UIProcess/qt/QtPageClient.cpp

    r102680 r102765  
    5353PassOwnPtr<DrawingAreaProxy> QtPageClient::createDrawingAreaProxy()
    5454{
    55     return m_qtWebPageProxy->createDrawingAreaProxy();
     55    return QQuickWebViewPrivate::get(m_webView)->createDrawingAreaProxy();
    5656}
    5757
  • trunk/Source/WebKit2/UIProcess/qt/QtPageClient.h

    r102680 r102765  
    5050    virtual void processDidCrash();
    5151    virtual void didRelaunchProcess();
     52    virtual PassOwnPtr<DrawingAreaProxy> createDrawingAreaProxy();
    5253
    53     virtual PassOwnPtr<DrawingAreaProxy> createDrawingAreaProxy();
    5454    virtual void displayView();
    5555    virtual void scrollView(const WebCore::IntRect& scrollRect, const WebCore::IntSize& scrollOffset);
     
    8686    virtual void didChangeScrollbarsForMainFrame() const { }
    8787    virtual void flashBackingStoreUpdates(const Vector<WebCore::IntRect>& updateRects);
    88     virtual void findStringInCustomRepresentation(const String&, FindOptions, unsigned maxMatchCount) { }
    89     virtual void countStringMatchesInCustomRepresentation(const String&, FindOptions, unsigned maxMatchCount) { }
     88    virtual void findStringInCustomRepresentation(const String&, WebKit::FindOptions, unsigned maxMatchCount) { }
     89    virtual void countStringMatchesInCustomRepresentation(const String&, WebKit::FindOptions, unsigned maxMatchCount) { }
    9090    virtual void didFindZoomableArea(const WebCore::IntPoint&, const WebCore::IntRect&);
    9191    virtual void focusEditableArea(const WebCore::IntRect&, const WebCore::IntRect&);
  • trunk/Source/WebKit2/UIProcess/qt/QtWebPageEventHandler.cpp

    r102579 r102765  
    2222#include "QtWebPageEventHandler.h"
    2323
    24 #include "qquickwebview_p.h"
    2524#include "NativeWebKeyboardEvent.h"
    2625#include "NativeWebMouseEvent.h"
    2726#include "NativeWebWheelEvent.h"
    2827#include "QtViewportInteractionEngine.h"
     28#include "qquickwebpage_p.h"
    2929#include <QDrag>
    3030#include <QGraphicsSceneMouseEvent>
     
    8181}
    8282
    83 QtWebPageEventHandler::QtWebPageEventHandler(WKPageRef pageRef, QQuickWebView* qmlWebView, WebKit::QtViewportInteractionEngine* viewportInteractionEngine)
     83QtWebPageEventHandler::QtWebPageEventHandler(WKPageRef pageRef, QQuickWebPage* qmlWebPage)
    8484    : m_webPageProxy(toImpl(pageRef))
    85     , m_interactionEngine(viewportInteractionEngine)
    8685    , m_panGestureRecognizer(this)
    8786    , m_pinchGestureRecognizer(this)
    8887    , m_tapGestureRecognizer(this)
    89     , m_webView(qmlWebView)
     88    , m_webPage(qmlWebPage)
    9089    , m_previousClickButton(Qt::NoButton)
    9190    , m_clickCount(0)
     
    415414    Qt::DropAction actualDropAction = Qt::IgnoreAction;
    416415
    417     if (QWindow* window = m_webView->canvas()) {
     416    if (QWindow* window = m_webPage->canvas()) {
    418417        QDrag* drag = new QDrag(window);
    419418        drag->setPixmap(QPixmap::fromImage(dragQImage));
  • trunk/Source/WebKit2/UIProcess/qt/QtWebPageEventHandler.h

    r102579 r102765  
    3232#include <WKPage.h>
    3333
    34 class QQuickWebView;
     34class QQuickWebPage;
    3535
    3636using namespace WebKit;
     
    4040
    4141public:
    42     QtWebPageEventHandler(WKPageRef, QQuickWebView*, WebKit::QtViewportInteractionEngine* = 0);
     42    QtWebPageEventHandler(WKPageRef, QQuickWebPage*);
    4343    ~QtWebPageEventHandler();
    4444
     
    6565    QtPinchGestureRecognizer m_pinchGestureRecognizer;
    6666    QtTapGestureRecognizer m_tapGestureRecognizer;
    67     QQuickWebView* m_webView;
     67    QQuickWebPage* m_webPage;
    6868
    6969private:
  • trunk/Source/WebKit2/UIProcess/qt/QtWebPageProxy.cpp

    r102680 r102765  
    3434
    3535#include "DownloadProxy.h"
    36 #include "DrawingAreaProxyImpl.h"
    37 #include "LayerTreeHostProxy.h"
    3836#include "QtDownloadManager.h"
    3937#include "QtPageClient.h"
    40 #include "QtWebPageEventHandler.h"
    4138#include "WebBackForwardList.h"
    42 #include "WebContextMenuProxyQt.h"
    4339#include "WKStringQt.h"
    4440#include <WebKit2/WKFrame.h>
     
    5854}
    5955
    60 void QtWebPageProxy::init(QtWebPageEventHandler* eventHandler)
     56void QtWebPageProxy::init()
    6157{
    62     m_eventHandler = eventHandler;
    6358    m_webPageProxy->initializeWebPage();
    6459}
     
    147142}
    148143
    149 void QtWebPageProxy::setDrawingAreaSize(const QSize& size)
    150 {
    151     if (!m_webPageProxy->drawingArea())
    152         return;
    153 
    154     m_webPageProxy->drawingArea()->setSize(IntSize(size), IntSize());
    155 }
    156 
    157144qreal QtWebPageProxy::textZoomFactor() const
    158145{
     
    208195}
    209196
    210 PassOwnPtr<DrawingAreaProxy> QtWebPageProxy::createDrawingAreaProxy()
    211 {
    212     return DrawingAreaProxyImpl::create(m_webPageProxy.get());
    213 }
    214 
    215 void QtWebPageProxy::renderToCurrentGLContext(const TransformationMatrix& transform, float opacity)
    216 {
    217     DrawingAreaProxy* drawingArea = m_webPageProxy->drawingArea();
    218     if (drawingArea)
    219         drawingArea->paintToCurrentGLContext(transform, opacity);
    220 }
    221 
    222 void QtWebPageProxy::purgeGLResources()
    223 {
    224     DrawingAreaProxy* drawingArea = m_webPageProxy->drawingArea();
    225     if (drawingArea && drawingArea->layerTreeHostProxy())
    226         drawingArea->layerTreeHostProxy()->purgeGLResources();
    227 }
    228 
    229 void QtWebPageProxy::setVisibleContentRectAndScale(const QRectF& visibleContentRect, float scale)
    230 {
    231     if (!m_webPageProxy->drawingArea())
    232         return;
    233 
    234     QRect alignedVisibleContentRect = visibleContentRect.toAlignedRect();
    235     m_webPageProxy->drawingArea()->setVisibleContentsRectAndScale(alignedVisibleContentRect, scale);
    236 
    237     // FIXME: Once we support suspend and resume, this should be delayed until the page is active if the page is suspended.
    238     m_webPageProxy->setFixedVisibleContentRect(alignedVisibleContentRect);
    239 }
    240 
    241 void QtWebPageProxy::setVisibleContentRectTrajectoryVector(const QPointF& trajectoryVector)
    242 {
    243     if (!m_webPageProxy->drawingArea())
    244         return;
    245 
    246     m_webPageProxy->drawingArea()->setVisibleContentRectTrajectoryVector(trajectoryVector);
    247 }
    248 
    249197#include "moc_QtWebPageProxy.cpp"
  • trunk/Source/WebKit2/UIProcess/qt/QtWebPageProxy.h

    r102680 r102765  
    2222#define QtWebPageProxy_h
    2323
    24 #include "DrawingAreaProxy.h"
    2524#include "QtWebContext.h"
    2625#include "WebPageProxy.h"
     
    3231class QQuickWebPage;
    3332class QQuickWebView;
    34 class QtWebPageEventHandler;
    3533class QWebDownloadItem;
    3634class QWebNavigationHistory;
     
    5149    ~QtWebPageProxy();
    5250
    53     PassOwnPtr<DrawingAreaProxy> createDrawingAreaProxy();
    54 
    5551    void goBackTo(int index);
    5652    void goForwardTo(int index);
    5753
    5854    WKPageRef pageRef() const;
    59 
    60     void setDrawingAreaSize(const QSize&);
    6155
    6256    QWebPreferences* preferences() const;
     
    7670    void setPageAndTextZoomFactors(qreal pageZoomFactor, qreal textZoomFactor);
    7771
    78     void setVisibleContentRectAndScale(const QRectF&, float);
    79     void setVisibleContentRectTrajectoryVector(const QPointF&);
    80     void renderToCurrentGLContext(const WebCore::TransformationMatrix&, float);
    81     void purgeGLResources();
    82 
    8372    QWebNavigationHistory* navigationHistory() const;
    8473
     
    8978
    9079    void handleDownloadRequest(DownloadProxy*);
    91     void init(QtWebPageEventHandler*);
     80    void init();
    9281
    9382    void showContextMenu(QSharedPointer<QMenu>);
    9483    void hideContextMenu();
    95 
    96     QtWebPageEventHandler* eventHandler() { return m_eventHandler; }
    9784
    9885public Q_SLOTS:
     
    115102
    116103    QSharedPointer<QMenu> activeMenu;
    117     QtWebPageEventHandler* m_eventHandler;
    118104};
    119105
Note: See TracChangeset for help on using the changeset viewer.