Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > e0f580afaab0bae40b47e15ecb321e3d > files > 5

mingw32-webkitgtk-1.3.6-2.fc14.src.rpm

--- WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp.orig	2010-11-14 02:01:30.773016494 +0100
+++ WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp	2010-11-14 02:02:08.747833375 +0100
@@ -846,7 +846,7 @@
     if (!dicts)
         return;
 
-    gchar* ctext = g_utf16_to_utf8(const_cast<gunichar2*>(text), length, 0, 0, 0);
+    gchar* ctext = g_utf16_to_utf8(const_cast<gunichar2*>(reinterpret_cast<const gunichar2*>(text)), length, 0, 0, 0);
     int utflen = g_utf8_strlen(ctext, -1);
 
     PangoLanguage* language = pango_language_get_default();
--- JavaScriptCore/wtf/unicode/glib/UnicodeGLib.cpp.orig	2010-11-14 02:39:27.495446094 +0100
+++ JavaScriptCore/wtf/unicode/glib/UnicodeGLib.cpp	2010-11-14 02:41:35.176717358 +0100
@@ -49,7 +49,7 @@
     GOwnPtr<GError> gerror;
 
     GOwnPtr<char> utf8src;
-    utf8src.set(g_utf16_to_utf8(src, srcLength, 0, 0, &gerror.outPtr()));
+    utf8src.set(g_utf16_to_utf8(reinterpret_cast<const gunichar2*>(src), srcLength, 0, 0, &gerror.outPtr()));
     if (gerror) {
         *error = true;
         return -1;
@@ -60,7 +60,7 @@
 
     long utf16resultLength = -1;
     GOwnPtr<UChar> utf16result;
-    utf16result.set(g_utf8_to_utf16(utf8result.get(), -1, 0, &utf16resultLength, &gerror.outPtr()));
+    utf16result.set(reinterpret_cast<UChar*>(g_utf8_to_utf16(utf8result.get(), -1, 0, &utf16resultLength, &gerror.outPtr())));
     if (gerror) {
         *error = true;
         return -1;
@@ -81,7 +81,7 @@
     GOwnPtr<GError> gerror;
 
     GOwnPtr<char> utf8src;
-    utf8src.set(g_utf16_to_utf8(src, srcLength, 0, 0, &gerror.outPtr()));
+    utf8src.set(g_utf16_to_utf8(reinterpret_cast<const gunichar2*>(src), srcLength, 0, 0, &gerror.outPtr()));
     if (gerror) {
         *error = true;
         return -1;
@@ -92,7 +92,7 @@
 
     long utf16resultLength = -1;
     GOwnPtr<UChar> utf16result;
-    utf16result.set(g_utf8_to_utf16(utf8result.get(), -1, 0, &utf16resultLength, &gerror.outPtr()));
+    utf16result.set(reinterpret_cast<UChar*>(g_utf8_to_utf16(utf8result.get(), -1, 0, &utf16resultLength, &gerror.outPtr())));
     if (gerror) {
         *error = true;
         return -1;
@@ -113,7 +113,7 @@
     GOwnPtr<GError> gerror;
 
     GOwnPtr<char> utf8src;
-    utf8src.set(g_utf16_to_utf8(src, srcLength, 0, 0, &gerror.outPtr()));
+    utf8src.set(g_utf16_to_utf8(reinterpret_cast<const gunichar2*>(src), srcLength, 0, 0, &gerror.outPtr()));
     if (gerror) {
         *error = true;
         return -1;
@@ -124,7 +124,7 @@
 
     long utf16resultLength = -1;
     GOwnPtr<UChar> utf16result;
-    utf16result.set(g_utf8_to_utf16(utf8result.get(), -1, 0, &utf16resultLength, &gerror.outPtr()));
+    utf16result.set(reinterpret_cast<UChar*>(g_utf8_to_utf16(utf8result.get(), -1, 0, &utf16resultLength, &gerror.outPtr())));
     if (gerror) {
         *error = true;
         return -1;
@@ -189,8 +189,8 @@
     GOwnPtr<char> utf8a;
     GOwnPtr<char> utf8b;
 
-    utf8a.set(g_utf16_to_utf8(a, len, 0, 0, 0));
-    utf8b.set(g_utf16_to_utf8(b, len, 0, 0, 0));
+    utf8a.set(g_utf16_to_utf8(reinterpret_cast<const gunichar2*>(a), len, 0, 0, 0));
+    utf8b.set(g_utf16_to_utf8(reinterpret_cast<const gunichar2*>(b), len, 0, 0, 0));
 
     GOwnPtr<char> foldedA;
     GOwnPtr<char> foldedB;
--- WebCore/plugins/win/PluginDatabaseWin.cpp.orig	2010-11-14 01:45:58.543238260 +0100
+++ WebCore/plugins/win/PluginDatabaseWin.cpp	2010-11-14 01:51:18.815019467 +0100
@@ -102,7 +102,7 @@
         DWORD pathStrSize = sizeof(pathStr);
         DWORD type;
 
-        result = SHGetValue(key, name, TEXT("Path"), &type, (LPBYTE)pathStr, &pathStrSize);
+        result = SHGetValueW(key, name, L"Path", &type, (LPBYTE)pathStr, &pathStrSize);
         if (result != ERROR_SUCCESS || type != REG_SZ)
             continue;
 
@@ -210,7 +210,7 @@
     HKEY key;
     LONG result;
     
-    result = RegOpenKeyEx(HKEY_LOCAL_MACHINE, TEXT("Software\\Mozilla"), 0, KEY_READ, &key);
+    result = RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"Software\\Mozilla", 0, KEY_READ, &key);
     if (result == ERROR_SUCCESS) {
         WCHAR name[128];
         FILETIME lastModified;
@@ -227,7 +227,7 @@
             HKEY extensionsKey;
 
             // Try opening the key
-            result = RegOpenKeyEx(key, extensionsPath.charactersWithNullTermination(), 0, KEY_READ, &extensionsKey);
+            result = RegOpenKeyExW(key, extensionsPath.charactersWithNullTermination(), 0, KEY_READ, &extensionsKey);
 
             if (result == ERROR_SUCCESS) {
                 // Now get the plugins directory
@@ -235,7 +235,7 @@
                 DWORD pluginsDirectorySize = sizeof(pluginsDirectoryStr);
                 DWORD type;
 
-                result = RegQueryValueEx(extensionsKey, TEXT("Plugins"), 0, &type, (LPBYTE)&pluginsDirectoryStr, &pluginsDirectorySize);
+                result = RegQueryValueExW(extensionsKey, L"Plugins", 0, &type, (LPBYTE)&pluginsDirectoryStr, &pluginsDirectorySize);
 
                 if (result == ERROR_SUCCESS && type == REG_SZ)
                     directories.append(String(pluginsDirectoryStr, pluginsDirectorySize / sizeof(WCHAR) - 1));
@@ -253,7 +253,7 @@
 #if !OS(WINCE)
     // The new WMP Firefox plugin is installed in \PFiles\Plugins if it can't find any Firefox installs
     WCHAR pluginDirectoryStr[_MAX_PATH + 1];
-    DWORD pluginDirectorySize = ::ExpandEnvironmentStringsW(TEXT("%SYSTEMDRIVE%\\PFiles\\Plugins"), pluginDirectoryStr, WTF_ARRAY_LENGTH(pluginDirectoryStr));
+    DWORD pluginDirectorySize = ::ExpandEnvironmentStringsW(L"%SYSTEMDRIVE%\\PFiles\\Plugins", pluginDirectoryStr, WTF_ARRAY_LENGTH(pluginDirectoryStr));
 
     if (pluginDirectorySize > 0 && pluginDirectorySize <= WTF_ARRAY_LENGTH(pluginDirectoryStr))
         directories.append(String(pluginDirectoryStr, pluginDirectorySize - 1));
@@ -263,7 +263,7 @@
     WCHAR installationDirectoryStr[_MAX_PATH];
     DWORD installationDirectorySize = sizeof(installationDirectoryStr);
 
-    HRESULT result = SHGetValue(HKEY_LOCAL_MACHINE, TEXT("Software\\Microsoft\\MediaPlayer"), TEXT("Installation Directory"), &type, (LPBYTE)&installationDirectoryStr, &installationDirectorySize);
+    HRESULT result = SHGetValueW(HKEY_LOCAL_MACHINE, L"Software\\Microsoft\\MediaPlayer", L"Installation Directory", &type, (LPBYTE)&installationDirectoryStr, &installationDirectorySize);
 
     if (result == ERROR_SUCCESS && type == REG_SZ)
         directories.append(String(installationDirectoryStr, installationDirectorySize / sizeof(WCHAR) - 1));
@@ -275,7 +275,7 @@
     WCHAR installationDirectoryStr[_MAX_PATH];
     DWORD installationDirectorySize = sizeof(installationDirectoryStr);
 
-    HRESULT result = SHGetValue(HKEY_LOCAL_MACHINE, TEXT("Software\\Apple Computer, Inc.\\QuickTime"), TEXT("InstallDir"), &type, (LPBYTE)&installationDirectoryStr, &installationDirectorySize);
+    HRESULT result = SHGetValueW(HKEY_LOCAL_MACHINE, L"Software\\Apple Computer, Inc.\\QuickTime", L"InstallDir", &type, (LPBYTE)&installationDirectoryStr, &installationDirectorySize);
 
     if (result == ERROR_SUCCESS && type == REG_SZ) {
         String pluginDir = String(installationDirectoryStr, installationDirectorySize / sizeof(WCHAR) - 1) + "\\plugins";
@@ -286,7 +286,7 @@
 static inline void addAdobeAcrobatPluginDirectory(Vector<String>& directories)
 {
     HKEY key;
-    HRESULT result = RegOpenKeyEx(HKEY_LOCAL_MACHINE, TEXT("Software\\Adobe\\Acrobat Reader"), 0, KEY_READ, &key);
+    HRESULT result = RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"Software\\Adobe\\Acrobat Reader", 0, KEY_READ, &key);
     if (result != ERROR_SUCCESS)
         return;
 
@@ -317,7 +317,7 @@
         DWORD acrobatInstallPathSize = sizeof(acrobatInstallPathStr);
 
         String acrobatPluginKeyPath = "Software\\Adobe\\Acrobat Reader\\" + latestAcrobatVersionString + "\\InstallPath";
-        result = SHGetValue(HKEY_LOCAL_MACHINE, acrobatPluginKeyPath.charactersWithNullTermination(), 0, &type, (LPBYTE)acrobatInstallPathStr, &acrobatInstallPathSize);
+        result = SHGetValueW(HKEY_LOCAL_MACHINE, acrobatPluginKeyPath.charactersWithNullTermination(), 0, &type, (LPBYTE)acrobatInstallPathStr, &acrobatInstallPathSize);
 
         if (result == ERROR_SUCCESS) {
             String acrobatPluginDirectory = String(acrobatInstallPathStr, acrobatInstallPathSize / sizeof(WCHAR) - 1) + "\\browser";
@@ -331,7 +331,7 @@
 static inline void addJavaPluginDirectory(Vector<String>& directories)
 {
     HKEY key;
-    HRESULT result = RegOpenKeyEx(HKEY_LOCAL_MACHINE, TEXT("Software\\JavaSoft\\Java Plug-in"), 0, KEY_READ, &key);
+    HRESULT result = RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"Software\\JavaSoft\\Java Plug-in", 0, KEY_READ, &key);
     if (result != ERROR_SUCCESS)
         return;
 
@@ -364,10 +364,10 @@
         DWORD useNewPluginSize;
 
         String javaPluginKeyPath = "Software\\JavaSoft\\Java Plug-in\\" + latestJavaVersionString;
-        result = SHGetValue(HKEY_LOCAL_MACHINE, javaPluginKeyPath.charactersWithNullTermination(), TEXT("UseNewJavaPlugin"), &type, (LPVOID)&useNewPluginValue, &useNewPluginSize);
+        result = SHGetValueW(HKEY_LOCAL_MACHINE, javaPluginKeyPath.charactersWithNullTermination(), L"UseNewJavaPlugin", &type, (LPVOID)&useNewPluginValue, &useNewPluginSize);
 
         if (result == ERROR_SUCCESS && useNewPluginValue == 1) {
-            result = SHGetValue(HKEY_LOCAL_MACHINE, javaPluginKeyPath.charactersWithNullTermination(), TEXT("JavaHome"), &type, (LPBYTE)javaInstallPathStr, &javaInstallPathSize);
+            result = SHGetValueW(HKEY_LOCAL_MACHINE, javaPluginKeyPath.charactersWithNullTermination(), L"JavaHome", &type, (LPBYTE)javaInstallPathStr, &javaInstallPathSize);
             if (result == ERROR_SUCCESS) {
                 String javaPluginDirectory = String(javaInstallPathStr, javaInstallPathSize / sizeof(WCHAR) - 1) + "\\bin\\new_plugin";
                 directories.append(javaPluginDirectory);
@@ -387,12 +387,12 @@
     if (!cachedPluginDirectory) {
         cachedPluginDirectory = true;
 
-        int moduleFileNameLen = GetModuleFileName(0, moduleFileNameStr, _MAX_PATH);
+        int moduleFileNameLen = GetModuleFileNameW(0, moduleFileNameStr, _MAX_PATH);
 
         if (!moduleFileNameLen || moduleFileNameLen == _MAX_PATH)
             goto exit;
 
-        if (!PathRemoveFileSpec(moduleFileNameStr))
+        if (!PathRemoveFileSpecW(moduleFileNameStr))
             goto exit;
 
         pluginsDirectory = String(moduleFileNameStr) + "\\Plugins";
@@ -406,15 +406,15 @@
 #if !OS(WINCE)
     WCHAR systemDirectoryStr[MAX_PATH];
 
-    if (!GetSystemDirectory(systemDirectoryStr, WTF_ARRAY_LENGTH(systemDirectoryStr)))
+    if (!GetSystemDirectoryW(systemDirectoryStr, WTF_ARRAY_LENGTH(systemDirectoryStr)))
         return;
 
     WCHAR macromediaDirectoryStr[MAX_PATH];
 
-    PathCombine(macromediaDirectoryStr, systemDirectoryStr, TEXT("macromed\\Flash"));
+    PathCombineW(macromediaDirectoryStr, systemDirectoryStr, L"macromed\\Flash");
     directories.append(macromediaDirectoryStr);
 
-    PathCombine(macromediaDirectoryStr, systemDirectoryStr, TEXT("macromed\\Shockwave 10"));
+    PathCombineW(macromediaDirectoryStr, systemDirectoryStr, L"macromed\\Shockwave 10");
     directories.append(macromediaDirectoryStr);
 #endif
 }
--- WebCore/plugins/PluginView.cpp.orig	2010-11-14 01:31:21.261395772 +0100
+++ WebCore/plugins/PluginView.cpp	2010-11-14 01:38:16.645071930 +0100
@@ -340,7 +340,7 @@
 #endif
 
 #if ENABLE(NETSCAPE_PLUGIN_API)
-#ifdef XP_WIN
+#if defined(XP_WIN) && !PLATFORM(GTK)
     // Unsubclass the window
     if (m_isWindowed) {
 #if OS(WINCE)
--- WebCore/plugins/gtk/PluginViewGtk.cpp.orig	2010-11-14 01:53:23.131491478 +0100
+++ WebCore/plugins/gtk/PluginViewGtk.cpp	2010-11-14 01:58:15.688495036 +0100
@@ -47,6 +47,7 @@
 #include "Image.h"
 #include "KeyboardEvent.h"
 #include "MouseEvent.h"
+#include "NotImplemented.h"
 #include "Page.h"
 #include "PlatformKeyboardEvent.h"
 #include "PlatformMouseEvent.h"
@@ -74,7 +75,7 @@
 #include <cairo/cairo-xlib.h>
 #include <gdk/gdkx.h>
 #elif defined(GDK_WINDOWING_WIN32)
-#include "PluginMessageThrottlerWin.h"
+#include "win/PluginMessageThrottlerWin.h"
 #include <gdk/gdkwin32.h>
 #endif
 
@@ -686,6 +687,7 @@
         gtk_widget_queue_draw(m_parentFrame->view()->hostWindow()->platformPageClient());
 }
 
+#ifndef GDK_WINDOWING_WIN32
 static Display* getPluginDisplay()
 {
     // The plugin toolkit might have a different X connection open.  Since we're
@@ -699,6 +701,7 @@
     return 0;
 #endif
 }
+#endif
 
 #if defined(XP_UNIX)
 static void getVisualAndColormap(int depth, Visual** visual, Colormap* colormap)
@@ -769,15 +772,17 @@
         PluginView::setCurrentPluginView(this);
         JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly);
         setCallingPlugin(true);
+#if defined(XP_UNIX)
         m_plugin->pluginFuncs()->getvalue(m_instance, NPPVpluginNeedsXEmbed, &m_needsXEmbed);
+#endif
         setCallingPlugin(false);
         PluginView::setCurrentPluginView(0);
     }
 
     if (m_isWindowed) {
-#if defined(XP_UNIX)
         GtkWidget* pageClient = m_parentFrame->view()->hostWindow()->platformPageClient();
 
+#if defined(XP_UNIX)
         if (m_needsXEmbed) {
             // If our parent is not anchored the startup process will
             // fail miserably for XEmbed plugins a bit later on when
@@ -798,7 +803,9 @@
 #endif
     } else {
         setPlatformWidget(0);
+#if defined(XP_UNIX)
         m_pluginDisplay = getPluginDisplay();
+#endif
     }
 
     show();
--- WebCore/plugins/PluginView.h.orig	2010-11-14 01:39:13.104335187 +0100
+++ WebCore/plugins/PluginView.h	2010-11-14 01:58:44.760665201 +0100
@@ -384,7 +384,7 @@
 
 private:
 
-#if defined(XP_UNIX) || OS(SYMBIAN)
+#if defined(XP_UNIX) || OS(SYMBIAN) || PLATFORM(GTK)
         void setNPWindowIfNeeded();
 #elif defined(XP_MACOSX)
         NP_CGContext m_npCgContext;
--- WebCore/platform/KURL.cpp.orig	2010-11-14 01:23:55.869590450 +0100
+++ WebCore/platform/KURL.cpp	2010-11-14 01:25:04.996595383 +0100
@@ -1454,7 +1454,7 @@
 #elif USE(GLIB_UNICODE)
     GOwnPtr<gchar> utf8Hostname;
     GOwnPtr<GError> utf8Err;
-    utf8Hostname.set(g_utf16_to_utf8(str, strLen, 0, 0, &utf8Err.outPtr()));
+    utf8Hostname.set(g_utf16_to_utf8(reinterpret_cast<const gunichar2*>(str), strLen, 0, 0, &utf8Err.outPtr()));
     if (utf8Err)
         return;
 
--- WebCore/platform/text/TextEncoding.cpp.orig	2010-11-14 01:26:26.023458630 +0100
+++ WebCore/platform/text/TextEncoding.cpp	2010-11-14 01:27:31.208555988 +0100
@@ -119,7 +119,7 @@
     return newTextCodec(*this)->encode(reinterpret_cast<const UChar *>(str.utf16()), str.length(), handling);
 #elif USE(GLIB_UNICODE)
     GOwnPtr<char> UTF8Source;
-    UTF8Source.set(g_utf16_to_utf8(characters, length, 0, 0, 0));
+    UTF8Source.set(g_utf16_to_utf8(reinterpret_cast<const gunichar2*>(characters), length, 0, 0, 0));
     if (!UTF8Source) {
         // If conversion to UTF-8 failed, try with the string without normalization
         return newTextCodec(*this)->encode(characters, length, handling);
@@ -130,7 +130,7 @@
 
     long UTF16Length;
     GOwnPtr<UChar> UTF16Normalized;
-    UTF16Normalized.set(g_utf8_to_utf16(UTF8Normalized.get(), -1, 0, &UTF16Length, 0));
+    UTF16Normalized.set(reinterpret_cast<UChar*>(g_utf8_to_utf16(UTF8Normalized.get(), -1, 0, &UTF16Length, 0)));
 
     return newTextCodec(*this)->encode(UTF16Normalized.get(), UTF16Length, handling);
 #elif OS(WINCE)
--- WebCore/platform/text/gtk/TextBreakIteratorGtk.cpp.orig	2010-11-14 02:00:18.844672945 +0100
+++ WebCore/platform/text/gtk/TextBreakIteratorGtk.cpp	2010-11-14 02:00:37.786081187 +0100
@@ -75,7 +75,7 @@
 bool CharacterIterator::setText(const UChar* string, int length)
 {
     long utf8Size = 0;
-    m_utf8.set(g_utf16_to_utf8(string, length, 0, &utf8Size, 0));
+    m_utf8.set(g_utf16_to_utf8(reinterpret_cast<const gunichar2*>(string), length, 0, &utf8Size, 0));
     if (!utf8Size)
         return false;
 
--- WebCore/platform/FileSystem.h.orig	2010-11-14 01:32:43.897746786 +0100
+++ WebCore/platform/FileSystem.h	2010-11-14 01:33:35.471696924 +0100
@@ -67,7 +67,7 @@
 namespace WebCore {
 
 // PlatformModule
-#if OS(WINDOWS)
+#if OS(WINDOWS) && !PLATFORM(GTK)
 typedef HMODULE PlatformModule;
 #elif PLATFORM(QT)
 #if defined(Q_WS_MAC)
@@ -112,7 +112,7 @@
 #if PLATFORM(QT)
 typedef QFile* PlatformFileHandle;
 const PlatformFileHandle invalidPlatformFileHandle = 0;
-#elif OS(WINDOWS)
+#elif OS(WINDOWS) && !PLATFORM(GTK)
 typedef HANDLE PlatformFileHandle;
 // FIXME: -1 is INVALID_HANDLE_VALUE, defined in <winbase.h>. Chromium tries to
 // avoid using Windows headers in headers.  We'd rather move this into the .cpp.
@@ -180,7 +180,7 @@
 // Encode a string for use within a file name.
 String encodeForFileName(const String&);
 
-#if PLATFORM(WIN)
+#if PLATFORM(WIN) && !PLATFORM(GTK)
 String localUserSpecificStorageDirectory();
 String roamingUserSpecificStorageDirectory();
 
--- WebCore/dom/XMLDocumentParserLibxml2.cpp.orig	2010-11-14 01:16:29.252186309 +0100
+++ WebCore/dom/XMLDocumentParserLibxml2.cpp	2010-11-14 01:17:05.364811184 +0100
@@ -940,7 +940,7 @@
     if (isStopped())
         return;
 
-#if COMPILER(MSVC) || COMPILER(RVCT)
+#if COMPILER(MSVC) || COMPILER(RVCT) || COMPILER(MINGW)
     char m[1024];
     vsnprintf(m, sizeof(m) - 1, message, args);
 #else
@@ -954,7 +954,7 @@
     else
         handleError(type, m, lineNumber(), columnNumber());
 
-#if !COMPILER(MSVC) && !COMPILER(RVCT)
+#if !COMPILER(MSVC) && !COMPILER(RVCT) && !COMPILER(MINGW)
     free(m);
 #endif
 }
--- JavaScriptCore/wtf/unicode/glib/UnicodeGLib.h.orig	2010-11-14 12:48:13.642806376 +0100
+++ JavaScriptCore/wtf/unicode/glib/UnicodeGLib.h	2010-11-14 12:48:33.280858182 +0100
@@ -34,7 +34,11 @@
 #include <stdlib.h>
 #include <string.h>
 
+#ifdef WIN32
+typedef wchar_t UChar;
+#else
 typedef uint16_t UChar;
+#endif
 typedef int32_t UChar32;
 
 namespace WTF {