Diff
Modified: trunk/Source/WebKit2/ChangeLog (156886 => 156887)
--- trunk/Source/WebKit2/ChangeLog 2013-10-04 12:23:15 UTC (rev 156886)
+++ trunk/Source/WebKit2/ChangeLog 2013-10-04 14:16:22 UTC (rev 156887)
@@ -1,3 +1,35 @@
+2013-10-04 Sergio Correia <[email protected]>
+
+ Remove Qt leftovers from WebKit2
+ https://bugs.webkit.org/show_bug.cgi?id=122317
+
+ Reviewed by Anders Carlsson.
+
+ * Platform/CoreIPC/unix/ConnectionUnix.cpp:
+ (CoreIPC::Connection::platformInitialize):
+ (CoreIPC::Connection::platformInvalidate):
+ (CoreIPC::Connection::readyReadHandler):
+ (CoreIPC::Connection::open):
+ (CoreIPC::Connection::sendOutgoingMessage):
+ * Shared/API/c/WKBase.h:
+ * Shared/NativeWebTouchEvent.h:
+ * UIProcess/API/C/WebKit2_C.h:
+ * UIProcess/BackingStore.h:
+ * UIProcess/InspectorServer/WebInspectorServer.cpp:
+ (WebKit::WebInspectorServer::inspectorUrlForPageID):
+ * UIProcess/InspectorServer/WebInspectorServer.h:
+ * UIProcess/InspectorServer/WebSocketServer.cpp:
+ * UIProcess/InspectorServer/WebSocketServer.h:
+ * UIProcess/WebPageProxy.cpp:
+ * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
+ (WebKit::getPluginDisplay):
+ (WebKit::x11Screen):
+ (WebKit::displayDepth):
+ (WebKit::rootWindowID):
+ (WebKit::NetscapePlugin::x11HostDisplay):
+ (WebKit::NetscapePlugin::platformPostInitializeWindowless):
+ (WebKit::NetscapePlugin::platformPaint):
+
2013-10-03 Mark Rowe <[email protected]>
REGRESSION (r155787): WebKitTestRunner rebuilds from scratch when doing an incremental build
Modified: trunk/Source/WebKit2/Platform/CoreIPC/unix/ConnectionUnix.cpp (156886 => 156887)
--- trunk/Source/WebKit2/Platform/CoreIPC/unix/ConnectionUnix.cpp 2013-10-04 12:23:15 UTC (rev 156886)
+++ trunk/Source/WebKit2/Platform/CoreIPC/unix/ConnectionUnix.cpp 2013-10-04 14:16:22 UTC (rev 156887)
@@ -39,10 +39,7 @@
#include <wtf/StdLibExtras.h>
#include <wtf/UniStdExtras.h>
-#if PLATFORM(QT)
-#include <QPointer>
-#include <QSocketNotifier>
-#elif PLATFORM(GTK)
+#if PLATFORM(GTK)
#include <glib.h>
#endif
@@ -126,10 +123,6 @@
m_readBufferSize = 0;
m_fileDescriptors.resize(attachmentMaxAmount);
m_fileDescriptorsSize = 0;
-
-#if PLATFORM(QT)
- m_socketNotifier = 0;
-#endif
}
void Connection::platformInvalidate()
@@ -143,43 +136,14 @@
if (!m_isConnected)
return;
-#if PLATFORM(GTK)
+#if PLATFORM(GTK) || PLATFORM(EFL)
m_connectionQueue->unregisterSocketEventHandler(m_socketDescriptor);
#endif
-#if PLATFORM(QT)
- delete m_socketNotifier;
- m_socketNotifier = 0;
-#endif
-
-#if PLATFORM(EFL)
- m_connectionQueue->unregisterSocketEventHandler(m_socketDescriptor);
-#endif
-
m_socketDescriptor = -1;
m_isConnected = false;
}
-#if PLATFORM(QT)
-class SocketNotifierResourceGuard {
-public:
- SocketNotifierResourceGuard(QSocketNotifier* socketNotifier)
- : m_socketNotifier(socketNotifier)
- {
- m_socketNotifier.data()->setEnabled(false);
- }
-
- ~SocketNotifierResourceGuard()
- {
- if (m_socketNotifier)
- m_socketNotifier.data()->setEnabled(true);
- }
-
-private:
- QPointer<QSocketNotifier> const m_socketNotifier;
-};
-#endif
-
template<class T, class iterator>
class AttachmentResourceGuard {
public:
@@ -371,10 +335,6 @@
void Connection::readyReadHandler()
{
-#if PLATFORM(QT)
- SocketNotifierResourceGuard socketNotifierEnabler(m_socketNotifier);
-#endif
-
while (true) {
size_t fileDescriptorsCount = 0;
size_t bytesToRead = m_readBuffer.size() - m_readBufferSize;
@@ -408,10 +368,6 @@
bool Connection::open()
{
-#if PLATFORM(QT)
- ASSERT(!m_socketNotifier);
-#endif
-
int flags = fcntl(m_socketDescriptor, F_GETFL, 0);
while (fcntl(m_socketDescriptor, F_SETFL, flags | O_NONBLOCK) == -1) {
if (errno != EINTR) {
@@ -421,9 +377,7 @@
}
m_isConnected = true;
-#if PLATFORM(QT)
- m_socketNotifier = m_connectionQueue->registerSocketEventHandler(m_socketDescriptor, QSocketNotifier::Read, WTF::bind(&Connection::readyReadHandler, this));
-#elif PLATFORM(GTK)
+#if PLATFORM(GTK)
m_connectionQueue->registerSocketEventHandler(m_socketDescriptor, G_IO_IN, WTF::bind(&Connection::readyReadHandler, this), WTF::bind(&Connection::connectionDidClose, this));
#elif PLATFORM(EFL)
m_connectionQueue->registerSocketEventHandler(m_socketDescriptor, WTF::bind(&Connection::readyReadHandler, this));
@@ -443,10 +397,6 @@
bool Connection::sendOutgoingMessage(std::unique_ptr<MessageEncoder> encoder)
{
-#if PLATFORM(QT)
- ASSERT(m_socketNotifier);
-#endif
-
COMPILE_ASSERT(sizeof(MessageInfo) + attachmentMaxAmount * sizeof(size_t) <= messageMaxSize, AttachmentsFitToMessageInline);
Vector<Attachment> attachments = encoder->releaseAttachments();
@@ -556,11 +506,4 @@
return true;
}
-#if PLATFORM(QT)
-void Connection::setShouldCloseConnectionOnProcessTermination(WebKit::PlatformProcessIdentifier process)
-{
- m_connectionQueue->dispatchOnTermination(process, WTF::bind(&Connection::connectionDidClose, this));
-}
-#endif
-
} // namespace CoreIPC
Modified: trunk/Source/WebKit2/Shared/API/c/WKBase.h (156886 => 156887)
--- trunk/Source/WebKit2/Shared/API/c/WKBase.h 2013-10-04 12:23:15 UTC (rev 156886)
+++ trunk/Source/WebKit2/Shared/API/c/WKBase.h 2013-10-04 14:16:22 UTC (rev 156887)
@@ -42,7 +42,7 @@
#include <WebKit2/WKBaseEfl.h>
#endif
-#if defined(__APPLE__) && !defined(BUILDING_QT__)
+#if defined(__APPLE__)
#include <WebKit2/WKBaseMac.h>
#endif
Modified: trunk/Source/WebKit2/Shared/NativeWebTouchEvent.h (156886 => 156887)
--- trunk/Source/WebKit2/Shared/NativeWebTouchEvent.h 2013-10-04 12:23:15 UTC (rev 156886)
+++ trunk/Source/WebKit2/Shared/NativeWebTouchEvent.h 2013-10-04 14:16:22 UTC (rev 156887)
@@ -28,9 +28,7 @@
#include "WebEvent.h"
-#if PLATFORM(QT)
-#include <QTouchEvent>
-#elif PLATFORM(EFL)
+#if PLATFORM(EFL)
#include "EwkTouchEvent.h"
#include <WebCore/AffineTransform.h>
#include <wtf/RefPtr.h>
@@ -40,22 +38,13 @@
class NativeWebTouchEvent : public WebTouchEvent {
public:
-#if PLATFORM(QT)
- explicit NativeWebTouchEvent(const QTouchEvent*, const QTransform& fromItemTransform);
-#elif PLATFORM(EFL)
+#if PLATFORM(EFL)
NativeWebTouchEvent(EwkTouchEvent*, const WebCore::AffineTransform&);
-#endif
-
-#if PLATFORM(QT)
- const QTouchEvent* nativeEvent() const { return &m_nativeEvent; }
-#elif PLATFORM(EFL)
const EwkTouchEvent* nativeEvent() const { return m_nativeEvent.get(); }
#endif
private:
-#if PLATFORM(QT)
- const QTouchEvent m_nativeEvent;
-#elif PLATFORM(EFL)
+#if PLATFORM(EFL)
RefPtr<EwkTouchEvent> m_nativeEvent;
#endif
};
Modified: trunk/Source/WebKit2/UIProcess/API/C/WebKit2_C.h (156886 => 156887)
--- trunk/Source/WebKit2/UIProcess/API/C/WebKit2_C.h 2013-10-04 12:23:15 UTC (rev 156886)
+++ trunk/Source/WebKit2/UIProcess/API/C/WebKit2_C.h 2013-10-04 14:16:22 UTC (rev 156887)
@@ -61,7 +61,7 @@
#if defined(__OBJC__) && __OBJC__
#import <WebKit2/WKView.h>
-#elif !((defined(__APPLE__) && __APPLE__) || defined(BUILDING_QT__))
+#elif !(defined(__APPLE__) && __APPLE__)
#include <WebKit2/WKView.h>
#endif
Modified: trunk/Source/WebKit2/UIProcess/BackingStore.h (156886 => 156887)
--- trunk/Source/WebKit2/UIProcess/BackingStore.h 2013-10-04 12:23:15 UTC (rev 156886)
+++ trunk/Source/WebKit2/UIProcess/BackingStore.h 2013-10-04 14:16:22 UTC (rev 156887)
@@ -29,11 +29,6 @@
#include <WebCore/IntRect.h>
#include <wtf/Noncopyable.h>
-#if PLATFORM(QT)
-#include <QtGui/QPainter>
-#include <QtGui/QPixmap>
-#endif
-
#if USE(CAIRO)
#include <RefPtrCairo.h>
#include <WebCore/WidgetBackingStore.h>
@@ -55,9 +50,7 @@
const WebCore::IntSize& size() const { return m_size; }
float deviceScaleFactor() const { return m_deviceScaleFactor; }
-#if PLATFORM(QT)
- typedef QPainter* PlatformGraphicsContext;
-#elif USE(CAIRO)
+#if USE(CAIRO)
typedef cairo_t* PlatformGraphicsContext;
#endif
@@ -72,9 +65,7 @@
float m_deviceScaleFactor;
WebPageProxy* m_webPageProxy;
-#if PLATFORM(QT)
- QPixmap m_pixmap;
-#elif USE(CAIRO)
+#if USE(CAIRO)
OwnPtr<WebCore::WidgetBackingStore> m_backingStore;
#endif
};
Modified: trunk/Source/WebKit2/UIProcess/InspectorServer/WebInspectorServer.cpp (156886 => 156887)
--- trunk/Source/WebKit2/UIProcess/InspectorServer/WebInspectorServer.cpp 2013-10-04 12:23:15 UTC (rev 156886)
+++ trunk/Source/WebKit2/UIProcess/InspectorServer/WebInspectorServer.cpp 2013-10-04 14:16:22 UTC (rev 156887)
@@ -94,12 +94,10 @@
closeConnection(0, connection);
}
-#if !PLATFORM(QT)
String WebInspectorServer::inspectorUrlForPageID(int)
{
return String();
}
-#endif
void WebInspectorServer::sendMessageOverConnection(unsigned pageIdForConnection, const String& message)
{
Modified: trunk/Source/WebKit2/UIProcess/InspectorServer/WebInspectorServer.h (156886 => 156887)
--- trunk/Source/WebKit2/UIProcess/InspectorServer/WebInspectorServer.h 2013-10-04 12:23:15 UTC (rev 156886)
+++ trunk/Source/WebKit2/UIProcess/InspectorServer/WebInspectorServer.h 2013-10-04 14:16:22 UTC (rev 156887)
@@ -61,7 +61,7 @@
virtual void didCloseWebSocketConnection(WebSocketServerConnection*);
bool platformResourceForPath(const String& path, Vector<char>& data, String& contentType);
-#if PLATFORM(QT) || PLATFORM(GTK) || PLATFORM(EFL)
+#if PLATFORM(GTK) || PLATFORM(EFL)
void buildPageList(Vector<char>& data, String& contentType);
#endif
Modified: trunk/Source/WebKit2/UIProcess/InspectorServer/WebSocketServer.cpp (156886 => 156887)
--- trunk/Source/WebKit2/UIProcess/InspectorServer/WebSocketServer.cpp 2013-10-04 12:23:15 UTC (rev 156886)
+++ trunk/Source/WebKit2/UIProcess/InspectorServer/WebSocketServer.cpp 2013-10-04 14:16:22 UTC (rev 156887)
@@ -34,10 +34,6 @@
#include <WebCore/SocketStreamHandle.h>
#include <wtf/PassOwnPtr.h>
-#if PLATFORM(QT)
-#include "WebSocketServerQt.h"
-#endif
-
using namespace WebCore;
namespace WebKit {
Modified: trunk/Source/WebKit2/UIProcess/InspectorServer/WebSocketServer.h (156886 => 156887)
--- trunk/Source/WebKit2/UIProcess/InspectorServer/WebSocketServer.h 2013-10-04 12:23:15 UTC (rev 156886)
+++ trunk/Source/WebKit2/UIProcess/InspectorServer/WebSocketServer.h 2013-10-04 14:16:22 UTC (rev 156887)
@@ -38,12 +38,6 @@
#include <wtf/gobject/GRefPtr.h>
#endif
-#if PLATFORM(QT)
-namespace WebKit {
-class QtTcpServerHandler;
-}
-#endif
-
namespace WebCore {
class SocketStreamHandle;
}
@@ -81,9 +75,7 @@
WebSocketServerClient* m_client;
String m_bindAddress;
unsigned short m_port;
-#if PLATFORM(QT)
- OwnPtr<QtTcpServerHandler> m_tcpServerHandler;
-#elif USE(SOUP)
+#if USE(SOUP)
GRefPtr<GSocketService> m_socketService;
#endif
friend class WebSocketServerConnection;
Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (156886 => 156887)
--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp 2013-10-04 12:23:15 UTC (rev 156886)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp 2013-10-04 14:16:22 UTC (rev 156887)
@@ -1658,7 +1658,7 @@
resetStateAfterProcessExited();
}
-#if !USE(CF) || defined(BUILDING_QT__)
+#if !USE(CF)
PassRefPtr<WebData> WebPageProxy::sessionStateData(WebPageProxySessionStateFilterCallback, void* /*context*/) const
{
// FIXME: Return session state data for saving Page state.
Modified: trunk/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp (156886 => 156887)
--- trunk/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp 2013-10-04 12:23:15 UTC (rev 156886)
+++ trunk/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp 2013-10-04 14:16:22 UTC (rev 156887)
@@ -34,9 +34,7 @@
#include <WebCore/GraphicsContext.h>
#include <WebCore/NotImplemented.h>
-#if PLATFORM(QT)
-#include <WebCore/QtX11ImageConversion.h>
-#elif PLATFORM(GTK)
+#if PLATFORM(GTK)
#include <gtk/gtk.h>
#ifndef GTK_API_VERSION_2
#include <gtk/gtkx.h>
@@ -59,33 +57,7 @@
static Display* getPluginDisplay()
{
-#if PLATFORM(QT)
- // At the moment, we only support gdk based plugins (like Flash) that use a different X connection.
- // The code below has the same effect as this one:
- // Display *gdkDisplay = gdk_x11_display_get_xdisplay(gdk_display_get_default());
-
- QLibrary library(QLatin1String("libgdk-x11-2.0"), 0);
- if (!library.load())
- return 0;
-
- typedef void *(*gdk_init_check_ptr)(void*, void*);
- gdk_init_check_ptr gdk_init_check = (gdk_init_check_ptr)library.resolve("gdk_init_check");
- if (!gdk_init_check)
- return 0;
-
- typedef void *(*gdk_display_get_default_ptr)();
- gdk_display_get_default_ptr gdk_display_get_default = (gdk_display_get_default_ptr)library.resolve("gdk_display_get_default");
- if (!gdk_display_get_default)
- return 0;
-
- typedef void *(*gdk_x11_display_get_xdisplay_ptr)(void *);
- gdk_x11_display_get_xdisplay_ptr gdk_x11_display_get_xdisplay = (gdk_x11_display_get_xdisplay_ptr)library.resolve("gdk_x11_display_get_xdisplay");
- if (!gdk_x11_display_get_xdisplay)
- return 0;
-
- gdk_init_check(0, 0);
- return (Display*)gdk_x11_display_get_xdisplay(gdk_display_get_default());
-#elif PLATFORM(GTK)
+#if PLATFORM(GTK)
// Since we're a gdk/gtk app, we'll (probably?) have the same X connection as any gdk-based
// plugins, so we can return that. We might want to add other implementations here later.
return GDK_DISPLAY_XDISPLAY(gdk_display_get_default());
@@ -98,9 +70,7 @@
static inline int x11Screen()
{
-#if PLATFORM(QT)
- return XDefaultScreen(NetscapePlugin::x11HostDisplay());
-#elif PLATFORM(GTK)
+#if PLATFORM(GTK)
return gdk_screen_get_number(gdk_screen_get_default());
#elif PLATFORM(EFL) && defined(HAVE_ECORE_X)
return ecore_x_screen_index_get(ecore_x_default_screen_get());
@@ -111,9 +81,7 @@
static inline int displayDepth()
{
-#if PLATFORM(QT)
- return XDefaultDepth(NetscapePlugin::x11HostDisplay(), x11Screen());
-#elif PLATFORM(GTK)
+#if PLATFORM(GTK)
return gdk_visual_get_depth(gdk_screen_get_system_visual(gdk_screen_get_default()));
#elif PLATFORM(EFL) && defined(HAVE_ECORE_X)
return ecore_x_default_depth_get(NetscapePlugin::x11HostDisplay(), ecore_x_default_screen_get());
@@ -124,9 +92,7 @@
static inline unsigned long rootWindowID()
{
-#if PLATFORM(QT)
- return XDefaultRootWindow(NetscapePlugin::x11HostDisplay());
-#elif PLATFORM(GTK)
+#if PLATFORM(GTK)
return GDK_ROOT_WINDOW();
#elif PLATFORM(EFL) && defined(HAVE_ECORE_X)
return ecore_x_window_root_first_get();
@@ -148,14 +114,7 @@
Display* NetscapePlugin::x11HostDisplay()
{
-#if PLATFORM(QT)
- static Display* dedicatedDisplay = 0;
- if (!dedicatedDisplay)
- dedicatedDisplay = XOpenDisplay(0);
-
- ASSERT(dedicatedDisplay);
- return dedicatedDisplay;
-#elif PLATFORM(GTK)
+#if PLATFORM(GTK)
return GDK_DISPLAY_XDISPLAY(gdk_display_get_default());
#elif PLATFORM(EFL) && defined(HAVE_ECORE_X)
return static_cast<Display*>(ecore_x_display_get());
@@ -221,9 +180,7 @@
m_npWindow.window = 0;
int depth = displayDepth();
-#if PLATFORM(QT)
- ASSERT(depth == 16 || depth == 24 || depth == 32);
-#endif
+
NPSetWindowCallbackStruct* callbackStruct = static_cast<NPSetWindowCallbackStruct*>(m_npWindow.ws_info);
callbackStruct->display = display;
callbackStruct->depth = depth;
@@ -376,14 +333,7 @@
if (m_pluginDisplay != x11HostDisplay())
XSync(m_pluginDisplay, false);
-#if PLATFORM(QT)
- XImage* xImage = XGetImage(NetscapePlugin::x11HostDisplay(), m_drawable, exposedRect.x(), exposedRect.y(),
- exposedRect.width(), exposedRect.height(), ULONG_MAX, ZPixmap);
- QPainter* painter = context->platformContext();
- painter->drawImage(QPoint(exposedRect.x(), exposedRect.y()), qimageFromXImage(xImage), exposedRect);
-
- XDestroyImage(xImage);
-#elif PLATFORM(GTK) || (PLATFORM(EFL) && USE(CAIRO))
+#if PLATFORM(GTK) || (PLATFORM(EFL) && USE(CAIRO))
RefPtr<cairo_surface_t> drawableSurface = adoptRef(cairo_xlib_surface_create(m_pluginDisplay,
m_drawable,
static_cast<NPSetWindowCallbackStruct*>(m_npWindow.ws_info)->visual,