[mingw-webkitgtk: 2/36] Initial import

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


commit aba5819bdcb8b42232dfa1dbd8ca9183f4559214
Author: Erik van Pienbroek <epienbro at fedoraproject.org>
Date:   Fri Nov 19 15:12:31 2010 +0100

    Initial import

 .gitignore                                |    1 +
 mingw32-webkitgtk.spec                    |  356 +++++++++++++++++++++++++
 sources                                   |    1 +
 webkit-dump-render-tree-compile-fix.patch |   31 +++
 webkit-jpeg-boolean-fix.patch             |   29 ++
 webkit-mingw-fixes.patch                  |  408 +++++++++++++++++++++++++++++
 6 files changed, 826 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..0ba4158 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/webkit-1.3.6.tar.gz
diff --git a/mingw32-webkitgtk.spec b/mingw32-webkitgtk.spec
new file mode 100644
index 0000000..9d29553
--- /dev/null
+++ b/mingw32-webkitgtk.spec
@@ -0,0 +1,356 @@
+%global __strip %{_mingw32_strip}
+%global __objdump %{_mingw32_objdump}
+%global _use_internal_dependency_generator 0
+%global __find_requires %{_mingw32_findrequires}
+%global __find_provides %{_mingw32_findprovides}
+%define __debug_install_post %{_mingw32_debug_install_post}
+
+## NOTE: Lots of files in various subdirectories have the same name (such as
+## "LICENSE") so this short macro allows us to distinguish them by using their
+## directory names (from the source tree) as prefixes for the files.
+%global add_to_doc_files() \
+    mkdir -p %{buildroot}%{_docdir}/%{name}-%{version} ||: ; \
+    cp -p %1  %{buildroot}%{_docdir}/%{name}-%{version}/$(echo '%1' | sed -e 's!/!.!g')
+
+#define	svn_revision	41071
+
+## Optional build modifications...
+## --with 3dtransforms: Enables support for 3-D transforms.
+##	(Default: No)
+##
+## --with coverage: Enables compile-time checking of code coverage.
+##	(Default: No)
+##
+## --with debug: Enable more verbose debugging. Makes runtime a bit slower.
+##	Also disables the optimized memory allocator.
+##	(Default: No)
+##
+## --with html5video: Enable HTML5 video element support using Gstreamer.
+##	(Default: No) 
+##
+## --with jit: Enable JIT ("just-in-time") JavaScript compiling support.
+##	Only supported on ix86 at this time, according to upstream.
+##	(Default: No)
+##	
+## --with svg: Experimental SVG support (filters)
+##	(Default: No) 
+##
+## --with wml: Build support for WML
+##	(Default: No)
+
+%bcond_with	3dtransforms
+%bcond_with	coverage
+%bcond_with	debug
+%bcond_with	html5video
+%bcond_with	jit
+%bcond_with	svg
+%bcond_with	wml
+
+Name:		mingw32-webkitgtk
+Version:	1.3.6
+Release:	2%{?dist}
+Summary:	MinGW Windows web content engine library
+
+Group:		Development/Libraries
+License:	LGPLv2+ and BSD
+URL:		http://webkit.org/
+
+#Source0:	http://nightly.webkit.org/files/trunk/src/WebKit-r%{svn_revision}.tar.bz2
+Source0:	http://www.webkitgtk.org/webkit-%{version}.tar.gz
+
+# The Fedora MinGW libjpeg uses the datatype 'jpeg_boolean' instead
+# of 'boolean' to avoid a conflict with the header rpcndr.h
+Patch0:		webkit-jpeg-boolean-fix.patch
+
+# Several changes required to get webkitgtk cross-compiled
+# Originally created by Mikkel Kruse Johnsen
+# https://bugs.webkit.org/show_bug.cgi?id=23872
+Patch1:		webkit-mingw-fixes.patch
+
+# The DumpRenderTree tool fails to compile for version 1.3.6
+# As this tool isn't packaged a ugly hack can be applied to make it compile
+Patch2:		webkit-dump-render-tree-compile-fix.patch
+
+BuildArch:	noarch
+
+BuildRequires:	bison
+BuildRequires:	flex
+BuildRequires:	gperf
+
+# Required for glib-mkenums
+BuildRequires:	glib2-devel
+
+BuildRequires:	gettext
+BuildRequires:	mingw32-filesystem
+BuildRequires:	mingw32-gcc
+BuildRequires:	mingw32-gcc-c++
+BuildRequires:	mingw32-binutils
+BuildRequires:	mingw32-gtk2
+BuildRequires:	mingw32-libxml2
+BuildRequires:	mingw32-libsoup
+BuildRequires:	mingw32-libidn
+BuildRequires:	mingw32-sqlite
+BuildRequires:	mingw32-libxslt
+BuildRequires:	mingw32-pthreads
+BuildRequires:	mingw32-enchant
+
+## Conditional dependencies...
+%if %{with html5video}
+BuildRequires:	mingw32-gstreamer
+%endif
+
+
+%description 
+WebKitGTK+ is an open-source Web content engine library.
+This package contains the shared libraries for the WebKit GTK+ port
+as well as the sample GtkLauncher tool. 
+
+This is the MinGW port of WebKitGTK+
+
+
+%package static
+Summary:	Static version of the MinGW Windows WebKitGTK+ library
+Requires:	%{name} = %{version}-%{release}
+Group:		Development/Libraries
+
+%description static
+Static version of the MinGW Windows WebKitGTK+ library.
+
+
+%{?_mingw32_debug_package}
+
+
+%prep
+%setup -qn "webkit-%{version}"
+
+%patch0 -p0 -b .jpeg_boolean
+%patch1 -p0 -b .mingw
+%patch2 -p0 -b .dumprendertree
+
+
+%build
+%{_mingw32_configure}						\
+			--with-target=win32			\
+			--with-font-backend=pango		\
+			--with-unicode-backend=glib		\
+			--disable-video				\
+			--enable-static --enable-shared		\
+%{?with_3dtransforms:	--enable-3D-transforms		}	\
+%{?with_coverage:	--enable-coverage		}	\
+%{?with_debug:		--enable-debug			}	\
+%{?with_html5video:	--enable-video			}	\
+%{?with_jit:		--enable-jit			}	\
+%{?with_svg:		--enable-svg-filters		}	\
+%{?with_wml:		--enable-wml			}
+	
+make %{?_smp_mflags} V=99
+
+
+%install
+make install DESTDIR=%{buildroot}
+install -m 755 Programs/.libs/GtkLauncher.exe %{buildroot}%{_mingw32_bindir}
+
+%find_lang webkit-2.0
+
+
+## Copy over and rename the various files for %%doc inclusion.
+%add_to_doc_files JavaScriptCore/icu/LICENSE
+%add_to_doc_files WebKit/LICENSE
+%add_to_doc_files WebCore/icu/LICENSE
+%add_to_doc_files WebCore/LICENSE-APPLE
+%add_to_doc_files WebCore/LICENSE-LGPL-2
+%add_to_doc_files WebCore/LICENSE-LGPL-2.1
+
+%add_to_doc_files JavaScriptCore/pcre/COPYING
+%add_to_doc_files JavaScriptCore/COPYING.LIB
+
+%add_to_doc_files JavaScriptCore/icu/README
+%add_to_doc_files WebKit/gtk/po/README
+
+%add_to_doc_files JavaScriptCore/AUTHORS
+%add_to_doc_files JavaScriptCore/pcre/AUTHORS
+
+%add_to_doc_files JavaScriptCore/THANKS
+
+%add_to_doc_files WebKit/gtk/NEWS
+
+
+%files -f webkit-2.0.lang
+%defattr(-,root,root,-)
+%{_docdir}/%{name}-%{version}/
+%{_mingw32_bindir}/jsc-1.exe
+%{_mingw32_bindir}/GtkLauncher.exe
+%{_mingw32_bindir}/libwebkitgtk-1.0-0.dll
+%{_mingw32_includedir}/webkit-1.0/
+%{_mingw32_libdir}/libwebkitgtk-1.0.dll.a
+%{_mingw32_libdir}/libwebkitgtk-1.0.la
+%{_mingw32_libdir}/pkgconfig/webkit-1.0.pc
+%{_mingw32_datadir}/glib-2.0/schemas/org.webkitgtk-1.0.gschema.xml
+%{_mingw32_datadir}/webkit-1.0/
+%{_mingw32_datadir}/webkitgtk-1.0/
+
+%files static
+%defattr(-,root,root,-)
+%{_mingw32_libdir}/libwebkitgtk-1.0.a
+
+
+%changelog
+* Tue Nov 16 2010 Erik van Pienbroek <epienbro at fedoraproject.org> - 1.3.6-2
+- Improved the description
+- Bundle the various license files
+- Dropped the BuildRoot tag, the %%clean section and the
+  'rm -rf %{buildroot}' from the %%install section as they
+  aren't needed anymore these days
+
+* Sun Nov 14 2010 Erik van Pienbroek <epienbro at fedoraproject.org> - 1.3.6-1
+- Update to 1.3.6
+
+* Sun Nov  7 2010 Erik van Pienbroek <epienbro at fedoraproject.org> - 1.2.5-1
+- Update to 1.2.5
+- Automatically generate debuginfo subpackage
+- Use %%global instead of %%define
+- Dropped the manual strip command
+- Dropped old patches
+
+* Fri May 22 2009 Erik van Pienbroek <epienbro at fedoraproject.org> - 1.1.7-1
+- Update to 1.1.7
+
+* Sun May 10 2009 Erik van Pienbroek <epienbro at fedoraproject.org> - 1.1.6-1
+- Update to 1.1.6
+- Updated the patches to apply cleanly against version 1.1.6
+- Renamed the package to mingw32-webkitgtk
+- Merged the changes from the native webkitgtk package up to 1.1.6-1
+- Added a BR: mingw32-enchant (required as of version 1.1.6)
+
+* Sat Apr 25 2009 Erik van Pienbroek <epienbro at fedoraproject.org> - 1.1.5-1
+- Adjusted native WebKit .spec file so that it supports mingw32
+- Update to 1.1.5
+- Updated Source URL
+- Added patches from Mikkel Kruse Johnsen for compilation on Win32 environments
+
+* Sat Mar 07 2009 Peter Gordon <peter at thecodergeek.com> - 1.1.1-1
+- Update to new upstream release (1.1.1), includes a soname bump.
+- Enable gnome-keyring support.
+
+* Wed Mar  4 2009 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 1.1.0-0.21.svn41071
+- Compile libJavaScriptCore.a with -fno-strict-aliasing to
+  do workaround for #488112
+
+* Mon Feb 23 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.1.0-0.20.svn41071
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
+
+* Fri Feb 20 2009 Peter Gordon <peter at thecodergeek.com> 1.1.0-0.19.svn41071
+- Update to new upstream snapshot (SVN 41071).
+- Drop libsoup build conditional. Use libsoup as default HTTP backend instead
+  of cURL, following upstream's default.
+
+* Fri Jan 30 2009 Peter Gordon <peter at thecodergeek.com> 1.1.0-0.18.svn40351
+- Fix ownership of doc directory...this time without the oops (#473619).
+- Bump package version number to match that used in the configure/build
+  scripts. (Thanks to Martin Sourada for the bug report via email.)
+
+* Thu Jan 29 2009 Peter Gordon <peter at thecodergeek.com> 1.0.0-0.17.svn40351
+- Update to new upstream snapshot (SVN 40351): adds the WebPolicyDelegate
+  implementaton and related API (#482739).
+- Drop Bison 2.4 patch (fixed upstream):
+  - bison24.patch
+- Fixes CVE-2008-6059: Sensitive information disclosure from cookies via
+  XMLHttpRequest calls (#484197).
+
+* Sat Nov 29 2008 Peter Gordon <peter at thecodergeek.com> 1.0.0-0.16.svn39370
+- Update to new upstream snapshot (SVN 39370)
+- Fix ownership of %%_docdir in the doc subpackage. 
+- Resolves: bug 473619 (WebKit : Unowned directories).
+- Adds webinspector data to the gtk-devel subpackage.
+- Add patch from upstream bug 22205 to fix compilation errors with Bison 2.4:
+  + bison24.patch
+- Add build-time conditional for WML support.
+
+* Thu Oct 23 2008 Peter Gordon <peter at thecodergeek.com> 1.0.0-0.15.svn37790
+- Update to new upstream snapshot (SVN 37790).
+- Default to freetype font backend for improved CJK/Unicode support. (#448693)
+- Add some notes to the build options comments block.
+- Add a build-time conditional for jit
+
+* Sun Aug 24 2008 Peter Gordon <peter at thecodergeek.com> 1.0.0-0.14.svn35904
+- Update to new upstream snapshot (SVN 35904)
+
+* Fri Jul 04 2008 Peter Gordon <peter at thecodergeek.com>
+- Remove outdated and unnecessary GCC 4.3 patch:
+  - gcc43.patch
+- Fix the curl-devel BuildRequire conditional. (It is only needed when building
+  against curl instead of libsoup.)
+
+* Thu Jun 12 2008 Peter Gordon <peter at thecodergeek.com> 1.0.0-0.13.svn34655
+- Update to new upstream snapshot (SVN 34655)
+- Add some build-time conditionals for non-default features: debug, 
+  html5video, libsoup, pango, svg. 
+
+* Tue Jun  3 2008 Caolán McNamara <caolanm at redhat.com> - 1.0.0-0.12.svn34279
+- rebuild for new icu
+
+* Tue Jun  3 2008 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 1.0.0-0.11.svn34279
+- Update to new upstream snapshot (SVN 34279) anyway
+- Add BR: libXt-devel
+
+* Tue Apr 29 2008 Peter Gordon <peter at thecodergeek.com> 1.0.0-0.10.svn32531
+- Remove the -Qt subpackage stuff. QtWebKit is now included in Qt proper, as
+  of qt-4.4.0-0.6.rc1. (We no longer need separate build-qt and build-gtk
+  subdirectories either.)
+- Reference: bug 442200 (RFE: WebKit Migration)
+- Add libjpeg dependency (was previously pulled in by the qt4-devel dependency
+  tree).
+
+* Mon Apr 28 2008 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 1.0.0-0.9.svn32531
+- Update to new upstream snapshot (SVN 32531).
+- Fix bug 443048 and hopefully fix bug 444445
+- Modify the process of building GTK+ port a bit
+- on qt port WebKit/qt/Plugins is not built for qt >= 4.4.0
+
+* Sat Apr 12 2008 Peter Gordon <peter at thecodergeek.com> 1.0.0-0.8.svn31787
+- Update to new upstream snapshot (SVN 31787).
+- Resolves: CVE-2008-1010 (bug 438532: Arbitrary code execution) and
+  CVE-2008-1011 (bug 438531: Cross-Site Scripting).
+- Switch to using autotools for building the GTK+ port.
+
+* Wed Mar 05 2008 Peter Gordon <peter at thecodergeek.com> 1.0.0-0.7.svn30667
+- Fix the WebKitGtk pkgconfig data (should depend on gtk+-2.0). Resolves
+  bug 436073 (Requires: gtk+-2.0 missing from WebKitGtk.pc).
+- Thanks to Mamoru Tasaka for helping find and squash these many bugs. 
+  
+* Sat Mar 01 2008 Peter Gordon <peter at thecodergeek.com> 1.0.0-0.6.svn30667
+- Fix include directory naming. Resolves: bug 435561 (Header file <> header
+  file location mismatch)
+- Remove qt4-devel runtime dependency and .prl file from WebKit-gtk-devel.
+  Resolves: bug 433138 (WebKit-gtk-devel has a requirement on qt4-devel) 
+
+* Fri Feb 29 2008 Peter Gordon <peter at thecodergeek.com> 1.0.0-0.5.svn30667
+- Update to new upstream snapshot (SVN 30667)
+- Add some build fixes for GCC 4.3:
+  + gcc43.patch
+
+* Tue Feb 19 2008 Fedora Release Engineering <rel-eng at fedoraproject.org> - 1.0.0-0.5.svn29336
+- Autorebuild for GCC 4.3
+
+* Wed Jan 09 2008 Peter Gordon <peter at thecodergeek.com> 1.0.0-0.4.svn29336
+- Update to new upstream snapshot (SVN 29336).
+- Drop TCSpinLock pthread workaround (fixed upstream):
+  - TCSpinLock-use-pthread-stubs.patch
+
+* Thu Dec 06 2007 Peter Gordon <peter at thecodergeek.com> 1.0.0-0.3.svn28482
+- Add proper %%defattr line to qt, qt-devel, and doc subpackages.
+- Add patch to forcibly build the TCSpinLock code using the pthread
+  implementation:
+  + TCSpinLock-use-pthread-stubs.patch
+
+* Thu Dec 06 2007 Peter Gordon <peter at thecodergeek.com> 1.0.0-0.2.svn28482
+- Package renamed from WebKitGtk.
+- Update to SVN 28482.
+- Build both the GTK and Qt ports, putting each into their own respective
+  subpackages.
+- Invoke qmake-qt4 and make directly (with SMP build flags) instead of using
+  the build-webkit script from upstream.
+- Add various AUTHORS, README, and LICENSE files (via the doc subpackage). 
+
+* Tue Dec 04 2007 Peter Gordon <peter at thecodergeek.com> 1.0.0-0.1.svn28383
+- Initial packaging for Fedora.
diff --git a/sources b/sources
index e69de29..1e07dc4 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+ad409dfc737399c1d24dba9038c9eaf2  webkit-1.3.6.tar.gz
diff --git a/webkit-dump-render-tree-compile-fix.patch b/webkit-dump-render-tree-compile-fix.patch
new file mode 100644
index 0000000..ece1bd9
--- /dev/null
+++ b/webkit-dump-render-tree-compile-fix.patch
@@ -0,0 +1,31 @@
+--- WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp.orig	2010-11-14 16:41:38.341419529 +0100
++++ WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp	2010-11-14 16:41:42.949240602 +0100
+@@ -688,7 +688,7 @@
+     else if (g_str_equal(originalName.get(), "WebKitHyperlinkAuditingEnabled"))
+         propertyName = "enable-hyperlink-auditing";
+     else if (g_str_equal(originalName.get(), "WebKitTabToLinksPreferenceKey")) {
+-        DumpRenderTreeSupportGtk::setLinksIncludedInFocusChain(!g_ascii_strcasecmp(valueAsString.get(), "true") || !g_ascii_strcasecmp(valueAsString.get(), "1"));
++        //DumpRenderTreeSupportGtk::setLinksIncludedInFocusChain(!g_ascii_strcasecmp(valueAsString.get(), "true") || !g_ascii_strcasecmp(valueAsString.get(), "1"));
+         return;
+     } else {
+         fprintf(stderr, "LayoutTestController::overridePreference tried to override "
+--- WebKitTools/DumpRenderTree/gtk/DumpRenderTree.cpp.orig	2010-11-14 16:39:27.868165959 +0100
++++ WebKitTools/DumpRenderTree/gtk/DumpRenderTree.cpp	2010-11-14 16:39:38.970144976 +0100
+@@ -444,7 +444,7 @@
+ 
+     setlocale(LC_ALL, "");
+ 
+-    DumpRenderTreeSupportGtk::setLinksIncludedInFocusChain(true);
++    //DumpRenderTreeSupportGtk::setLinksIncludedInFocusChain(true);
+ }
+ 
+ static bool useLongRunningServerMode(int argc, char *argv[])
+@@ -998,7 +998,7 @@
+ {
+     WebKitWebView* view = WEBKIT_WEB_VIEW(webkit_web_view_new());
+ 
+-    DumpRenderTreeSupportGtk::setDumpRenderTreeModeEnabled(true);
++    //DumpRenderTreeSupportGtk::setDumpRenderTreeModeEnabled(true);
+ 
+     // From bug 11756: Use a frame group name for all WebViews created by
+     // DumpRenderTree to allow testing of cross-page frame lookup.
diff --git a/webkit-jpeg-boolean-fix.patch b/webkit-jpeg-boolean-fix.patch
new file mode 100644
index 0000000..f3b1a0b
--- /dev/null
+++ b/webkit-jpeg-boolean-fix.patch
@@ -0,0 +1,29 @@
+--- ./WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp.orig	2010-11-07 12:09:27.209820788 +0100
++++ ./WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp	2010-11-07 12:10:47.274135534 +0100
+@@ -41,7 +41,7 @@
+ #include "JPEGImageDecoder.h"
+ #include <stdio.h>  // Needed by jpeglib.h for FILE.
+ 
+-#if OS(WINCE) || PLATFORM(BREWMP_SIMULATOR)
++#if OS(WINCE) || PLATFORM(BREWMP_SIMULATOR) || PLATFORM(GTK)
+ // Remove warning: 'FAR' macro redefinition
+ #undef FAR
+ 
+@@ -74,7 +74,7 @@
+ };
+ 
+ void init_source(j_decompress_ptr jd);
+-boolean fill_input_buffer(j_decompress_ptr jd);
++jpeg_boolean fill_input_buffer(j_decompress_ptr jd);
+ void skip_input_data(j_decompress_ptr jd, long num_bytes);
+ void term_source(j_decompress_ptr jd);
+ void error_exit(j_common_ptr cinfo);
+@@ -358,7 +358,7 @@
+     src->decoder->skipBytes(num_bytes);
+ }
+ 
+-boolean fill_input_buffer(j_decompress_ptr jd)
++jpeg_boolean fill_input_buffer(j_decompress_ptr jd)
+ {
+     // Our decode step always sets things up properly, so if this method is ever
+     // called, then we have hit the end of the buffer.  A return value of false
diff --git a/webkit-mingw-fixes.patch b/webkit-mingw-fixes.patch
new file mode 100644
index 0000000..94ba93f
--- /dev/null
+++ b/webkit-mingw-fixes.patch
@@ -0,0 +1,408 @@
+--- 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 {


More information about the scm-commits mailing list