Make compile with both OS(WINCE) and PLATFORM(QT) support
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Sep 2012 05:53:37 +0000 (05:53 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Sep 2012 05:53:37 +0000 (05:53 +0000)
https://bugs.webkit.org/show_bug.cgi?id=95536

Patch by Kevin Funk <kevin.funk@kdab.com> on 2012-09-13
Reviewed by Simon Hausmann.

Source/JavaScriptCore:

Do not link against advapi32 on wince

* jsc.pro:

Source/WebCore:

* WebCore.pri:
Set defines for the WinCE platform build
* platform/graphics/BitmapImage.cpp:
Use default implementation in BitmapImage::reportMemoryUsage() when Qt support available
* platform/graphics/GraphicsContext.cpp:
Same as above: use default implementation
 * platform/win/ClipboardUtilitiesWin.cpp:
Remove unnecessary include

Source/WTF:

Fixes for Windows CE.

* WTF.pri:
Also include path for mt19937ar.c
* wtf/unicode/icu/CollatorICU.cpp:
Fix undeclared strdup() on CE7
* wtf/Platform.h:

Tools:

Fix wince support in qmake files

* Tools.pro:
* qmake/mkspecs/features/configure.prf:
* qmake/mkspecs/features/default_post.prf:
* qmake/mkspecs/features/features.prf:
* qmake/mkspecs/features/functions.prf:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@128558 268f45cc-cd09-0410-ab3c-d52691b4dbfc

17 files changed:
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/jsc.pro
Source/WTF/ChangeLog
Source/WTF/WTF.pro
Source/WTF/wtf/Platform.h
Source/WTF/wtf/unicode/icu/CollatorICU.cpp
Source/WebCore/ChangeLog
Source/WebCore/WebCore.pri
Source/WebCore/platform/graphics/BitmapImage.cpp
Source/WebCore/platform/graphics/GraphicsContext.cpp
Source/WebCore/platform/win/ClipboardUtilitiesWin.cpp
Source/WebKit/qt/WebCoreSupport/EditorClientQt.cpp
Tools/ChangeLog
Tools/qmake/mkspecs/features/configure.prf
Tools/qmake/mkspecs/features/default_post.prf
Tools/qmake/mkspecs/features/features.prf
Tools/qmake/mkspecs/features/functions.prf

index 75f5746..1e75002 100644 (file)
@@ -1,3 +1,14 @@
+2012-09-13  Kevin Funk  <kevin.funk@kdab.com>
+
+        Make compile with both OS(WINCE) and PLATFORM(QT) support
+        https://bugs.webkit.org/show_bug.cgi?id=95536
+
+        Reviewed by Simon Hausmann.
+
+        Do not link against advapi32 on wince
+
+        * jsc.pro:
+
 2012-09-13  Geoffrey Garen  <ggaren@apple.com>
 
         Refactored the DFG to make fewer assumptions about variable capture
index 123362f..f226bde 100644 (file)
@@ -23,7 +23,7 @@ mac {
     LIBS_PRIVATE += -framework AppKit
 }
 
-win* {
+win32-* {
     LIBS += -ladvapi32
 }
 
index 5485537..8b87295 100644 (file)
@@ -1,3 +1,18 @@
+2012-09-13  Kevin Funk  <kevin.funk@kdab.com>
+
+        Make compile with both OS(WINCE) and PLATFORM(QT) support
+        https://bugs.webkit.org/show_bug.cgi?id=95536
+
+        Reviewed by Simon Hausmann.
+
+        Fixes for Windows CE.
+
+        * WTF.pri:
+        Also include path for mt19937ar.c
+        * wtf/unicode/icu/CollatorICU.cpp:
+        Fix undeclared strdup() on CE7
+        * wtf/Platform.h:
+
 2012-09-13  Byungseon Shin  <xingri@gmail.com>
 
         Fix for WTF fails to compile in thumb mode when llint is enabled.
index 789e49b..bc0a877 100644 (file)
@@ -14,6 +14,11 @@ VPATH += $$PWD/wtf
 
 INCLUDEPATH += $$PWD/wtf
 
+wince* {
+    # for mt19937ar.c
+    INCLUDEPATH += $${ROOT_WEBKIT_DIR}/Source/ThirdParty
+}
+
 HEADERS += \
     Alignment.h \
     AlwaysInline.h \
index e5cc9cc..0be4bb0 100644 (file)
 
 #endif  /* OS(WINCE) && !PLATFORM(QT) */
 
-#if OS(WINCE)
+#if OS(WINCE) && !PLATFORM(QT)
 #define WTF_USE_WCHAR_UNICODE 1
 #elif PLATFORM(GTK)
 /* The GTK+ Unicode backend is configurable */
index bef0f7a..f0cfb91 100644 (file)
@@ -32,6 +32,7 @@
 #if USE(ICU_UNICODE) && !UCONFIG_NO_COLLATION
 
 #include <wtf/Assertions.h>
+#include <wtf/StringExtras.h>
 #include <wtf/Threading.h>
 #include <unicode/ucol.h>
 #include <string.h>
index 6ff5e1f..f28192a 100644 (file)
@@ -1,3 +1,19 @@
+2012-09-13  Kevin Funk  <kevin.funk@kdab.com>
+
+        Make compile with both OS(WINCE) and PLATFORM(QT) support
+        https://bugs.webkit.org/show_bug.cgi?id=95536
+
+        Reviewed by Simon Hausmann.
+
+        * WebCore.pri:
+        Set defines for the WinCE platform build
+        * platform/graphics/BitmapImage.cpp:
+        Use default implementation in BitmapImage::reportMemoryUsage() when Qt support available
+        * platform/graphics/GraphicsContext.cpp:
+        Same as above: use default implementation
+         * platform/win/ClipboardUtilitiesWin.cpp:
+        Remove unnecessary include
+
 2012-09-13  Keishi Hattori  <keishi@webkit.org>
 
         Create Localizer factory method for LocaleWin
index 9178ca2..b21e5af 100644 (file)
@@ -220,11 +220,21 @@ mac {
     LIBS += -framework Carbon -framework AppKit
 }
 
-win32-* {
+win32 {
     INCLUDEPATH += $$SOURCE_DIR/platform/win
-    LIBS += -lgdi32
-    LIBS += -lole32
-    LIBS += -luser32
+
+    wince* {
+        # see https://bugs.webkit.org/show_bug.cgi?id=43442
+        DEFINES += HAVE_LOCALTIME_S=0
+
+        LIBS += -lmmtimer
+        LIBS += -lole32
+    }
+    else {
+        LIBS += -lgdi32
+        LIBS += -lole32
+        LIBS += -luser32
+    }
 }
 
 # Remove whole program optimizations due to miscompilations
@@ -241,12 +251,6 @@ win32-msvc2005|win32-msvc2008|win32-msvc2010|wince*:{
     }
 }
 
-wince* {
-    DEFINES += HAVE_LOCALTIME_S=0
-    LIBS += -lmmtimer
-    LIBS += -lole32
-}
-
 mac {
     LIBS_PRIVATE += -framework Carbon -framework AppKit
 }
index 56d38de..0b11680 100644 (file)
@@ -580,7 +580,7 @@ void BitmapImage::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
     info.addMember(m_frameTimer);
     info.addVector(m_frames);
     for (unsigned i = 0; i < m_frameCount; ++i) {
-#if OS(WINCE)
+#if OS(WINCE) && !PLATFORM(QT)
         info.addRawBuffer(m_frames[i].m_frame.get(), m_frames[i].m_frameBytes);
 #else
         info.addRawBuffer(m_frames[i].m_frame, m_frames[i].m_frameBytes);
index 3a1bdcd..2f90911 100644 (file)
@@ -376,7 +376,7 @@ bool GraphicsContext::paintingDisabled() const
     return m_state.paintingDisabled;
 }
 
-#if !OS(WINCE)
+#if !OS(WINCE) || PLATFORM(QT)
 void GraphicsContext::drawText(const Font& font, const TextRun& run, const FloatPoint& point, int from, int to)
 {
     if (paintingDisabled())
index a168179..f237444 100644 (file)
 #include "TextEncoding.h"
 #include "markup.h"
 #include <shlobj.h>
-#include <shlwapi.h>
 #include <wininet.h> // for INTERNET_MAX_URL_LENGTH
 #include <wtf/StringExtras.h>
 #include <wtf/text/CString.h>
 #include <wtf/text/StringBuilder.h>
 #include <wtf/text/WTFString.h>
 
+#if !OS(WINCE)
+#include <shlwapi.h>
+#endif
+
 #if USE(CF)
 #include <CoreFoundation/CoreFoundation.h>
 #include <wtf/RetainPtr.h>
index a5a1d80..eb73c9e 100644 (file)
@@ -644,7 +644,11 @@ void EditorClientQt::setInputMethodState(bool active)
 
 bool EditorClientQt::supportsGlobalSelection()
 {
+#ifndef QT_NO_CLIPBOARD
     return qApp->clipboard()->supportsSelection();
+#else
+    return false;
+#endif
 }
 
 }
index b2d5639..fbd86e5 100644 (file)
@@ -1,3 +1,18 @@
+2012-09-13  Kevin Funk  <kevin.funk@kdab.com>
+
+        Make compile with both OS(WINCE) and PLATFORM(QT) support
+        https://bugs.webkit.org/show_bug.cgi?id=95536
+
+        Reviewed by Simon Hausmann.
+
+        Fix wince support in qmake files
+
+        * Tools.pro:
+        * qmake/mkspecs/features/configure.prf:
+        * qmake/mkspecs/features/default_post.prf:
+        * qmake/mkspecs/features/features.prf:
+        * qmake/mkspecs/features/functions.prf:
+
 2012-09-13  KwangYong Choi  <ky0.choi@samsung.com>
 
         [WK2] Add color picker API support for WebKit2
index 2551b51..37e7a06 100644 (file)
@@ -86,6 +86,10 @@ defineTest(finalizeConfigure) {
         WEBKIT_CONFIG -= build_drt build_wtr build_tests
     }
 
+    wince* {
+        WEBKIT_CONFIG -= build_drt
+    }
+
     production_build {
         WEBKIT_CONFIG -= build_drt build_wtr build_tests
     }
index de5a34c..227da1b 100644 (file)
@@ -171,7 +171,7 @@ contains(TEMPLATE, lib) {
 }
 
 # For anyone trying to include stdint.h
-win32-msvc*|win32-icc: INCLUDEPATH += $$ROOT_WEBKIT_DIR/Source/JavaScriptCore/os-win32
+win32-msvc*|win32-icc|wince*: INCLUDEPATH += $$ROOT_WEBKIT_DIR/Source/JavaScriptCore/os-win32
 
 contains(QT, webkit) {
     # In addition to the main shared QtWebKit library we also
index a9d0a44..2df33e1 100644 (file)
@@ -79,11 +79,17 @@ defineTest(detectFeatures) {
     }
 
     # Enable the USE(3D_GRAPHICS) flag when QtOpenGL is enabled.
-    contains(QT_CONFIG, opengl) {
+    # Disable on Windows CE for now, as ANGLE won't compile.
+    !wince*:contains(QT_CONFIG, opengl) {
         # On Windows we require GLES2/EGL through ANGLE.
         !win32|contains(QT_CONFIG, opengles2): WEBKIT_CONFIG += use_3d_graphics
     }
 
+    # Temporarily disable FTPDIR on Windows CE (missing functions from time.h)
+    wince* {
+        WEBKIT_CONFIG -= ftpdir
+    }
+
     # WebGL support - only enabled if we can use 3D graphics
     use?(3d_graphics): WEBKIT_CONFIG += webgl
 
index d45451c..588cd42 100644 (file)
@@ -7,7 +7,7 @@
 
 defineReplace(toSanitizedPath) {
     path = $$1
-    win32-msvc* {
+    win32-msvc*|wince* {
         components = $$split(path, :)
         count(components, 2): path = $$lower($$first(components)):$$last(components)
         return($$replace(path, \\\\, /))