From df21899e65c6e4d8226a161b4ca8dce68eaa92df Mon Sep 17 00:00:00 2001 From: staikos Date: Sun, 19 Nov 2006 18:39:14 +0000 Subject: [PATCH] top level: Reviewed by Zack. http://bugs.webkit.org/show_bug.cgi?id=11649 * CMakeLists.txt: Fix Qt-only build without KDE cmake files JavaScriptCore: Reviewed by Zack. http://bugs.webkit.org/show_bug.cgi?id=11649 Fix CMake Qt-only build without KDE CMake files * CMakeLists.txt: * pcre/CMakeLists.txt: WebCore: Reviewed by Zack. http://bugs.webkit.org/show_bug.cgi?id=11649 Fix CMake files for Qt-only build without KDE cmake files. Fix Qt/KDE build for the SVG support. Fix Qt-only build in the resource handler. * CMakeLists.txt: * platform/graphics/svg/qt/SVGResourceFilterQt.cpp: Added. (WebCore::SVGResourceFilter::SVGResourceFilter): (WebCore::SVGResourceFilter::~SVGResourceFilter): (WebCore::SVGResourceFilter::prepareFilter): (WebCore::SVGResourceFilter::applyFilter): * platform/network/qt/ResourceHandleManager.cpp: (WebCore::ResourceHandleManager::cancel): (WebCore::ResourceHandleManager::slotData): (WebCore::ResourceHandleManager::slotMimetype): (WebCore::ResourceHandleManager::slotResult): (WebCore::ResourceHandleManager::deliverJobData): * platform/network/qt/ResourceHandleManager.h: * platform/network/qt/ResourceHandleQt.cpp: * platform/qt/CursorQt.cpp: (WebCore::noDropCursor): (WebCore::progressCursor): (WebCore::aliasCursor): WebKitQt: Reviewed by Zack. http://bugs.webkit.org/show_bug.cgi?id=11649 Fix Qt-only build * QtLauncher/CMakeLists.txt: git-svn-id: https://svn.webkit.org/repository/webkit/trunk@17853 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- CMakeLists.txt | 33 ++++++++++++--- ChangeLog | 8 ++++ JavaScriptCore/CMakeLists.txt | 40 +++++++++++++------ JavaScriptCore/ChangeLog | 10 +++++ JavaScriptCore/pcre/CMakeLists.txt | 12 +++++- WebCore/CMakeLists.txt | 35 +++++++++++----- WebCore/ChangeLog | 28 +++++++++++++ .../network/qt/ResourceHandleManager.cpp | 21 +++++++++- .../network/qt/ResourceHandleManager.h | 6 +++ .../platform/network/qt/ResourceHandleQt.cpp | 4 ++ WebCore/platform/qt/CursorQt.cpp | 15 +++++++ WebKitQt/ChangeLog | 9 +++++ WebKitQt/QtLauncher/CMakeLists.txt | 11 +++-- 13 files changed, 197 insertions(+), 35 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c728eac44cb4..fe8011a0dd61 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,9 +39,30 @@ IF (WEBKIT_USE_XBL_SUPPORT) ENDIF (WEBKIT_USE_XBL_SUPPORT) # search packages used by KDE -find_package (KDE4 REQUIRED) -include (KDE4Defaults) -include (MacroLibrary) +IF (WEBKIT_USE_KDE_SUPPORT) + find_package (KDE4 REQUIRED) + include (KDE4Defaults) + include (MacroLibrary) + + # use the KDE modules for finding these + find_package (LibXml2 REQUIRED) + find_package (LibXslt REQUIRED) + +ELSE (WEBKIT_USE_KDE_SUPPORT) + INCLUDE(UsePkgConfig) + + PKGCONFIG(libxml-2.0 _LibXml2IncDir _LibXml2LinkDir _LibXml2LinkFlags _LibXml2CFlags) + SET(LIBXML2_LIBRARIES ${_LibXml2LinkFlags}) + # I'd like to use the output of --cflags directly but cmake craps out on it ;( + SET(LIBXML2_INCLUDE_DIR ${_LibXml2IncDir}/libxml2) + + PKGCONFIG(libxslt _LibXslt2IncDir _LibXslt2LinkDir _LibXslt2LinkFlags _LibXslt2CFlags) + SET(LIBXSLT_LIBRARIES ${_LibXslt2LinkFlags}) + SET(LIBXSLT_INCLUDE_DIR ${_LibXslt2IncDir}) + + include(CheckLibraryExists) + include(FindQt4) +ENDIF (WEBKIT_USE_KDE_SUPPORT) # Special option for BuildBot, to disable output colorization (must be done after KDE4Defaults is loaded) OPTION (WEBKIT_DO_NOT_USE_COLORFUL_OUTPUT "Do not colorize compilation output." OFF) @@ -50,8 +71,6 @@ IF (WEBKIT_DO_NOT_USE_COLORFUL_OUTPUT) set(CMAKE_COLOR_MAKEFILE OFF) ENDIF (WEBKIT_DO_NOT_USE_COLORFUL_OUTPUT) -find_package (LibXml2 REQUIRED) -find_package (LibXslt REQUIRED) find_package (JPEG REQUIRED) find_package (PNG REQUIRED) @@ -82,7 +101,9 @@ add_definitions (-DUSE_SYSTEM_MALLOC=1) add_subdirectory (JavaScriptCore) add_subdirectory (WebCore) -add_subdirectory (WebKitTools/DumpRenderTree/DumpRenderTree.qtproj) +IF (WEBKIT_USE_KDE_SUPPORT) + add_subdirectory (WebKitTools/DumpRenderTree/DumpRenderTree.qtproj) +ENDIF (WEBKIT_USE_KDE_SUPPORT) add_subdirectory (WebKitQt/QtLauncher) diff --git a/ChangeLog b/ChangeLog index 34227f822bfa..b5d01fcfe361 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2006-11-19 Simon Hausmann + + Reviewed by Zack. + + http://bugs.webkit.org/show_bug.cgi?id=11649 + + * CMakeLists.txt: Fix Qt-only build without KDE cmake files + 2006-10-30 Timothy Hatcher Reviewed by Brady. diff --git a/JavaScriptCore/CMakeLists.txt b/JavaScriptCore/CMakeLists.txt index 8058dcb4808b..38cb33a354fc 100644 --- a/JavaScriptCore/CMakeLists.txt +++ b/JavaScriptCore/CMakeLists.txt @@ -10,6 +10,7 @@ check_library_exists(pthread pthread_attr_get_np "" HAVE_PTHREAD_ATTR_GET_NP) check_library_exists(pthread pthread_getattr_np "" HAVE_PTHREAD_GETATTR_NP) include_directories( + ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/pcre ${CMAKE_CURRENT_SOURCE_DIR}/bindings ${CMAKE_CURRENT_SOURCE_DIR}/bindings/c @@ -55,12 +56,21 @@ add_custom_command( ########### next target ############### -kde4_add_library(wtf-unity SHARED - wtf/TCSystemAlloc.cpp - wtf/Assertions.cpp - wtf/HashTable.cpp - wtf/FastMalloc.cpp -) +IF (WEBKIT_USE_KDE_SUPPORT) + kde4_add_library(wtf-unity SHARED + wtf/TCSystemAlloc.cpp + wtf/Assertions.cpp + wtf/HashTable.cpp + wtf/FastMalloc.cpp + ) +ELSE (WEBKIT_USE_KDE_SUPPORT) + add_library(wtf-unity SHARED + wtf/TCSystemAlloc.cpp + wtf/Assertions.cpp + wtf/HashTable.cpp + wtf/FastMalloc.cpp + ) +ENDIF (WEBKIT_USE_KDE_SUPPORT) set(kjs-unity_LIB_SRCS ${kjs-unity_LIB_SRCS} @@ -118,23 +128,29 @@ set(kjs-unity_LIB_SRCS kjs/ExecState.cpp ) -kde4_add_library(kjs-unity STATIC ${kjs-unity_LIB_SRCS}) IF (WEBKIT_USE_KDE_SUPPORT) if(UNIX) + kde4_add_library(kjs-unity STATIC ${kjs-unity_LIB_SRCS}) target_link_libraries(kjs-unity ${KDE4_KDECORE_LIBS} m ) else(UNIX) target_link_libraries(kjs-unity ${KDE4_KDECORE_LIBS}) endif(UNIX) +ELSE (WEBKIT_USE_KDE_SUPPORT) + add_library(kjs-unity STATIC ${kjs-unity_LIB_SRCS}) ENDIF (WEBKIT_USE_KDE_SUPPORT) target_link_libraries(kjs-unity wtf-unity) set_target_properties(kjs-unity PROPERTIES VERSION ${GENERIC_LIB_VERSION} SOVERSION ${GENERIC_LIB_SOVERSION} ) -install (TARGETS wtf-unity DESTINATION ${LIB_INSTALL_DIR}) -install (TARGETS kjs-unity DESTINATION ${LIB_INSTALL_DIR}) +IF (WEBKIT_USE_KDE_SUPPORT) + install (TARGETS wtf-unity DESTINATION ${LIB_INSTALL_DIR}) + install (TARGETS kjs-unity DESTINATION ${LIB_INSTALL_DIR}) +ENDIF (WEBKIT_USE_KDE_SUPPORT) # testkjs -set(testkjs_SRCS kjs/testkjs.cpp) -kde4_add_executable(testkjs RUN_UNINSTALLED ${testkjs_SRCS}) -target_link_libraries(testkjs ${KDE4_KDECORE_LIBS} kjs-unity pcre-unity icuuc) +IF (WEBKIT_USE_KDE_SUPPORT) + set(testkjs_SRCS kjs/testkjs.cpp) + kde4_add_executable(testkjs RUN_UNINSTALLED ${testkjs_SRCS}) + target_link_libraries(testkjs ${KDE4_KDECORE_LIBS} kjs-unity pcre-unity icuuc) +ENDIF (WEBKIT_USE_KDE_SUPPORT) diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog index 69a0bf7b03bd..04d63b1070f6 100644 --- a/JavaScriptCore/ChangeLog +++ b/JavaScriptCore/ChangeLog @@ -1,3 +1,13 @@ +2006-11-19 Simon Hausmann + + Reviewed by Zack. + + http://bugs.webkit.org/show_bug.cgi?id=11649 + Fix CMake Qt-only build without KDE CMake files + + * CMakeLists.txt: + * pcre/CMakeLists.txt: + 2006-11-17 Anders Carlsson Reviewed by Adam. diff --git a/JavaScriptCore/pcre/CMakeLists.txt b/JavaScriptCore/pcre/CMakeLists.txt index d346123536a9..5956a2b6284c 100644 --- a/JavaScriptCore/pcre/CMakeLists.txt +++ b/JavaScriptCore/pcre/CMakeLists.txt @@ -1,7 +1,11 @@ project( pcre-unity ) -include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/../wtf ) +include_directories( + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/.. + ${CMAKE_CURRENT_SOURCE_DIR}/../wtf + ) #compile dftables.c -> dftables #run dftables to generate chartables.c @@ -36,6 +40,10 @@ set(pcre-unity_LIB_SRCS pcre_fullinfo.c ) -kde4_add_library(pcre-unity STATIC ${pcre-unity_LIB_SRCS}) +IF (WEBKIT_USE_KDE_SUPPORT) + kde4_add_library(pcre-unity STATIC ${pcre-unity_LIB_SRCS}) +ELSE (WEBKIT_USE_KDE_SUPPORT) + add_library(pcre-unity STATIC ${pcre-unity_LIB_SRCS}) +ENDIF (WEBKIT_USE_KDE_SUPPORT) diff --git a/WebCore/CMakeLists.txt b/WebCore/CMakeLists.txt index c231b96d3c54..a50621f6aace 100644 --- a/WebCore/CMakeLists.txt +++ b/WebCore/CMakeLists.txt @@ -1,7 +1,9 @@ project( WebCore ) -include (CheckCXXCompilerFlag) +IF (WEBKIT_USE_KDE_SUPPORT) + include (CheckCXXCompilerFlag) +ENDIF (WEBKIT_USE_KDE_SUPPORT) include_directories( BEFORE ${CMAKE_CURRENT_BINARY_DIR} @@ -51,20 +53,28 @@ include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/rendering ${CMAKE_CURRENT_BINARY_DIR}/xml ${CMAKE_CURRENT_SOURCE_DIR}/xml + ${LIBXML2_INCLUDE_DIR} + ${QT_INCLUDES} ) -include_directories( ${LIBXML2_INCLUDE_DIR} ${QT_INCLUDES} ) - add_definitions( -DQT3_SUPPORT -Wno-undef -Wno-unused-parameter ) -check_cxx_compiler_flag( -Wno-variadic-macros __KDE_HAVE_WVARIADIC_MACROS ) +IF (WEBKIT_USE_KDE_SUPPORT) + check_cxx_compiler_flag( -Wno-variadic-macros __KDE_HAVE_WVARIADIC_MACROS ) +ENDIF (WEBKIT_USE_KDE_SUPPORT) IF ( __KDE_HAVE_WVARIADIC_MACROS ) add_definitions( -Wno-variadic-macros ) ENDIF (__KDE_HAVE_WVARIADIC_MACROS) -kde4_automoc( WebCore platform/network/qt/ResourceHandleManager.cpp ) -kde4_automoc( WebCore platform/qt/ScrollViewCanvasQt.cpp ) -kde4_automoc( WebCore platform/qt/SharedTimerQt.cpp ) +IF (WEBKIT_USE_KDE_SUPPORT) + kde4_automoc( WebCore platform/network/qt/ResourceHandleManager.cpp ) + kde4_automoc( WebCore platform/qt/ScrollViewCanvasQt.cpp ) + kde4_automoc( WebCore platform/qt/SharedTimerQt.cpp ) +ELSE (WEBKIT_USE_KDE_SUPPORT) + qt4_automoc( WebCore platform/network/qt/ResourceHandleManager.cpp ) + qt4_automoc( WebCore platform/qt/ScrollViewCanvasQt.cpp ) + qt4_automoc( WebCore platform/qt/SharedTimerQt.cpp ) +ENDIF (WEBKIT_USE_KDE_SUPPORT) SET (FEATURE_DEFINES_JAVASCRIPT LANGUAGE_JAVASCRIPT) @@ -1069,6 +1079,7 @@ set(WebCore_SRCS platform/graphics/svg/qt/SVGResourceClipperQt.cpp platform/graphics/svg/qt/SVGResourceImageQt.cpp platform/graphics/svg/qt/SVGResourceMaskerQt.cpp + platform/graphics/svg/qt/SVGResourceFilterQt.cpp platform/image-decoders/bmp/BMPImageDecoder.cpp platform/image-decoders/gif/GIFImageDecoder.cpp @@ -1256,7 +1267,11 @@ set(WebCore_SRCS ${WebCore-unity-IDLGeneratedSources} ) -kde4_add_library( WebCore-unity SHARED ${WebCore_SRCS} ) +IF (WEBKIT_USE_KDE_SUPPORT) + kde4_add_library( WebCore-unity SHARED ${WebCore_SRCS} ) +ELSE (WEBKIT_USE_KDE_SUPPORT) + add_library( WebCore-unity SHARED ${WebCore_SRCS} ) +ENDIF (WEBKIT_USE_KDE_SUPPORT) IF (WEBKIT_USE_KDE_SUPPORT) target_link_libraries(WebCore-unity @@ -1291,4 +1306,6 @@ target_link_libraries(WebCore-unity ) ENDIF (WEBKIT_USE_KDE_SUPPORT) -install( TARGETS WebCore-unity DESTINATION ${LIB_INSTALL_DIR} ) +IF (WEBKIT_USE_KDE_SUPPORT) + install( TARGETS WebCore-unity DESTINATION ${LIB_INSTALL_DIR} ) +ENDIF (WEBKIT_USE_KDE_SUPPORT) diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog index 7b414d3464bb..174a171ceeea 100644 --- a/WebCore/ChangeLog +++ b/WebCore/ChangeLog @@ -1,3 +1,31 @@ +2006-11-19 Simon Hausmann + + Reviewed by Zack. + + http://bugs.webkit.org/show_bug.cgi?id=11649 + Fix CMake files for Qt-only build without KDE cmake files. + Fix Qt/KDE build for the SVG support. + Fix Qt-only build in the resource handler. + + * CMakeLists.txt: + * platform/graphics/svg/qt/SVGResourceFilterQt.cpp: Added. + (WebCore::SVGResourceFilter::SVGResourceFilter): + (WebCore::SVGResourceFilter::~SVGResourceFilter): + (WebCore::SVGResourceFilter::prepareFilter): + (WebCore::SVGResourceFilter::applyFilter): + * platform/network/qt/ResourceHandleManager.cpp: + (WebCore::ResourceHandleManager::cancel): + (WebCore::ResourceHandleManager::slotData): + (WebCore::ResourceHandleManager::slotMimetype): + (WebCore::ResourceHandleManager::slotResult): + (WebCore::ResourceHandleManager::deliverJobData): + * platform/network/qt/ResourceHandleManager.h: + * platform/network/qt/ResourceHandleQt.cpp: + * platform/qt/CursorQt.cpp: + (WebCore::noDropCursor): + (WebCore::progressCursor): + (WebCore::aliasCursor): + 2006-11-19 Mitz Pettel Reviewed by Maciej. diff --git a/WebCore/platform/network/qt/ResourceHandleManager.cpp b/WebCore/platform/network/qt/ResourceHandleManager.cpp index a0e5805dbf90..257ee1d19954 100644 --- a/WebCore/platform/network/qt/ResourceHandleManager.cpp +++ b/WebCore/platform/network/qt/ResourceHandleManager.cpp @@ -284,7 +284,23 @@ void ResourceHandleManager::add(ResourceHandle* resource, FrameQtClient* frameCl void ResourceHandleManager::cancel(ResourceHandle* job) { remove(job); - job->setError(1); + //FIXME set an error state + //job->setError(1); +} + +void ResourceHandleManager::slotData(KIO::Job*, const QByteArray& data) +{ + // dummy, never called in a Qt-only build +} + +void ResourceHandleManager::slotMimetype(KIO::Job*, const QString& type) +{ + // dummy, never called in a Qt-only build +} + +void ResourceHandleManager::slotResult(KJob*) +{ + // dummy, never called in a Qt-only build } void ResourceHandleManager::deliverJobData(QtJob* job, const QByteArray& data) @@ -299,7 +315,8 @@ void ResourceHandleManager::deliverJobData(QtJob* job, const QByteArray& data) d->m_client->didReceiveData(handle, data.data(), data.size()); - handle->setError(0); + //FIXME: should report an error + //handle->setError(0); remove(handle); ASSERT(m_frameClient); diff --git a/WebCore/platform/network/qt/ResourceHandleManager.h b/WebCore/platform/network/qt/ResourceHandleManager.h index 8780701e85ea..afb0b92c8af6 100644 --- a/WebCore/platform/network/qt/ResourceHandleManager.h +++ b/WebCore/platform/network/qt/ResourceHandleManager.h @@ -33,6 +33,12 @@ #include "ResourceHandle.h" +// forward declarations for Qt-only build +namespace KIO { +class Job; +} +class KJob; + namespace WebCore { class FrameQtClient; diff --git a/WebCore/platform/network/qt/ResourceHandleQt.cpp b/WebCore/platform/network/qt/ResourceHandleQt.cpp index 7d040876977a..aaec306a6049 100644 --- a/WebCore/platform/network/qt/ResourceHandleQt.cpp +++ b/WebCore/platform/network/qt/ResourceHandleQt.cpp @@ -27,7 +27,11 @@ #include "config.h" +#if PLATFORM(KDE) #include +#endif + +#include #include "FrameQt.h" #include "DocLoader.h" diff --git a/WebCore/platform/qt/CursorQt.cpp b/WebCore/platform/qt/CursorQt.cpp index 59454cb76f69..2833453bab11 100644 --- a/WebCore/platform/qt/CursorQt.cpp +++ b/WebCore/platform/qt/CursorQt.cpp @@ -241,6 +241,21 @@ const Cursor& contextMenuCursor() return Cursors::self()->PointerCursor; } +const Cursor& noDropCursor() +{ + return Cursors::self()->PointerCursor; +} + +const Cursor& progressCursor() +{ + return Cursors::self()->PointerCursor; +} + +const Cursor& aliasCursor() +{ + return Cursors::self()->PointerCursor; +} + } // vim: ts=4 sw=4 et diff --git a/WebKitQt/ChangeLog b/WebKitQt/ChangeLog index 907b327ef774..fdc8634d48c3 100644 --- a/WebKitQt/ChangeLog +++ b/WebKitQt/ChangeLog @@ -1,3 +1,12 @@ +2006-11-19 Simon Hausmann + + Reviewed by Zack. + + http://bugs.webkit.org/show_bug.cgi?id=11649 + Fix Qt-only build + + * QtLauncher/CMakeLists.txt: + 2006-11-17 Zack Rusin Reviewed by Mitz. Landed by Niko. diff --git a/WebKitQt/QtLauncher/CMakeLists.txt b/WebKitQt/QtLauncher/CMakeLists.txt index 810062472459..58990e2a8b41 100644 --- a/WebKitQt/QtLauncher/CMakeLists.txt +++ b/WebKitQt/QtLauncher/CMakeLists.txt @@ -23,10 +23,13 @@ include_directories( add_definitions(-Wno-undef -Wno-unused-parameter) set(testunity_SRCS main.cpp) -kde4_automoc(testunity ${testunity_SRCS}) -kde4_add_executable(testunity RUN_UNINSTALLED ${testunity_SRCS}) IF (WEBKIT_USE_KDE_SUPPORT) -target_link_libraries(testunity ${KDE4_KDECORE_LIBS} WebCore-unity ) + kde4_add_executable(testunity RUN_UNINSTALLED ${testunity_SRCS}) + target_link_libraries(testunity ${KDE4_KDECORE_LIBS} WebCore-unity) + kde4_automoc(testunity ${testunity_SRCS}) ELSE (WEBKIT_USE_KDE_SUPPORT) -target_link_libraries(testunity WebCore-unity ) + include_directories(${QT_INCLUDES}) + add_executable(testunity ${testunity_SRCS}) + target_link_libraries(testunity WebCore-unity) + qt4_automoc(testunity ${testunity_SRCS}) ENDIF (WEBKIT_USE_KDE_SUPPORT) -- 2.36.0