Diff
Modified: trunk/Source/WebKit2/ChangeLog (102679 => 102680)
--- trunk/Source/WebKit2/ChangeLog 2011-12-13 15:19:50 UTC (rev 102679)
+++ trunk/Source/WebKit2/ChangeLog 2011-12-13 15:47:27 UTC (rev 102680)
@@ -1,3 +1,41 @@
+2011-12-13 Caio Marcelo de Oliveira Filho <caio.olive...@openbossa.org>
+
+ [Qt][WK2] Make QtPageClient dispatch directly to WebView when possible
+ https://bugs.webkit.org/show_bug.cgi?id=74407
+
+ Reviewed by Simon Hausmann.
+
+ * UIProcess/API/qt/qquickwebview.cpp:
+ (QQuickWebViewPrivate::QQuickWebViewPrivate):
+ (QQuickWebViewPrivate::~QQuickWebViewPrivate):
+ (QQuickWebViewPrivate::initialize):
+ (QQuickWebViewPrivate::pageDidRequestScroll):
+ (QQuickWebViewPrivate::processDidCrash):
+ (QQuickWebViewPrivate::didRelaunchProcess):
+ (QQuickWebViewPrivate::viewSize):
+ (QQuickWebViewPrivate::didReceiveMessageFromNavigatorQtObject):
+ (QQuickWebViewExperimental::QQuickWebViewExperimental):
+ (QQuickWebView::QQuickWebView):
+ * UIProcess/API/qt/qquickwebview_p_p.h:
+ * UIProcess/qt/QtPageClient.cpp:
+ (QtPageClient::QtPageClient):
+ (QtPageClient::setViewNeedsDisplay):
+ (QtPageClient::pageDidRequestScroll):
+ (QtPageClient::processDidCrash):
+ (QtPageClient::didRelaunchProcess):
+ (QtPageClient::didChangeContentsSize):
+ (QtPageClient::didChangeViewportProperties):
+ (QtPageClient::createPopupMenuProxy):
+ (QtPageClient::didReceiveMessageFromNavigatorQtObject):
+ (QtPageClient::viewSize):
+ (QtPageClient::isViewFocused):
+ (QtPageClient::isViewVisible):
+ * UIProcess/qt/QtPageClient.h:
+ (QtPageClient::initialize):
+ * UIProcess/qt/QtWebPageProxy.cpp:
+ (QtWebPageProxy::QtWebPageProxy):
+ * UIProcess/qt/QtWebPageProxy.h:
+
2011-12-13 Carlos Garcia Campos <cgar...@igalia.com>
[GTK] Add support for _javascript_ dialogs in WebKit2 GTK+ API
Modified: trunk/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp (102679 => 102680)
--- trunk/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp 2011-12-13 15:19:50 UTC (rev 102679)
+++ trunk/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp 2011-12-13 15:47:27 UTC (rev 102680)
@@ -36,11 +36,10 @@
#include <_javascript_Core/InitializeThreading.h>
#include <QFileDialog>
-#include <QInputDialog>
#include <QtQuick/QQuickCanvas>
#include <WKOpenPanelResultListener.h>
-QQuickWebViewPrivate::QQuickWebViewPrivate(QQuickWebView* viewport, WKContextRef contextRef, WKPageGroupRef pageGroupRef)
+QQuickWebViewPrivate::QQuickWebViewPrivate(QQuickWebView* viewport)
: q_ptr(viewport)
, alertDialog(0)
, confirmDialog(0)
@@ -51,14 +50,21 @@
, pageIsSuspended(false)
{
viewport->setFlags(QQuickItem::ItemClipsChildrenToShape);
-
QObject::connect(viewport, SIGNAL(visibleChanged()), viewport, SLOT(_q_onVisibleChanged()));
pageView.reset(new QQuickWebPage(viewport));
+}
- pageClient.reset(new QtPageClient());
+QQuickWebViewPrivate::~QQuickWebViewPrivate()
+{
+ if (interactionEngine)
+ interactionEngine->disconnect();
+}
+// Note: we delay this initialization to make sure that QQuickWebView has its d-ptr in-place.
+void QQuickWebViewPrivate::initialize(WKContextRef contextRef, WKPageGroupRef pageGroupRef)
+{
QQuickWebPagePrivate* const pageViewPrivate = pageView.data()->d;
- setPageProxy(new QtWebPageProxy(pageView.data(), q_ptr, pageClient.data(), contextRef, pageGroupRef));
+ setPageProxy(new QtWebPageProxy(q_ptr, &pageClient, contextRef, pageGroupRef));
pageViewPrivate->setPageProxy(pageProxy.data());
pageLoadClient.reset(new QtWebPageLoadClient(pageProxy->pageRef(), q_ptr));
@@ -70,7 +76,7 @@
setUseTraditionalDesktopBehaviour(false);
QWebPreferencesPrivate::get(pageProxy->preferences())->setAttribute(QWebPreferencesPrivate::AcceleratedCompositingEnabled, true);
- pageClient->initialize(pageProxy.data(), eventHandler.data(), &undoController);
+ pageClient.initialize(q_ptr, pageProxy.data(), eventHandler.data(), &undoController);
// Creates a page with the page creation parameters.
pageProxy->init(eventHandler.data());
@@ -79,12 +85,6 @@
_q_onVisibleChanged();
}
-QQuickWebViewPrivate::~QQuickWebViewPrivate()
-{
- if (interactionEngine)
- interactionEngine->disconnect();
-}
-
void QQuickWebViewPrivate::enableMouseEvents()
{
Q_Q(QQuickWebView);
@@ -198,7 +198,7 @@
pageProxy->navigationHistory()->d->reset();
}
-void QQuickWebViewPrivate::scrollPositionRequested(const QPoint& pos)
+void QQuickWebViewPrivate::pageDidRequestScroll(const QPoint& pos)
{
if (useTraditionalDesktopBehaviour)
return;
@@ -211,6 +211,21 @@
interactionEngine->pagePositionRequest(pos);
}
+void QQuickWebViewPrivate::processDidCrash()
+{
+ emit q_ptr->navigationStateChanged();
+ eventHandler->resetGestureRecognizers();
+ WebCore::KURL url(WebCore::ParsedURLString, webPageProxy()->urlAtProcessExit());
+ qWarning("WARNING: The web process experienced a crash on '%s'.", qPrintable(QUrl(url).toString(QUrl::RemoveUserInfo)));
+}
+
+void QQuickWebViewPrivate::didRelaunchProcess()
+{
+ emit q_ptr->navigationStateChanged();
+ qWarning("WARNING: The web process has been successfully restarted.");
+ pageProxy->setDrawingAreaSize(viewSize());
+}
+
void QQuickWebViewPrivate::updateVisibleContentRect()
{
Q_Q(QQuickWebView);
@@ -411,6 +426,19 @@
return toImpl(pageProxy->pageRef());
}
+WebCore::IntSize QQuickWebViewPrivate::viewSize() const
+{
+ return WebCore::IntSize(pageView->width(), pageView->height());
+}
+
+void QQuickWebViewPrivate::didReceiveMessageFromNavigatorQtObject(const String& message)
+{
+ QVariantMap variantMap;
+ variantMap.insert(QLatin1String("data"), QString(message));
+ variantMap.insert(QLatin1String("origin"), q_ptr->url());
+ emit q_ptr->experimental()->messageReceived(variantMap);
+}
+
/*!
\qmlsignal WebView::onNavigationRequested(request)
@@ -448,8 +476,6 @@
, q_ptr(webView)
, d_ptr(webView->d_ptr.data())
{
- Q_D(QQuickWebView);
- QObject::connect(d->pageProxy.data(), SIGNAL(receivedMessageFromNavigatorQtObject(QVariantMap)), this, SIGNAL(messageReceived(QVariantMap)));
}
QQuickWebViewExperimental::~QQuickWebViewExperimental()
@@ -559,14 +585,17 @@
, m_experimental(new QQuickWebViewExperimental(this))
{
Q_D(QQuickWebView);
+ d->initialize();
d->initializeTouch(this);
}
QQuickWebView::QQuickWebView(WKContextRef contextRef, WKPageGroupRef pageGroupRef, QQuickItem* parent)
: QQuickItem(parent)
- , d_ptr(new QQuickWebViewPrivate(this, contextRef, pageGroupRef))
+ , d_ptr(new QQuickWebViewPrivate(this))
, m_experimental(new QQuickWebViewExperimental(this))
{
+ Q_D(QQuickWebView);
+ d->initialize(contextRef, pageGroupRef);
}
QQuickWebView::~QQuickWebView()
Modified: trunk/Source/WebKit2/UIProcess/API/qt/qquickwebview_p_p.h (102679 => 102680)
--- trunk/Source/WebKit2/UIProcess/API/qt/qquickwebview_p_p.h 2011-12-13 15:19:50 UTC (rev 102679)
+++ trunk/Source/WebKit2/UIProcess/API/qt/qquickwebview_p_p.h 2011-12-13 15:47:27 UTC (rev 102680)
@@ -54,9 +54,12 @@
public:
static QQuickWebViewPrivate* get(QQuickWebView* q) { return q->d_ptr.data(); }
- QQuickWebViewPrivate(QQuickWebView* viewport, WKContextRef contextRef = 0, WKPageGroupRef pageGroupRef = 0);
- virtual ~QQuickWebViewPrivate();
+ QQuickWebViewPrivate(QQuickWebView* viewport);
+ virtual ~QQuickWebViewPrivate();
+
+ void initialize(WKContextRef contextRef = 0, WKPageGroupRef pageGroupRef = 0);
void setPageProxy(QtWebPageProxy*);
+
void initializeTouch(QQuickWebView* viewport);
void initializeDesktop(QQuickWebView* viewport);
void enableMouseEvents();
@@ -65,11 +68,9 @@
void loadDidCommit();
void didFinishFirstNonEmptyLayout();
- void didChangeContentsSize(const QSize& newSize);
void didChangeViewportProperties(const WebCore::ViewportArguments& args);
void didChangeBackForwardList();
- void scrollPositionRequested(const QPoint& pos);
void updateViewportSize();
QtViewportInteractionEngine::Constraints computeViewportConstraints();
@@ -92,6 +93,15 @@
WebKit::WebPageProxy* webPageProxy() const;
+ // PageClient.
+ WebCore::IntSize viewSize() const;
+ void didReceiveMessageFromNavigatorQtObject(const String& message);
+ void pageDidRequestScroll(const QPoint& pos);
+ void didChangeContentsSize(const QSize& newSize);
+ void processDidCrash();
+ void didRelaunchProcess();
+
+
private:
// This class is responsible for collecting and applying all properties
// on the viewport item, when transitioning from page A to page B is finished.
@@ -122,9 +132,9 @@
QPoint position;
};
+ QtPageClient pageClient;
QtWebUndoController undoController;
- QScopedPointer<QtPageClient> pageClient;
QScopedPointer<QtWebPageEventHandler> eventHandler;
QScopedPointer<QtWebPageLoadClient> pageLoadClient;
@@ -137,8 +147,6 @@
QQuickWebView* q_ptr;
QScopedPointer<QtWebPageProxy> pageProxy;
- OwnPtr<QWebNavigationHistory> navigationHistory;
-
QDeclarativeComponent* alertDialog;
QDeclarativeComponent* confirmDialog;
QDeclarativeComponent* promptDialog;
Modified: trunk/Source/WebKit2/UIProcess/qt/QtPageClient.cpp (102679 => 102680)
--- trunk/Source/WebKit2/UIProcess/qt/QtPageClient.cpp 2011-12-13 15:19:50 UTC (rev 102679)
+++ trunk/Source/WebKit2/UIProcess/qt/QtPageClient.cpp 2011-12-13 15:47:27 UTC (rev 102680)
@@ -26,8 +26,10 @@
#include "QtWebUndoController.h"
#include "WebContextMenuProxyQt.h"
#include "WebEditCommandProxy.h"
+#include "WebPopupMenuProxyQt.h"
+#include "qquickwebview_p.h"
+#include "qquickwebview_p_p.h"
#include <QGuiApplication>
-#include <QUndoStack>
#include <WebCore/Cursor.h>
#include <WebCore/DragData.h>
#include <WebCore/FloatRect.h>
@@ -37,7 +39,10 @@
using namespace WebCore;
QtPageClient::QtPageClient()
- : m_qtWebPageProxy(0)
+ : m_webView(0)
+ , m_qtWebPageProxy(0)
+ , m_eventHandler(0)
+ , m_undoController(0)
{
}
@@ -52,32 +57,32 @@
void QtPageClient::setViewNeedsDisplay(const WebCore::IntRect& rect)
{
- m_qtWebPageProxy->setViewNeedsDisplay(rect);
+ m_webView->page()->update();
}
void QtPageClient::pageDidRequestScroll(const IntPoint& pos)
{
- m_qtWebPageProxy->pageDidRequestScroll(pos);
+ QQuickWebViewPrivate::get(m_webView)->pageDidRequestScroll(pos);
}
void QtPageClient::processDidCrash()
{
- m_qtWebPageProxy->processDidCrash();
+ QQuickWebViewPrivate::get(m_webView)->processDidCrash();
}
void QtPageClient::didRelaunchProcess()
{
- m_qtWebPageProxy->didRelaunchProcess();
+ QQuickWebViewPrivate::get(m_webView)->didRelaunchProcess();
}
void QtPageClient::didChangeContentsSize(const IntSize& newSize)
{
- m_qtWebPageProxy->didChangeContentsSize(newSize);
+ QQuickWebViewPrivate::get(m_webView)->didChangeContentsSize(newSize);
}
void QtPageClient::didChangeViewportProperties(const WebCore::ViewportArguments& args)
{
- m_qtWebPageProxy->didChangeViewportProperties(args);
+ QQuickWebViewPrivate::get(m_webView)->didChangeViewportProperties(args);
}
void QtPageClient::startDrag(const WebCore::DragData& dragData, PassRefPtr<ShareableBitmap> dragImage)
@@ -148,7 +153,7 @@
PassRefPtr<WebPopupMenuProxy> QtPageClient::createPopupMenuProxy(WebPageProxy* webPageProxy)
{
- return m_qtWebPageProxy->createPopupMenuProxy(webPageProxy);
+ return WebPopupMenuProxyQt::create(toImpl(m_qtWebPageProxy->pageRef()), m_webView);
}
PassRefPtr<WebContextMenuProxy> QtPageClient::createContextMenuProxy(WebPageProxy*)
@@ -175,7 +180,7 @@
void QtPageClient::didReceiveMessageFromNavigatorQtObject(const String& message)
{
- m_qtWebPageProxy->didReceiveMessageFromNavigatorQtObject(message);
+ QQuickWebViewPrivate::get(m_webView)->didReceiveMessageFromNavigatorQtObject(message);
}
#if ENABLE(TOUCH_EVENTS)
@@ -198,7 +203,7 @@
WebCore::IntSize QtPageClient::viewSize()
{
- return m_qtWebPageProxy->viewSize();
+ return QQuickWebViewPrivate::get(m_webView)->viewSize();
}
bool QtPageClient::isViewWindowActive()
@@ -209,18 +214,16 @@
bool QtPageClient::isViewFocused()
{
- if (!m_qtWebPageProxy)
+ if (!m_webView)
return false;
-
- return m_qtWebPageProxy->isViewFocused();
+ return m_webView->hasFocus();
}
bool QtPageClient::isViewVisible()
{
- if (!m_qtWebPageProxy)
+ if (!m_webView)
return false;
-
- return m_qtWebPageProxy->isViewVisible();
+ return m_webView->isVisible() && m_webView->page()->isVisible();
}
bool QtPageClient::isViewInWindow()
Modified: trunk/Source/WebKit2/UIProcess/qt/QtPageClient.h (102679 => 102680)
--- trunk/Source/WebKit2/UIProcess/qt/QtPageClient.h 2011-12-13 15:19:50 UTC (rev 102679)
+++ trunk/Source/WebKit2/UIProcess/qt/QtPageClient.h 2011-12-13 15:47:27 UTC (rev 102680)
@@ -29,6 +29,7 @@
class QtWebPageEventHandler;
class QtWebUndoController;
+class QQuickWebView;
using namespace WebKit;
@@ -37,25 +38,28 @@
QtPageClient();
~QtPageClient();
+ // QQuickWebView.
+ virtual void setViewNeedsDisplay(const WebCore::IntRect&);
+ virtual WebCore::IntSize viewSize();
+ virtual bool isViewFocused();
+ virtual bool isViewVisible();
+ virtual void didReceiveMessageFromNavigatorQtObject(const String&);
+ virtual void pageDidRequestScroll(const WebCore::IntPoint&);
+ virtual void didChangeContentsSize(const WebCore::IntSize&);
+ virtual void didChangeViewportProperties(const WebCore::ViewportArguments&);
+ virtual void processDidCrash();
+ virtual void didRelaunchProcess();
+
virtual PassOwnPtr<DrawingAreaProxy> createDrawingAreaProxy();
- virtual void setViewNeedsDisplay(const WebCore::IntRect&);
virtual void displayView();
virtual void scrollView(const WebCore::IntRect& scrollRect, const WebCore::IntSize& scrollOffset);
- virtual WebCore::IntSize viewSize();
virtual bool isViewWindowActive();
- virtual bool isViewFocused();
- virtual bool isViewVisible();
virtual bool isViewInWindow();
#if USE(ACCELERATED_COMPOSITING)
virtual void enterAcceleratedCompositingMode(const LayerTreeContext&);
virtual void exitAcceleratedCompositingMode();
#endif // USE(ACCELERATED_COMPOSITING)
- virtual void pageDidRequestScroll(const WebCore::IntPoint&);
- virtual void processDidCrash();
virtual void pageClosed() { }
- virtual void didRelaunchProcess();
- virtual void didChangeContentsSize(const WebCore::IntSize&);
- virtual void didChangeViewportProperties(const WebCore::ViewportArguments&);
virtual void startDrag(const WebCore::DragData&, PassRefPtr<ShareableBitmap> dragImage);
virtual void setCursor(const WebCore::Cursor&);
virtual void setCursorHiddenUntilMouseMoves(bool);
@@ -85,21 +89,22 @@
virtual void countStringMatchesInCustomRepresentation(const String&, FindOptions, unsigned maxMatchCount) { }
virtual void didFindZoomableArea(const WebCore::IntPoint&, const WebCore::IntRect&);
virtual void focusEditableArea(const WebCore::IntRect&, const WebCore::IntRect&);
- virtual void didReceiveMessageFromNavigatorQtObject(const String&);
virtual void handleDownloadRequest(DownloadProxy*);
#if ENABLE(TOUCH_EVENTS)
virtual void doneWithTouchEvent(const NativeWebTouchEvent&, bool wasEventHandled);
#endif
- void initialize(QtWebPageProxy* pageProxy, QtWebPageEventHandler* eventHandler, QtWebUndoController* undoController)
+ void initialize(QQuickWebView* webView, QtWebPageProxy* pageProxy, QtWebPageEventHandler* eventHandler, QtWebUndoController* undoController)
{
+ m_webView = webView;
m_eventHandler = eventHandler;
m_qtWebPageProxy = pageProxy;
m_undoController = undoController;
}
private:
+ QQuickWebView* m_webView;
QtWebPageProxy* m_qtWebPageProxy;
QtWebPageEventHandler* m_eventHandler;
QtWebUndoController* m_undoController;
Modified: trunk/Source/WebKit2/UIProcess/qt/QtWebPageProxy.cpp (102679 => 102680)
--- trunk/Source/WebKit2/UIProcess/qt/QtWebPageProxy.cpp 2011-12-13 15:19:50 UTC (rev 102679)
+++ trunk/Source/WebKit2/UIProcess/qt/QtWebPageProxy.cpp 2011-12-13 15:47:27 UTC (rev 102680)
@@ -25,7 +25,6 @@
#include <QtQuick/qquickcanvas.h>
#include "qquickwebview_p.h"
#include "qquickwebview_p_p.h"
-#include "qquickwebpage_p.h"
#include "qwebdownloaditem_p.h"
#include "qwebdownloaditem_p_p.h"
#include "qwebnavigationhistory_p.h"
@@ -41,10 +40,7 @@
#include "QtWebPageEventHandler.h"
#include "WebBackForwardList.h"
#include "WebContextMenuProxyQt.h"
-#include "WebPopupMenuProxyQt.h"
#include "WKStringQt.h"
-#include "WKURLQt.h"
-#include <QUndoStack>
#include <WebKit2/WKFrame.h>
#include <WebKit2/WKPageGroup.h>
#include <WebKit2/WKRetainPtr.h>
@@ -52,11 +48,9 @@
using namespace WebKit;
using namespace WebCore;
-QtWebPageProxy::QtWebPageProxy(QQuickWebPage* qmlWebPage, QQuickWebView* qmlWebView, QtPageClient *pageClient, WKContextRef contextRef, WKPageGroupRef pageGroupRef)
- : m_qmlWebPage(qmlWebPage)
- , m_qmlWebView(qmlWebView)
+QtWebPageProxy::QtWebPageProxy(QQuickWebView* qmlWebView, QtPageClient *pageClient, WKContextRef contextRef, WKPageGroupRef pageGroupRef)
+ : m_qmlWebView(qmlWebView)
, m_context(contextRef ? QtWebContext::create(toImpl(contextRef)) : QtWebContext::defaultContext())
- , m_undoStack(adoptPtr(new QUndoStack(this)))
, m_navigatorQtObjectEnabled(false)
{
m_webPageProxy = m_context->createWebPage(pageClient, toImpl(pageGroupRef));
@@ -106,59 +100,11 @@
activeMenu->hide();
}
-void QtWebPageProxy::setViewNeedsDisplay(const WebCore::IntRect&)
-{
- m_qmlWebPage->update();
-}
-
-WebCore::IntSize QtWebPageProxy::viewSize()
-{
- return WebCore::IntSize(m_qmlWebPage->width(), m_qmlWebPage->height());
-}
-
-bool QtWebPageProxy::isViewFocused()
-{
- return m_qmlWebView->hasFocus();
-}
-
-bool QtWebPageProxy::isViewVisible()
-{
- return m_qmlWebView->isVisible() && m_qmlWebPage->isVisible();
-}
-
-void QtWebPageProxy::pageDidRequestScroll(const IntPoint& pos)
-{
- m_qmlWebView->d_func()->scrollPositionRequested(pos);
-}
-
-void QtWebPageProxy::didChangeContentsSize(const IntSize& newSize)
-{
- m_qmlWebView->d_func()->didChangeContentsSize(newSize);
-}
-
-void QtWebPageProxy::didChangeViewportProperties(const WebCore::ViewportArguments& args)
-{
- m_qmlWebView->d_func()->didChangeViewportProperties(args);
-}
-
-PassRefPtr<WebPopupMenuProxy> QtWebPageProxy::createPopupMenuProxy(WebPageProxy*)
-{
- return WebPopupMenuProxyQt::create(m_webPageProxy.get(), m_qmlWebView);
-}
-
WKPageRef QtWebPageProxy::pageRef() const
{
return toAPI(m_webPageProxy.get());;
}
-void QtWebPageProxy::didReceiveMessageFromNavigatorQtObject(const String& message)
-{
- QVariantMap variantMap;
- variantMap.insert(QLatin1String("data"), QString(message));
- variantMap.insert(QLatin1String("origin"), m_qmlWebView->url());
- emit receivedMessageFromNavigatorQtObject(variantMap);
-}
-
void QtWebPageProxy::goBackTo(int index)
{
m_navigationHistory->d->goBackTo(index);
@@ -169,29 +115,6 @@
m_navigationHistory->d->goForwardTo(index);
}
-void QtWebPageProxy::updateNavigationState()
-{
- emit m_qmlWebView->navigationStateChanged();
-}
-
-void QtWebPageProxy::didRelaunchProcess()
-{
- updateNavigationState();
- qWarning("WARNING: The web process has been successfully restarted.");
- setDrawingAreaSize(viewSize());
-}
-
-void QtWebPageProxy::processDidCrash()
-{
- updateNavigationState();
-
- ASSERT(m_eventHandler);
- m_eventHandler->resetGestureRecognizers();
-
- WebCore::KURL url(WebCore::ParsedURLString, m_webPageProxy->urlAtProcessExit());
- qWarning("WARNING: The web process experienced a crash on '%s'.", qPrintable(QUrl(url).toString(QUrl::RemoveUserInfo)));
-}
-
QWebPreferences* QtWebPageProxy::preferences() const
{
if (!m_preferences)
Modified: trunk/Source/WebKit2/UIProcess/qt/QtWebPageProxy.h (102679 => 102680)
--- trunk/Source/WebKit2/UIProcess/qt/QtWebPageProxy.h 2011-12-13 15:19:50 UTC (rev 102679)
+++ trunk/Source/WebKit2/UIProcess/qt/QtWebPageProxy.h 2011-12-13 15:47:27 UTC (rev 102680)
@@ -23,16 +23,11 @@
#include "DrawingAreaProxy.h"
#include "QtWebContext.h"
-#include "ViewportArguments.h"
#include "WebPageProxy.h"
#include <wtf/RefPtr.h>
#include <QMenu>
#include <QSharedPointer>
-QT_BEGIN_NAMESPACE
-class QUndoStack;
-QT_END_NAMESPACE
-
class QtPageClient;
class QQuickWebPage;
class QQuickWebView;
@@ -52,32 +47,14 @@
Q_OBJECT
public:
- QtWebPageProxy(QQuickWebPage*, QQuickWebView*, QtPageClient*, WKContextRef = 0, WKPageGroupRef = 0);
+ QtWebPageProxy(QQuickWebView*, QtPageClient*, WKContextRef = 0, WKPageGroupRef = 0);
~QtWebPageProxy();
PassOwnPtr<DrawingAreaProxy> createDrawingAreaProxy();
- void setViewNeedsDisplay(const WebCore::IntRect&);
- WebCore::IntSize viewSize();
- bool isViewFocused();
- bool isViewVisible();
-
- void pageDidRequestScroll(const WebCore::IntPoint&);
- void processDidCrash();
- void didRelaunchProcess();
-
- void didChangeContentsSize(const WebCore::IntSize&);
- void didChangeViewportProperties(const WebCore::ViewportArguments&);
-
- PassRefPtr<WebKit::WebPopupMenuProxy> createPopupMenuProxy(WebKit::WebPageProxy*);
-
- void didReceiveMessageFromNavigatorQtObject(const String&);
-
void goBackTo(int index);
void goForwardTo(int index);
- void updateNavigationState();
-
WKPageRef pageRef() const;
void setDrawingAreaSize(const QSize&);
@@ -123,10 +100,8 @@
public:
Q_SIGNAL void zoomableAreaFound(const QRect&);
- Q_SIGNAL void receivedMessageFromNavigatorQtObject(const QVariantMap&);
protected:
- QQuickWebPage* m_qmlWebPage;
QQuickWebView* m_qmlWebView;
RefPtr<WebKit::WebPageProxy> m_webPageProxy;
@@ -136,8 +111,6 @@
mutable OwnPtr<QWebPreferences> m_preferences;
- OwnPtr<QUndoStack> m_undoStack;
-
bool m_navigatorQtObjectEnabled;
QSharedPointer<QMenu> activeMenu;