[Qt][WK2] Fix build after r156688.

https://bugs.webkit.org/show_bug.cgi?id=122153

Patch by Gabor Abraham <abrhm@inf.u-szeged.hu> on 2013-10-01
Reviewed by Allan Sandfeld Jensen.

* Shared/qt/ShareableBitmapQt.cpp:
(WebKit::ShareableBitmap::createGraphicsContext):
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::createDrawingAreaProxy):
* UIProcess/API/qt/qquickwebview_p_p.h:
* UIProcess/API/qt/raw/qrawwebview.cpp:
(QRawWebViewPrivate::createDrawingAreaProxy):
* UIProcess/API/qt/raw/qrawwebview_p_p.h:
* UIProcess/qt/QtPageClient.cpp:
(WebKit::QtPageClient::createDrawingAreaProxy):
* UIProcess/qt/QtPageClient.h:
* WebProcess/WebCoreSupport/qt/WebDragClientQt.cpp:
(WebKit::convertQPixmapToShareableBitmap):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156706 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 130ab673
2013-10-01 Gabor Abraham <abrhm@inf.u-szeged.hu>
[Qt][WK2] Fix build after r156688.
https://bugs.webkit.org/show_bug.cgi?id=122153
Reviewed by Allan Sandfeld Jensen.
* Shared/qt/ShareableBitmapQt.cpp:
(WebKit::ShareableBitmap::createGraphicsContext):
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::createDrawingAreaProxy):
* UIProcess/API/qt/qquickwebview_p_p.h:
* UIProcess/API/qt/raw/qrawwebview.cpp:
(QRawWebViewPrivate::createDrawingAreaProxy):
* UIProcess/API/qt/raw/qrawwebview_p_p.h:
* UIProcess/qt/QtPageClient.cpp:
(WebKit::QtPageClient::createDrawingAreaProxy):
* UIProcess/qt/QtPageClient.h:
* WebProcess/WebCoreSupport/qt/WebDragClientQt.cpp:
(WebKit::convertQPixmapToShareableBitmap):
2013-09-30 Ryuan Choi <ryuan.choi@samsung.com>
Build fix for EFL, Qt, Gtk port after r156688
......
......@@ -56,15 +56,15 @@ PassRefPtr<Image> ShareableBitmap::createImage()
return BitmapImage::create(pixmap);
}
PassOwnPtr<GraphicsContext> ShareableBitmap::createGraphicsContext()
std::unique_ptr<GraphicsContext> ShareableBitmap::createGraphicsContext()
{
// FIXME: Should this be OwnPtr<QImage>?
QImage* image = new QImage(createQImage());
QPainter* painter = new QPainter(image);
painter->setRenderHint(QPainter::SmoothPixmapTransform, true);
OwnPtr<GraphicsContext> context = adoptPtr(new GraphicsContext(painter));
auto context = std::make_unique<GraphicsContext>(painter);
context->takeOwnershipOfPlatformContext();
return context.release();
return context;
}
void ShareableBitmap::paint(GraphicsContext& context, const IntPoint& dstPoint, const IntRect& srcRect)
......
......@@ -635,9 +635,9 @@ void QQuickWebViewPrivate::processDidBecomeResponsive(WKPageRef, const void* cli
emit q->experimental()->processDidBecomeResponsive();
}
OwnPtr<DrawingAreaProxy> QQuickWebViewPrivate::createDrawingAreaProxy()
std::unique_ptr<DrawingAreaProxy> QQuickWebViewPrivate::createDrawingAreaProxy()
{
return createOwned<WebKit::DrawingAreaProxyImpl>(webPageProxy.get());
return std::make_unique<WebKit::DrawingAreaProxyImpl>(webPageProxy.get());
}
void QQuickWebViewPrivate::handleDownloadRequest(DownloadProxy* download)
......
......@@ -133,7 +133,7 @@ public:
virtual void pageDidRequestScroll(const QPoint& pos) { }
void processDidCrash();
void didRelaunchProcess();
OwnPtr<WebKit::DrawingAreaProxy> createDrawingAreaProxy();
std::unique_ptr<WebKit::DrawingAreaProxy> createDrawingAreaProxy();
void handleDownloadRequest(WebKit::DownloadProxy*);
void didReceiveMessageFromNavigatorQtObject(WKStringRef message);
......
......@@ -239,9 +239,9 @@ void QRawWebViewPrivate::doneWithKeyEvent(const WebKit::NativeWebKeyboardEvent&
m_client->doneWithKeyEvent(event.nativeEvent(), wasEventHandled);
}
OwnPtr<WebKit::DrawingAreaProxy> QRawWebViewPrivate::createDrawingAreaProxy()
std::unique_ptr<WebKit::DrawingAreaProxy> QRawWebViewPrivate::createDrawingAreaProxy()
{
return createOwned<WebKit::DrawingAreaProxyImpl>(m_webPageProxy.get());
return std::make_unique<WebKit::DrawingAreaProxyImpl>(m_webPageProxy.get());
}
QRawWebViewPrivate::QRawWebViewPrivate(WebKit::WebContext* context, WebKit::WebPageGroup* pageGroup, QRawWebViewClient* client)
......
......@@ -94,7 +94,7 @@ public:
// PageClient
virtual OwnPtr<WebKit::DrawingAreaProxy> createDrawingAreaProxy();
virtual std::unique_ptr<WebKit::DrawingAreaProxy> createDrawingAreaProxy();
virtual void pageDidRequestScroll(const WebCore::IntPoint& pos);
virtual void processDidCrash();
......
......@@ -63,7 +63,7 @@ void QtPageClient::initialize(QQuickWebView* webView, QtWebPageEventHandler* eve
m_undoController = undoController;
}
OwnPtr<DrawingAreaProxy> QtPageClient::createDrawingAreaProxy()
std::unique_ptr<DrawingAreaProxy> QtPageClient::createDrawingAreaProxy()
{
return QQuickWebViewPrivate::get(m_webView)->createDrawingAreaProxy();
}
......
......@@ -52,7 +52,7 @@ public:
virtual void didChangeViewportProperties(const WebCore::ViewportAttributes&);
virtual void processDidCrash();
virtual void didRelaunchProcess();
virtual OwnPtr<DrawingAreaProxy> createDrawingAreaProxy();
virtual std::unique_ptr<DrawingAreaProxy> createDrawingAreaProxy();
virtual void handleDownloadRequest(DownloadProxy*);
virtual void handleApplicationSchemeRequest(PassRefPtr<QtRefCountedNetworkRequestData>);
virtual void handleAuthenticationRequiredRequest(const String& hostname, const String& realm, const String& prefilledUsername, String& username, String& password);
......
......@@ -45,7 +45,7 @@ static PassRefPtr<ShareableBitmap> convertQPixmapToShareableBitmap(QPixmap* pixm
return 0;
RefPtr<ShareableBitmap> bitmap = ShareableBitmap::createShareable(IntSize(pixmap->size()), ShareableBitmap::SupportsAlpha);
OwnPtr<GraphicsContext> graphicsContext = bitmap->createGraphicsContext();
auto graphicsContext = bitmap->createGraphicsContext();
graphicsContext->platformContext()->drawPixmap(0, 0, *pixmap);
return bitmap.release();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment