summaryrefslogtreecommitdiff
path: root/Source/WebKit2/UIProcess/API/qt/raw
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebKit2/UIProcess/API/qt/raw')
-rw-r--r--Source/WebKit2/UIProcess/API/qt/raw/qrawwebview.cpp43
-rw-r--r--Source/WebKit2/UIProcess/API/qt/raw/qrawwebview_p.h6
-rw-r--r--Source/WebKit2/UIProcess/API/qt/raw/qrawwebview_p_p.h13
3 files changed, 23 insertions, 39 deletions
diff --git a/Source/WebKit2/UIProcess/API/qt/raw/qrawwebview.cpp b/Source/WebKit2/UIProcess/API/qt/raw/qrawwebview.cpp
index 3f9c3b2ae..89f729705 100644
--- a/Source/WebKit2/UIProcess/API/qt/raw/qrawwebview.cpp
+++ b/Source/WebKit2/UIProcess/API/qt/raw/qrawwebview.cpp
@@ -20,10 +20,9 @@
#include "config.h"
#include "qrawwebview_p.h"
+#include "CoordinatedLayerTreeHostProxy.h"
#include "Cursor.h"
#include "DrawingAreaProxyImpl.h"
-#include "LayerTreeCoordinatorProxy.h"
-#include "LayerTreeRenderer.h"
#include "NativeWebKeyboardEvent.h"
#include "NativeWebMouseEvent.h"
#if ENABLE(TOUCH_EVENTS)
@@ -35,13 +34,9 @@
#include "WebPageGroup.h"
#include "WebPreferences.h"
#include "qrawwebview_p_p.h"
+#include <WebCore/CoordinatedGraphicsScene.h>
#include <WebKit2/qrawwebview_p.h>
-void QRawWebViewPrivate::didReceiveMessageFromNavigatorQtObject(const String& message)
-{
- notImplemented();
-}
-
void QRawWebViewPrivate::didChangeViewportProperties(const WebCore::ViewportAttributes& attr)
{
notImplemented();
@@ -195,10 +190,10 @@ PassRefPtr<WebKit::WebContextMenuProxy> QRawWebViewPrivate::createContextMenuPro
}
#if ENABLE(INPUT_TYPE_COLOR)
-PassRefPtr<WebKit::WebColorChooserProxy> QRawWebViewPrivate::createColorChooserProxy(WebKit::WebPageProxy*, const WebCore::Color& intialColor, const WebCore::IntRect&)
+PassRefPtr<WebKit::WebColorPicker> QRawWebViewPrivate::createColorPicker(WebKit::WebPageProxy*, const WebCore::Color& intialColor, const WebCore::IntRect&)
{
notImplemented();
- return PassRefPtr<WebKit::WebColorChooserProxy>();
+ return PassRefPtr<WebKit::WebColorPicker>();
}
#endif
@@ -329,7 +324,7 @@ void QRawWebView::setActive(bool active)
{
d->m_active = active;
d->m_webPageProxy->viewStateDidChange(WebKit::WebPageProxy::ViewWindowIsActive);
- layerTreeRenderer()->setActive(active);
+ coordinatedGraphicsScene()->setActive(active);
}
QSize QRawWebView::size() const
@@ -344,18 +339,12 @@ void QRawWebView::setSize(const QSize& size)
return;
if (d->m_webPageProxy->useFixedLayout())
- d->m_webPageProxy->setViewportSize(size);
- else {
- WebKit::LayerTreeCoordinatorProxy* coordinator = drawingArea->layerTreeCoordinatorProxy();
- if (!coordinator)
- return;
- coordinator->setContentsSize(WebCore::FloatSize(size.width(), size.height()));
- }
+ drawingArea->setSize(size, WebCore::IntSize(), WebCore::IntSize());
d->m_size = size;
- drawingArea->setSize(d->m_size, WebCore::IntSize());
- drawingArea->setVisibleContentsRect(WebCore::IntRect(WebCore::IntPoint(), d->m_size), 1 /*scale*/, WebCore::FloatPoint());
+ drawingArea->setSize(d->m_size, WebCore::IntSize(), WebCore::IntSize());
+ drawingArea->setVisibleContentsRect(WebCore::IntRect(WebCore::IntPoint(), d->m_size), WebCore::FloatPoint());
}
WKPageRef QRawWebView::pageRef()
@@ -363,28 +352,28 @@ WKPageRef QRawWebView::pageRef()
return toAPI(d->m_webPageProxy.get());
}
-WebKit::LayerTreeRenderer* QRawWebView::layerTreeRenderer() const
+WebCore::CoordinatedGraphicsScene* QRawWebView::coordinatedGraphicsScene() const
{
WebKit::DrawingAreaProxy* drawingArea = d->m_webPageProxy->drawingArea();
if (!drawingArea)
return 0;
- WebKit::LayerTreeCoordinatorProxy* layerTreeCoordinatorProxy = drawingArea->layerTreeCoordinatorProxy();
- if (!layerTreeCoordinatorProxy)
+ WebKit::CoordinatedLayerTreeHostProxy* coordinatedLayerTreeHostProxy = drawingArea->coordinatedLayerTreeHostProxy();
+ if (!coordinatedLayerTreeHostProxy)
return 0;
- return layerTreeCoordinatorProxy->layerTreeRenderer();
+ return coordinatedLayerTreeHostProxy->coordinatedGraphicsScene();
}
void QRawWebView::paint(const QMatrix4x4& transform, float opacity, unsigned paintFlags)
{
- WebKit::LayerTreeRenderer* renderer = layerTreeRenderer();
- if (!renderer)
+ WebCore::CoordinatedGraphicsScene* scene = coordinatedGraphicsScene();
+ if (!scene)
return;
- renderer->setActive(true);
+ scene->setActive(true);
WebCore::FloatRect rect(0, 0, d->m_size.width(), d->m_size.height());
- renderer->paintToCurrentGLContext(transform, opacity, transform.mapRect(rect), paintFlags);
+ scene->paintToCurrentGLContext(transform, opacity, transform.mapRect(rect), paintFlags);
}
void QRawWebView::sendKeyEvent(QKeyEvent* event)
diff --git a/Source/WebKit2/UIProcess/API/qt/raw/qrawwebview_p.h b/Source/WebKit2/UIProcess/API/qt/raw/qrawwebview_p.h
index 015815ad8..4ae3e5e53 100644
--- a/Source/WebKit2/UIProcess/API/qt/raw/qrawwebview_p.h
+++ b/Source/WebKit2/UIProcess/API/qt/raw/qrawwebview_p.h
@@ -47,8 +47,8 @@ QT_END_NAMESPACE
class QRawWebViewPrivate;
-namespace WebKit {
-class LayerTreeRenderer;
+namespace WebCore {
+class CoordinatedGraphicsScene;
}
class QRawWebViewClient {
@@ -101,7 +101,7 @@ public:
void sendTouchEvent(QTouchEvent*);
private:
- WebKit::LayerTreeRenderer* layerTreeRenderer() const;
+ WebCore::CoordinatedGraphicsScene* coordinatedGraphicsScene() const;
QRawWebViewPrivate* d;
};
diff --git a/Source/WebKit2/UIProcess/API/qt/raw/qrawwebview_p_p.h b/Source/WebKit2/UIProcess/API/qt/raw/qrawwebview_p_p.h
index 7bc6f1162..58d6b1390 100644
--- a/Source/WebKit2/UIProcess/API/qt/raw/qrawwebview_p_p.h
+++ b/Source/WebKit2/UIProcess/API/qt/raw/qrawwebview_p_p.h
@@ -37,17 +37,11 @@ public:
virtual void pageClosed() { }
+ virtual void preferencesDidChange() { }
+
virtual void setFindIndicator(PassRefPtr<WebKit::FindIndicator>, bool fadeOut, bool animate) { }
- virtual void didCommitLoadForMainFrame(bool useCustomRepresentation) { }
- virtual void didFinishLoadingDataForCustomRepresentation(const String& suggestedFilename, const CoreIPC::DataReference&) { }
- virtual double customRepresentationZoomFactor() { return 1; }
- virtual void setCustomRepresentationZoomFactor(double) { }
- virtual void didChangeScrollbarsForMainFrame() const { }
- virtual void findStringInCustomRepresentation(const String&, WebKit::FindOptions, unsigned maxMatchCount) { }
- virtual void countStringMatchesInCustomRepresentation(const String&, WebKit::FindOptions, unsigned maxMatchCount) { }
virtual void clearAllEditCommands() { }
- virtual void didReceiveMessageFromNavigatorQtObject(const String& message);
virtual void didChangeViewportProperties(const WebCore::ViewportAttributes& attr);
virtual void handleDownloadRequest(WebKit::DownloadProxy* download);
@@ -76,6 +70,7 @@ public:
virtual void doneWithGestureEvent(const WebKit::WebGestureEvent& event, bool wasEventHandled);
#endif
virtual void displayView();
+ virtual bool canScrollView() { return false; }
virtual void scrollView(const WebCore::IntRect& scrollRect, const WebCore::IntSize& scrollOffset);
virtual void flashBackingStoreUpdates(const Vector<WebCore::IntRect>&);
@@ -91,7 +86,7 @@ public:
virtual PassRefPtr<WebKit::WebContextMenuProxy> createContextMenuProxy(WebKit::WebPageProxy* webPageProxy);
#if ENABLE(INPUT_TYPE_COLOR)
- virtual PassRefPtr<WebKit::WebColorChooserProxy> createColorChooserProxy(WebKit::WebPageProxy*, const WebCore::Color& intialColor, const WebCore::IntRect&);
+ virtual PassRefPtr<WebKit::WebColorPicker> createColorPicker(WebKit::WebPageProxy*, const WebCore::Color& intialColor, const WebCore::IntRect&);
#endif
QRawWebViewPrivate(WebKit::WebContext*, WebKit::WebPageGroup*, QRawWebViewClient*);