[Qt][WK2] Remove Symbian code.

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

Reviewed by Benjamin Poulain.

Source/WebKit2: 

* DerivedSources.pro:
* Platform/CoreIPC/Attachment.h:
* Platform/CoreIPC/Connection.h:
* Platform/SharedMemory.h:
* Platform/qt/SharedMemorySymbian.cpp: Removed.
* UIProcess/API/qt/tests/tests.pri:
* UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
* WebKit2.pri:
* WebKit2.pro:
* WebProcess.pro:
* config.h:

Tools: 

* MiniBrowser/qt/BrowserWindow.cpp:
(BrowserWindow::BrowserWindow):
(BrowserWindow::screenshot):
* MiniBrowser/qt/MiniBrowser.pro:
* MiniBrowser/qt/MiniBrowserApplication.h:
(WindowOptions::WindowOptions):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@90578 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 39b7cc20
2011-07-07 Andreas Kling <kling@webkit.org>
[Qt][WK2] Remove Symbian code.
https://bugs.webkit.org/show_bug.cgi?id=64101
Reviewed by Benjamin Poulain.
* DerivedSources.pro:
* Platform/CoreIPC/Attachment.h:
* Platform/CoreIPC/Connection.h:
* Platform/SharedMemory.h:
* Platform/qt/SharedMemorySymbian.cpp: Removed.
* UIProcess/API/qt/tests/tests.pri:
* UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
* WebKit2.pri:
* WebKit2.pro:
* WebProcess.pro:
* config.h:
2011-07-07 Andreas Kling <kling@webkit.org>
[Qt][WK2] Don't support ridiculous matrix of QT_NO_FEATURE combinations.
......
......@@ -23,7 +23,7 @@ WEBCORE_GENERATED_HEADERS_FOR_WEBKIT2 += \
QUOTE = ""
DOUBLE_ESCAPED_QUOTE = ""
ESCAPE = ""
win32-msvc*|symbian {
win32-msvc* {
ESCAPE = "^"
} else:win32-g++*:isEmpty(QMAKE_SH) {
# MinGW's make will run makefile commands using sh, even if make
......
......@@ -40,7 +40,7 @@ public:
#if PLATFORM(MAC)
MachPortType,
MachOOLMemoryType,
#elif USE(UNIX_DOMAIN_SOCKETS) || OS(SYMBIAN)
#elif USE(UNIX_DOMAIN_SOCKETS)
MappedMemory
#endif
};
......@@ -48,7 +48,7 @@ public:
#if PLATFORM(MAC)
Attachment(mach_port_name_t port, mach_msg_type_name_t disposition);
Attachment(void* address, mach_msg_size_t size, mach_msg_copy_options_t copyOptions, bool deallocate);
#elif USE(UNIX_DOMAIN_SOCKETS) || OS(SYMBIAN)
#elif USE(UNIX_DOMAIN_SOCKETS)
Attachment(int fileDescriptor, size_t);
#endif
......@@ -66,7 +66,7 @@ public:
mach_msg_size_t size() const { ASSERT(m_type == MachOOLMemoryType); return m_oolMemory.size; }
mach_msg_copy_options_t copyOptions() const { ASSERT(m_type == MachOOLMemoryType); return m_oolMemory.copyOptions; }
bool deallocate() const { ASSERT(m_type == MachOOLMemoryType); return m_oolMemory.deallocate; }
#elif USE(UNIX_DOMAIN_SOCKETS) || OS(SYMBIAN)
#elif USE(UNIX_DOMAIN_SOCKETS)
size_t size() const { return m_size; }
int releaseFileDescriptor() { int temp = m_fileDescriptor; m_fileDescriptor = -1; return temp; }
......@@ -94,7 +94,7 @@ private:
bool deallocate;
} m_oolMemory;
};
#elif USE(UNIX_DOMAIN_SOCKETS) || OS(SYMBIAN)
#elif USE(UNIX_DOMAIN_SOCKETS)
int m_fileDescriptor;
size_t m_size;
#endif
......
......@@ -108,7 +108,7 @@ public:
#elif PLATFORM(WIN)
typedef HANDLE Identifier;
static bool createServerAndClientIdentifiers(Identifier& serverIdentifier, Identifier& clientIdentifier);
#elif USE(UNIX_DOMAIN_SOCKETS) || OS(SYMBIAN)
#elif USE(UNIX_DOMAIN_SOCKETS)
typedef int Identifier;
#endif
......@@ -335,7 +335,7 @@ private:
OwnPtr<ArgumentEncoder> m_pendingWriteArguments;
OVERLAPPED m_writeState;
HANDLE m_connectionPipe;
#elif USE(UNIX_DOMAIN_SOCKETS) || OS(SYMBIAN)
#elif USE(UNIX_DOMAIN_SOCKETS)
// Called on the connection queue.
void readyReadHandler();
bool processMessage();
......
......@@ -60,7 +60,7 @@ public:
void encode(CoreIPC::ArgumentEncoder*) const;
static bool decode(CoreIPC::ArgumentDecoder*, Handle&);
#if USE(UNIX_DOMAIN_SOCKETS) || OS(SYMBIAN)
#if USE(UNIX_DOMAIN_SOCKETS)
CoreIPC::Attachment releaseToAttachment() const;
void adoptFromAttachment(int fileDescriptor, size_t);
#endif
......@@ -72,8 +72,6 @@ public:
mutable HANDLE m_handle;
#elif USE(UNIX_DOMAIN_SOCKETS)
mutable int m_fileDescriptor;
#elif OS(SYMBIAN)
mutable uint32_t m_chunkID;
#endif
size_t m_size;
};
......@@ -113,8 +111,6 @@ private:
HANDLE m_handle;
#elif USE(UNIX_DOMAIN_SOCKETS)
int m_fileDescriptor;
#elif OS(SYMBIAN)
int m_handle;
#endif
};
......
/*
Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies)
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#include "config.h"
#if PLATFORM(QT) && OS(SYMBIAN)
#include "SharedMemory.h"
#include "ArgumentDecoder.h"
#include "ArgumentEncoder.h"
#include <e32math.h>
#include <qdebug.h>
#include <qglobal.h>
#include <sys/param.h>
namespace WebKit {
SharedMemory::Handle::Handle()
: m_chunkID(0)
, m_size(0)
{
}
SharedMemory::Handle::~Handle()
{
}
bool SharedMemory::Handle::isNull() const
{
return !m_chunkID;
}
void SharedMemory::Handle::encode(CoreIPC::ArgumentEncoder* encoder) const
{
ASSERT(!isNull());
encoder->encodeUInt32(m_size);
// name of the global chunk (masquerading as uint32_t for ease of serialization)
encoder->encodeUInt32(m_chunkID);
}
bool SharedMemory::Handle::decode(CoreIPC::ArgumentDecoder* decoder, Handle& handle)
{
size_t size;
if (!decoder->decodeUInt32(size))
return false;
uint32_t chunkID;
if (!decoder->decodeUInt32(chunkID))
return false;
handle.m_size = size;
handle.m_chunkID = chunkID;
return true;
}
// FIXME: To be removed as part of Bug 55877
CoreIPC::Attachment SharedMemory::Handle::releaseToAttachment() const
{
return CoreIPC::Attachment(-1, 0);
}
// FIXME: To be removed as part of Bug 55877
void SharedMemory::Handle::adoptFromAttachment(int, size_t)
{
}
PassRefPtr<SharedMemory> SharedMemory::create(size_t size)
{
// On Symbian, global chunks (shared memory segments) have system-unique names, so we pick a random
// number from the kernel's random pool and use it as a string.
// Using an integer simplifies serialization of the name in Handle::encode()
uint32_t random = Math::Random();
TBuf<KMaxKernelName> chunkName;
chunkName.Format(_L("%d"), random);
RChunk chunk;
TInt error = chunk.CreateGlobal(chunkName, size, size);
if (error) {
qCritical() << "Failed to create WK2 shared memory of size " << size << " with error " << error;
return 0;
}
RefPtr<SharedMemory> sharedMemory(adoptRef(new SharedMemory));
sharedMemory->m_handle = chunk.Handle();
sharedMemory->m_size = chunk.Size();
sharedMemory->m_data = static_cast<void*>(chunk.Base());
return sharedMemory.release();
}
PassRefPtr<SharedMemory> SharedMemory::create(const Handle& handle, Protection protection)
{
if (handle.isNull())
return 0;
// Convert number to string, and open the global chunk
TBuf<KMaxKernelName> chunkName;
chunkName.Format(_L("%d"), handle.m_chunkID);
RChunk chunk;
// NOTE: Symbian OS doesn't support read-only global chunks.
TInt error = chunk.OpenGlobal(chunkName, false);
if (error) {
qCritical() << "Failed to create WK2 shared memory from handle " << error;
return 0;
}
chunk.Adjust(chunk.MaxSize());
RefPtr<SharedMemory> sharedMemory(adoptRef(new SharedMemory));
sharedMemory->m_handle = chunk.Handle();
sharedMemory->m_size = chunk.Size();
sharedMemory->m_data = static_cast<void*>(chunk.Base());
return sharedMemory.release();
}
SharedMemory::~SharedMemory()
{
// FIXME: We don't Close() the chunk here, causing leaks of the shared memory segment
// If we do, the chunk is closed the decommitted prematurely before the other process
// has a chance to OpenGlobal() it.
}
bool SharedMemory::createHandle(Handle& handle, Protection protection)
{
ASSERT_ARG(handle, handle.isNull());
RChunk chunk;
if (chunk.SetReturnedHandle(m_handle))
return false;
// Convert the name (string form) to a uint32_t.
TName globalChunkName = chunk.Name();
TLex lexer(globalChunkName);
TUint32 nameAsInt = 0;
if (lexer.Val(nameAsInt, EDecimal))
return false;
handle.m_chunkID = nameAsInt;
handle.m_size = m_size;
return true;
}
unsigned SharedMemory::systemPageSize()
{
return PAGE_SIZE;
}
} // namespace WebKit
#endif
......@@ -13,4 +13,4 @@ include(../../../../../WebKit.pri)
QT += testlib
QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR
!symbian: DEFINES += TESTS_SOURCE_DIR=\\\"$$PWD\\\"
DEFINES += TESTS_SOURCE_DIR=\\\"$$PWD\\\"
......@@ -83,16 +83,6 @@ void QtWebProcess::setupChildProcess()
#endif
}
#if OS(SYMBIAN)
// FIXME: Symbian's POSIX layer doesn't have a socketpair(), so
// the following is just to fix the build until a pure Symbian
// IPC implementation lands on trunk
static int socketpair(int, int, int , int[2])
{
return -1;
}
#endif
void ProcessLauncher::launchProcess()
{
QString applicationPath = QLatin1String("%1 %2");
......
......@@ -61,14 +61,7 @@ WEBKIT2_INCLUDEPATH = \
$$SOURCE_DIR/WebKit2/WebProcess/qt \
$$SOURCE_DIR/WebKit2/PluginProcess
# On Symbian PREPEND_INCLUDEPATH is the best way to make sure that WebKit headers
# are included before platform headers.
symbian {
PREPEND_INCLUDEPATH = $$WEBKIT2_INCLUDEPATH $$WEBKIT2_GENERATED_SOURCES_DIR $$PREPEND_INCLUDEPATH
} else {
INCLUDEPATH = $$WEBKIT2_INCLUDEPATH $$WEBKIT2_GENERATED_SOURCES_DIR $$INCLUDEPATH
}
INCLUDEPATH = $$WEBKIT2_INCLUDEPATH $$WEBKIT2_GENERATED_SOURCES_DIR $$INCLUDEPATH
defineTest(prependWebKit2Lib) {
pathToWebKit2Output = $$ARGS/$$WEBKIT2_DESTDIR
......@@ -77,10 +70,6 @@ defineTest(prependWebKit2Lib) {
LIBS = -l$$WEBKIT2_TARGET $$LIBS
LIBS = -L$$pathToWebKit2Output $$LIBS
POST_TARGETDEPS += $${pathToWebKit2Output}$${QMAKE_DIR_SEP}$${WEBKIT2_TARGET}.lib
} else:symbian {
LIBS = -l$${WEBKIT2_TARGET}.lib $$LIBS
QMAKE_LIBDIR += $$pathToWebKit2Output
POST_TARGETDEPS += $${pathToWebKit2Output}$${QMAKE_DIR_SEP}$${WEBKIT2_TARGET}.lib
} else {
QMAKE_LIBDIR = $$pathToWebKit2Output $$QMAKE_LIBDIR
LIBS = -l$$WEBKIT2_TARGET $$LIBS
......
......@@ -333,7 +333,6 @@ SOURCES += \
Platform/qt/ModuleQt.cpp \
Platform/qt/RunLoopQt.cpp \
Platform/qt/WorkQueueQt.cpp \
Platform/qt/SharedMemorySymbian.cpp \
Platform/unix/SharedMemoryUnix.cpp \
PluginProcess/PluginControllerProxy.cpp \
PluginProcess/PluginProcess.cpp \
......
......@@ -33,22 +33,6 @@ linux-* {
QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR
}
symbian {
TARGET.UID3 = 0xA000E544
MMP_RULES += pageddata
RSS_RULES += "hidden = KAppIsHidden;" # No icon in application grid
TARGET.CAPABILITY *= ReadUserData
TARGET.CAPABILITY *= WriteUserData
TARGET.CAPABILITY *= NetworkServices # QtNetwork and Bearer
# See QtMobility docs on Symbian capabilities:
# http://doc.qt.nokia.com/qtmobility/quickstart.html
TARGET.CAPABILITY *= ReadDeviceData
TARGET.CAPABILITY *= WriteDeviceData
TARGET.CAPABILITY *= LocalServices
}
contains(QT_CONFIG, opengl) {
QT += opengl
DEFINES += QT_CONFIGURED_WITH_OPENGL
......
......@@ -146,7 +146,7 @@ static const type& name() \
#define PLUGIN_ARCHITECTURE_MAC 1
#elif PLATFORM(WIN)
#define PLUGIN_ARCHITECTURE_WIN 1
#elif (PLATFORM(QT) || (PLATFORM(GTK))) && (OS(UNIX) && !OS(MAC_OS_X) && !OS(SYMBIAN))
#elif (PLATFORM(QT) || (PLATFORM(GTK))) && (OS(UNIX) && !OS(MAC_OS_X))
#define PLUGIN_ARCHITECTURE_X11 1
#else
#define PLUGIN_ARCHITECTURE_UNSUPPORTED 1
......
2011-07-07 Andreas Kling <kling@webkit.org>
[Qt][WK2] Remove Symbian code.
https://bugs.webkit.org/show_bug.cgi?id=64101
Reviewed by Benjamin Poulain.
* MiniBrowser/qt/BrowserWindow.cpp:
(BrowserWindow::BrowserWindow):
(BrowserWindow::screenshot):
* MiniBrowser/qt/MiniBrowser.pro:
* MiniBrowser/qt/MiniBrowserApplication.h:
(WindowOptions::WindowOptions):
2011-07-07 Andreas Kling <kling@webkit.org>
[Qt][WK2] Don't support ridiculous matrix of QT_NO_FEATURE combinations.
......
......@@ -127,21 +127,13 @@ BrowserWindow::BrowserWindow(WindowOptions* options)
connect(m_addressBar, SIGNAL(returnPressed()), SLOT(changeLocation()));
QToolBar* bar = addToolBar("Navigation");
#if defined(Q_OS_SYMBIAN)
bar->setIconSize(QSize(16, 16));
#endif
#if 0
bar->addAction(page()->action(QWKPage::Back));
bar->addAction(page()->action(QWKPage::Forward));
bar->addAction(page()->action(QWKPage::Reload));
bar->addAction(page()->action(QWKPage::Stop));
#endif
#if defined(Q_OS_SYMBIAN)
addToolBarBreak();
addToolBar("Location")->addWidget(m_addressBar);
#else
bar->addWidget(m_addressBar);
#endif
QShortcut* selectAddressBar = new QShortcut(Qt::CTRL | Qt::Key_L, this);
connect(selectAddressBar, SIGNAL(activated()), this, SLOT(openLocation()));
......@@ -234,13 +226,11 @@ void BrowserWindow::screenshot()
{
QPixmap pixmap = QPixmap::grabWidget(m_browser);
QLabel* label = 0;
#if !defined(Q_OS_SYMBIAN)
label = new QLabel;
label->setAttribute(Qt::WA_DeleteOnClose);
label->setWindowTitle("Screenshot - Preview");
label->setPixmap(pixmap);
label->show();
#endif
QString fileName = QFileDialog::getSaveFileName(label, "Screenshot", QString(), QString("PNG File (.png)"));
if (!fileName.isEmpty()) {
......
......@@ -46,23 +46,6 @@ linux-* {
QMAKE_RPATHDIR = $$OUTPUT_DIR/lib $$QMAKE_RPATHDIR
}
symbian {
TARGET.UID3 = 0xA000E545
MMP_RULES += pageddata
TARGET.CAPABILITY *= ReadUserData
TARGET.CAPABILITY *= WriteUserData
TARGET.CAPABILITY *= NetworkServices # QtNetwork and Bearer
TARGET.CAPABILITY *= PowerMgmt # killing web process from UI process
# See QtMobility docs on Symbian capabilities:
# http://doc.qt.nokia.com/qtmobility/quickstart.html
TARGET.CAPABILITY *= Location # geolocation
TARGET.CAPABILITY *= ReadDeviceData # geolocation, sensors
TARGET.CAPABILITY *= WriteDeviceData # geolocation
TARGET.CAPABILITY *= LocalServices # geolocation, sysinfo
}
contains(QT_CONFIG, opengl) {
QT += opengl
DEFINES += QT_CONFIGURED_WITH_OPENGL
......
......@@ -36,11 +36,7 @@ struct WindowOptions {
WindowOptions()
: printLoadedUrls(false)
, useTouchWebView(false)
#if defined(Q_OS_SYMBIAN)
, startMaximized(true)
#else
, startMaximized(false)
#endif
#if defined(QT_CONFIGURED_WITH_OPENGL)
, useQGLWidgetViewport(false)
#endif
......
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