summary refs log tree commit diff
path: root/pkgs/development/libraries/qt-5/5.6/qtwebkit.patch
blob: da1658554e442d818be7204fc4e273e62029d0af (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
diff --git a/Source/JavaScriptCore/API/JSStringRef.cpp b/Source/JavaScriptCore/API/JSStringRef.cpp
index 812f3d413..77a3fd0f4 100644
--- a/Source/JavaScriptCore/API/JSStringRef.cpp
+++ b/Source/JavaScriptCore/API/JSStringRef.cpp
@@ -37,7 +37,7 @@ using namespace WTF::Unicode;
 JSStringRef JSStringCreateWithCharacters(const JSChar* chars, size_t numChars)
 {
     initializeThreading();
-    return OpaqueJSString::create(chars, numChars).leakRef();
+    return OpaqueJSString::create(reinterpret_cast<const UChar*>(chars), numChars).leakRef();
 }
 
 JSStringRef JSStringCreateWithUTF8CString(const char* string)
@@ -62,7 +62,7 @@ JSStringRef JSStringCreateWithUTF8CString(const char* string)
 JSStringRef JSStringCreateWithCharactersNoCopy(const JSChar* chars, size_t numChars)
 {
     initializeThreading();
-    return OpaqueJSString::create(StringImpl::createWithoutCopying(chars, numChars, WTF::DoesNotHaveTerminatingNullCharacter)).leakRef();
+    return OpaqueJSString::create(StringImpl::createWithoutCopying(reinterpret_cast<const UChar*>(chars), numChars, WTF::DoesNotHaveTerminatingNullCharacter)).leakRef();
 }
 
 JSStringRef JSStringRetain(JSStringRef string)
@@ -83,7 +83,7 @@ size_t JSStringGetLength(JSStringRef string)
 
 const JSChar* JSStringGetCharactersPtr(JSStringRef string)
 {
-    return string->characters();
+    return reinterpret_cast<const JSChar*>(string->characters());
 }
 
 size_t JSStringGetMaximumUTF8CStringSize(JSStringRef string)
diff --git a/Source/JavaScriptCore/runtime/DateConversion.cpp b/Source/JavaScriptCore/runtime/DateConversion.cpp
index 0b57f012d..05e27338b 100644
--- a/Source/JavaScriptCore/runtime/DateConversion.cpp
+++ b/Source/JavaScriptCore/runtime/DateConversion.cpp
@@ -107,7 +107,8 @@ String formatDateTime(const GregorianDateTime& t, DateTimeFormat format, bool as
 #if OS(WINDOWS)
             TIME_ZONE_INFORMATION timeZoneInformation;
             GetTimeZoneInformation(&timeZoneInformation);
-            const WCHAR* timeZoneName = t.isDST() ? timeZoneInformation.DaylightName : timeZoneInformation.StandardName;
+            const WCHAR* winTimeZoneName = t.isDST() ? timeZoneInformation.DaylightName : timeZoneInformation.StandardName;
+            String timeZoneName(reinterpret_cast<const UChar*>(winTimeZoneName));
 #else
             struct tm gtm = t;
             char timeZoneName[70];
diff --git a/Source/WTF/WTF.pri b/Source/WTF/WTF.pri
index 1f4866d66..bb61e4ba3 100644
--- a/Source/WTF/WTF.pri
+++ b/Source/WTF/WTF.pri
@@ -12,7 +12,7 @@ mac {
     # Mac OS does ship libicu but not the associated header files.
     # Therefore WebKit provides adequate header files.
     INCLUDEPATH = $${ROOT_WEBKIT_DIR}/Source/WTF/icu $$INCLUDEPATH
-    LIBS += -licucore
+    LIBS += /usr/lib/libicucore.dylib
 } else:!use?(wchar_unicode): {
     win32 {
         CONFIG(static, static|shared) {
diff --git a/Source/WTF/wtf/TypeTraits.h b/Source/WTF/wtf/TypeTraits.h
index 9df2c95cf..f5d6121fd 100644
--- a/Source/WTF/wtf/TypeTraits.h
+++ b/Source/WTF/wtf/TypeTraits.h
@@ -72,6 +72,9 @@ namespace WTF {
     template<> struct IsInteger<unsigned long>      { static const bool value = true; };
     template<> struct IsInteger<long long>          { static const bool value = true; };
     template<> struct IsInteger<unsigned long long> { static const bool value = true; };
+#if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__) || (defined(_HAS_CHAR16_T_LANGUAGE_SUPPORT) && _HAS_CHAR16_T_LANGUAGE_SUPPORT)
+    template<> struct IsInteger<char16_t>           { static const bool value = true; };
+#endif
 #if !COMPILER(MSVC) || defined(_NATIVE_WCHAR_T_DEFINED)
     template<> struct IsInteger<wchar_t>            { static const bool value = true; };
 #endif
diff --git a/Source/WebCore/plugins/qt/PluginPackageQt.cpp b/Source/WebCore/plugins/qt/PluginPackageQt.cpp
index a923d49aa..46772a4bb 100644
--- a/Source/WebCore/plugins/qt/PluginPackageQt.cpp
+++ b/Source/WebCore/plugins/qt/PluginPackageQt.cpp
@@ -136,7 +136,11 @@ static void initializeGtk(QLibrary* module = 0)
         }
     }
 
+#ifdef NIXPKGS_LIBGTK2
+    QLibrary library(QLatin1String(NIXPKGS_LIBGTK2), 0);
+#else
     QLibrary library(QLatin1String("libgtk-x11-2.0"), 0);
+#endif
     if (library.load()) {
         typedef void *(*gtk_init_check_ptr)(int*, char***);
         gtk_init_check_ptr gtkInitCheck = (gtk_init_check_ptr)library.resolve("gtk_init_check");
diff --git a/Source/WebCore/plugins/qt/PluginViewQt.cpp b/Source/WebCore/plugins/qt/PluginViewQt.cpp
index de06a2fea..86fe39ef1 100644
--- a/Source/WebCore/plugins/qt/PluginViewQt.cpp
+++ b/Source/WebCore/plugins/qt/PluginViewQt.cpp
@@ -697,7 +697,11 @@ static Display *getPluginDisplay()
     // 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());
+#ifdef NIXPKGS_LIBGDK2
+    QLibrary library(QLatin1String(NIXPKGS_LIBGDK2), 0);
+#else
     QLibrary library(QLatin1String("libgdk-x11-2.0"), 0);
+#endif
     if (!library.load())
         return 0;
 
diff --git a/Source/WebKit2/PluginProcess/qt/PluginProcessMainQt.cpp b/Source/WebKit2/PluginProcess/qt/PluginProcessMainQt.cpp
index 8de65216b..38f5c05e5 100644
--- a/Source/WebKit2/PluginProcess/qt/PluginProcessMainQt.cpp
+++ b/Source/WebKit2/PluginProcess/qt/PluginProcessMainQt.cpp
@@ -53,7 +53,11 @@ static void messageHandler(QtMsgType type, const QMessageLogContext&, const QStr
 
 static bool initializeGtk()
 {
+#ifdef NIXPKGS_LIBGTK2
+    QLibrary gtkLibrary(QLatin1String(NIXPKGS_LIBGTK2), 0);
+#else
     QLibrary gtkLibrary(QLatin1String("libgtk-x11-2.0"), 0);
+#endif
     if (!gtkLibrary.load())
         return false;
     typedef void* (*gtk_init_ptr)(void*, void*);
diff --git a/Source/WebKit2/Shared/API/c/WKString.cpp b/Source/WebKit2/Shared/API/c/WKString.cpp
index cbac67dd8..23400a64e 100644
--- a/Source/WebKit2/Shared/API/c/WKString.cpp
+++ b/Source/WebKit2/Shared/API/c/WKString.cpp
@@ -55,7 +55,7 @@ size_t WKStringGetLength(WKStringRef stringRef)
 size_t WKStringGetCharacters(WKStringRef stringRef, WKChar* buffer, size_t bufferLength)
 {
     COMPILE_ASSERT(sizeof(WKChar) == sizeof(UChar), WKStringGetCharacters_sizeof_WKChar_matches_UChar);
-    return (toImpl(stringRef)->getCharacters(static_cast<UChar*>(buffer), bufferLength));
+    return (toImpl(stringRef)->getCharacters(reinterpret_cast<UChar*>(buffer), bufferLength));
 }
 
 size_t WKStringGetMaximumUTF8CStringSize(WKStringRef stringRef)
diff --git a/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp b/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp
index d734ff684..0f6ff63d1 100644
--- a/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp
+++ b/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp
@@ -64,7 +64,11 @@ static Display* getPluginDisplay()
     // The code below has the same effect as this one:
     // Display *gdkDisplay = gdk_x11_display_get_xdisplay(gdk_display_get_default());
 
+#ifdef NIXPKGS_LIBGDK2
+    QLibrary library(QLatin1String(NIXPKGS_LIBGDK2), 0);
+#else
     QLibrary library(QLatin1String("libgdk-x11-2.0"), 0);
+#endif
     if (!library.load())
         return 0;