diff --git a/Source/WebKit2/ChangeLog b/Source/WebKit2/ChangeLog index ba48ae6cf717210ed7bdf7ea4ec3886bc1758abf..fbe1ea1b405fa5066034794d850b6ab04c4d1ad1 100644 --- a/Source/WebKit2/ChangeLog +++ b/Source/WebKit2/ChangeLog @@ -1,3 +1,22 @@ +2011-07-07 Andreas Kling + + [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 [Qt][WK2] Don't support ridiculous matrix of QT_NO_FEATURE combinations. diff --git a/Source/WebKit2/DerivedSources.pro b/Source/WebKit2/DerivedSources.pro index 006a88cfc1b88934a10c056b9beae06d730100ba..7381f7d971ed1fa8dd86186a54c545fbe0d290c0 100644 --- a/Source/WebKit2/DerivedSources.pro +++ b/Source/WebKit2/DerivedSources.pro @@ -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 diff --git a/Source/WebKit2/Platform/CoreIPC/Attachment.h b/Source/WebKit2/Platform/CoreIPC/Attachment.h index de18fdecb6a83d6b48eae6f3b5b6506e5c4baf7c..8060c64a76a5551c43a9a2ce439887d599fbd680 100644 --- a/Source/WebKit2/Platform/CoreIPC/Attachment.h +++ b/Source/WebKit2/Platform/CoreIPC/Attachment.h @@ -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 diff --git a/Source/WebKit2/Platform/CoreIPC/Connection.h b/Source/WebKit2/Platform/CoreIPC/Connection.h index fe965c4af19928814a7781edbdfa8b0e7fda34cd..75005df7be45d0d50d7b78cbcab36a583a88d0bf 100644 --- a/Source/WebKit2/Platform/CoreIPC/Connection.h +++ b/Source/WebKit2/Platform/CoreIPC/Connection.h @@ -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 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(); diff --git a/Source/WebKit2/Platform/SharedMemory.h b/Source/WebKit2/Platform/SharedMemory.h index 2fe6b5d577daaf787be9452b179a3dab97cab8bd..de404fff0142c2d20d9fb3d5af0de7be83b83dee 100644 --- a/Source/WebKit2/Platform/SharedMemory.h +++ b/Source/WebKit2/Platform/SharedMemory.h @@ -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 }; diff --git a/Source/WebKit2/Platform/qt/SharedMemorySymbian.cpp b/Source/WebKit2/Platform/qt/SharedMemorySymbian.cpp deleted file mode 100644 index 57bdf8636eacaf95435fb2340cc319a7ba07f6d5..0000000000000000000000000000000000000000 --- a/Source/WebKit2/Platform/qt/SharedMemorySymbian.cpp +++ /dev/null @@ -1,166 +0,0 @@ -/* - 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 -#include -#include -#include - - -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::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 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(adoptRef(new SharedMemory)); - sharedMemory->m_handle = chunk.Handle(); - sharedMemory->m_size = chunk.Size(); - sharedMemory->m_data = static_cast(chunk.Base()); - return sharedMemory.release(); -} - -PassRefPtr SharedMemory::create(const Handle& handle, Protection protection) -{ - if (handle.isNull()) - return 0; - - // Convert number to string, and open the global chunk - TBuf 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(adoptRef(new SharedMemory)); - sharedMemory->m_handle = chunk.Handle(); - sharedMemory->m_size = chunk.Size(); - sharedMemory->m_data = static_cast(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 diff --git a/Source/WebKit2/UIProcess/API/qt/tests/tests.pri b/Source/WebKit2/UIProcess/API/qt/tests/tests.pri index 032acc3c768fb9b7f02d6760d58964e859a3d31b..2932e1c63ee5925b8a0c78462c229f3b3e1b1c97 100644 --- a/Source/WebKit2/UIProcess/API/qt/tests/tests.pri +++ b/Source/WebKit2/UIProcess/API/qt/tests/tests.pri @@ -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\\\" diff --git a/Source/WebKit2/UIProcess/Launcher/qt/ProcessLauncherQt.cpp b/Source/WebKit2/UIProcess/Launcher/qt/ProcessLauncherQt.cpp index 5f3c99f8e805550f2f11bab96b546c216c2d0a23..cae5bdff675343a7d7b0d00a8e0e18b92179a5ca 100644 --- a/Source/WebKit2/UIProcess/Launcher/qt/ProcessLauncherQt.cpp +++ b/Source/WebKit2/UIProcess/Launcher/qt/ProcessLauncherQt.cpp @@ -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"); diff --git a/Source/WebKit2/WebKit2.pri b/Source/WebKit2/WebKit2.pri index 32c25e14da76be215b496f3d2a268258f5afb2eb..1528b25919f5cb5cb501a1c055dcbdb505456c61 100644 --- a/Source/WebKit2/WebKit2.pri +++ b/Source/WebKit2/WebKit2.pri @@ -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 diff --git a/Source/WebKit2/WebKit2.pro b/Source/WebKit2/WebKit2.pro index 5f9b0f9370cc072e9026367664b809c19db4fe79..ad2112fefacdc1c31bb856acc52f02d3c1de6811 100644 --- a/Source/WebKit2/WebKit2.pro +++ b/Source/WebKit2/WebKit2.pro @@ -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 \ diff --git a/Source/WebKit2/WebProcess.pro b/Source/WebKit2/WebProcess.pro index fc56e9b255954fbefb7b7172734fa7e332ffc9af..b82f8ae8b7ae80f3c51b244cd2b0677b90d86cab 100644 --- a/Source/WebKit2/WebProcess.pro +++ b/Source/WebKit2/WebProcess.pro @@ -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 diff --git a/Source/WebKit2/config.h b/Source/WebKit2/config.h index 53f567ee3fa405411f5761a4ebfc15fb9b850035..39ec8d9140cfdd7cd98342fc53a0bf0788248df1 100644 --- a/Source/WebKit2/config.h +++ b/Source/WebKit2/config.h @@ -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 diff --git a/Tools/ChangeLog b/Tools/ChangeLog index d9732d5e6c49ebd1b4146ec25c2b0ba1a2e71beb..5dfcdf48abecca3954d0884a6095f2270a1a9183 100644 --- a/Tools/ChangeLog +++ b/Tools/ChangeLog @@ -1,3 +1,17 @@ +2011-07-07 Andreas Kling + + [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 [Qt][WK2] Don't support ridiculous matrix of QT_NO_FEATURE combinations. diff --git a/Tools/MiniBrowser/qt/BrowserWindow.cpp b/Tools/MiniBrowser/qt/BrowserWindow.cpp index 163a9095086d9d66998e65c8e75cd6285a72db73..d0edfc6b038ade84fe2175a62d0a765dd0589d44 100644 --- a/Tools/MiniBrowser/qt/BrowserWindow.cpp +++ b/Tools/MiniBrowser/qt/BrowserWindow.cpp @@ -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()) { diff --git a/Tools/MiniBrowser/qt/MiniBrowser.pro b/Tools/MiniBrowser/qt/MiniBrowser.pro index 92666e94bf3df26b4af7e7f8423bdb91bd656649..4101e256d333ce62380880eafd91f5419b90bb7c 100644 --- a/Tools/MiniBrowser/qt/MiniBrowser.pro +++ b/Tools/MiniBrowser/qt/MiniBrowser.pro @@ -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 diff --git a/Tools/MiniBrowser/qt/MiniBrowserApplication.h b/Tools/MiniBrowser/qt/MiniBrowserApplication.h index 459189d015522b11b185e0a6e09e5146d7989547..a182f9ba8d01604c68af35a95a5f4ff5fc5f953d 100644 --- a/Tools/MiniBrowser/qt/MiniBrowserApplication.h +++ b/Tools/MiniBrowser/qt/MiniBrowserApplication.h @@ -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