[mingw-webkitgtk: 5/36] Update to 1.4.0

Kalev Lember kalev at fedoraproject.org
Tue Mar 6 21:09:50 UTC 2012


commit 92d1c1d49cc7aac5fefb4b6cbac9b329e6ecca5c
Author: Erik van Pienbroek <epienbro at fedoraproject.org>
Date:   Thu Apr 28 00:19:15 2011 +0200

    Update to 1.4.0

 .gitignore                                         |    1 +
 changeset_r75819.diff                              |  201 ++++++++
 changeset_r75825.diff                              |   17 +
 changeset_r75827.diff                              |   18 +
 changeset_r75830.diff                              |   11 +
 changeset_r75839.diff                              |   11 +
 changeset_r82344.diff                              |   38 ++
 changeset_r82701.diff                              |   10 +
 changeset_r84123.diff                              |   11 +
 sources                                            |    2 +-
 ...-fixes.patch => webkit-1.3.13-mingw-fixes.patch |  505 ++++++++++----------
 webkit-dump-render-tree-compile-fix.patch          |   31 --
 webkit-libpng15-compile-fix.patch                  |   11 +
 13 files changed, 573 insertions(+), 294 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 0ba4158..601702d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 /webkit-1.3.6.tar.gz
+/webkit-1.3.13.tar.gz
diff --git a/changeset_r75819.diff b/changeset_r75819.diff
new file mode 100644
index 0000000..6d9d964
--- /dev/null
+++ b/changeset_r75819.diff
@@ -0,0 +1,201 @@
+Index: Source/JavaScriptCore/wtf/FastMalloc.cpp
+===================================================================
+--- Source/JavaScriptCore/wtf/FastMalloc.cpp	(revision 75766)
++++ Source/JavaScriptCore/wtf/FastMalloc.cpp	(revision 75819)
+@@ -1447,5 +1447,19 @@
+   ALWAYS_INLINE bool shouldScavenge() const;
+ 
+-#if !HAVE(DISPATCH_H)
++#if HAVE(DISPATCH_H) || OS(WINDOWS)
++  void periodicScavenge();
++  ALWAYS_INLINE bool isScavengerSuspended();
++  ALWAYS_INLINE void scheduleScavenger();
++  ALWAYS_INLINE void rescheduleScavenger();
++  ALWAYS_INLINE void suspendScavenger();
++#endif
++
++#if HAVE(DISPATCH_H)
++  dispatch_queue_t m_scavengeQueue;
++  dispatch_source_t m_scavengeTimer;
++  bool m_scavengingSuspended;
++#elif OS(WINDOWS)
++  HANDLE m_scavengeQueueTimer;
++#else 
+   static NO_RETURN_WITH_VALUE void* runScavengerThread(void*);
+   NO_RETURN void scavengerThread();
+@@ -1457,10 +1471,4 @@
+   pthread_mutex_t m_scavengeMutex;
+   pthread_cond_t m_scavengeCondition;
+-#else // !HAVE(DISPATCH_H)
+-  void periodicScavenge();
+-
+-  dispatch_queue_t m_scavengeQueue;
+-  dispatch_source_t m_scavengeTimer;
+-  bool m_scavengingScheduled;
+ #endif
+ 
+@@ -1498,5 +1506,83 @@
+ #if USE_BACKGROUND_THREAD_TO_SCAVENGE_MEMORY
+ 
+-#if !HAVE(DISPATCH_H)
++#if HAVE(DISPATCH_H)
++
++void TCMalloc_PageHeap::initializeScavenger()
++{
++    m_scavengeQueue = dispatch_queue_create("com.apple.JavaScriptCore.FastMallocSavenger", NULL);
++    m_scavengeTimer = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER, 0, 0, m_scavengeQueue);
++    dispatch_time_t startTime = dispatch_time(DISPATCH_TIME_NOW, kScavengeDelayInSeconds * NSEC_PER_SEC);
++    dispatch_source_set_timer(m_scavengeTimer, startTime, kScavengeDelayInSeconds * NSEC_PER_SEC, 1000 * NSEC_PER_USEC);
++    dispatch_source_set_event_handler(m_scavengeTimer, ^{ periodicScavenge(); });
++    m_scavengingSuspended = false;
++}
++
++ALWAYS_INLINE bool TCMalloc_PageHeap::isScavengerSuspended()
++{
++    ASSERT(IsHeld(pageheap_lock));
++    return m_scavengingSuspended;
++}
++
++ALWAYS_INLINE void TCMalloc_PageHeap::scheduleScavenger()
++{
++    ASSERT(IsHeld(pageheap_lock));
++    m_scavengingSuspended = false;
++    dispatch_resume(m_scavengeTimer);
++}
++
++ALWAYS_INLINE void TCMalloc_PageHeap::rescheduleScavenger()
++{
++    // Nothing to do here for libdispatch.
++}
++
++ALWAYS_INLINE void TCMalloc_PageHeap::suspendScavenger()
++{
++    ASSERT(IsHeld(pageheap_lock));
++    m_scavengingSuspended = true;
++    dispatch_suspend(m_scavengeTimer);
++}
++
++#elif OS(WINDOWS)
++
++static void CALLBACK scavengerTimerFired(void* context, BOOLEAN)
++{
++    static_cast<TCMalloc_PageHeap*>(context)->periodicScavenge();
++}
++
++void TCMalloc_PageHeap::initializeScavenger()
++{
++    m_scavengeQueueTimer = 0;
++}
++
++ALWAYS_INLINE bool TCMalloc_PageHeap::isScavengerSuspended()
++{
++    ASSERT(IsHeld(pageheap_lock));
++    return !m_scavengeQueueTimer;
++}
++
++ALWAYS_INLINE void TCMalloc_PageHeap::scheduleScavenger()
++{
++    // We need to use WT_EXECUTEONLYONCE here and reschedule the timer, because
++    // Windows will fire the timer event even when the function is already running.
++    ASSERT(IsHeld(pageheap_lock));
++    CreateTimerQueueTimer(&m_scavengeQueueTimer, 0, scavengerTimerFired, 0, kScavengeDelayInSeconds * 1000, 0, WT_EXECUTEONLYONCE);
++}
++
++ALWAYS_INLINE void TCMalloc_PageHeap::rescheduleScavenger()
++{
++    // We must delete the timer and create it again, because it is not possible to retrigger a timer on Windows.
++    suspendScavenger();
++    scheduleScavenger();
++}
++
++ALWAYS_INLINE void TCMalloc_PageHeap::suspendScavenger()
++{
++    ASSERT(IsHeld(pageheap_lock));
++    HANDLE scavengeQueueTimer = m_scavengeQueueTimer;
++    m_scavengeQueueTimer = 0;
++    DeleteTimerQueueTimer(0, scavengeQueueTimer, 0);
++}
++
++#else
+ 
+ void TCMalloc_PageHeap::initializeScavenger()
+@@ -1536,25 +1622,4 @@
+     if (!m_scavengeThreadActive && shouldScavenge())
+         pthread_cond_signal(&m_scavengeCondition);
+-}
+-
+-#else // !HAVE(DISPATCH_H)
+-
+-void TCMalloc_PageHeap::initializeScavenger()
+-{
+-  m_scavengeQueue = dispatch_queue_create("com.apple.JavaScriptCore.FastMallocSavenger", NULL);
+-  m_scavengeTimer = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER, 0, 0, m_scavengeQueue);
+-  dispatch_time_t startTime = dispatch_time(DISPATCH_TIME_NOW, kScavengeDelayInSeconds * NSEC_PER_SEC);
+-  dispatch_source_set_timer(m_scavengeTimer, startTime, kScavengeDelayInSeconds * NSEC_PER_SEC, 1000 * NSEC_PER_USEC);
+-  dispatch_source_set_event_handler(m_scavengeTimer, ^{ periodicScavenge(); });
+-  m_scavengingScheduled = false;
+-}
+-
+-ALWAYS_INLINE void TCMalloc_PageHeap::signalScavenger()
+-{
+-    ASSERT(IsHeld(pageheap_lock));
+-    if (!m_scavengingScheduled && shouldScavenge()) {
+-        m_scavengingScheduled = true;
+-        dispatch_resume(m_scavengeTimer);
+-    }
+ }
+ 
+@@ -2387,11 +2452,27 @@
+ #if USE_BACKGROUND_THREAD_TO_SCAVENGE_MEMORY
+ 
+-#if !HAVE(DISPATCH_H)
+-#if OS(WINDOWS)
+-static void sleep(unsigned seconds)
+-{
+-    ::Sleep(seconds * 1000);
+-}
+-#endif
++#if HAVE(DISPATCH_H) || OS(WINDOWS)
++
++void TCMalloc_PageHeap::periodicScavenge()
++{
++    SpinLockHolder h(&pageheap_lock);
++    pageheap->scavenge();
++
++    if (shouldScavenge()) {
++        rescheduleScavenger();
++        return;
++    }
++
++    suspendScavenger();
++}
++
++ALWAYS_INLINE void TCMalloc_PageHeap::signalScavenger()
++{
++    ASSERT(IsHeld(pageheap_lock));
++    if (isScavengerSuspended() && shouldScavenge())
++        scheduleScavenger();
++}
++
++#else
+ 
+ void TCMalloc_PageHeap::scavengerThread()
+@@ -2418,17 +2499,5 @@
+ }
+ 
+-#else
+-
+-void TCMalloc_PageHeap::periodicScavenge()
+-{
+-    SpinLockHolder h(&pageheap_lock);
+-    pageheap->scavenge();
+-
+-    if (!shouldScavenge()) {
+-        m_scavengingScheduled = false;
+-        dispatch_suspend(m_scavengeTimer);
+-    }
+-}
+-#endif // HAVE(DISPATCH_H)
++#endif
+ 
+ #endif
diff --git a/changeset_r75825.diff b/changeset_r75825.diff
new file mode 100644
index 0000000..810fbca
--- /dev/null
+++ b/changeset_r75825.diff
@@ -0,0 +1,17 @@
+Index: Source/JavaScriptCore/wtf/FastMalloc.cpp
+===================================================================
+--- Source/JavaScriptCore/wtf/FastMalloc.cpp	(revision 75819)
++++ Source/JavaScriptCore/wtf/FastMalloc.cpp	(revision 75825)
+@@ -1460,4 +1460,5 @@
+   bool m_scavengingSuspended;
+ #elif OS(WINDOWS)
++  static void CALLBACK scavengerTimerFired(void*, BOOLEAN)
+   HANDLE m_scavengeQueueTimer;
+ #else 
+@@ -1545,5 +1546,5 @@
+ #elif OS(WINDOWS)
+ 
+-static void CALLBACK scavengerTimerFired(void* context, BOOLEAN)
++static void CALLBACK TCMalloc_PageHeap::scavengerTimerFired(void* context, BOOLEAN)
+ {
+     static_cast<TCMalloc_PageHeap*>(context)->periodicScavenge();
diff --git a/changeset_r75827.diff b/changeset_r75827.diff
new file mode 100644
index 0000000..52979f5
--- /dev/null
+++ b/changeset_r75827.diff
@@ -0,0 +1,18 @@
+Index: Source/JavaScriptCore/wtf/FastMalloc.cpp
+===================================================================
+--- Source/JavaScriptCore/wtf/FastMalloc.cpp	(revision 75825)
++++ Source/JavaScriptCore/wtf/FastMalloc.cpp	(revision 75827)
+@@ -1460,5 +1460,5 @@
+   bool m_scavengingSuspended;
+ #elif OS(WINDOWS)
+-  static void CALLBACK scavengerTimerFired(void*, BOOLEAN)
++  static void CALLBACK scavengerTimerFired(void*, BOOLEAN);
+   HANDLE m_scavengeQueueTimer;
+ #else 
+@@ -1546,5 +1546,5 @@
+ #elif OS(WINDOWS)
+ 
+-static void CALLBACK TCMalloc_PageHeap::scavengerTimerFired(void* context, BOOLEAN)
++void TCMalloc_PageHeap::scavengerTimerFired(void* context, BOOLEAN)
+ {
+     static_cast<TCMalloc_PageHeap*>(context)->periodicScavenge();
diff --git a/changeset_r75830.diff b/changeset_r75830.diff
new file mode 100644
index 0000000..edc902c
--- /dev/null
+++ b/changeset_r75830.diff
@@ -0,0 +1,11 @@
+Index: Source/JavaScriptCore/wtf/FastMalloc.cpp
+===================================================================
+--- Source/JavaScriptCore/wtf/FastMalloc.cpp	(revision 75827)
++++ Source/JavaScriptCore/wtf/FastMalloc.cpp	(revision 75830)
+@@ -1516,5 +1516,5 @@
+     dispatch_source_set_timer(m_scavengeTimer, startTime, kScavengeDelayInSeconds * NSEC_PER_SEC, 1000 * NSEC_PER_USEC);
+     dispatch_source_set_event_handler(m_scavengeTimer, ^{ periodicScavenge(); });
+-    m_scavengingSuspended = false;
++    m_scavengingSuspended = true;
+ }
+ 
diff --git a/changeset_r75839.diff b/changeset_r75839.diff
new file mode 100644
index 0000000..eeef48a
--- /dev/null
+++ b/changeset_r75839.diff
@@ -0,0 +1,11 @@
+Index: Source/JavaScriptCore/wtf/FastMalloc.cpp
+===================================================================
+--- Source/JavaScriptCore/wtf/FastMalloc.cpp	(revision 75830)
++++ Source/JavaScriptCore/wtf/FastMalloc.cpp	(revision 75839)
+@@ -1567,5 +1567,5 @@
+     // Windows will fire the timer event even when the function is already running.
+     ASSERT(IsHeld(pageheap_lock));
+-    CreateTimerQueueTimer(&m_scavengeQueueTimer, 0, scavengerTimerFired, 0, kScavengeDelayInSeconds * 1000, 0, WT_EXECUTEONLYONCE);
++    CreateTimerQueueTimer(&m_scavengeQueueTimer, 0, scavengerTimerFired, this, kScavengeDelayInSeconds * 1000, 0, WT_EXECUTEONLYONCE);
+ }
+ 
diff --git a/changeset_r82344.diff b/changeset_r82344.diff
new file mode 100644
index 0000000..ec56eab
--- /dev/null
+++ b/changeset_r82344.diff
@@ -0,0 +1,38 @@
+Index: Source/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp
+===================================================================
+--- Source/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp	(revision 82202)
++++ Source/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp	(revision 82344)
+@@ -242,9 +242,9 @@
+     png_structp png = m_reader->pngPtr();
+     png_infop info = m_reader->infoPtr();
+-    png_uint_32 width = png->width;
+-    png_uint_32 height = png->height;
++    png_uint_32 width = png_get_image_width(png, info);
++    png_uint_32 height = png_get_image_height(png, info);
+     
+     // Protect against large images.
+-    if (png->width > cMaxPNGSize || png->height > cMaxPNGSize) {
++    if (width > cMaxPNGSize || height > cMaxPNGSize) {
+         longjmp(JMPBUF(png), 1);
+         return;
+@@ -319,7 +319,12 @@
+ 
+     if (m_reader->decodingSizeOnly()) {
+-        // If we only needed the size, halt the reader.     
++        // If we only needed the size, halt the reader.
++#if defined(PNG_LIBPNG_VER_MAJOR) && defined(PNG_LIBPNG_VER_MINOR) && (PNG_LIBPNG_VER_MAJOR > 1 || (PNG_LIBPNG_VER_MAJOR == 1 && PNG_LIBPNG_VER_MINOR >= 5))
++        // '0' argument to png_process_data_pause means: Do not cache unprocessed data.
++        m_reader->setReadOffset(m_reader->currentBufferSize() - png_process_data_pause(png, 0));
++#else
+         m_reader->setReadOffset(m_reader->currentBufferSize() - png->buffer_size);
+         png->buffer_size = 0;
++#endif
+     }
+ }
+@@ -344,5 +349,5 @@
+         buffer.setOriginalFrameRect(IntRect(IntPoint(), size()));
+ 
+-        if (m_reader->pngPtr()->interlaced)
++        if (png_get_interlace_type(m_reader->pngPtr(), m_reader->infoPtr()) != PNG_INTERLACE_NONE)
+             m_reader->createInterlaceBuffer((m_reader->hasAlpha() ? 4 : 3) * size().width() * size().height());
+     }
diff --git a/changeset_r82701.diff b/changeset_r82701.diff
new file mode 100644
index 0000000..1620560
--- /dev/null
+++ b/changeset_r82701.diff
@@ -0,0 +1,10 @@
+Index: Source/WebCore/platform/graphics/pango/FontPlatformData.h
+===================================================================
+--- Source/WebCore/platform/graphics/pango/FontPlatformData.h	(revision 81548)
++++ Source/WebCore/platform/graphics/pango/FontPlatformData.h	(revision 82701)
+@@ -69,4 +69,5 @@
+ 
+     FontOrientation orientation() const { return Horizontal; } // FIXME: Implement.
++    void setOrientation(FontOrientation) { } // FIXME: Implement.
+ 
+     cairo_scaled_font_t* scaledFont() const { return m_scaledFont; }
diff --git a/changeset_r84123.diff b/changeset_r84123.diff
new file mode 100644
index 0000000..2a3ad9f
--- /dev/null
+++ b/changeset_r84123.diff
@@ -0,0 +1,11 @@
+Index: Source/WebCore/dom/make_names.pl
+===================================================================
+--- Source/WebCore/dom/make_names.pl	(revision 73989)
++++ Source/WebCore/dom/make_names.pl	(revision 84123)
+@@ -66,5 +66,5 @@
+     $gccLocation = "/usr/bin/gcc";
+ }
+-my $preprocessor = $gccLocation . " -E -P -x c++";
++my $preprocessor = $gccLocation . " -E -x c++";
+ 
+ GetOptions(
diff --git a/sources b/sources
index 1e07dc4..fdf6b18 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-ad409dfc737399c1d24dba9038c9eaf2  webkit-1.3.6.tar.gz
+984adaafac545a89c24351fd4dbd743c  webkit-1.3.13.tar.gz
diff --git a/webkit-mingw-fixes.patch b/webkit-1.3.13-mingw-fixes.patch
similarity index 74%
rename from webkit-mingw-fixes.patch
rename to webkit-1.3.13-mingw-fixes.patch
index 94ba93f..b1da29d 100644
--- a/webkit-mingw-fixes.patch
+++ b/webkit-1.3.13-mingw-fixes.patch
@@ -1,83 +1,232 @@
---- 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)
+--- Source/WebCore/platform/FileSystem.h.orig  2010-11-14 01:32:43.897746786 +0100
++++ Source/WebCore/platform/FileSystem.h       2010-11-14 01:33:35.471696924 +0100
+@@ -72,7 +72,7 @@
+ namespace WebCore {
+ 
+ // PlatformModule
+-#if OS(WINDOWS)
++#if OS(WINDOWS) && !PLATFORM(GTK)
+ typedef HMODULE PlatformModule;
+ #elif PLATFORM(QT)
+ #if defined(Q_WS_MAC)
+@@ -117,7 +117,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.
+@@ -203,7 +203,7 @@
+ CString applicationDirectoryPath();
+ #endif
+ 
+-#if PLATFORM(WIN) && !OS(WINCE)
++#if PLATFORM(WIN) && !OS(WINCE) && !PLATFORM(GTK)
+ String localUserSpecificStorageDirectory();
+ String roamingUserSpecificStorageDirectory();
+ bool safeCreateFile(const String&, CFDataRef);
+--- Source/WebCore/dom/XMLDocumentParserLibxml2.cpp.orig       2010-11-14 01:16:29.252186309 +0100
++++ Source/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
+ }
+--- Source/WebCore/plugins/PluginView.h.orig   2010-11-14 01:39:13.104335187 +0100
++++ Source/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;
+--- Source/WebCore/plugins/gtk/PluginViewGtk.cpp.orig  2010-11-14 01:53:23.131491478 +0100
++++ Source/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();
+--- Source/WebKit/gtk/webkit/webkitwebsettings.cpp.orig	2011-04-21 00:25:52.740516641 +0200
++++ Source/WebKit/gtk/webkit/webkitwebsettings.cpp	2011-04-21 00:26:00.067653521 +0200
+@@ -40,7 +40,7 @@
+ #if OS(UNIX)
+ #include <sys/utsname.h>
+ #elif OS(WINDOWS)
+-#include "SystemInfo.h"
++#include "win/SystemInfo.h"
+ #endif
  
--    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;
+ /**
+--- Source/WebCore/platform/graphics/WOFFFileFormat.cpp.orig	2011-04-21 00:37:18.437364878 +0200
++++ Source/WebCore/platform/graphics/WOFFFileFormat.cpp	2011-04-23 15:06:02.763002927 +0200
+@@ -43,7 +43,7 @@
+ #define ntohs(x) std_ntohs(x)
+ #endif
  
--    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));
+-#if PLATFORM(WIN)
++#ifdef WIN32
+ #if CPU(BIG_ENDIAN)
+ #define ntohs(x) ((uint16_t)(x))
+ #define htons(x) ((uint16_t)(x))
+--- Source/JavaScriptCore/wtf/unicode/glib/UnicodeGLib.h.orig	2011-04-24 10:14:16.151292163 +0200
++++ Source/JavaScriptCore/wtf/unicode/glib/UnicodeGLib.h	2011-04-24 10:14:59.632105921 +0200
+@@ -34,7 +34,11 @@
+ #include <stdlib.h>
+ #include <string.h>
  
-     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
++#ifdef WIN32
++typedef wchar_t UChar;
++#else
+ typedef uint16_t UChar;
++#endif
+ typedef int32_t UChar32;
+ 
+ namespace WTF {
+--- Source/WebCore/platform/KURL.cpp.orig      2010-11-14 01:23:55.869590450 +0100
++++ Source/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;
+ 
+--- Source/WebCore/platform/text/TextEncoding.cpp.orig 2010-11-14 01:26:26.023458630 +0100
++++ Source/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)
+--- Source/WebCore/platform/gtk/PopupMenuGtk.cpp.orig	2011-04-24 12:19:13.327884741 +0200
++++ Source/WebCore/platform/gtk/PopupMenuGtk.cpp	2011-04-24 12:39:13.653313780 +0200
+@@ -171,9 +171,9 @@
+     // menulists.
+     bool repeatingCharacter = unicodeCharacter != m_previousKeyEventCharacter;
+     if (event->time - m_previousKeyEventTimestamp > gSearchTimeoutMs)
+-        m_currentSearchString = String(static_cast<UChar*>(utf16String.get()), charactersWritten);
++        m_currentSearchString = String(reinterpret_cast<UChar*>(utf16String.get()), charactersWritten);
+     else if (repeatingCharacter)
+-        m_currentSearchString.append(String(static_cast<UChar*>(utf16String.get()), charactersWritten));
++        m_currentSearchString.append(String(reinterpret_cast<UChar*>(utf16String.get()), charactersWritten));
+ 
+     m_previousKeyEventTimestamp = event->time;
+     m_previousKeyEventCharacter = unicodeCharacter;
+--- Source/WebCore/platform/text/gtk/TextBreakIteratorGtk.cpp.orig     2010-11-14 02:00:18.844672945 +0100
++++ Source/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;
+
+--- Source/WebCore/plugins/PluginView.cpp.orig 2010-11-14 01:31:21.261395772 +0100
++++ Source/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)
+--- Source/WebCore/plugins/win/PluginDatabaseWin.cpp.orig	2010-11-14 01:45:58.543238260 +0100
++++ Source/WebCore/plugins/win/PluginDatabaseWin.cpp	2010-11-14 01:51:18.815019467 +0100
 @@ -102,7 +102,7 @@
          DWORD pathStrSize = sizeof(pathStr);
          DWORD type;
@@ -215,194 +364,26 @@
      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
+--- Source/JavaScriptCore/wtf/unicode/glib/UnicodeGLib.cpp.orig	2010-11-14 02:39:27.495446094 +0100
++++ Source/JavaScriptCore/wtf/unicode/glib/UnicodeGLib.cpp	2010-11-14 02:41:35.176717358 +0100
+@@ -189,8 +189,8 @@
+     GOwnPtr<char> utf8a;
+     GOwnPtr<char> utf8b;
  
- #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>
+-    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;
+--- Source/WebCore/plugins/gtk/PluginViewGtk.cpp.orig	2011-04-21 00:00:21.327670117 +0200
++++ Source/WebCore/plugins/gtk/PluginViewGtk.cpp	2011-04-21 00:01:13.050661439 +0200
+@@ -79,6 +79,7 @@
  #elif defined(GDK_WINDOWING_WIN32)
--#include "PluginMessageThrottlerWin.h"
-+#include "win/PluginMessageThrottlerWin.h"
+ #include "win/PluginMessageThrottlerWin.h"
  #include <gdk/gdkwin32.h>
++typedef void *HGIOBJ;
  #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 {
+ using JSC::ExecState;
diff --git a/webkit-libpng15-compile-fix.patch b/webkit-libpng15-compile-fix.patch
new file mode 100644
index 0000000..97646ad
--- /dev/null
+++ b/webkit-libpng15-compile-fix.patch
@@ -0,0 +1,11 @@
+--- Source/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp.libpng15	2011-03-21 19:43:07.000000000 +0100
++++ Source/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp	2011-04-24 17:58:34.849856493 +0200
+@@ -228,7 +228,7 @@
+     int compressionType;
+     char* profile;
+     png_uint_32 profileLength;
+-    if (png_get_iCCP(png, info, &profileName, &compressionType, &profile, &profileLength)) {
++    if (png_get_iCCP(png, info, &profileName, &compressionType, (png_bytepp) &profile, &profileLength)) {
+         ColorProfile colorProfile;
+         colorProfile.append(profile, profileLength);
+         return colorProfile;


More information about the scm-commits mailing list