diff -Naur WebKit-r41128/autotools/webkit.m4 WebKit-r41128-nx/autotools/webkit.m4
--- WebKit-r41128/autotools/webkit.m4	2009-02-15 03:48:56.000000000 -0500
+++ WebKit-r41128-nx/autotools/webkit.m4	2009-02-23 16:01:26.040005950 -0500
@@ -120,17 +120,17 @@
 dnl determine the Unicode backend
 AC_MSG_CHECKING([which Unicode backend to use])
 AC_ARG_WITH(unicode_backend,
-            AC_HELP_STRING([--with-unicode-backend=@<:@icu@:>@],
+            AC_HELP_STRING([--with-unicode-backend=@<:@icu/glib@:>@],
                            [Select Unicode backend [default=icu]]),
-            [],[unicode_backend="icu"])
+            [],[with_unicode_backend="icu"])
 
-case "$unicode_backend" in
-     icu) ;;
-     *) AC_MSG_ERROR([Invalid Unicode backend: must be icu.]) ;;
+case "$with_unicode_backend" in
+  icu|glib) ;;
+  *) AC_MSG_ERROR([Invalid Unicode backend: must be icu or glib.]) ;;
 esac
-AC_MSG_RESULT([$unicode_backend])
-
-if test "$unicode_backend" = "icu"; then
+AC_MSG_RESULT([$with_unicode_backend])
+  
+if test "$with_unicode_backend" = "icu"; then
 	if test "$os_darwin" = "yes"; then
 		UNICODE_CFLAGS="-I\$(srcdir)/JavaScriptCore/icu -I\$(srcdir)/WebCore/icu"
 		UNICODE_LIBS="-licucore"
@@ -150,6 +150,19 @@
 		UNICODE_LIBS=`$icu_config --ldflags`
 	fi
 fi
+
+if test "$with_unicode_backend" = "glib"; then
+	PKG_CHECK_MODULES([UNICODE], [glib-2.0 pango >= 1.16.0])
+	AC_MSG_CHECKING([for libidn])
+	AC_CHECK_HEADER(idna.h,
+		AC_CHECK_LIB(idn, stringprep_check_version,
+			[libidn=yes UNICODE_LIBS="${UNICODE_LIBS} -lidn"], libidn=no),
+		libidn=no)
+	if test "$libidn" = "no" ; then
+		AC_MSG_ERROR([Libidn not found, needed for GLib unicode backend.])
+	fi
+fi
+
 AC_SUBST([UNICODE_CFLAGS])
 AC_SUBST([UNICODE_LIBS])
 ])
diff -Naur WebKit-r41128/autotoolsconfig.h.in WebKit-r41128-nx/autotoolsconfig.h.in
--- WebKit-r41128/autotoolsconfig.h.in	1969-12-31 19:00:00.000000000 -0500
+++ WebKit-r41128-nx/autotoolsconfig.h.in	2009-02-23 16:05:13.444005790 -0500
@@ -0,0 +1,113 @@
+/* autotoolsconfig.h.in.  Generated from configure.ac by autoheader.  */
+
+/* Define to enable JIT */
+#undef ENABLE_JIT
+
+/* Define to enable optimized arithmetic */
+#undef ENABLE_JIT_OPTIMIZE_ARITHMETIC
+
+/* Define to enable optimizing calls */
+#undef ENABLE_JIT_OPTIMIZE_CALL
+
+/* Define to enable optimized property access */
+#undef ENABLE_JIT_OPTIMIZE_PROPERTY_ACCESS
+
+/* Define to enable WREC */
+#undef ENABLE_WREC
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if you have the <pthread.h> header file. */
+#undef HAVE_PTHREAD_H
+
+/* Define to 1 if stdbool.h conforms to C99. */
+#undef HAVE_STDBOOL_H
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define to 1 if the system has the type `_Bool'. */
+#undef HAVE__BOOL
+
+/* Define to disable debugging features */
+#undef NDEBUG
+
+/* Define to 1 if your C compiler doesn't accept -c and -o together. */
+#undef NO_MINUS_C_MINUS_O
+
+/* Name of package */
+#undef PACKAGE
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Version number of package */
+#undef VERSION
+
+/* Define if target is DirectFB */
+#undef WTF_PLATFORM_DIRECTFB
+
+/* Define if target is X11 */
+#undef WTF_PLATFORM_X11
+
+/* Use stub va_list */
+#undef WTF_USE_JIT_STUB_ARGUMENT_VA_LIST
+
+/* Number of bits in a file offset, on hosts where this is settable. */
+#undef _FILE_OFFSET_BITS
+
+/* Define for large files, on AIX-style hosts. */
+#undef _LARGE_FILES
+
+/* Define to empty if `const' does not conform to ANSI C. */
+#undef const
+
+/* Define to `__inline__' or `__inline' if that's what the C compiler
+   calls it, or to nothing if 'inline' is not supported under any name.  */
+#ifndef __cplusplus
+#undef inline
+#endif
+
+/* Define to empty if the keyword `volatile' does not work. Warning: valid
+   code using `volatile' can become incorrect without. Disable with care. */
+#undef volatile
diff -Naur WebKit-r41128/configure.ac WebKit-r41128-nx/configure.ac
--- WebKit-r41128/configure.ac	2009-02-19 01:12:25.000000000 -0500
+++ WebKit-r41128-nx/configure.ac	2009-02-23 16:01:26.072006950 -0500
@@ -27,7 +27,7 @@
 LIBWEBKITGTK_VERSION=1:0:0
 AC_SUBST([LIBWEBKITGTK_VERSION])
 
-AM_INIT_AUTOMAKE([foreign subdir-objects tar-ustar])
+AM_INIT_AUTOMAKE([foreign subdir-objects])
 
 # host checking - inspired by the GTK+ configure.in
 # TODO: move these to webkit.m4?
@@ -607,6 +607,10 @@
 AM_CONDITIONAL([TARGET_QUARTZ], [test "$with_target" = "quartz"])
 AM_CONDITIONAL([TARGET_DIRECTFB], [test "$with_target" = "directfb"])
 
+# Unicode backend conditionals
+AM_CONDITIONAL([USE_ICU_UNICODE], [test "$with_unicode_backend" = "icu"])
+AM_CONDITIONAL([USE_GLIB_UNICODE], [test "$with_unicode_backend" = "glib"])
+
 # HTTP backend conditionals
 AM_CONDITIONAL([USE_CURL], [test "$with_http_backend" = "curl"])
 AM_CONDITIONAL([USE_SOUP], [test "$with_http_backend" = "soup"])
@@ -656,7 +660,7 @@
  Enable debugging (slow)                                  : $enable_debug
  Enable GCC build optimization                            : $enable_optimizations
  Code coverage support                                    : $enable_coverage
- Unicode backend                                          : $unicode_backend
+ Unicode backend                                          : $with_unicode_backend
  HTTP backend                                             : $with_http_backend
  Font backend                                             : $with_font_backend
  Optimized memory allocator                               : $enable_fast_malloc
diff -Naur WebKit-r41128/debian/changelog WebKit-r41128-nx/debian/changelog
--- WebKit-r41128/debian/changelog	1969-12-31 19:00:00.000000000 -0500
+++ WebKit-r41128-nx/debian/changelog	2009-02-23 16:03:25.776005910 -0500
@@ -0,0 +1,71 @@
+webkit (1.0-svn41128-1) unstable; urgency=high
+
+    * Update from upstream.
+    * Some tests.
+
+ -- Bundyo <bundyo@gmail.com>  Tue, 23 Jan 2009 02:00:00 +0200
+ 
+webkit (1.0-svn41071-1) unstable; urgency=high
+
+    * Update from upstream.
+
+ -- Bundyo <bundyo@gmail.com>  Tue, 20 Jan 2009 02:00:00 +0200
+ 
+webkit (1.0-svn40663-1) unstable; urgency=high
+
+    * Update from upstream.
+
+ -- Bundyo <bundyo@gmail.com>  Tue, 06 Jan 2009 02:00:00 +0200
+ 
+webkit (1.0-svn40419-1) unstable; urgency=high
+
+    * Handling text/plain MIME types as downloads - like Mozilla does.
+    * Different way to get the Content-Length - CURL doesn't seem to do it.
+
+ -- Bundyo <bundyo@gmail.com>  Tue, 31 Jan 2009 22:00:00 +0200
+
+webkit (1.0-svn40239-3) unstable; urgency=high
+
+    * Changed some dependencies to allow installation on Chinook.
+
+ -- Bundyo <bundyo@gmail.com>  Tue, 28 Jan 2009 23:30:00 +0200
+
+webkit (1.0-svn40239-2) unstable; urgency=high
+
+    * Switched on some optimizations.
+
+ -- Bundyo <bundyo@gmail.com>  Tue, 27 Jan 2009 03:00:00 +0200
+
+webkit (1.0-svn40239-1) unstable; urgency=high
+
+    * Updated to 40239.
+
+ -- Bundyo <bundyo@gmail.com>  Tue, 27 Jan 2009 01:00:00 +0200
+
+webkit (1.0-svn40080-1) unstable; urgency=high
+
+    * Updated to 40080.
+
+ -- Bundyo <bundyo@gmail.com>  Tue, 22 Jan 2009 01:00:00 +0200
+ 
+webkit (1.0-svn39682-1) unstable; urgency=high
+
+    * Updated to 39682.
+
+ -- Bundyo <bundyo@gmail.com>  Tue, 09 Jan 2009 23:00:00 +0200
+ 
+webkit (1.0-svn39572-1) unstable; urgency=high
+
+    * Patch for unicode handling with GLib.
+    * Patch for download support.
+    * Patch for inspect support.
+    * Maemo PASSWORD input field support with INVISIBLE input mode.
+    * Web inspector files included in package.
+
+ -- Bundyo <bundyo@gmail.com>  Tue, 04 Jan 2009 20:00:00 +0200
+
+webkit (1.0-svn39572) unstable; urgency=high
+
+    * Packaged for Maemo. No changes from SVN 39572.
+
+ -- Bundyo <bundyo@gmail.com>  Tue, 03 Jan 2009 20:57:48 +0200
\ No newline at end of file
diff -Naur WebKit-r41128/debian/compat WebKit-r41128-nx/debian/compat
--- WebKit-r41128/debian/compat	1969-12-31 19:00:00.000000000 -0500
+++ WebKit-r41128-nx/debian/compat	2009-02-23 16:01:26.129006270 -0500
@@ -0,0 +1 @@
+4
diff -Naur WebKit-r41128/debian/control WebKit-r41128-nx/debian/control
--- WebKit-r41128/debian/control	1969-12-31 19:00:00.000000000 -0500
+++ WebKit-r41128-nx/debian/control	2009-02-23 16:01:26.156732550 -0500
@@ -0,0 +1,53 @@
+Source: webkit
+Priority: optional
+Section: user/other
+Uploaders: Bundyo <bundyo@gmail.com>
+Build-Depends: debhelper (>= 5.0), libgtk2.0-dev (>= 2.10), libpango1.0-dev (>= 1.16), libxslt-dev, libcurl3-dev, libsqlite3-dev, bison, flex, libjpeg62-dev, libpng12-dev, autoconf, automake, libtool, libxt-dev
+Standards-Version: 3.8.0.1
+Homepage: http://webkit.org/
+
+Package: libwebkit-1.0-1
+Section: user/other
+Architecture: any
+Depends: ${shlibs:Depends}
+Description: Web content engine library for Gtk+
+ WebKit is a web content engine, derived from KHTML and KJS from KDE, and
+ used primarily in Apple's Safari browser.  It is made to be embedded in
+ other applications, such as mail readers, or web browsers.
+ .
+ It is able to display content such as HTML, SVG, XML, and others. It also
+ supports DOM, XMLHttpRequest, XSLT, CSS, Javascript/ECMAscript and more.
+ .
+ This is the library for embedding in Gtk+ applications.
+
+Package: libwebkit-dev
+Section: libdevel
+Priority: extra
+Architecture: all
+Depends: libwebkit-1.0-1 (>= ${source:Upstream-Version}), libgtk2.0-dev
+Conflicts: libwebkitgdk-dev
+Description: Web content engine library for Gtk+ - Development files
+ WebKit is a web content engine, derived from KHTML and KJS from KDE, and
+ used primarily in Apple's Safari browser.  It is made to be embedded in
+ other applications, such as mail readers, or web browsers.
+ .
+ It is able to display content such as HTML, SVG, XML, and others. It also
+ supports DOM, XMLHttpRequest, XSLT, CSS, Javascript/ECMAscript and more.
+ .
+ This package provides development files required to create Gtk+ applications
+ embedding WebKit.
+
+Package: libwebkit-1.0-1-dbg
+Section: libdevel
+Priority: extra
+Architecture: any
+Depends: libwebkit-1.0-1 (= ${binary:Version})
+Description: Web content engine library for Gtk+ - Debugging symbols
+ WebKit is a web content engine, derived from KHTML and KJS from KDE, and
+ used primarily in Apple's Safari browser.  It is made to be embedded in
+ other applications, such as mail readers, or web browsers.
+ .
+ It is able to display content such as HTML, SVG, XML, and others. It also
+ supports DOM, XMLHttpRequest, XSLT, CSS, Javascript/ECMAscript and more.
+ .
+ This package provides the debugging symbols for the Webkit library for Gtk+.
diff -Naur WebKit-r41128/debian/copyright WebKit-r41128-nx/debian/copyright
--- WebKit-r41128/debian/copyright	1969-12-31 19:00:00.000000000 -0500
+++ WebKit-r41128-nx/debian/copyright	2009-02-23 16:01:26.190209710 -0500
@@ -0,0 +1,1082 @@
+Original source may be found at http://people.freedesktop.org/~alp/webkit/gtk/
+
+Files: debian/*
+Copyright: © 2007 Mike Hommey <glandium@debian.org>
+License: LGPL-2+ (/usr/share/common-licenses/LGPL-2)
+
+Files: JavaScriptCore/API/*,
+       JavaScriptCore/profiler/Profile.*,
+       JavaScriptCore/wtf/Assertions.*,
+       JavaScriptCore/wtf/HashIterators.h,
+       JavaScriptCore/wtf/MathExtras.h,
+       JavaScriptCore/wtf/OwnPtrWin.cpp,
+       JavaScriptCore/wtf/Platform.h,
+       JavaScriptCore/wtf/StringExtras.h,
+       JavaScriptCore/wtf/unicode/UTF8.*,
+       WebCore/WebCorePrefix.cpp,
+       WebCore/bindings/js/JSAudioConstructor.*,
+       WebCore/bindings/js/JSConsoleCustom.cpp,
+       WebCore/bindings/js/JSCSSRuleCustom.cpp,
+       WebCore/bindings/js/JSCSSStyleDeclarationCustom.*,
+       WebCore/bindings/js/JSCSSValueCustom.cpp,
+       WebCore/bindings/js/JSCustomXPathNSResolver.*,
+       WebCore/bindings/js/JSDOMApplicationCacheCustom.cpp,
+       WebCore/bindings/js/JSEventTargetBase.*,
+       WebCore/bindings/js/JSEventTargetNode.*,
+       WebCore/bindings/js/JSHTMLAllCollection.h,
+       WebCore/bindings/js/JSHTMLAppletElementCustom.*,
+       WebCore/bindings/js/JSHTMLDocumentCustom.cpp,
+       WebCore/bindings/js/JSHTMLElementCustom.cpp,
+       WebCore/bindings/js/JSHTMLEmbedElementCustom.*,
+       WebCore/bindings/js/JSHTMLFormElementCustom.cpp,
+       WebCore/bindings/js/JSHTMLFrameSetElementCustom.cpp,
+       WebCore/bindings/js/JSHTMLObjectElementCustom.*,
+       WebCore/bindings/js/JSHistoryCustom.h,
+       WebCore/bindings/js/JSInspectedObjectWrapper.*,
+       WebCore/bindings/js/JSInspectorCallbackWrapper.*,
+       WebCore/bindings/js/JSJavaScriptCallFrameCustom.cpp,
+       WebCore/bindings/js/JSLocationCustom.h,
+       WebCore/bindings/js/JSNamedNodeMapCustom.cpp,
+       WebCore/bindings/js/JSNamedNodesCollection.*,
+       WebCore/bindings/js/JSNodeCustom.cpp,
+       WebCore/bindings/js/JSNodeFilterCustom.cpp,
+       WebCore/bindings/js/JSNodeListCustom.cpp,
+       WebCore/bindings/js/JSQuarantinedObjectWrapper.*,
+       WebCore/bindings/js/JSSVGPODTypeWrapper.h,
+       WebCore/bindings/js/JSStorageCustom.*,
+       WebCore/bindings/js/JSStyleSheetCustom.cpp,
+       WebCore/bindings/js/JSStyleSheetListCustom.cpp,
+       WebCore/bindings/js/JSTextCustom.cpp,
+       WebCore/bindings/js/JSXSLTProcessorConstructor.*,
+       WebCore/bindings/js/GCController.*,
+       WebCore/bindings/objc/*,
+       WebCore/bridge/*,
+       WebCore/css/CSSCanvasValue.*,
+       WebCore/css/CSSFontFace.*,
+       WebCore/css/CSSFontFaceSource.*,
+       WebCore/css/CSSFontFaceSrcValue.*,
+       WebCore/css/CSSFontSelector.*,
+       WebCore/css/CSSGradientValue.*,
+       WebCore/css/CSSImageGeneratorValue.*,
+       WebCore/css/CSSPrimitiveValueMappings.h,
+       WebCore/css/CSSReflectValue.*,
+       WebCore/css/CSSReflectionDirection.h,
+       WebCore/css/CSSRuleList.idl,
+       WebCore/css/CSSSegmentedFontFace.*,
+       WebCore/css/CSSTimingFunctionValue.*,
+       WebCore/css/CSSTransformValue.*,
+       WebCore/css/CSSUnicodeRangeValue.*,
+       WebCore/css/CSSValueList.idl,
+       WebCore/css/MediaList.idl,
+       WebCore/css/MediaQuery*,
+       WebCore/css/view-source.css,
+       WebCore/css/svg.css,
+       WebCore/dom/BeforeTextInsertedEvent.*,
+       WebCore/dom/Clipboard.cpp,
+       WebCore/dom/ClipboardAccessPolicy.h,
+       WebCore/dom/EventTarget.cpp,
+       WebCore/dom/EventTarget.h,
+       WebCore/dom/ExceptionCode.cpp,
+       WebCore/dom/MessageEvent.*,
+       WebCore/dom/NodeWithIndex.h,
+       WebCore/dom/OverflowEvent.*,
+       WebCore/dom/Position*,
+       WebCore/dom/ProgressEvent.*,
+       WebCore/dom/RangeBoundaryPoint.h,
+       WebCore/dom/TextEvent.*,
+       WebCore/editing/*,
+       WebCore/history/*,
+       WebCore/html/Canvas*,
+       WebCore/html/HTMLAudioElement.*,
+       WebCore/html/HTMLCanvasElement.*,
+       WebCore/html/HTMLMediaElement.*,
+       WebCore/html/HTMLParserErrorCodes.*,
+       WebCore/html/HTMLSourceElement.*,
+       WebCore/html/HTMLTextFieldInnerElement.*,
+       WebCore/html/HTMLVideoElement.*,
+       WebCore/html/HTMLViewSourceDocument.*,
+       WebCore/html/MediaError.h,
+       WebCore/html/PreloadScanner.*,
+       WebCore/html/TimeRanges.*,
+       WebCore/html/VoidCallback.h,
+       WebCore/loader/CachePolicy.h,
+       WebCore/loader/CachedFont.*,
+       WebCore/loader/ImageDocument.*,
+       WebCore/loader/PluginDocument.*,
+       WebCore/loader/ProgressTracker.*,
+       WebCore/loader/SubstituteData.h,
+       WebCore/loader/SubstituteResource.h,
+       WebCore/loader/TextDocument.*,
+       WebCore/loader/FTPDirectoryDocument.*,
+       WebCore/loader/*/*,
+       WebCore/page/*,
+       WebCore/page/inspector/Breakpoint.js,
+       WebCore/page/inspector/BreakpointsSidebarPane.js,
+       WebCore/page/inspector/CallStackSidebarPane.js,
+       WebCore/page/inspector/DataGrid.js,
+       WebCore/page/inspector/DatabaseQueryView.js,
+       WebCore/page/inspector/DatabaseTableView.js,
+       WebCore/page/inspector/Object.js,
+       WebCore/page/inspector/ObjectPropertiesSection.js,
+       WebCore/page/inspector/Placard.js,
+       WebCore/page/inspector/ProfileView.js,
+       WebCore/page/inspector/ProfilesPanel.js,
+       WebCore/page/inspector/ScopeChainSidebarPane.js,
+       WebCore/page/inspector/Script.js,
+       WebCore/page/inspector/ScriptsPanel.js,
+       WebCore/page/inspector/ScriptView.js,
+       WebCore/page/inspector/SidebarTreeElement.js,
+       WebCore/page/inspector/SourceFrame.js,
+       WebCore/page/inspector/View.js,
+       WebCore/page/win/AXObjectCacheWin.cpp,
+       WebCore/page/win/AccessibilityObjectWrapperWin.h,
+       WebCore/platform/*,
+       WebCore/platform/graphics/svg/filters/cg/WK*,
+       WebCore/plugins/gtk/PluginDatabaseGtk.cpp,
+       WebCore/plugins/gtk/PluginPackageGtk.cpp,
+       WebCore/plugins/gtk/PluginViewGtk.cpp,
+       WebCore/plugins/npapi.cpp,
+       WebCore/plugins/npfunctions.h,
+       WebCore/plugins/PluginDatabase.*,
+       WebCore/plugins/PluginDebug.h,
+       WebCore/plugins/PluginInfoStore.*,
+       WebCore/plugins/PluginStream.*,
+       WebCore/plugins/PluginPackage.*,
+       WebCore/plugins/PluginView.*,
+       WebCore/plugins/PluginQuirkSet.h,
+       WebCore/plugins/qt/PluginDatabaseQt.cpp,
+       WebCore/plugins/qt/PluginPackageQt.cpp,
+       WebCore/plugins/qt/PluginViewQt.cpp,
+       WebCore/plugins/win/PluginMessageThrottlerWin.*,
+       WebCore/plugins/win/PluginDatabaseWin.cpp,
+       WebCore/plugins/win/PluginViewWin.cpp,
+       WebCore/plugins/win/PluginPackageWin.cpp,
+       WebCore/plugins/wx/PluginDataWx.cpp,
+       WebCore/plugins/wx/PluginDatabaseWx.cpp,
+       WebCore/plugins/wx/PluginPackageWx.cpp,
+       WebCore/plugins/wx/PluginViewWx.cpp,
+       WebCore/rendering/LayoutState.*,
+       WebCore/rendering/RenderHTMLCanvas.*,
+       WebCore/rendering/RenderImageGeneratedContent.*,
+       WebCore/rendering/RenderMedia.*,
+       WebCore/rendering/RenderTreeAsText.*,
+       WebCore/rendering/RenderWordBreak.*,
+       WebCore/rendering/SVGRenderTreeAsText.*,
+       WebCore/rendering/RenderVideo.*,
+       WebCore/storage/LocalStorage.*,
+       WebCore/storage/LocalStorageArea.*,
+       WebCore/storage/LocalStorageTask.*,
+       WebCore/storage/LocalStorageThread.*,
+       WebCore/storage/SessionStorage.*,
+       WebCore/storage/SessionStorageArea.*,
+       WebCore/storage/Storage.*,
+       WebCore/storage/StorageArea.*,
+       WebCore/storage/StorageEvent.*,
+       WebCore/storage/StorageMap.*,
+       WebCore/svg/ElementTimeControl.h,
+       WebCore/svg/*.idl,
+       WebCore/svg/animation/*,
+       WebCore/svg/graphics/SVGImage.*,
+       WebCore/svg/graphics/SVGImageEmptyClients.h,
+       WebCore/svg/graphics/SVGPaintServer*,
+       WebCore/svg/graphics/SVGResource*,
+       WebCore/svg/graphics/cg/CgSupport.*,
+       WebCore/svg/graphics/cg/RenderPathCg.cpp,
+       WebCore/svg/graphics/cg/SVGResourceClipperCg.cpp,
+       WebCore/svg/graphics/cg/SVGResourceFilterCg.cpp,
+       WebCore/svg/graphics/cg/SVGResourceMaskerCg.cpp,
+       WebCore/svg/graphics/filters/cg/WK*,
+       WebCore/svg/graphics/mac/SVGResourceFilterPlatformDataMac.h,
+       WebCore/xml/*,
+       WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.*,
+       WebKit/gtk/WebCoreSupport/EditorClientGtk.*,
+       WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.*,
+       WebKitTools/DumpRenderTree/cg/ImageDiffCG.cpp,
+       WebKitTools/DumpRenderTree/mac/ObjCPlugin.*,
+       WebKitTools/DumpRenderTree/mac/ObjCPluginFunction.*,
+       WebKitTools/GtkLauncher/main.c,
+       WebKitTools/Scripts/run-sunspider,
+       WebKitTools/Scripts/update-sources-list.py,
+       WebKitTools/wx/build-wxwebkit,
+       WebKitTools/wx/browser/browser.cpp,
+       WebKitTools/WinLauncher/stdafx.*,
+       WebKitTools/WinLauncher/WinLauncher.*,
+       WebKit/mac/History/WebHistoryInternal.h
+       WebKit/mac/Misc/WebIconFetcher.*,
+       WebKit/mac/Misc/WebIconFetcherInternal.h,
+       WebKit/mac/Plugins/WebNetscapePluginEventHandler.*,
+       WebKit/mac/Plugins/WebNetscapePluginEventHandlerCarbon.*,
+       WebKit/mac/Plugins/WebNetscapePluginEventHandlerCocoa.*,
+       WebKit/mac/Plugins/nptextinput.h,
+       WebKit/mac/WebCoreSupport/WebDragClient.h,
+       WebKit/mac/WebCoreSupport/WebPasteboardHelper.h,
+       WebKit/win/*,
+       WebKit/wx/*,
+       WebKitLibraries/win/tools/scripts/auto-version.sh
+Copyright: © 2002, 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc.
+           © 2005, 2006, 2007 Alexey Proskuryakov (ap@nypop.com)
+           © 2006, 2007 Trolltech ASA
+           © 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
+           © 2006 Samuel Weinig <sam.weinig@gmail.com>
+           © 2006 James G. Speth (speth@end.com)
+           © 2006 Jonas Witt <jonas.witt@gmail.com>
+           © 2005 Frerich Raabe <raabe@kde.org>
+           © 2005 Maksim Orlovich <maksim@kde.org>
+           © 2001, 2002 Thomas Broyer, Charlie Bozeman and Daniel Veillard
+           © 2005, 2006 Alexander Kellett <lypanov@kde.org>
+           © 2005, 2006 Kimmo Kinnunen <kimmo.t.kinnunen@nokia.com>
+           © 2005, 2006 Michael Emmel mike.emmel@gmail.com
+           © 2005 Ben La Monica <ben.lamonica@gmail.com>
+           © 2005 Google Inc.
+           © 2005, 2006 Nokia Corporation
+           © 2005, 2006 Oliver Hunt <ojh16@student.canterbury.ac.nz>
+           © 2006, 2007 Eric Seidel <eric@webkit.org>
+           © 2006 Allan Sandfeld Jensen <sandfeld@kde.org>
+           © 2006 Charles Samuels <charles@kde.org>
+           © 2006 Dave MacLachlan (dmaclach@mac.com)
+           © 2006 David Smith (catfish.man@gmail.com)
+           © 2006 Dirk Mueller <mueller@kde.org>
+           © 2006 Don Gibson <dgibson77@gmail.com>
+           © 2006 Friedemann Kleint <fkleint@trolltech.com>
+           © 2006 George Staikos <staikos@kde.org>
+           © 2006 Justin Haygood <jhaygood@spsu.edu>
+           © 2006, 2007, 2008 Kevin Ollivier <kevino@theolliviers.com>
+           © 2006 Lars Knoll <lars@trolltech.com>
+           © 2006 Nefaur Khandker <nefaurk@gmail.com>
+           © 2006, 2007 Rob Buis <buis@kde.org>
+           © 2006 Simon Hausmann <hausmann@kde.org>
+           © 2006 Zack Rusin <zack@kde.org>
+           © 2007 Alp Toker <alp.toker@collabora.co.uk>
+           © 2007 Holger Hans Peter Freyther <zecke@selfish.org>
+           © 2007 Robin Dunn
+           © 2007 Staikos Computing Services Inc. <info@staikos.net>
+           © 2007 Henry Mason (hmason@mac.com)
+           © 2007 Hiroyuki Ikezoe
+           © 2007 Kouhei Sutou
+           © 2007 Vaclav Slavik
+           © 2008 Xan Lopez <xan@gnome.org>
+           © 2008 Collabora, Ltd.
+           © 2008 Julien Chaffraix <jchaffraix@webkit.org>
+	   © 2008 The Mozilla Foundation
+License: BSD-2
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ 1. Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in the
+    documentation and/or other materials provided with the distribution.
+ .
+ THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Files: JavaScriptCore/API/JSRetainPtr.h,
+       JavaScriptCore/API/JSStringRefBSTR.*,
+       JavaScriptCore/DerivedSources.make,
+       JavaScriptCore/VM/*,
+       JavaScriptCore/kjs/CallData.h,
+       JavaScriptCore/kjs/CollectorHeapIntrospector.*,
+       JavaScriptCore/kjs/ConstructData.h,
+       JavaScriptCore/kjs/DebuggerCallFrame.*,
+       JavaScriptCore/kjs/InitializeThreading.*,
+       JavaScriptCore/kjs/JSActivation.*,
+       JavaScriptCore/kjs/JSGlobalData.*,
+       JavaScriptCore/kjs/JSGlobalObject.cpp,
+       JavaScriptCore/kjs/JSNotAnObject.*,
+       JavaScriptCore/kjs/JSVariableObject.*,
+       JavaScriptCore/kjs/SourceProvider.h,
+       JavaScriptCore/kjs/SourceRange.h,
+       JavaScriptCore/kjs/SymbolTable.h,
+       JavaScriptCore/profiler/*,
+       JavaScriptCore/wtf/ASCIICType.h,
+       JavaScriptCore/wtf/AVLTree.h,
+       JavaScriptCore/wtf/Deque.h,
+       JavaScriptCore/wtf/DisallowCType.h,
+       JavaScriptCore/wtf/Locker.h,
+       JavaScriptCore/wtf/MainThread.*,
+       JavaScriptCore/wtf/MallocZoneSupport.h,
+       JavaScriptCore/wtf/MessageQueue.h,
+       JavaScriptCore/wtf/Threading.h,
+       JavaScriptCore/wtf/ThreadingGtk.cpp,
+       JavaScriptCore/wtf/ThreadingNone.cpp,
+       JavaScriptCore/wtf/ThreadingPthreads.cpp,
+       JavaScriptCore/wtf/ThreadingQt.cpp,
+       JavaScriptCore/wtf/ThreadingWin.cpp,
+       JavaScriptCore/wtf/ThreadSpecific.h,
+       JavaScriptCore/wtf/mac/MainThreadMac.mm,
+       JavaScriptCore/wtf/gtk/MainThreadGtk.cpp,
+       JavaScriptCore/wtf/qt/MainThreadQt.cpp,
+       JavaScriptCore/wtf/unicode/Collator.h,
+       JavaScriptCore/wtf/unicode/CollatorDefault.cpp
+       JavaScriptCore/wtf/unicode/icu/CollatorICU.cpp,
+       JavaScriptCore/wtf/win/MainThreadWin.cpp,
+       JavaScriptCore/wtf/wx/MainThreadWx.cpp,
+       JavaScriptGlue/*,
+       WebCore/DerivedSources.make,
+       WebCore/WebCore.vcproj/migrate-idls.sh,
+       WebCore/bindings/js/JSAttrCustom.cpp,
+       WebCore/bindings/js/JSCanvasPixelArrayCustom.cpp,
+       WebCore/bindings/js/JSClipboardCustom.cpp,
+       WebCore/bindings/js/JSCustomSQL*,
+       WebCore/bindings/js/JSCustomVoidCallback.*,
+       WebCore/bindings/js/JSDatabaseCustom.cpp,
+       WebCore/bindings/js/JSHistoryCustom.cpp,
+       WebCore/bindings/js/JSEventCustom.cpp,
+       WebCore/bindings/js/JSHTMLFrameElementCustom.cpp,
+       WebCore/bindings/js/JSHTMLIFrameElementCustom.cpp,
+       WebCore/bindings/js/JSHTMLSelectElementCustom.h,
+       WebCore/bindings/js/JSSQLResultSetRowListCustom.cpp,
+       WebCore/bindings/js/JSSQLTransactionCustom.cpp,
+       WebCore/bindings/js/JSXMLHttpRequestCustom.cpp,
+       WebCore/bindings/js/JSXSLTProcessorCustom.cpp,
+       WebCore/bindings/js/StringSourceProvider.h,
+       WebCore/bindings/objc/DOMAbstractView.mm,
+       WebCore/bindings/objc/DOMAbstractViewFrame.h,
+       WebCore/bridge/npruntime.h,
+       WebCore/dom/ClassNodeList.*,
+       WebCore/dom/Clipboard.idl,
+       WebCore/dom/DOMCoreException.idl,
+       WebCore/dom/DOMCoreException.h,
+       WebCore/dom/EventException.idl,
+       WebCore/dom/EventException.h,
+       WebCore/dom/ExceptionBase.*,
+       WebCore/dom/SelectorNodeList.*,
+       WebCore/dom/StaticNodeList.*,
+       WebCore/dom/make_names.pl,
+       WebCore/editing/SmartReplace*,
+       WebCore/history/CachedPagePlatformData.h,
+       WebCore/html/CanvasPixelArray.*,
+       WebCore/html/HTMLTableRowsCollection.*,
+       WebCore/html/ImageData.*,
+       WebCore/loader/archive/*,
+       WebCore/loader/DocumentLoader.*,
+       WebCore/loader/FormState.*,
+       WebCore/loader/FrameLoader*,
+       WebCore/loader/MainResourceLoader.*,
+       WebCore/loader/NavigationAction.*,
+       WebCore/loader/NetscapePlugInStreamLoader.*,
+       WebCore/loader/ResourceLoader.*,
+       WebCore/loader/SubresourceLoader*,
+       WebCore/loader/icon/IconDatabaseClient.h,
+       WebCore/loader/icon/IconRecord.*,
+       WebCore/loader/icon/PageURLRecord.*,
+       WebCore/loader/mac/*,
+       WebCore/page/AccessibilityObject.*,
+       WebCore/page/AccessibilityListBox.*,
+       WebCore/page/AccessibilityListBoxOption.*,
+       WebCore/page/AccessibilityRenderObject.*,
+       WebCore/page/AnimationController.*,
+       WebCore/page/AXObjectCache.cpp,
+       WebCore/page/BarInfo.*,
+       WebCore/page/Console.*,
+       WebCore/page/DOMSelection.*,
+       WebCore/page/InspectorController.*,
+       WebCore/page/JavaScriptDebugListener.h,
+       WebCore/page/JavaScriptDebugServer.*,
+       WebCore/page/Location.*,
+       WebCore/page/Screen.*,
+       WebCore/page/WindowFeatures.h,
+       WebCore/page/inspector/*,
+       WebCore/page/mac/AccessibilityObjectWrapper.*,
+       WebCore/page/mac/PageMac.cpp,
+       WebCore/platform/AutodrainedPool.h,
+       WebCore/platform/FileChooser.*,
+       WebCore/platform/FileSystem.h,
+       WebCore/platform/FloatConversion.h,
+       WebCore/platform/SecurityOrigin.*,
+       WebCore/platform/SecurityOriginHash.h,
+       WebCore/platform/cf/FileSystemCF.cpp,
+       WebCore/platform/cf/SchedulePair.*,
+       WebCore/platform/cf/SharedBufferCF.cpp,
+       WebCore/platform/graphics/FontCache.*,
+       WebCore/platform/graphics/FontFallbackList.cpp,
+       WebCore/platform/graphics/FontDescription.cpp,
+       WebCore/platform/graphics/Glyph*,
+       WebCore/platform/graphics/SimpleFontData.cpp,
+       WebCore/platform/graphics/StringTruncator.*,
+       WebCore/platform/graphics/gtk/FontDataGtk.cpp,
+       WebCore/platform/graphics/gtk/FontCacheGtk.cpp,
+       WebCore/platform/graphics/gtk/GlyphPageTreeNodeGtk.cpp,
+       WebCore/platform/graphics/gtk/GlyphPageTreeNodePango.cpp,
+       WebCore/platform/graphics/gtk/IconGtk.cpp,
+       WebCore/platform/graphics/gtk/SimpleFontDataGtk.cpp,
+       WebCore/platform/graphics/gtk/SimpleFontDataPango.cpp,
+       WebCore/platform/graphics/mac/ColorMac.h,
+       WebCore/platform/graphics/mac/FontCacheMac.mm,
+       WebCore/platform/graphics/mac/FontDataMac.mm,
+       WebCore/platform/graphics/mac/GlyphPageTreeNodeMac.cpp,
+       WebCore/platform/graphics/mac/SimpleFontDataMac.mm,
+       WebCore/platform/graphics/win/ColorSafari.cpp,
+       WebCore/platform/graphics/win/FontCacheWin.cpp,
+       WebCore/platform/graphics/win/FontDataWin.cpp,
+       WebCore/platform/graphics/win/FontDatabase.*,
+       WebCore/platform/graphics/win/GlyphPageTreeNodeCairoWin.cpp,
+       WebCore/platform/graphics/win/GlyphPageTreeNodeCGWin.cpp,
+       WebCore/platform/graphics/win/SimpleFontDataWin.cpp,
+       WebCore/platform/graphics/win/SimpleFontDataCGWin.cpp,
+       WebCore/platform/graphics/win/SimpleFontDataCairoWin.cpp,
+       WebCore/platform/graphics/win/UniscribeController.*,
+       WebCore/platform/graphics/wx/FontCacheWx.cpp,
+       WebCore/platform/graphics/wx/FontDataWx.cpp,
+       WebCore/platform/graphics/wx/FontPlatformData.h,
+       WebCore/platform/graphics/wx/GlyphMapWx.cpp,
+       WebCore/platform/graphics/wx/SimpleFontDataWx.cpp,
+       WebCore/platform/gtk/ContextMenuGtk.cpp,
+       WebCore/platform/gtk/ContextMenuItemGtk.cpp,
+       WebCore/platform/gtk/PasteboardGtk.cpp,
+       WebCore/platform/gtk/SearchPopupMenuGtk.cpp,
+       WebCore/platform/mac/AutodrainedPool.mm,
+       WebCore/platform/mac/FileChooserMac.mm,
+       WebCore/platform/mac/SchedulePairMac.mm,
+       WebCore/platform/mac/SoftLinking.h,
+       WebCore/platform/mac/Threading.mm,
+       WebCore/platform/mac/WebCoreNSStringExtras.*,
+       WebCore/platform/mac/WebCoreObjCExtras.*,
+       WebCore/platform/mac/WebFontCache.mm,
+       WebCore/platform/network/HTTPParsers.*,
+       WebCore/platform/network/cf/FormDataStreamCFNet.*,
+       WebCore/platform/network/mac/FormDataStreamMac.*,
+       WebCore/platform/network/mac/WebCoreURLResponse.*,
+       WebCore/platform/posix/FileSystemPOSIX.cpp,
+       WebCore/platform/qt/FileSystemQt.cpp
+       WebCore/platform/qt/PlatformScreenQt.cpp,
+       WebCore/platform/qt/ThreadingQt.cpp,
+       WebCore/platform/sql/SQLValue.*,
+       WebCore/platform/sql/SQLiteAuthorizer.*,
+       WebCore/platform/text/StringBuffer.h,
+       WebCore/platform/text/StringBuilder.*,
+       WebCore/platform/text/mac/make-charset-table.pl,
+       WebCore/platform/win/FileSystemWin.cpp,
+       WebCore/platform/win/GDIObjectCounter.*,
+       WebCore/platform/win/MutexWin.cpp,
+       WebCore/platform/win/SharedBufferWin.cpp,
+       WebCore/platform/win/SoftLinking.h,
+       WebCore/platform/win/WindowMessageBroadcaster.*,
+       WebCore/platform/win/WindowMessageListener.h,
+       WebCore/platform/wx/ThreadingWx.cpp,
+       WebCore/rendering/MediaControlElements.*,
+       WebCore/rendering/RenderListBox.*,
+       WebCore/rendering/RenderReplica.*,
+       WebCore/storage/*,
+       WebCore/xml/XMLHttpRequest.idl,
+       WebCore/xml/XMLHttpRequestException.h,
+       WebCore/xml/XMLHttpRequestException.idl,
+       WebCore/xml/XPathException.h,
+       WebCore/xml/XPathException.idl,
+       WebCore/xml/XSLTUnicodeSort.*,
+       WebKit/qt/WebCoreSupport/InspectorClientQt.*,
+       WebKitTools/BuildSlaveSupport/*,
+       WebKitTools/CodeCoverage/*,
+       WebKitTools/DumpRenderTree/*,
+       WebKitTools/Scripts/*,
+       WebKitTools/WebKitLauncher/*,
+       WebKitTools/FindSafari/*,
+       WebKitTools/wx/browser/browser.bkl,
+       WebKitTools/wx/install-unix-extras,
+       WebKit/*,
+       WebKit/gtk/*,
+       WebKit/win/DOMCreateInstance.*,
+       WebKit/win/ForEachCoClass.h,
+       WebKit/win/GEN_DOMObject.*,
+       WebKit/win/WebDatabaseManager.*,
+       WebKit/win/WebDragClient.h,
+       WebKit/win/WebInspector.*,
+       WebKit/win/WebInspectorClient.*,
+       WebKit/win/WebKit.vcproj/FixMIDLHeaders.pl,
+       WebKit/win/WebKit.vcproj/build-generated-files.sh,
+       WebKit/win/WebKitLogging.*,
+       WebKit/win/WebKitPrefix.*,
+       WebKit/win/WebKitStatistics*,
+       WebKit/win/WebKitSystemBits.*,
+       WebKit/win/WebPreferenceKeysPrivate.h,
+       WebKit/win/WebScriptCallFrame.*,
+       WebKit/win/WebTextRenderer.*,
+       WebKit/win/WebNodeHighlight.*,
+       WebKit/win/Interfaces/IWebIconFetcher.idl,
+       WebKit/win/Interfaces/IWebMutableURLRequestPrivate.idl,
+       WebKit/win/Interfaces/IWebSecurityOrigin.idl,
+       WebKit/win/WebCoreSupport/FormValuesPropertyBag.*,
+       WebKit/win/WebCoreSupport/WebFrameLoaderClient.*,
+       WebKit/win/WebCoreSupport/WebInspectorDelegate.cpp,
+       WebKit/wx/WebViewPrivate.h
+Copyright: © 2003, 2005, 2006, 2007, 2008 Apple Inc.
+           © 2006, 2007 Holger Hans Peter Freyther <zecke@selfish.org>
+           © 2004, Apple Computer, Inc. and The Mozilla Foundation
+           © 2006 Samuel Weinig <sam.weinig@gmail.com>
+           © 2006, 2007 Trolltech ASA
+           © 2006 Alexey Proskuryakov (ap@nypop.com)
+           © 2007 Matt Lilek (pewtermoose@gmail.com)
+           © 2006 Michael Emmel mike.emmel@gmail.com
+           © 2007, 2008 Alp Toker <alp@atoker.com>
+           © 2006, 2007 Kevin Ollivier <kevino@theolliviers.com>
+           © 2006 Mark Rowe <opendarwin.org@bdash.net.nz>
+           © 2004, 2005, 2006 Nathaniel Smith
+           © 2006, 2007 David Smith (catfish.man@gmail.com)
+           © 2006, 2007 Vladimir Olexa (vladimir.olexa@gmail.com)
+           © 2006 Nikolas Zimmermann <zimmermann@kde.org>
+           © 2006 Jonas Witt <jonas.witt@gmail.com>
+           © 2006 Eric Seidel (eric@webkit.org)
+           © 2006 Graham Dennis
+           © 2007 Staikos Computing Services, Inc. <info@staikos.net>
+           © 2007 Brent Fulgham
+           © 2007 Justin Haygood (jhaygood@reaktix.com)
+           © 2008 Cameron Zwarich (cwzwarich@uwaterloo.ca)
+           © 2008 Tony Chang <idealisms@gmail.com>
+License: BSD-3
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ .
+ 1.  Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the following disclaimer.
+ 2.  Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the following disclaimer in the
+     documentation and/or other materials provided with the distribution.
+ 3.  Neither the name of Apple, Inc. ("Apple") nor the names of
+     its contributors may be used to endorse or promote products derived
+     from this software without specific prior written permission.
+ .
+ THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Files: WebCore/bridge/qt/*,
+       WebCore/page/Chrome.*,
+       WebCore/page/ChromeClient.h,
+       WebCore/page/Frame.*,
+       WebCore/page/FramePrivate.h,
+       WebCore/page/FrameTree.*,
+       WebCore/page/FrameView.*,
+       WebCore/page/MouseEventWithHitTestResults.*,
+       WebCore/page/Navigator.*,
+       WebCore/page/Page.*,
+       WebCore/page/Plugin.h,
+       WebCore/page/PrintContext.*,
+       WebCore/page/WindowFeatures.cpp,
+       WebCore/page/gtk/AXObjectCacheAtk.cpp,
+       WebCore/page/gtk/AccessibilityObjectWrapperAtk.*,
+       WebCore/page/mac/ChromeMac.mm,
+       WebCore/platform/PopupMenuClient.h,
+       WebCore/platform/PopupMenu.h,
+       WebCore/platform/SearchPopupMenu.h,
+       WebCore/platform/Shared.h,
+       WebCore/platform/StaticConstructors.h,
+       WebCore/platform/TreeShared.h,
+       WebCore/platform/graphics/FloatPoint3D.*,
+       WebCore/platform/graphics/Font.cpp,
+       WebCore/platform/graphics/Font.h,
+       WebCore/platform/graphics/FontDescription.h,
+       WebCore/platform/graphics/FontFallbackList.h,
+       WebCore/platform/graphics/Icon.h,
+       WebCore/platform/graphics/IntSizeHash.h,
+       WebCore/platform/graphics/PathTraversalState.cpp,
+       WebCore/platform/graphics/SimpleFontData.h,
+       WebCore/platform/graphics/cairo/CairoPath.h,
+       WebCore/platform/graphics/cairo/PathCairo.cpp,
+       WebCore/platform/graphics/gtk/FontPlatformData.h,
+       WebCore/platform/graphics/gtk/FontPlatformDataGtk.cpp,
+       WebCore/platform/graphics/gtk/FontPlatformDataPango.cpp,
+       WebCore/platform/graphics/gtk/MediaPlayerPrivateGStreamer.*,
+       WebCore/platform/graphics/gtk/PopupMenuGtk.cpp,
+       WebCore/platform/graphics/gtk/RenderThemeGtk.*,
+       WebCore/platform/graphics/gtk/VideoSinkGStreamer.*,
+       WebCore/platform/graphics/mac/FontCustomPlatformData.*,
+       WebCore/platform/graphics/mac/FontMac.mm,
+       WebCore/platform/graphics/mac/FontPlatformData.h,
+       WebCore/platform/graphics/mac/FontPlatformDataMac.mm,
+       WebCore/platform/graphics/mac/IconMac.mm,
+       WebCore/platform/graphics/qt/FontCacheQt.cpp,
+       WebCore/platform/graphics/qt/FontCustomPlatformData.*,
+       WebCore/platform/graphics/qt/FontDataQt.cpp,
+       WebCore/platform/graphics/qt/FontPlatformData.h,
+       WebCore/platform/graphics/qt/FontQt.cpp,
+       WebCore/platform/graphics/qt/GlyphPageTreeNodeQt.cpp,
+       WebCore/platform/graphics/qt/IconQt.cpp,
+       WebCore/platform/graphics/qt/MediaPlayerPrivatePhonon.*,
+       WebCore/platform/graphics/qt/SimpleFontDataQt.cpp,
+       WebCore/platform/graphics/win/FontCustomPlatformData.*,
+       WebCore/platform/graphics/win/FontCustomPlatformDataCairo.*,
+       WebCore/platform/graphics/win/FontPlatformData.h,
+       WebCore/platform/graphics/win/FontPlatformDataCGWin.cpp,
+       WebCore/platform/graphics/win/FontPlatformDataCairoWin.cpp,
+       WebCore/platform/graphics/win/IconWin.cpp,
+       WebCore/platform/gtk/CursorGtk.h,
+       WebCore/platform/gtk/EventLoopGtk.cpp,
+       WebCore/platform/gtk/PasteboardHelper.h,
+       WebCore/platform/mac/LocalCurrentGraphicsContext.*,
+       WebCore/platform/mac/PopupMenuMac.mm,
+       WebCore/platform/mac/SearchPopupMenuMac.mm,
+       WebCore/platform/network/FormData.*,
+       WebCore/platform/network/curl/CookieJarCurl.cpp,
+       WebCore/platform/network/soup/CookieJarSoup.cpp,
+       WebCore/platform/network/qt/QNetworkReplyHandler.*,
+       WebCore/platform/network/qt/ResourceRequestQt.cpp,
+       WebCore/platform/network/soup/ResourceHandleSoup.cpp,
+       WebCore/platform/qt/EventLoopQt.cpp,
+       WebCore/platform/qt/FileChooserQt.cpp,
+       WebCore/platform/qt/KURLQt.cpp,
+       WebCore/platform/qt/LoggingQt.cpp,
+       WebCore/platform/qt/MenuEventProxy.h,
+       WebCore/platform/qt/PopupMenuQt.cpp,
+       WebCore/platform/qt/QWebPopup.*,
+       WebCore/platform/qt/RenderThemeQt.*,
+       WebCore/platform/qt/SearchPopupMenuQt.cpp,
+       WebCore/platform/qt/WheelEventQt.cpp,
+       WebCore/platform/qt/html4-adjustments-qt.css,
+       WebCore/platform/text/AtomicString.*,
+       WebCore/platform/text/AtomicStringImpl.h,
+       WebCore/platform/text/Base64.cpp,
+       WebCore/platform/text/BidiContext.*,
+       WebCore/platform/text/BidiResolver.h,
+       WebCore/platform/text/ParserUtilities.h,
+       WebCore/platform/text/PlatformString.h,
+       WebCore/platform/text/String.cpp,
+       WebCore/platform/text/SegmentedString.*,
+       WebCore/platform/text/StringHash.h,
+       WebCore/platform/text/StringImpl.*,
+       WebCore/platform/text/TextBreakIterator.h,
+       WebCore/platform/text/TextBreakIteratorICU.cpp,
+       WebCore/platform/text/TextBreakIteratorInternalICU.h,
+       WebCore/platform/text/cf/StringCF.cpp,
+       WebCore/platform/text/cf/StringImplCF.cpp,
+       WebCore/platform/text/gtk/TextBreakIteratorInternalICUGtk.cpp,
+       WebCore/platform/text/mac/StringImplMac.mm,
+       WebCore/platform/text/mac/StringMac.mm,
+       WebCore/platform/text/mac/TextBreakIteratorInternalICUMac.mm,
+       WebCore/platform/text/qt/TextBreakIteratorQt.cpp,
+       WebCore/platform/text/win/TextBreakIteratorInternalICUWin.cpp,
+       WebCore/platform/win/PopupMenuWin.cpp,
+       WebCore/platform/win/SearchPopupMenuWin.cpp,
+       WebCore/platform/wx/PopupMenuWx.cpp,
+       WebCore/svg/SVGAngle.idl,
+       WebCore/svg/SVGColor.idl,
+       WebCore/svg/SVGDocument.idl,
+       WebCore/svg/SVGElement.idl,
+       WebCore/svg/SVGException.idl,
+       WebCore/svg/SVGFontData.*,
+       WebCore/svg/SVGHKernElement.idl,
+       WebCore/svg/SVGLength.idl,
+       WebCore/svg/SVGMatrix.idl,
+       WebCore/svg/SVGMetadataElement.idl,
+       WebCore/svg/SVGNumber.idl,
+       WebCore/svg/SVGPoint.idl,
+       WebCore/svg/SVGRect.idl,
+       WebCore/svg/SVGSVGElement.idl,
+       WebCore/svg/SVGTransform.idl,
+       WebCore/svg/graphics/SVGResourceFilter.*,
+       WebCore/svg/graphics/cg/SVGPaintServerCg.cpp,
+       WebCore/svg/graphics/cg/SVGPaintServerGradientCg.cpp,
+       WebCore/svg/graphics/cg/SVGPaintServerPatternCg.cpp,
+       WebCore/svg/graphics/cg/SVGPaintServerSolidCg.cpp,
+       WebCore/svg/graphics/filters/*,
+       WebCore/svg/graphics/filters/cg/SVG*,
+       WebCore/svg/graphics/qt/*,
+       WebCore/xml/DOMParser.*,
+       WebCore/xml/XMLSerializer.*,
+       WebCore/xml/XPathEvaluator.idl,
+       WebCore/xml/XPathExpression.idl,
+       WebCore/xml/XPathNSResolver.idl,
+       WebCore/xml/XPathResult.idl,
+       WebCore/xml/XSL*,
+       WebKit/gtk/WebCoreSupport/PasteboardHelperGtk.*,
+       WebKit/gtk/webkit/*,
+       WebKit/qt,
+       *
+Copyright: © 2002, 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc.
+           © 1991, 1999 Free Software Foundation, Inc.
+           © 1997 Martin Jones (mjones@kde.org)
+           © 1998, 1999 Torben Weis <weis@kde.org>
+           © 1998-2003, 2006 Lars Knoll (knoll@kde.org)
+           © 1999-2004 Harri Porten (porten@kde.org)
+           © 1999, 2001 Antti Koivisto (koivisto@kde.org)
+           © 1999, 2002 Waldo Bastian (bastian@kde.org)
+           © 2000-2001 Dawit Alemayehu <adawit@kde.org>
+           © 2000 Daniel Molkentin (molkentin@kde.org)
+           © 2000-2003 Dirk Mueller (mueller@kde.org)
+           © 2000 Frederik Holljen (frederik.holljen@hig.no)
+           © 2000, 2001, 2003 Peter Kelly (pmk@post.com)
+           © 2000 Malte Starostik <malte@kde.org>
+           © 2000 Simon Hausmann <hausmann@kde.org>
+           © 2000 Stefan Schimanski (schimmi@kde.org)
+           © 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de)
+           © 2001 Tim Copperfield <timecop@network.email.ne.jp>
+           © 2002, 2003 The Karbon Developers
+           © 2002 Cyrus Patel <cyp@fb14.uni-mainz.de>
+           © 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org>
+           © 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org>
+           © 2004, 2005 Allan Sandfeld Jensen (kde@carewolf.com)
+           © 2004, 2006 Zack Rusin <zack@kde.org>
+	   © 2004 Michal Zalewski <lcamtuf@coredump.cx>
+           © 2005, 2006 Alexander Kellett <lypanov@kde.org>
+           © 2005, 2006, 2007 Alexey Proskuryakov <ap@nypop.com>
+           © 2005, 2006 Oliver Hunt <ojh16@student.canterbury.ac.nz>
+           © 2006, 2007 Eric Seidel (eric@webkit.org)
+           © 2006, 2007 Samuel Weinig <sam@webkit.org>
+           © 2006 Anders Carlsson <andersca@mac.com>
+           © 2006 Andrew Wellington (proton@wiretapped.net)
+           © 2006 Bjoern Graf (bjoern.graf@gmail.com)
+           © 2006 Enrico Ros <enrico.ros@m31engineering.it>
+           © 2006 George Staikos <staikos@kde.org>
+           © 2006 Graham Dennis (graham.dennis@gmail.com)
+           © 2006 James G. Speth (speth@end.com)
+           © 2006 Jon Shier (jshier@iastate.edu)
+           © 2006, 2007 Maks Orlovich
+           © 2006 Michael Emmel <mike.emmel@gmail.com>
+           © 2006, 2008 Trolltech ASA
+           © 2007, 2008 Alp Toker <alp@atoker.com>
+           © 2007 Cameron Zwarich (cwzwarich@uwaterloo.ca)
+           © 2007 Holger Hans Peter Freyther <zecke@selfish.org>
+           © 2007 Krzysztof Kowalczyk <kkowalczyk@gmail.com>
+           © 2007 Staikos Computing Services Inc. <info@staikos.net>
+           © 2007 David Smith (catfish.man@gmail.com)
+           © 2007, 2008 Collabora, Ltd.
+           © 2007 OpenedHand
+           © 2007 Christian Dywan <christian@twotoasts.de>
+           © 2007 Luca Bruno <lethalman88@gmail.com>
+           © 2008 Xan Lopez <xan@gnome.org>
+	   © 2008 Nuanti Ltd
+           © 2007 Christian Dywan <christian@imiendo.com>
+License: LGPL-2+ (/usr/share/common-licenses/LGPL-2)
+
+Files: WebCore/bridge/npruntime_internal.h
+Copyright: © 2007 Collabora, Ltd.
+License: LGPL-2.1+ (/usr/share/common-licenses/LGPL-2)
+
+Files: JavaScriptCore/kjs/DateMath.*,
+       WebCore/bridge/npapi.h,
+       WebCore/html/HTMLDocument.cpp,
+       WebCore/platform/Arena.*,
+       WebCore/platform/gtk/gtk2drawing.c,
+       WebCore/platform/gtk/gtkdrawing.h,
+       WebCore/platform/image-decoders/gif/GIFImageReader.*,
+       WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp,
+       WebCore/platform/image-decoders/png/PNGImageDecoder.cpp,
+       WebCore/platform/image-decoders/zlib/mozzconf.h,
+       WebCore/platform/text/UnicodeRange.*,
+       WebCore/plugins/gtk/gtk2xtbin.*,
+       WebCore/plugins/gtk/xembed.h,
+       WebCore/rendering/RenderArena.*,
+       WebCore/rendering/RenderLayer.*
+Copyright: © 1998, 2001-2006 mozilla.org
+           © 1999, 2000 Harri Porten (porten@kde.org)
+           © 2003, 2004, 2005, 2006, 2007 Apple Inc.
+           © 1998-2000, 2002 Netscape Communications Corporation.
+           © 1999 Lars Knoll (knoll@kde.org)
+           © 1999 Antti Koivisto (koivisto@kde.org)
+           © 2004 IBM Corporation
+           © 2002 Sun Microsystems, Inc.
+License: LGPL-2.1+ (/usr/share/common-licenses/LGPL-2) | GPL-2+ (/usr/share/common-licenses/GPL-2) | MPL-1.1
+ Other contributors for this code include:
+ - Boris Zbarsky <bzbarsky@mit.edu>
+ - Brian Ryner <bryner@brianryner.com>
+ - Chris Saari <saari@netscape.com>
+ - Christian Biesinger <cbiesinger@web.de>
+ - David Baron <dbaron@fas.harvard.edu>
+ - Jeff Hostetler <jeff@nerdone.com>
+ - Josh Soref <timeless@mac.com>
+ - Michael Ventnor <m.ventnor@gmail.com>
+ - Nick Blievers <nickb@adacel.com.au>
+ - Pierre Chanial <p_ch@verizon.net>
+ - Raffaele Sena <raff@netwinder.org>
+ - Randall Jesup <rjesup@wgate.com>
+ - Robert O'Callahan <roc+@cs.cmu.edu>
+ - Roland Mainz <roland.mainz@informatik.med.uni-giessen.de>
+ - Stuart Parmenter <stuart@mozilla.com>
+ - Tom Rini <trini@kernel.crashing.org>
+
+Files: JavaScriptCore/pcre/*
+Copyright: © 1997-2005 University of Cambridge
+           © 2002, 2004, 2005, 2006, 2007 Apple Inc.
+License: BSD-3
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+ .
+     * Redistributions of source code must retain the above copyright notice,
+       this list of conditions and the following disclaimer.
+ .
+     * Redistributions in binary form must reproduce the above copyright
+       notice, this list of conditions and the following disclaimer in the
+       documentation and/or other materials provided with the distribution.
+ .
+     * Neither the name of the University of Cambridge nor the names of its
+       contributors may be used to endorse or promote products derived from
+       this software without specific prior written permission.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+
+Files: JavaScriptCore/kjs/dtoa.cpp
+Copyright: © 1991, 2000, 2001 Lucent Technologies
+License: other
+ Permission to use, copy, modify, and distribute this software for any
+ purpose without fee is hereby granted, provided that this entire notice
+ is included in all copies of any software which is or includes a copy
+ or modification of this software and in all copies of the supporting
+ documentation for such software.
+ .
+ THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED
+ WARRANTY.  IN PARTICULAR, NEITHER THE AUTHOR NOR LUCENT MAKES ANY
+ REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY
+ OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
+
+Files: JavaScriptCore/wtf/FastMalloc.cpp,
+       JavaScriptCore/wtf/TC*
+Copyright: © 2005, 2007 Google Inc.
+License: BSD-3
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+ .
+     * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+     * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following disclaimer
+ in the documentation and/or other materials provided with the
+ distribution.
+     * Neither the name of Google Inc. nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Files: WebCore/platform/text/symbian/StringImplSymbian.*
+Copyright: © 2006 Nokia Corporation
+License: BSD-3
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ .
+    * Redistributions of source code must retain the above copyright
+      notice, this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in
+      the documentation and/or other materials provided with the
+      distribution.
+    * Neither the name of the Nokia Corporation nor the names of its
+      contributors may be used to endorse or promote products derived
+      from this software without specific prior written permission.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ DAMAGE.
+
+Files: JavaScriptCore/icu/*,
+       JavaScriptGlue/icu/*,
+       WebCore/icu/*,
+       WebKit/mac/icu/*,
+Copyright: © 1995-2006 International Business Machines Corporation and others
+License: other
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this
+ software and associated documentation files (the "Software"), to deal in the Software
+ without restriction, including without limitation the rights to use, copy, modify,
+ merge, publish, distribute, and/or sell copies of the Software, and to permit persons
+ to whom the Software is furnished to do so, provided that the above copyright notice(s)
+ and this permission notice appear in all copies of the Software and that both the above
+ copyright notice(s) and this permission notice appear in supporting documentation.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+ INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+ PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER
+ OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR
+ CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+ OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ .
+ Except as contained in this notice, the name of a copyright holder shall not be used in
+ advertising or otherwise to promote the sale, use or other dealings in this Software
+ without prior written authorization of the copyright holder.
+
+Files: WebCore/platform/image-decoders/zlib/*
+Copyright: © 1995-2005 Mark Adler
+           © 1995-2005 Jean-loup Gailly
+License: other
+ This software is provided 'as-is', without any express or implied
+ warranty.  In no event will the authors be held liable for any damages
+ arising from the use of this software.
+ .
+ Permission is granted to anyone to use this software for any purpose,
+ including commercial applications, and to alter it and redistribute it
+ freely, subject to the following restrictions:
+ .
+ 1. The origin of this software must not be misrepresented; you must not
+    claim that you wrote the original software. If you use this software
+    in a product, an acknowledgment in the product documentation would be
+    appreciated but is not required.
+ 2. Altered source versions must be plainly marked as such, and must not be
+    misrepresented as being the original software.
+ 3. This notice may not be removed or altered from any source distribution.
+
+Files: WebKitTools/DumpRenderTree/win/TestNetscapePlugin/main.c,
+       WebKitTools/DumpRenderTree/win/TestNetscapePlugin/main.cpp,
+       WebKitTools/DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.cpp,
+       WebKitTools/DumpRenderTree/TestNetscapePlugIn.subproj/PluginObject.h,
+       WebKitTools/DumpRenderTree/TestNetscapePlugIn.subproj/TestObject.cpp,
+       WebKitTools/DumpRenderTree/TestNetscapePlugIn.subproj/TestObject.h,
+       WebKitTools/DumpRenderTree/TestNetscapePlugIn.subproj/main.cpp
+Copyright: © Apple Inc.
+License: other
+ IMPORTANT:  This Apple software is supplied to you by Apple Computer, Inc. ("Apple") in
+ consideration of your agreement to the following terms, and your use, installation,
+ modification or redistribution of this Apple software constitutes acceptance of these
+ terms.  If you do not agree with these terms, please do not use, install, modify or
+ redistribute this Apple software.
+ .
+ In consideration of your agreement to abide by the following terms, and subject to these
+ terms, Apple grants you a personal, non-exclusive license, under Apple's copyrights in
+ this original Apple software (the "Apple Software"), to use, reproduce, modify and
+ redistribute the Apple Software, with or without modifications, in source and/or binary
+ forms; provided that if you redistribute the Apple Software in its entirety and without
+ modifications, you must retain this notice and the following text and disclaimers in all
+ such redistributions of the Apple Software.  Neither the name, trademarks, service marks
+ or logos of Apple Computer, Inc. may be used to endorse or promote products derived from
+ the Apple Software without specific prior written permission from Apple. Except as expressly
+ stated in this notice, no other rights or licenses, express or implied, are granted by Apple
+ herein, including but not limited to any patent rights that may be infringed by your
+ derivative works or by other works in which the Apple Software may be incorporated.
+ .
+ The Apple Software is provided by Apple on an "AS IS" basis.  APPLE MAKES NO WARRANTIES,
+ EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS
+ USE AND OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
+ .
+ IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE,
+ REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND
+ WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR
+ OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Files: WebKitTools/iExploder/*
+Copyright: © 2005 Thomas Stromberg <thomas@stromberg.org>
+License: other
+ This software is provided 'as-is', without any express or implied warranty.
+ In no event will the authors be held liable for any damages arising from the
+ use of this software.
+ .
+ Permission is granted to anyone to use this software for any purpose,
+ including commercial applications, and to alter it and redistribute it
+ freely, subject to the following restrictions:
+ .
+ 1. The origin of this software must not be misrepresented; you must not
+ claim that you wrote the original software. If you use this software in a
+ product, an acknowledgment in the product documentation would be appreciated
+ but is not required.
+ .
+ 2. Altered source versions must be plainly marked as such, and must not be
+ misrepresented as being the original software.
+ .
+ 3. This notice may not be removed or altered from any source distribution.
+
+Files: WebKitTools/Scripts/prepare-ChangeLog
+Copyright: © 2000, 2001 Eazel, Inc.
+           © 2002, 2003, 2004, 2005, 2006, 2007 Apple Inc.
+License: GPL-2+ (/usr/share/common-licenses/GPL-2)
+
+Files: WebCore/bindings/scripts/XMLTiny.pm
+Copyright: © 2007 David Cantrell
+License: other
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of either:
+ .
+    a) the GNU General Public License as published by the Free
+    Software Foundation; either version 1, or (at your option) any
+    later version, or
+    b) the "Artistic License" which comes with this Kit.
+ .
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See either
+ the GNU General Public License or the Artistic License for more details.
+ .
+ You should have received a copy of the Artistic License with this
+ Kit, in the file named "Artistic".  If not, I'll be glad to provide one.
+ .
+ You should also have received a copy of the GNU General Public License
+ along with this program in the file named "Copying". If not, write to the
+ Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307, USA or visit their web page on the internet at
+ http://www.gnu.org/copyleft/gpl.html.
+ .
+ For those of you that choose to use the GNU General Public License,
+ my interpretation of the GNU General Public License is that no Perl
+ script falls under the terms of the GPL unless you explicitly put
+ said script under the terms of the GPL yourself.  Furthermore, any
+ object code linked with perl does not automatically fall under the
+ terms of the GPL, provided such object code only adds definitions
+ of subroutines and variables, and does not otherwise impair the
+ resulting interpreter from executing any standard Perl script.  I
+ consider linking in C subroutines in this manner to be the moral
+ equivalent of defining subroutines in the Perl language itself.  You
+ may sell such an object file as proprietary provided that you provide  
+ or offer to provide the Perl source, as specified by the GNU General
+ Public License.  (This is merely an alternate way of specifying input
+ to the program.)  You may also sell a binary produced by the dumping of
+ a running Perl script that belongs to you, provided that you provide or
+ offer to provide the Perl source as specified by the GPL.  (The
+ fact that a Perl interpreter and your code are in the same binary file
+ is, in this case, a form of mere aggregation.)  This is my interpretation
+ of the GPL.  If you still have concerns or difficulties understanding
+ my intent, feel free to contact me.  Of course, the Artistic License
+ spells all this out for your protection, so you may prefer to use that.
+
+Files: WebKitLibraries/WebCoreSQLite3
+Copyright: © 2001, 2006
+License: other
+ The author disclaims copyright to this source code.  In place of
+ a legal notice, here is a blessing:
+ .
+    May you do good and not evil.
+    May you find forgiveness for yourself and forgive others.
+    May you share freely, never taking more than you give.
+
+Files: acinclude.m4
+Copyright: © 2007, 2008 Josh Triplett <josh@freedesktop.org>
+License: other
+ Copying and distribution of this file, with or without modification,
+ are permitted in any medium without royalty provided the copyright
+ notice and this notice are preserved.
diff -Naur WebKit-r41128/debian/files WebKit-r41128-nx/debian/files
--- WebKit-r41128/debian/files	1969-12-31 19:00:00.000000000 -0500
+++ WebKit-r41128-nx/debian/files	2009-02-26 02:36:03.061010270 -0500
@@ -0,0 +1,3 @@
+libwebkit-dev_1.0-svn41128-1_all.deb libdevel extra
+libwebkit-1.0-1_1.0-svn41128-1_armel.deb user/other optional
+libwebkit-1.0-1-dbg_1.0-svn41128-1_armel.deb libdevel extra
diff -Naur WebKit-r41128/debian/libwebkit-1.0-1.install WebKit-r41128-nx/debian/libwebkit-1.0-1.install
--- WebKit-r41128/debian/libwebkit-1.0-1.install	1969-12-31 19:00:00.000000000 -0500
+++ WebKit-r41128-nx/debian/libwebkit-1.0-1.install	2009-02-23 16:01:26.257006910 -0500
@@ -0,0 +1,4 @@
+usr/lib/libwebkit-1.0.so.*
+usr/lib/webkit-1.0/libexec/GtkLauncher
+usr/lib/webkit-1.0/libexec/DumpRenderTree
+usr/share/webkit-1.0/*
diff -Naur WebKit-r41128/debian/libwebkit-dev.install WebKit-r41128-nx/debian/libwebkit-dev.install
--- WebKit-r41128/debian/libwebkit-dev.install	1969-12-31 19:00:00.000000000 -0500
+++ WebKit-r41128-nx/debian/libwebkit-dev.install	2009-02-23 16:01:26.290663510 -0500
@@ -0,0 +1,3 @@
+usr/lib/libwebkit-1.0.so
+usr/include/webkit-1.0
+usr/lib/pkgconfig/webkit-1.0.pc
diff -Naur WebKit-r41128/debian/rules WebKit-r41128-nx/debian/rules
--- WebKit-r41128/debian/rules	1969-12-31 19:00:00.000000000 -0500
+++ WebKit-r41128-nx/debian/rules	2009-02-23 16:01:26.324007030 -0500
@@ -0,0 +1,100 @@
+#!/usr/bin/make -f
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+export LC_ALL=en_US
+
+CFLAGS = -g -Wall
+
+ifeq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
+        CFLAGS += -O2 -mfpu=vfp -mfloat-abi=softfp
+else
+        CFLAGS += -O0
+endif
+
+ifeq ($(DEB_BUILD_ARCH),alpha)
+        CFLAGS += -Wl,--no-relax
+endif
+
+clean:
+	dh_testdir
+	dh_testroot
+
+	rm -f build-stamp install-stamp
+	rm -rf build
+
+	rm -f GNUmakefile.in INSTALL README aclocal.m4 aconfig.h.in compile config.guess config.sub configure depcomp install-sh ltmain.sh missing
+	rm -rf autom4te.cache
+
+	dh_clean
+
+build: build-stamp
+
+build-stamp:
+	dh_testdir
+
+#	CPPFLAGS="-DMOBILE=1"
+	[ ! -d build ] && mkdir build || true
+	cd build && \
+	CFLAGS="$(CFLAGS)" \
+	CXXFLAGS="$(CFLAGS)" \
+	CC="gcc -Wl,--as-needed" \
+	CXX="g++ -Wl,--as-needed" \
+	../autogen.sh --prefix=/usr --with-hildon --with-unicode-backend=glib --disable-dashboard-support --enable-optimizations --enable-workers --with-http-backend=curl
+
+	$(MAKE) -j3 -C build
+
+	touch $@
+
+install: install-stamp
+
+install-stamp: build-stamp
+	dh_testdir
+	dh_testroot
+
+	dh_clean -k
+
+	$(MAKE) -j3 -C build install DESTDIR="$(CURDIR)"/debian/tmp
+	[ ! -d debian/tmp/usr/lib/webkit-1.0/libexec ] && install -d -m 755 debian/tmp/usr/lib/webkit-1.0/libexec || true
+	build/libtool --mode=install install -m 755 build/Programs/DumpRenderTree "$(CURDIR)"/debian/tmp/usr/lib/webkit-1.0/libexec/DumpRenderTree
+	build/libtool --mode=install install -m 755 build/Programs/GtkLauncher "$(CURDIR)"/debian/tmp/usr/lib/webkit-1.0/libexec/GtkLauncher
+
+	touch $@
+
+# Build architecture-independent files here.
+binary-indep: build install
+	dh_testdir
+	dh_testroot
+	dh_installdocs -i
+	dh_installchangelogs -i
+	dh_install -i --sourcedir=debian/tmp
+	dh_link -i
+	dh_compress -i
+	dh_fixperms -i
+	dh_installdeb -i
+	dh_gencontrol -i
+	dh_md5sums -i
+	dh_builddeb -i
+
+# Build architecture-dependent files here.
+binary-arch: build install
+	dh_testdir
+	dh_testroot
+	dh_installdocs -a
+	dh_installchangelogs -a
+	dh_install -a --sourcedir=debian/tmp
+	dh_link -a
+	dh_strip -a --dbg-package=libwebkit-1.0-1-dbg
+	dh_compress -a
+	dh_fixperms -a
+	dh_makeshlibs -a -V 'libwebkit-1.0-1 (>= 1.0.1)' -- -c4
+	dh_installdeb -a
+	dh_shlibdeps -a
+	dh_gencontrol -a
+	dh_md5sums -a
+	dh_builddeb -a
+
+binary: binary-indep binary-arch
+
+.PHONY: build clean install binary binary-indep binary-arch
diff -Naur WebKit-r41128/debian/shlibs.local WebKit-r41128-nx/debian/shlibs.local
--- WebKit-r41128/debian/shlibs.local	1969-12-31 19:00:00.000000000 -0500
+++ WebKit-r41128-nx/debian/shlibs.local	2009-02-23 16:01:26.357006550 -0500
@@ -0,0 +1,2 @@
+libglib-2.0 0 libglib2.0-0 (>= 2.12)
+libfreetype 6 libfreetype6 (>= 2.2)
diff -Naur WebKit-r41128/GNUmakefile.am WebKit-r41128-nx/GNUmakefile.am
--- WebKit-r41128/GNUmakefile.am	2009-02-20 22:38:12.000000000 -0500
+++ WebKit-r41128-nx/GNUmakefile.am	2009-02-23 16:01:26.392005430 -0500
@@ -50,8 +50,15 @@
 # Global flags to CPP
 global_cppflags :=
 
+if USE_ICU_UNICODE
 global_cppflags += \
 	-DWTF_USE_ICU_UNICODE=1
+endif
+
+if USE_GLIB_UNICODE
+global_cppflags += \
+	-DWTF_USE_GLIB_UNICODE=1
+endif
 
 # Default compiler flags
 global_cflags := \
@@ -314,6 +321,7 @@
 	WebKit/gtk/webkit/webkitwebpolicydecision.h \
 	WebKit/gtk/webkit/webkitwebsettings.h \
 	WebKit/gtk/webkit/webkitwebwindowfeatures.h \
+	WebKit/gtk/webkit/webkitwebdownload.h \
 	WebKit/gtk/webkit/webkitwebview.h
 
 webkitgtk_built_sources += \
@@ -348,6 +356,7 @@
 	WebKit/gtk/webkit/webkitwebnavigationaction.cpp \
 	WebKit/gtk/webkit/webkitwebpolicydecision.cpp \
 	WebKit/gtk/webkit/webkitwebsettings.cpp \
+	WebKit/gtk/webkit/webkitwebdownload.cpp \
 	WebKit/gtk/webkit/webkitwebview.cpp \
 	WebKit/gtk/webkit/webkitwebwindowfeatures.cpp
 
diff -Naur WebKit-r41128/JavaScriptCore/wtf/unicode/glib/CasefoldTableFromGLib.h WebKit-r41128-nx/JavaScriptCore/wtf/unicode/glib/CasefoldTableFromGLib.h
--- WebKit-r41128/JavaScriptCore/wtf/unicode/glib/CasefoldTableFromGLib.h	1969-12-31 19:00:00.000000000 -0500
+++ WebKit-r41128-nx/JavaScriptCore/wtf/unicode/glib/CasefoldTableFromGLib.h	2009-02-23 16:01:26.416357830 -0500
@@ -0,0 +1,200 @@
+/*
+ *  Copyright (C) 2006 George Staikos <staikos@kde.org>
+ *  Copyright (C) 2006 Alexey Proskuryakov <ap@nypop.com>
+ *  Copyright (C) 2007 Apple Computer, Inc. All rights reserved.
+ *  Copyright (C) 2008 Jürg Billeter <j@bitron.ch>
+ *  Copyright (C) 2008 Dominik Röttsches <dominik.roettsches@access-company.com>
+ *
+ *  This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Library General Public
+ *  License as published by the Free Software Foundation; either
+ *  version 2 of the License, or (at your option) any later version.
+ *
+ *  This library is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Library General Public License
+ *  along with this library; see the file COPYING.LIB.  If not, write to
+ *  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ *  Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef CasefoldTableFromGLib_h
+#define CasefoldTableFromGLib_h
+
+#include <glib.h>
+
+// copied from GLib
+
+/* Table of casefolding cases that can't be derived by lowercasing
+ */
+static const struct {
+    guint16 ch;
+    gchar data[7];
+} casefold_table[] = {
+    { 0x00b5, "\xce\xbc" },
+    { 0x00df, "\x73\x73" },
+    { 0x0130, "\x69\xcc\x87" },
+    { 0x0149, "\xca\xbc\x6e" },
+    { 0x017f, "\x73" },
+    { 0x01f0, "\x6a\xcc\x8c" },
+    { 0x0345, "\xce\xb9" },
+    { 0x0390, "\xce\xb9\xcc\x88\xcc\x81" },
+    { 0x03b0, "\xcf\x85\xcc\x88\xcc\x81" },
+    { 0x03c2, "\xcf\x83" },
+    { 0x03d0, "\xce\xb2" },
+    { 0x03d1, "\xce\xb8" },
+    { 0x03d5, "\xcf\x86" },
+    { 0x03d6, "\xcf\x80" },
+    { 0x03f0, "\xce\xba" },
+    { 0x03f1, "\xcf\x81" },
+    { 0x03f5, "\xce\xb5" },
+    { 0x0587, "\xd5\xa5\xd6\x82" },
+    { 0x1e96, "\x68\xcc\xb1" },
+    { 0x1e97, "\x74\xcc\x88" },
+    { 0x1e98, "\x77\xcc\x8a" },
+    { 0x1e99, "\x79\xcc\x8a" },
+    { 0x1e9a, "\x61\xca\xbe" },
+    { 0x1e9b, "\xe1\xb9\xa1" },
+    { 0x1f50, "\xcf\x85\xcc\x93" },
+    { 0x1f52, "\xcf\x85\xcc\x93\xcc\x80" },
+    { 0x1f54, "\xcf\x85\xcc\x93\xcc\x81" },
+    { 0x1f56, "\xcf\x85\xcc\x93\xcd\x82" },
+    { 0x1f80, "\xe1\xbc\x80\xce\xb9" },
+    { 0x1f81, "\xe1\xbc\x81\xce\xb9" },
+    { 0x1f82, "\xe1\xbc\x82\xce\xb9" },
+    { 0x1f83, "\xe1\xbc\x83\xce\xb9" },
+    { 0x1f84, "\xe1\xbc\x84\xce\xb9" },
+    { 0x1f85, "\xe1\xbc\x85\xce\xb9" },
+    { 0x1f86, "\xe1\xbc\x86\xce\xb9" },
+    { 0x1f87, "\xe1\xbc\x87\xce\xb9" },
+    { 0x1f88, "\xe1\xbc\x80\xce\xb9" },
+    { 0x1f89, "\xe1\xbc\x81\xce\xb9" },
+    { 0x1f8a, "\xe1\xbc\x82\xce\xb9" },
+    { 0x1f8b, "\xe1\xbc\x83\xce\xb9" },
+    { 0x1f8c, "\xe1\xbc\x84\xce\xb9" },
+    { 0x1f8d, "\xe1\xbc\x85\xce\xb9" },
+    { 0x1f8e, "\xe1\xbc\x86\xce\xb9" },
+    { 0x1f8f, "\xe1\xbc\x87\xce\xb9" },
+    { 0x1f90, "\xe1\xbc\xa0\xce\xb9" },
+    { 0x1f91, "\xe1\xbc\xa1\xce\xb9" },
+    { 0x1f92, "\xe1\xbc\xa2\xce\xb9" },
+    { 0x1f93, "\xe1\xbc\xa3\xce\xb9" },
+    { 0x1f94, "\xe1\xbc\xa4\xce\xb9" },
+    { 0x1f95, "\xe1\xbc\xa5\xce\xb9" },
+    { 0x1f96, "\xe1\xbc\xa6\xce\xb9" },
+    { 0x1f97, "\xe1\xbc\xa7\xce\xb9" },
+    { 0x1f98, "\xe1\xbc\xa0\xce\xb9" },
+    { 0x1f99, "\xe1\xbc\xa1\xce\xb9" },
+    { 0x1f9a, "\xe1\xbc\xa2\xce\xb9" },
+    { 0x1f9b, "\xe1\xbc\xa3\xce\xb9" },
+    { 0x1f9c, "\xe1\xbc\xa4\xce\xb9" },
+    { 0x1f9d, "\xe1\xbc\xa5\xce\xb9" },
+    { 0x1f9e, "\xe1\xbc\xa6\xce\xb9" },
+    { 0x1f9f, "\xe1\xbc\xa7\xce\xb9" },
+    { 0x1fa0, "\xe1\xbd\xa0\xce\xb9" },
+    { 0x1fa1, "\xe1\xbd\xa1\xce\xb9" },
+    { 0x1fa2, "\xe1\xbd\xa2\xce\xb9" },
+    { 0x1fa3, "\xe1\xbd\xa3\xce\xb9" },
+    { 0x1fa4, "\xe1\xbd\xa4\xce\xb9" },
+    { 0x1fa5, "\xe1\xbd\xa5\xce\xb9" },
+    { 0x1fa6, "\xe1\xbd\xa6\xce\xb9" },
+    { 0x1fa7, "\xe1\xbd\xa7\xce\xb9" },
+    { 0x1fa8, "\xe1\xbd\xa0\xce\xb9" },
+    { 0x1fa9, "\xe1\xbd\xa1\xce\xb9" },
+    { 0x1faa, "\xe1\xbd\xa2\xce\xb9" },
+    { 0x1fab, "\xe1\xbd\xa3\xce\xb9" },
+    { 0x1fac, "\xe1\xbd\xa4\xce\xb9" },
+    { 0x1fad, "\xe1\xbd\xa5\xce\xb9" },
+    { 0x1fae, "\xe1\xbd\xa6\xce\xb9" },
+    { 0x1faf, "\xe1\xbd\xa7\xce\xb9" },
+    { 0x1fb2, "\xe1\xbd\xb0\xce\xb9" },
+    { 0x1fb3, "\xce\xb1\xce\xb9" },
+    { 0x1fb4, "\xce\xac\xce\xb9" },
+    { 0x1fb6, "\xce\xb1\xcd\x82" },
+    { 0x1fb7, "\xce\xb1\xcd\x82\xce\xb9" },
+    { 0x1fbc, "\xce\xb1\xce\xb9" },
+    { 0x1fbe, "\xce\xb9" },
+    { 0x1fc2, "\xe1\xbd\xb4\xce\xb9" },
+    { 0x1fc3, "\xce\xb7\xce\xb9" },
+    { 0x1fc4, "\xce\xae\xce\xb9" },
+    { 0x1fc6, "\xce\xb7\xcd\x82" },
+    { 0x1fc7, "\xce\xb7\xcd\x82\xce\xb9" },
+    { 0x1fcc, "\xce\xb7\xce\xb9" },
+    { 0x1fd2, "\xce\xb9\xcc\x88\xcc\x80" },
+    { 0x1fd3, "\xce\xb9\xcc\x88\xcc\x81" },
+    { 0x1fd6, "\xce\xb9\xcd\x82" },
+    { 0x1fd7, "\xce\xb9\xcc\x88\xcd\x82" },
+    { 0x1fe2, "\xcf\x85\xcc\x88\xcc\x80" },
+    { 0x1fe3, "\xcf\x85\xcc\x88\xcc\x81" },
+    { 0x1fe4, "\xcf\x81\xcc\x93" },
+    { 0x1fe6, "\xcf\x85\xcd\x82" },
+    { 0x1fe7, "\xcf\x85\xcc\x88\xcd\x82" },
+    { 0x1ff2, "\xe1\xbd\xbc\xce\xb9" },
+    { 0x1ff3, "\xcf\x89\xce\xb9" },
+    { 0x1ff4, "\xcf\x8e\xce\xb9" },
+    { 0x1ff6, "\xcf\x89\xcd\x82" },
+    { 0x1ff7, "\xcf\x89\xcd\x82\xce\xb9" },
+    { 0x1ffc, "\xcf\x89\xce\xb9" },
+    { 0x2160, "\xe2\x85\xb0" },
+    { 0x2161, "\xe2\x85\xb1" },
+    { 0x2162, "\xe2\x85\xb2" },
+    { 0x2163, "\xe2\x85\xb3" },
+    { 0x2164, "\xe2\x85\xb4" },
+    { 0x2165, "\xe2\x85\xb5" },
+    { 0x2166, "\xe2\x85\xb6" },
+    { 0x2167, "\xe2\x85\xb7" },
+    { 0x2168, "\xe2\x85\xb8" },
+    { 0x2169, "\xe2\x85\xb9" },
+    { 0x216a, "\xe2\x85\xba" },
+    { 0x216b, "\xe2\x85\xbb" },
+    { 0x216c, "\xe2\x85\xbc" },
+    { 0x216d, "\xe2\x85\xbd" },
+    { 0x216e, "\xe2\x85\xbe" },
+    { 0x216f, "\xe2\x85\xbf" },
+    { 0x24b6, "\xe2\x93\x90" },
+    { 0x24b7, "\xe2\x93\x91" },
+    { 0x24b8, "\xe2\x93\x92" },
+    { 0x24b9, "\xe2\x93\x93" },
+    { 0x24ba, "\xe2\x93\x94" },
+    { 0x24bb, "\xe2\x93\x95" },
+    { 0x24bc, "\xe2\x93\x96" },
+    { 0x24bd, "\xe2\x93\x97" },
+    { 0x24be, "\xe2\x93\x98" },
+    { 0x24bf, "\xe2\x93\x99" },
+    { 0x24c0, "\xe2\x93\x9a" },
+    { 0x24c1, "\xe2\x93\x9b" },
+    { 0x24c2, "\xe2\x93\x9c" },
+    { 0x24c3, "\xe2\x93\x9d" },
+    { 0x24c4, "\xe2\x93\x9e" },
+    { 0x24c5, "\xe2\x93\x9f" },
+    { 0x24c6, "\xe2\x93\xa0" },
+    { 0x24c7, "\xe2\x93\xa1" },
+    { 0x24c8, "\xe2\x93\xa2" },
+    { 0x24c9, "\xe2\x93\xa3" },
+    { 0x24ca, "\xe2\x93\xa4" },
+    { 0x24cb, "\xe2\x93\xa5" },
+    { 0x24cc, "\xe2\x93\xa6" },
+    { 0x24cd, "\xe2\x93\xa7" },
+    { 0x24ce, "\xe2\x93\xa8" },
+    { 0x24cf, "\xe2\x93\xa9" },
+    { 0xfb00, "\x66\x66" },
+    { 0xfb01, "\x66\x69" },
+    { 0xfb02, "\x66\x6c" },
+    { 0xfb03, "\x66\x66\x69" },
+    { 0xfb04, "\x66\x66\x6c" },
+    { 0xfb05, "\x73\x74" },
+    { 0xfb06, "\x73\x74" },
+    { 0xfb13, "\xd5\xb4\xd5\xb6" },
+    { 0xfb14, "\xd5\xb4\xd5\xa5" },
+    { 0xfb15, "\xd5\xb4\xd5\xab" },
+    { 0xfb16, "\xd5\xbe\xd5\xb6" },
+    { 0xfb17, "\xd5\xb4\xd5\xad" }
+};
+
+
+#endif
+
diff -Naur WebKit-r41128/JavaScriptCore/wtf/unicode/glib/UnicodeGLib.h WebKit-r41128-nx/JavaScriptCore/wtf/unicode/glib/UnicodeGLib.h
--- WebKit-r41128/JavaScriptCore/wtf/unicode/glib/UnicodeGLib.h	1969-12-31 19:00:00.000000000 -0500
+++ WebKit-r41128-nx/JavaScriptCore/wtf/unicode/glib/UnicodeGLib.h	2009-02-23 16:01:26.441006430 -0500
@@ -0,0 +1,407 @@
+/*
+ *  Copyright (C) 2006 George Staikos <staikos@kde.org>
+ *  Copyright (C) 2006 Alexey Proskuryakov <ap@nypop.com>
+ *  Copyright (C) 2007 Apple Computer, Inc. All rights reserved.
+ *  Copyright (C) 2008 Jürg Billeter <j@bitron.ch>
+ *  Copyright (C) 2008 Dominik Röttsches <dominik.roettsches@access-company.com>
+ *
+ *  This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Library General Public
+ *  License as published by the Free Software Foundation; either
+ *  version 2 of the License, or (at your option) any later version.
+ *
+ *  This library is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Library General Public License
+ *  along with this library; see the file COPYING.LIB.  If not, write to
+ *  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ *  Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef UnicodeGLib_h
+#define UnicodeGLib_h
+
+#include <stdlib.h>
+#include <stdint.h>
+#include <string.h>
+
+#include <glib.h>
+#include <pango/pango.h>
+
+#include <wtf/GOwnPtr.h>
+
+#include "CasefoldTableFromGLib.h"
+#include "UnicodeGLibTypes.h"
+#include "UnicodeMacrosFromICU.h"
+
+namespace WTF {
+    namespace Unicode {
+
+        enum Direction {
+            LeftToRight,
+            RightToLeft,
+            EuropeanNumber,
+            EuropeanNumberSeparator,
+            EuropeanNumberTerminator,
+            ArabicNumber,
+            CommonNumberSeparator,
+            BlockSeparator,
+            SegmentSeparator,
+            WhiteSpaceNeutral,
+            OtherNeutral,
+            LeftToRightEmbedding,
+            LeftToRightOverride,
+            RightToLeftArabic,
+            RightToLeftEmbedding,
+            RightToLeftOverride,
+            PopDirectionalFormat,
+            NonSpacingMark,
+            BoundaryNeutral
+        };
+
+        enum DecompositionType {
+            DecompositionNone,
+            DecompositionCanonical,
+            DecompositionCompat,
+            DecompositionCircle,
+            DecompositionFinal,
+            DecompositionFont,
+            DecompositionFraction,
+            DecompositionInitial,
+            DecompositionIsolated,
+            DecompositionMedial,
+            DecompositionNarrow,
+            DecompositionNoBreak,
+            DecompositionSmall,
+            DecompositionSquare,
+            DecompositionSub,
+            DecompositionSuper,
+            DecompositionVertical,
+            DecompositionWide,
+        };
+
+        enum CharCategory {
+            NoCategory =  0,
+            Other_NotAssigned = U_MASK(G_UNICODE_UNASSIGNED),
+            Letter_Uppercase = U_MASK(G_UNICODE_UPPERCASE_LETTER),
+            Letter_Lowercase = U_MASK(G_UNICODE_LOWERCASE_LETTER),
+            Letter_Titlecase = U_MASK(G_UNICODE_TITLECASE_LETTER),
+            Letter_Modifier = U_MASK(G_UNICODE_MODIFIER_LETTER),
+            Letter_Other = U_MASK(G_UNICODE_OTHER_LETTER),
+
+            Mark_NonSpacing = U_MASK(G_UNICODE_NON_SPACING_MARK),
+            Mark_Enclosing = U_MASK(G_UNICODE_ENCLOSING_MARK),
+            Mark_SpacingCombining = U_MASK(G_UNICODE_COMBINING_MARK),
+
+            Number_DecimalDigit = U_MASK(G_UNICODE_DECIMAL_NUMBER),
+            Number_Letter = U_MASK(G_UNICODE_LETTER_NUMBER),
+            Number_Other = U_MASK(G_UNICODE_OTHER_NUMBER),
+
+            Separator_Space = U_MASK(G_UNICODE_SPACE_SEPARATOR),
+            Separator_Line = U_MASK(G_UNICODE_LINE_SEPARATOR),
+            Separator_Paragraph = U_MASK(G_UNICODE_PARAGRAPH_SEPARATOR),
+
+            Other_Control = U_MASK(G_UNICODE_CONTROL),
+            Other_Format = U_MASK(G_UNICODE_FORMAT),
+            Other_PrivateUse = U_MASK(G_UNICODE_PRIVATE_USE),
+            Other_Surrogate = U_MASK(G_UNICODE_SURROGATE),
+
+            Punctuation_Dash = U_MASK(G_UNICODE_DASH_PUNCTUATION),
+            Punctuation_Open = U_MASK(G_UNICODE_OPEN_PUNCTUATION),
+            Punctuation_Close = U_MASK(G_UNICODE_CLOSE_PUNCTUATION),
+            Punctuation_Connector = U_MASK(G_UNICODE_CONNECT_PUNCTUATION),
+            Punctuation_Other = U_MASK(G_UNICODE_OTHER_PUNCTUATION),
+
+            Symbol_Math = U_MASK(G_UNICODE_MATH_SYMBOL),
+            Symbol_Currency = U_MASK(G_UNICODE_CURRENCY_SYMBOL),
+            Symbol_Modifier = U_MASK(G_UNICODE_MODIFIER_SYMBOL),
+            Symbol_Other = U_MASK(G_UNICODE_OTHER_SYMBOL),
+
+            Punctuation_InitialQuote = U_MASK(G_UNICODE_INITIAL_PUNCTUATION),
+            Punctuation_FinalQuote = U_MASK(G_UNICODE_FINAL_PUNCTUATION)
+        };
+
+        inline UChar32 foldCase(UChar32 ch)
+        {
+            // add g_unichar_casefold to GLib upstream?
+
+            int start = 0;
+            int end = G_N_ELEMENTS(casefold_table);
+
+            if (ch >= casefold_table[start].ch &&
+                ch <= casefold_table[end - 1].ch) {
+                while (true) {
+                    int half = (start + end) / 2;
+                    if (ch == casefold_table[half].ch)
+                        return g_utf8_get_char(casefold_table[half].data);
+                    if (half == start)
+                        break;
+                    else if (ch > casefold_table[half].ch)
+                        start = half;
+                    else
+                        end = half;
+                }
+            }
+
+            return g_unichar_tolower (ch);
+        }
+
+        inline int foldCase(UChar* result, int resultLength, const UChar* src, int srcLength, bool* error)
+        {
+            *error = false;
+            GOwnPtr<GError> gerror;
+
+            GOwnPtr<char> utf8src;
+            utf8src.set(g_utf16_to_utf8(src, srcLength, 0, 0, &gerror.outPtr()));
+            if (gerror) {
+                *error = true;
+                return -1;
+            }
+
+            GOwnPtr<char> utf8result;
+            utf8result.set(g_utf8_casefold(utf8src.get(), -1));
+
+            long utf16resultLength = -1;
+            GOwnPtr<UChar> utf16result;
+            utf16result.set(g_utf8_to_utf16(utf8result.get(), -1, 0, &utf16resultLength, &gerror.outPtr()));
+            if (gerror) {
+                *error = true;
+                return -1;
+            }
+
+            if (utf16resultLength > resultLength) {
+                *error = true;
+                return utf16resultLength;
+            }
+            memcpy(result, utf16result.get(), utf16resultLength * sizeof(UChar));
+
+            return utf16resultLength;
+        }
+
+        inline int toLower(UChar* result, int resultLength, const UChar* src, int srcLength, bool* error)
+        {
+            *error = false;
+            GOwnPtr<GError> gerror;
+
+            GOwnPtr<char> utf8src;
+            utf8src.set(g_utf16_to_utf8(src, srcLength, 0, 0, &gerror.outPtr()));
+            if (gerror) {
+                *error = true;
+                return -1;
+            }
+
+            GOwnPtr<char> utf8result;
+            utf8result.set(g_utf8_strdown(utf8src.get(), -1));
+
+            long utf16resultLength = -1;
+            GOwnPtr<UChar> utf16result;
+            utf16result.set(g_utf8_to_utf16(utf8result.get(), -1, 0, &utf16resultLength, &gerror.outPtr()));
+            if (gerror) {
+                *error = true;
+                return -1;
+            }
+
+            if (utf16resultLength > resultLength) {
+                *error = true;
+                return utf16resultLength;
+            }
+            memcpy(result, utf16result.get(), utf16resultLength * sizeof(UChar));
+
+            return utf16resultLength;
+        }
+
+        inline UChar32 toLower(UChar32 c)
+        {
+            return g_unichar_tolower(c);
+        }
+
+        inline UChar32 toUpper(UChar32 c)
+        {
+            return g_unichar_toupper(c);
+        }
+
+        inline int toUpper(UChar* result, int resultLength, const UChar* src, int srcLength, bool* error)
+        {
+            *error = false;
+            GOwnPtr<GError> gerror;
+
+            GOwnPtr<char> utf8src;
+            utf8src.set(g_utf16_to_utf8(src, srcLength, 0, 0, &gerror.outPtr()));
+            if (gerror) {
+                *error = true;
+                return -1;
+            }
+
+            GOwnPtr<char> utf8result;
+            utf8result.set(g_utf8_strup(utf8src.get(), -1));
+
+            long utf16resultLength = -1;
+            GOwnPtr<UChar> utf16result;
+            utf16result.set(g_utf8_to_utf16(utf8result.get(), -1, 0, &utf16resultLength, &gerror.outPtr()));
+            if (gerror) {
+                *error = true;
+                return -1;
+            }
+
+            if (utf16resultLength > resultLength) {
+                *error = true;
+                return utf16resultLength;
+            }
+            memcpy(result, utf16result.get(), utf16resultLength * sizeof(UChar));
+
+            return utf16resultLength;
+        }
+
+        inline UChar32 toTitleCase(UChar32 c)
+        {
+            return g_unichar_totitle(c);
+        }
+
+        inline bool isArabicChar(UChar32 c)
+        {
+            return c >= 0x0600 && c <= 0x06FF;
+        }
+
+        inline bool isFormatChar(UChar32 c)
+        {
+            return g_unichar_type(c) == G_UNICODE_FORMAT;
+        }
+
+        inline bool isSeparatorSpace(UChar32 c)
+        {
+            return g_unichar_type(c) == G_UNICODE_SPACE_SEPARATOR;
+        }
+
+        inline bool isPrintableChar(UChar32 c)
+        {
+            return g_unichar_isprint(c);
+        }
+    
+        inline bool isDigit(UChar32 c)
+        {
+            return g_unichar_isdigit(c);
+        }
+
+        inline bool isPunct(UChar32 c)
+        {
+            return g_unichar_ispunct(c);
+        }
+
+        inline UChar32 mirroredChar(UChar32 c)
+        {
+            gunichar mirror = 0;
+            g_unichar_get_mirror_char(c, &mirror);
+            return mirror;
+        }
+
+        inline CharCategory category(UChar32 c)
+        {
+            if (c > 0xffff)
+                return NoCategory;
+
+            return (CharCategory) U_MASK(g_unichar_type(c));
+        }
+
+        inline Direction direction(UChar32 c)
+        {
+            /*PangoBidiType*/ PangoDirection type = pango_unichar_direction(c);//pango_bidi_type_for_unichar(c);
+            switch (type) {
+        	case PANGO_DIRECTION_LTR:
+        	    return LeftToRight;
+        	case PANGO_DIRECTION_RTL:
+        	    return RightToLeft;
+        	case PANGO_DIRECTION_WEAK_LTR:
+        	    return EuropeanNumber;
+        	case PANGO_DIRECTION_WEAK_RTL:
+        	    return ArabicNumber;
+/*            case PANGO_BIDI_TYPE_L: 
+                return LeftToRight;
+            case PANGO_BIDI_TYPE_R: 
+                return RightToLeft;
+            case PANGO_BIDI_TYPE_AL:
+                return RightToLeftArabic;
+            case PANGO_BIDI_TYPE_LRE:
+                return LeftToRightEmbedding;
+            case PANGO_BIDI_TYPE_RLE:
+                return RightToLeftEmbedding;
+            case PANGO_BIDI_TYPE_LRO:
+                return LeftToRightOverride;
+            case PANGO_BIDI_TYPE_RLO:
+                return RightToLeftOverride;
+            case PANGO_BIDI_TYPE_PDF:
+                return PopDirectionalFormat;
+            case PANGO_BIDI_TYPE_EN:
+                return EuropeanNumber;
+            case PANGO_BIDI_TYPE_AN:
+                return ArabicNumber;
+            case PANGO_BIDI_TYPE_ES:
+                return EuropeanNumberSeparator;
+            case PANGO_BIDI_TYPE_ET:
+                return EuropeanNumberTerminator;
+            case PANGO_BIDI_TYPE_CS:
+                return CommonNumberSeparator;
+            case PANGO_BIDI_TYPE_NSM:
+                return NonSpacingMark;
+            case PANGO_BIDI_TYPE_BN:
+                return BoundaryNeutral;
+            case PANGO_BIDI_TYPE_B:
+                return BlockSeparator;
+            case PANGO_BIDI_TYPE_S:
+                return SegmentSeparator;
+            case PANGO_BIDI_TYPE_WS:
+                return WhiteSpaceNeutral;*/
+            default:
+                return OtherNeutral;
+            } 
+        }
+
+        inline bool isLower(UChar32 c)
+        {
+            return g_unichar_islower(c);
+        }
+
+        inline int digitValue(UChar32 c)
+        {
+            return g_unichar_digit_value(c);
+        }
+
+        inline uint8_t combiningClass(UChar32 c)
+        {
+            // return g_unichar_combining_class(c);
+            return 0;
+        }
+
+        inline DecompositionType decompositionType(UChar32 c)
+        {
+            // FIXME
+            return DecompositionNone;
+        }
+
+        inline int umemcasecmp(const UChar* a, const UChar* b, int len)
+        {
+            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));
+
+            GOwnPtr<char> foldedA;
+            GOwnPtr<char> foldedB;
+
+            foldedA.set(g_utf8_casefold(utf8a.get(), -1));
+            foldedB.set(g_utf8_casefold(utf8b.get(), -1));
+
+            int result = g_utf8_collate(foldedA.get(), foldedB.get());
+
+            return result;
+        }
+
+    }
+}
+
+#endif
+
diff -Naur WebKit-r41128/JavaScriptCore/wtf/unicode/glib/UnicodeGLibTypes.h WebKit-r41128-nx/JavaScriptCore/wtf/unicode/glib/UnicodeGLibTypes.h
--- WebKit-r41128/JavaScriptCore/wtf/unicode/glib/UnicodeGLibTypes.h	1969-12-31 19:00:00.000000000 -0500
+++ WebKit-r41128-nx/JavaScriptCore/wtf/unicode/glib/UnicodeGLibTypes.h	2009-02-23 16:01:26.476005510 -0500
@@ -0,0 +1,31 @@
+/*
+ *  Copyright (C) 2006 George Staikos <staikos@kde.org>
+ *  Copyright (C) 2006 Alexey Proskuryakov <ap@nypop.com>
+ *  Copyright (C) 2007 Apple Computer, Inc. All rights reserved.
+ *  Copyright (C) 2008 Jürg Billeter <j@bitron.ch>
+ *  Copyright (C) 2008 Dominik Röttsches <dominik.roettsches@access-company.com>
+ *
+ *  This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Library General Public
+ *  License as published by the Free Software Foundation; either
+ *  version 2 of the License, or (at your option) any later version.
+ *
+ *  This library is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Library General Public License
+ *  along with this library; see the file COPYING.LIB.  If not, write to
+ *  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ *  Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef UnicodeGLibTypes_h
+#define UnicodeGLibTypes_h
+
+typedef uint16_t UChar;
+typedef int32_t UChar32;
+
+#endif
diff -Naur WebKit-r41128/JavaScriptCore/wtf/unicode/glib/UnicodeMacrosFromICU.h WebKit-r41128-nx/JavaScriptCore/wtf/unicode/glib/UnicodeMacrosFromICU.h
--- WebKit-r41128/JavaScriptCore/wtf/unicode/glib/UnicodeMacrosFromICU.h	1969-12-31 19:00:00.000000000 -0500
+++ WebKit-r41128-nx/JavaScriptCore/wtf/unicode/glib/UnicodeMacrosFromICU.h	2009-02-23 16:01:26.524007150 -0500
@@ -0,0 +1,58 @@
+/*
+ *  Copyright (C) 2006 George Staikos <staikos@kde.org>
+ *  Copyright (C) 2006 Alexey Proskuryakov <ap@nypop.com>
+ *  Copyright (C) 2007 Apple Computer, Inc. All rights reserved.
+ *  Copyright (C) 2008 Jürg Billeter <j@bitron.ch>
+ *  Copyright (C) 2008 Dominik Röttsches <dominik.roettsches@access-company.com>
+ *
+ *  This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Library General Public
+ *  License as published by the Free Software Foundation; either
+ *  version 2 of the License, or (at your option) any later version.
+ *
+ *  This library is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Library General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Library General Public License
+ *  along with this library; see the file COPYING.LIB.  If not, write to
+ *  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ *  Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef UnicodeMacrosFromICU_h
+#define UnicodeMacrosFromICU_h
+
+// some defines from ICU
+
+#define U16_IS_LEAD(c) (((c)&0xfffffc00)==0xd800)
+#define U16_IS_TRAIL(c) (((c)&0xfffffc00)==0xdc00)
+#define U16_SURROGATE_OFFSET ((0xd800<<10UL)+0xdc00-0x10000)
+#define U16_GET_SUPPLEMENTARY(lead, trail) \
+    (((UChar32)(lead)<<10UL)+(UChar32)(trail)-U16_SURROGATE_OFFSET)
+
+#define U16_LEAD(supplementary) (UChar)(((supplementary)>>10)+0xd7c0)
+#define U16_TRAIL(supplementary) (UChar)(((supplementary)&0x3ff)|0xdc00)
+
+#define U_IS_SURROGATE(c) (((c)&0xfffff800)==0xd800)
+#define U16_IS_SINGLE(c) !U_IS_SURROGATE(c)
+#define U16_IS_SURROGATE(c) U_IS_SURROGATE(c)
+#define U16_IS_SURROGATE_LEAD(c) (((c)&0x400)==0)
+
+#define U16_NEXT(s, i, length, c) { \
+    (c)=(s)[(i)++]; \
+    if(U16_IS_LEAD(c)) { \
+        uint16_t __c2; \
+        if((i)<(length) && U16_IS_TRAIL(__c2=(s)[(i)])) { \
+            ++(i); \
+            (c)=U16_GET_SUPPLEMENTARY((c), __c2); \
+        } \
+    } \
+}
+
+#define U_MASK(x) ((uint32_t)1<<(x))
+
+#endif
+
diff -Naur WebKit-r41128/JavaScriptCore/wtf/unicode/Unicode.h WebKit-r41128-nx/JavaScriptCore/wtf/unicode/Unicode.h
--- WebKit-r41128/JavaScriptCore/wtf/unicode/Unicode.h	2009-01-21 00:13:29.000000000 -0500
+++ WebKit-r41128-nx/JavaScriptCore/wtf/unicode/Unicode.h	2009-02-23 16:01:26.560005390 -0500
@@ -28,6 +28,8 @@
 #include "qt4/UnicodeQt4.h"
 #elif USE(ICU_UNICODE)
 #include <wtf/unicode/icu/UnicodeIcu.h>
+#elif USE(GLIB_UNICODE)
+#include <wtf/unicode/glib/UnicodeGLib.h>
 #else
 #error "Unknown Unicode implementation"
 #endif
diff -Naur WebKit-r41128/WebCore/bridge/IdentifierRep.h WebKit-r41128-nx/WebCore/bridge/IdentifierRep.h
--- WebKit-r41128/WebCore/bridge/IdentifierRep.h	2009-02-15 03:48:41.000000000 -0500
+++ WebKit-r41128-nx/WebCore/bridge/IdentifierRep.h	2009-02-23 16:01:26.584007270 -0500
@@ -26,6 +26,7 @@
 #ifndef IdentifierRep_h
 #define IdentifierRep_h
 
+#include <string.h>
 #include <wtf/Assertions.h>
 #include <string.h>
 
diff -Naur WebKit-r41128/WebCore/css/CSSPrimitiveValueMappings.h WebKit-r41128-nx/WebCore/css/CSSPrimitiveValueMappings.h
--- WebKit-r41128/WebCore/css/CSSPrimitiveValueMappings.h	2009-02-16 04:14:50.000000000 -0500
+++ WebKit-r41128-nx/WebCore/css/CSSPrimitiveValueMappings.h	2009-02-23 16:01:26.617005950 -0500
@@ -1676,72 +1676,6 @@
     }
 }
 
-template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EPointerEvents e)
-    : m_type(CSS_IDENT)
-{
-    switch (e) {
-        case PE_NONE:
-            m_value.ident = CSSValueNone;
-            break;
-        case PE_STROKE:
-            m_value.ident = CSSValueStroke;
-            break;
-        case PE_FILL:
-            m_value.ident = CSSValueFill;
-            break;
-        case PE_PAINTED:
-            m_value.ident = CSSValuePainted;
-            break;
-        case PE_VISIBLE:
-            m_value.ident = CSSValueVisible;
-            break;
-        case PE_VISIBLE_STROKE:
-            m_value.ident = CSSValueVisiblestroke;
-            break;
-        case PE_VISIBLE_FILL:
-            m_value.ident = CSSValueVisiblefill;
-            break;
-        case PE_VISIBLE_PAINTED:
-            m_value.ident = CSSValueVisiblepainted;
-            break;
-        case PE_AUTO:
-            m_value.ident = CSSValueAuto;
-            break;
-        case PE_ALL:
-            m_value.ident = CSSValueAll;
-            break;
-    }
-}
-
-template<> inline CSSPrimitiveValue::operator EPointerEvents() const
-{
-    switch (m_value.ident) {
-        case CSSValueAll:
-            return PE_ALL;
-        case CSSValueAuto:
-            return PE_AUTO;
-        case CSSValueNone:
-            return PE_NONE;
-        case CSSValueVisiblepainted:
-            return PE_VISIBLE_PAINTED;
-        case CSSValueVisiblefill:
-            return PE_VISIBLE_FILL;
-        case CSSValueVisiblestroke:
-            return PE_VISIBLE_STROKE;
-        case CSSValueVisible:
-            return PE_VISIBLE;
-        case CSSValuePainted:
-            return PE_PAINTED;
-        case CSSValueFill:
-            return PE_FILL;
-        case CSSValueStroke:
-            return PE_STROKE;
-        default:
-            ASSERT_NOT_REACHED();
-            return PE_ALL;
-    }
-}
-
 #if ENABLE(SVG)
 
 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(LineCap e)
@@ -2078,6 +2012,76 @@
     }
 }
 
+#endif
+
+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EPointerEvents e)
+    : m_type(CSS_IDENT)
+{
+    switch (e) {
+        case PE_NONE:
+            m_value.ident = CSSValueNone;
+            break;
+        case PE_STROKE:
+            m_value.ident = CSSValueStroke;
+            break;
+        case PE_FILL:
+            m_value.ident = CSSValueFill;
+            break;
+        case PE_PAINTED:
+            m_value.ident = CSSValuePainted;
+            break;
+        case PE_VISIBLE:
+            m_value.ident = CSSValueVisible;
+            break;
+        case PE_VISIBLE_STROKE:
+            m_value.ident = CSSValueVisiblestroke;
+            break;
+        case PE_VISIBLE_FILL:
+            m_value.ident = CSSValueVisiblefill;
+            break;
+        case PE_VISIBLE_PAINTED:
+            m_value.ident = CSSValueVisiblepainted;
+            break;
+        case PE_AUTO:
+            m_value.ident = CSSValueAuto;
+            break;
+        case PE_ALL:
+            m_value.ident = CSSValueAll;
+            break;
+    }
+}
+
+template<> inline CSSPrimitiveValue::operator EPointerEvents() const
+{
+    switch (m_value.ident) {
+        case CSSValueAll:
+            return PE_ALL;
+        case CSSValueAuto:
+            return PE_AUTO;
+        case CSSValueNone:
+            return PE_NONE;
+        case CSSValueVisiblepainted:
+            return PE_VISIBLE_PAINTED;
+        case CSSValueVisiblefill:
+            return PE_VISIBLE_FILL;
+        case CSSValueVisiblestroke:
+            return PE_VISIBLE_STROKE;
+        case CSSValueVisible:
+            return PE_VISIBLE;
+        case CSSValuePainted:
+            return PE_PAINTED;
+        case CSSValueFill:
+            return PE_FILL;
+        case CSSValueStroke:
+            return PE_STROKE;
+        default:
+            ASSERT_NOT_REACHED();
+            return PE_ALL;
+    }
+}
+
+#if ENABLE(SVG)
+
 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EShapeRendering e)
     : m_type(CSS_IDENT)
 {
diff -Naur WebKit-r41128/WebCore/GNUmakefile.am WebKit-r41128-nx/WebCore/GNUmakefile.am
--- WebKit-r41128/WebCore/GNUmakefile.am	2009-02-20 22:38:13.000000000 -0500
+++ WebKit-r41128-nx/WebCore/GNUmakefile.am	2009-02-23 16:01:26.621007950 -0500
@@ -1447,14 +1447,9 @@
 	WebCore/platform/text/StringImpl.cpp \
 	WebCore/platform/text/StringImpl.h \
 	WebCore/platform/text/TextBoundaries.h \
-	WebCore/platform/text/TextBoundariesICU.cpp \
 	WebCore/platform/text/TextBreakIterator.h \
-	WebCore/platform/text/TextBreakIteratorICU.cpp \
-	WebCore/platform/text/TextBreakIteratorInternalICU.h \
 	WebCore/platform/text/TextCodec.cpp \
 	WebCore/platform/text/TextCodec.h \
-	WebCore/platform/text/TextCodecICU.cpp \
-	WebCore/platform/text/TextCodecICU.h \
 	WebCore/platform/text/TextCodecLatin1.cpp \
 	WebCore/platform/text/TextCodecLatin1.h \
 	WebCore/platform/text/TextCodecUTF16.cpp \
@@ -1793,8 +1788,31 @@
 	WebCore/platform/image-decoders/png/PNGImageDecoder.cpp \
 	WebCore/platform/image-decoders/png/PNGImageDecoder.h \
 	WebCore/platform/image-decoders/xbm/XBMImageDecoder.cpp \
-	WebCore/platform/image-decoders/xbm/XBMImageDecoder.h \
+	WebCore/platform/image-decoders/xbm/XBMImageDecoder.h
+
+# ----
+# icu unicode backend
+# ----
+if USE_ICU_UNICODE
+webcoregtk_sources += \
+	WebCore/platform/text/TextCodecICU.cpp \
+	WebCore/platform/text/TextCodecICU.h \
+	WebCore/platform/text/TextBoundariesICU.cpp \
+	WebCore/platform/text/TextBreakIteratorICU.cpp \
+	WebCore/platform/text/TextBreakIteratorInternalICU.h \
 	WebCore/platform/text/gtk/TextBreakIteratorInternalICUGtk.cpp
+endif # USE_ICU_UNICODE
+
+# ----
+# glib unicode backend
+# ----
+if USE_GLIB_UNICODE
+webcoregtk_sources += \
+	WebCore/platform/text/gtk/TextCodecGtk.cpp \
+	WebCore/platform/text/gtk/TextCodecGtk.h \
+	WebCore/platform/text/gtk/TextBoundariesGtk.cpp \
+	WebCore/platform/text/gtk/TextBreakIteratorGtk.cpp
+endif
 
 # ----
 # curl http backend
diff -Naur WebKit-r41128/WebCore/html/HTMLInputElement.cpp WebKit-r41128-nx/WebCore/html/HTMLInputElement.cpp
--- WebKit-r41128/WebCore/html/HTMLInputElement.cpp	2009-02-16 02:39:40.000000000 -0500
+++ WebKit-r41128-nx/WebCore/html/HTMLInputElement.cpp	2009-02-23 16:01:26.660124510 -0500
@@ -173,7 +173,7 @@
 
 bool HTMLInputElement::shouldUseInputMethod() const
 {
-    return m_type == TEXT || m_type == SEARCH || m_type == ISINDEX;
+    return m_type == TEXT || m_type == SEARCH || m_type == ISINDEX || m_type == PASSWORD;
 }
 
 void HTMLInputElement::dispatchFocusEvent()
diff -Naur WebKit-r41128/WebCore/loader/EmptyClients.h WebKit-r41128-nx/WebCore/loader/EmptyClients.h
--- WebKit-r41128/WebCore/loader/EmptyClients.h	2009-02-15 03:48:47.000000000 -0500
+++ WebKit-r41128-nx/WebCore/loader/EmptyClients.h	2009-02-23 16:01:26.696007910 -0500
@@ -182,6 +182,7 @@
     virtual Frame* dispatchCreatePage() { return 0; }
     virtual void dispatchShow() { }
 
+    virtual bool dispatchDecidePolicyForNetworkRequest(const ResourceRequest&) { return true; }
     virtual void dispatchDecidePolicyForMIMEType(FramePolicyFunction, const String&, const ResourceRequest&) { }
     virtual void dispatchDecidePolicyForNewWindowAction(FramePolicyFunction, const NavigationAction&, const ResourceRequest&, PassRefPtr<FormState>, const String&) { }
     virtual void dispatchDecidePolicyForNavigationAction(FramePolicyFunction, const NavigationAction&, const ResourceRequest&, PassRefPtr<FormState>) { }
diff -Naur WebKit-r41128/WebCore/loader/FrameLoaderClient.h WebKit-r41128-nx/WebCore/loader/FrameLoaderClient.h
--- WebKit-r41128/WebCore/loader/FrameLoaderClient.h	2009-02-15 03:48:47.000000000 -0500
+++ WebKit-r41128-nx/WebCore/loader/FrameLoaderClient.h	2009-02-23 16:01:26.728007310 -0500
@@ -126,6 +126,7 @@
         virtual Frame* dispatchCreatePage() = 0;
         virtual void dispatchShow() = 0;
 
+        virtual bool dispatchDecidePolicyForNetworkRequest(const ResourceRequest&) = 0;
         virtual void dispatchDecidePolicyForMIMEType(FramePolicyFunction, const String& MIMEType, const ResourceRequest&) = 0;
         virtual void dispatchDecidePolicyForNewWindowAction(FramePolicyFunction, const NavigationAction&, const ResourceRequest&, PassRefPtr<FormState>, const String& frameName) = 0;
         virtual void dispatchDecidePolicyForNavigationAction(FramePolicyFunction, const NavigationAction&, const ResourceRequest&, PassRefPtr<FormState>) = 0;
diff -Naur WebKit-r41128/WebCore/loader/loader.cpp WebKit-r41128-nx/WebCore/loader/loader.cpp
--- WebKit-r41128/WebCore/loader/loader.cpp	2009-02-15 03:48:47.000000000 -0500
+++ WebKit-r41128-nx/WebCore/loader/loader.cpp	2009-02-23 16:01:26.762099190 -0500
@@ -49,7 +49,7 @@
 #if REQUEST_MANAGEMENT_ENABLED
 // Match the parallel connection count used by the networking layer
 // FIXME should not hardcode something like this
-static const unsigned maxRequestsInFlightPerHost = 4;
+static const unsigned maxRequestsInFlightPerHost = 8;
 // Having a limit might still help getting more important resources first
 static const unsigned maxRequestsInFlightForNonHTTPProtocols = 20;
 #else
diff -Naur WebKit-r41128/WebCore/loader/MainResourceLoader.cpp WebKit-r41128-nx/WebCore/loader/MainResourceLoader.cpp
--- WebKit-r41128/WebCore/loader/MainResourceLoader.cpp	2009-02-15 03:48:47.000000000 -0500
+++ WebKit-r41128-nx/WebCore/loader/MainResourceLoader.cpp	2009-02-23 16:01:26.793004990 -0500
@@ -219,9 +219,12 @@
             return;
         }
         frameLoader()->client()->download(m_handle.get(), request(), m_handle.get()->request(), r);
+        // CURL reuses the same ResourceHandle to download the file, so we cannot close it.
+#if !USE(CURL)
         // It might have gone missing
         if (frameLoader())
             receivedError(interruptionForPolicyChangeError());
+#endif
         return;
 
     case PolicyIgnore:
diff -Naur WebKit-r41128/WebCore/loader/ResourceLoader.cpp WebKit-r41128-nx/WebCore/loader/ResourceLoader.cpp
--- WebKit-r41128/WebCore/loader/ResourceLoader.cpp	2009-01-21 00:14:18.000000000 -0500
+++ WebKit-r41128-nx/WebCore/loader/ResourceLoader.cpp	2009-02-23 16:01:26.828006590 -0500
@@ -29,10 +29,12 @@
 
 #include "config.h"
 #include "ResourceLoader.h"
+#include "CString.h"
 
 #include "DocumentLoader.h"
 #include "Frame.h"
 #include "FrameLoader.h"
+#include "FrameLoaderClient.h"
 #include "Page.h"
 #include "ProgressTracker.h"
 #include "ResourceHandle.h"
@@ -115,6 +117,11 @@
         return false;
     }
     
+    if (!frameLoader()->client()->dispatchDecidePolicyForNetworkRequest(r)) {
+        didFail(frameLoader()->blockedError(clientRequest));
+        return false;
+    }
+
     if (m_documentLoader->scheduleArchiveLoad(this, clientRequest, r.url()))
         return true;
     
diff -Naur WebKit-r41128/WebCore/platform/ContextMenu.cpp WebKit-r41128-nx/WebCore/platform/ContextMenu.cpp
--- WebKit-r41128/WebCore/platform/ContextMenu.cpp	2009-02-15 03:48:48.000000000 -0500
+++ WebKit-r41128-nx/WebCore/platform/ContextMenu.cpp	2009-02-26 02:13:04.377007430 -0500
@@ -297,12 +297,12 @@
                 }
                 appendItem(CopyItem);
             } else {
-#if PLATFORM(GTK)
+/*#if PLATFORM(GTK)
                 appendItem(BackItem);
                 appendItem(ForwardItem);
                 appendItem(StopItem);
                 appendItem(ReloadItem);
-#else
+#else*/
                 if (loader->canGoBackOrForward(-1))
                     appendItem(BackItem);
 
@@ -315,7 +315,7 @@
                     appendItem(StopItem);
                 else
                     appendItem(ReloadItem);
-#endif
+/*#endif*/
 
                 if (frame->page() && frame != frame->page()->mainFrame())
                     appendItem(OpenFrameItem);
@@ -586,7 +586,7 @@
         case ContextMenuItemTagCheckSpellingWhileTyping:
             shouldCheck = frame->editor()->isContinuousSpellCheckingEnabled();
             break;
-#if PLATFORM(GTK)
+/*#if PLATFORM(GTK)
         case ContextMenuItemTagGoBack:
             shouldEnable = frame->loader()->canGoBackOrForward(-1);
             break;
@@ -602,13 +602,13 @@
         case ContextMenuItemTagFontMenu:
             shouldEnable = frame->editor()->canEditRichly();
             break;
-#else
+#else*/
         case ContextMenuItemTagGoBack:
         case ContextMenuItemTagGoForward:
         case ContextMenuItemTagStop:
         case ContextMenuItemTagReload:
         case ContextMenuItemTagFontMenu:
-#endif
+/*#endif*/
         case ContextMenuItemTagNoAction:
         case ContextMenuItemTagOpenLinkInNewWindow:
         case ContextMenuItemTagDownloadLinkToDisk:
diff -Naur WebKit-r41128/WebCore/platform/graphics/gtk/SimpleFontDataGtk.cpp WebKit-r41128-nx/WebCore/platform/graphics/gtk/SimpleFontDataGtk.cpp
--- WebKit-r41128/WebCore/platform/graphics/gtk/SimpleFontDataGtk.cpp	2009-02-12 18:01:53.000000000 -0500
+++ WebKit-r41128-nx/WebCore/platform/graphics/gtk/SimpleFontDataGtk.cpp	2009-02-23 16:01:26.860006790 -0500
@@ -39,8 +39,6 @@
 #include "FontDescription.h"
 #include "GlyphBuffer.h"
 #include <cairo.h>
-#include <unicode/uchar.h>
-#include <unicode/unorm.h>
 #include <wtf/MathExtras.h>
 
 namespace WebCore {
diff -Naur WebKit-r41128/WebCore/platform/gtk/gtk2drawing.c WebKit-r41128-nx/WebCore/platform/gtk/gtk2drawing.c
--- WebKit-r41128/WebCore/platform/gtk/gtk2drawing.c	2009-01-27 02:55:34.000000000 -0500
+++ WebKit-r41128-nx/WebCore/platform/gtk/gtk2drawing.c	2009-02-23 16:01:26.864005630 -0500
@@ -1925,7 +1925,7 @@
     /* this is for drawing a prelight box */
     if (state_type == GTK_STATE_PRELIGHT || state_type == GTK_STATE_ACTIVE) {
         gtk_paint_flat_box(style, drawable, GTK_STATE_PRELIGHT,
-                           GTK_SHADOW_ETCHED_OUT, cliprect, widget,
+                           GTK_SHADOW_NONE, cliprect, widget, // ETCHED_OUT 
                            "checkbutton",
                            rect->x, rect->y, rect->width, rect->height);
     }
@@ -2803,7 +2803,7 @@
                 w = gRadiobuttonWidget;
             }
 
-            *left = *top = *right = *bottom = GTK_CONTAINER(w)->border_width;
+            *left = *top = *right = *bottom = 2; //GTK_CONTAINER(w)->border_width;  // In Maemo better use smaller borders?
 
             if (!interior_focus) {
                 *left += (focus_width + focus_pad);
diff -Naur WebKit-r41128/WebCore/platform/gtk/RenderThemeGtk.cpp WebKit-r41128-nx/WebCore/platform/gtk/RenderThemeGtk.cpp
--- WebKit-r41128/WebCore/platform/gtk/RenderThemeGtk.cpp	2009-01-25 22:06:55.000000000 -0500
+++ WebKit-r41128-nx/WebCore/platform/gtk/RenderThemeGtk.cpp	2009-02-23 16:01:26.893005550 -0500
@@ -229,7 +229,7 @@
 
     // Other ports hard-code this to 13, but GTK+ users tend to demand the native look.
     // It could be made a configuration option values other than 13 actually break site compatibility.
-    int length = indicator_size + indicator_spacing;
+    int length = indicator_size + indicator_spacing;  // Check if this helps Maemo rendering
     if (style->width().isIntrinsicOrAuto())
         style->setWidth(Length(length, Fixed));
 
diff -Naur WebKit-r41128/WebCore/platform/KURL.cpp WebKit-r41128-nx/WebCore/platform/KURL.cpp
--- WebKit-r41128/WebCore/platform/KURL.cpp	2009-02-20 22:38:15.000000000 -0500
+++ WebKit-r41128-nx/WebCore/platform/KURL.cpp	2009-02-23 16:01:26.928006870 -0500
@@ -38,6 +38,10 @@
 #include <unicode/uidna.h>
 #elif USE(QT4_UNICODE)
 #include <QUrl>
+#elif USE(GLIB_UNICODE)
+#include <glib.h>
+#include <idna.h>
+#include <wtf/GOwnPtr.h>
 #endif
 
 #include <stdio.h>
@@ -1384,6 +1388,19 @@
 #elif USE(QT4_UNICODE)
     QByteArray result = QUrl::toAce(String(str, strLen));
     buffer.append(result.constData(), result.length());
+#elif USE(GLIB_UNICODE)
+    // first translate to ucs4, libidn is expecting code points 
+    GOwnPtr<gunichar> ucs4Hostname;
+    GOwnPtr<GError> ucs4Err;
+    ucs4Hostname.set(g_utf16_to_ucs4(str, strLen, 0, 0, &ucs4Err.outPtr()));
+    if(ucs4Err)
+        return;
+    char* encodedHostname = 0;
+    int err;
+    err = idna_to_ascii_4z(ucs4Hostname.get(), &encodedHostname, IDNA_ALLOW_UNASSIGNED);
+    if(err == IDNA_SUCCESS)
+        buffer.append(encodedHostname, strlen(encodedHostname));
+    free(encodedHostname);
 #endif
 }
 
diff -Naur WebKit-r41128/WebCore/platform/MIMETypeRegistry.cpp WebKit-r41128-nx/WebCore/platform/MIMETypeRegistry.cpp
--- WebKit-r41128/WebCore/platform/MIMETypeRegistry.cpp	2009-02-20 22:38:15.000000000 -0500
+++ WebKit-r41128-nx/WebCore/platform/MIMETypeRegistry.cpp	2009-02-23 16:01:26.961008590 -0500
@@ -186,6 +186,7 @@
         "text/html",
         "text/xml",
         "text/xsl",
+/* Mozilla asks before opening text/plain */
         "text/plain",
         "text/",
         "application/xml",
diff -Naur WebKit-r41128/WebCore/platform/network/curl/ResourceHandleCurl.cpp WebKit-r41128-nx/WebCore/platform/network/curl/ResourceHandleCurl.cpp
--- WebKit-r41128/WebCore/platform/network/curl/ResourceHandleCurl.cpp	2009-01-21 00:14:21.000000000 -0500
+++ WebKit-r41128-nx/WebCore/platform/network/curl/ResourceHandleCurl.cpp	2009-02-23 16:01:26.984007150 -0500
@@ -103,7 +103,10 @@
 
 bool ResourceHandle::start(Frame* frame)
 {
-    ASSERT(frame);
+    /*
+     * The frame could be null is the ResourceHandle is not associated
+     * to any Frame, i.e. if we are downloading a file.
+     */
     ResourceHandleManager::sharedInstance()->add(this);
     return true;
 }
diff -Naur WebKit-r41128/WebCore/platform/network/curl/ResourceHandleManager.cpp WebKit-r41128-nx/WebCore/platform/network/curl/ResourceHandleManager.cpp
--- WebKit-r41128/WebCore/platform/network/curl/ResourceHandleManager.cpp	2009-01-21 00:14:21.000000000 -0500
+++ WebKit-r41128-nx/WebCore/platform/network/curl/ResourceHandleManager.cpp	2009-02-23 16:01:27.012004190 -0500
@@ -62,7 +62,7 @@
 
 ResourceHandleManager::ResourceHandleManager()
     : m_downloadTimer(this, &ResourceHandleManager::downloadTimerCallback)
-    , m_cookieJarFileName(0)
+    , m_cookieJarFileName("/home/user/.webkitcookies")
     , m_runningJobs(0)
 {
     curl_global_init(CURL_GLOBAL_ALL);
@@ -175,9 +175,21 @@
         CURLcode err;
 
         double contentLength = 0;
-        err = curl_easy_getinfo(h, CURLINFO_CONTENT_LENGTH_DOWNLOAD, &contentLength);
+	String cLength = d->m_response.httpHeaderField("Content-Length");
+	
+        int index = cLength.find(':');
+	if (index == -1) {
+	    index = 0;
+        }
+    
+	contentLength = cLength.substring(0, index-1).stripWhiteSpace().toDouble();
         d->m_response.setExpectedContentLength(static_cast<long long int>(contentLength));
 
+/* CURL doesn't seem to get Content-Length properly */
+//        err = curl_easy_getinfo(h, CURLINFO_CONTENT_LENGTH_DOWNLOAD, &contentLength);
+//        if (CURLE_OK == err)
+//            d->m_response.setExpectedContentLength(static_cast<long long int>(contentLength));
+            
         const char* hdr;
         err = curl_easy_getinfo(h, CURLINFO_EFFECTIVE_URL, &hdr);
         d->m_response.setUrl(KURL(hdr));
@@ -504,6 +516,9 @@
     String mimeType = extractMIMETypeFromMediaType(mediaType);
     String charset = extractCharsetFromMediaType(mediaType);
 
+    if (mimeType.isEmpty())
+        mimeType = "application/octet-stream";
+        
     ResourceResponse response;
     response.setMimeType(mimeType);
 
@@ -637,10 +652,11 @@
     curl_easy_setopt(d->m_handle, CURLOPT_MAXREDIRS, 10);
     curl_easy_setopt(d->m_handle, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
     curl_easy_setopt(d->m_handle, CURLOPT_SHARE, m_curlShareHandle);
+    curl_easy_setopt(d->m_handle, CURLOPT_CAPATH, "/etc/ssl/certs");
     curl_easy_setopt(d->m_handle, CURLOPT_DNS_CACHE_TIMEOUT, 60 * 5); // 5 minutes
     // FIXME: Enable SSL verification when we have a way of shipping certs
     // and/or reporting SSL errors to the user.
-    if (ignoreSSLErrors)
+//    if (ignoreSSLErrors)
         curl_easy_setopt(d->m_handle, CURLOPT_SSL_VERIFYPEER, false);
     // enable gzip and deflate through Accept-Encoding:
     curl_easy_setopt(d->m_handle, CURLOPT_ENCODING, "");
diff -Naur WebKit-r41128/WebCore/platform/network/soup/ResourceHandleSoup.cpp WebKit-r41128-nx/WebCore/platform/network/soup/ResourceHandleSoup.cpp
--- WebKit-r41128/WebCore/platform/network/soup/ResourceHandleSoup.cpp	2009-02-20 22:38:15.000000000 -0500
+++ WebKit-r41128-nx/WebCore/platform/network/soup/ResourceHandleSoup.cpp	2009-02-23 16:01:27.044005230 -0500
@@ -475,9 +475,12 @@
 {
     ASSERT(!d->m_msg);
 
-    // If we are no longer attached to a Page, this must be an attempted load from an
-    // onUnload handler, so let's just block it.
-    if (!frame->page())
+
+    /* The frame could be null is the ResourceHandle is not associated to any
+     * Frame, i.e. if we are downloading a file.
+     * If the frame is not null but the page is null this must be an attempted
+     * load from an onUnload handler, so let's just block it. */
+    if (frame && !frame->page())
         return false;
 
     KURL url = request().url();
diff -Naur WebKit-r41128/WebCore/platform/ScrollView.cpp WebKit-r41128-nx/WebCore/platform/ScrollView.cpp
--- WebKit-r41128/WebCore/platform/ScrollView.cpp	2009-02-13 00:50:35.000000000 -0500
+++ WebKit-r41128-nx/WebCore/platform/ScrollView.cpp	2009-02-23 16:01:27.076006870 -0500
@@ -281,6 +281,7 @@
 
 void ScrollView::setScrollPosition(const IntPoint& scrollPoint)
 {
+#if 0
     if (prohibitsScrolling())
         return;
 
@@ -288,12 +289,13 @@
         platformSetScrollPosition(scrollPoint);
         return;
     }
+#endif
 
     IntPoint newScrollPosition = scrollPoint.shrunkTo(maximumScrollPosition());
     newScrollPosition.clampNegativeToZero();
 
-    if (newScrollPosition == scrollPosition())
-        return;
+    //if (newScrollPosition == scrollPosition())
+    //    return;
 
     updateScrollbars(IntSize(newScrollPosition.x(), newScrollPosition.y()));
 }
@@ -316,7 +318,8 @@
 void ScrollView::updateScrollbars(const IntSize& desiredOffset)
 {
     // Don't allow re-entrancy into this function.
-    if (m_inUpdateScrollbars || prohibitsScrolling() || platformWidget())
+    //if (m_inUpdateScrollbars || prohibitsScrolling() || platformWidget())
+    if (m_inUpdateScrollbars || platformWidget())
         return;
 
     m_inUpdateScrollbars = true;
diff -Naur WebKit-r41128/WebCore/platform/text/gtk/TextBoundariesGtk.cpp WebKit-r41128-nx/WebCore/platform/text/gtk/TextBoundariesGtk.cpp
--- WebKit-r41128/WebCore/platform/text/gtk/TextBoundariesGtk.cpp	1969-12-31 19:00:00.000000000 -0500
+++ WebKit-r41128-nx/WebCore/platform/text/gtk/TextBoundariesGtk.cpp	2009-02-23 16:01:27.112006950 -0500
@@ -0,0 +1,77 @@
+/*
+ * Copyright (C) 2006, 2007 Apple Inc.  All rights reserved.
+ * Copyright (C) 2008 Jürg Billeter <j@bitron.ch>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#include "config.h"
+#include "TextBoundaries.h"
+
+#include <glib.h>
+
+#include "StringImpl.h"
+#include "TextBreakIterator.h"
+
+namespace WebCore {
+
+int findNextWordFromIndex(const UChar* chars, int len, int position, bool forward)
+{
+    TextBreakIterator* it = wordBreakIterator(chars, len);
+
+    if (forward) {
+        position = textBreakFollowing(it, position);
+        while (position != TextBreakDone) {
+            // We stop searching when the character preceeding the break
+            // is alphanumeric.
+            if (position < len && g_unichar_isalnum(chars[position - 1]))
+                return position;
+
+            position = textBreakFollowing(it, position);
+        }
+
+        return len;
+    } else {
+        position = textBreakPreceding(it, position);
+        while (position != TextBreakDone) {
+            // We stop searching when the character following the break
+            // is alphanumeric.
+            if (position > 0 && g_unichar_isalnum(chars[position]))
+                return position;
+
+            position = textBreakPreceding(it, position);
+        }
+
+        return 0;
+    }
+}
+
+void findWordBoundary(const UChar* chars, int len, int position, int* start, int* end)
+{
+    TextBreakIterator* it = wordBreakIterator(chars, len);
+    *end = textBreakFollowing(it, position);
+    if (*end < 0)
+        *end = textBreakLast(it);
+    *start = textBreakPrevious(it);
+}
+
+} // namespace WebCore
diff -Naur WebKit-r41128/WebCore/platform/text/gtk/TextBreakIteratorGtk.cpp WebKit-r41128-nx/WebCore/platform/text/gtk/TextBreakIteratorGtk.cpp
--- WebKit-r41128/WebCore/platform/text/gtk/TextBreakIteratorGtk.cpp	1969-12-31 19:00:00.000000000 -0500
+++ WebKit-r41128-nx/WebCore/platform/text/gtk/TextBreakIteratorGtk.cpp	2009-02-23 16:01:27.136007110 -0500
@@ -0,0 +1,241 @@
+/*
+ * Copyright (C) 2006 Lars Knoll <lars@trolltech.com>
+ * Copyright (C) 2007 Apple Inc. All rights reserved.
+ * Copyright (C) 2008 Jürg Billeter <j@bitron.ch>
+ * Copyright (C) 2008 Dominik Röttsches <dominik.roettsches@access-company.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "config.h"
+#include "TextBreakIterator.h"
+
+#include <pango/pango.h>
+
+#include <wtf/GOwnPtr.h>
+
+namespace WebCore {
+
+enum UBreakIteratorType {
+    UBRK_CHARACTER,
+    UBRK_WORD,
+    UBRK_LINE,
+    UBRK_SENTENCE
+};
+
+class TextBreakIterator {
+public:
+    UBreakIteratorType m_type;
+    int m_length;
+    PangoLogAttr* m_log_attrs;
+
+    int m_index;
+};
+
+static TextBreakIterator* setUpIterator(bool& createdIterator, TextBreakIterator*& iterator,
+    UBreakIteratorType type, const UChar* string, int length)
+{
+    if (!string)
+        return 0;
+
+    if (!createdIterator) {
+        iterator = new TextBreakIterator();
+        createdIterator = true;
+    }
+    if (!iterator)
+        return 0;
+
+    long utf8len;
+    GOwnPtr<char> utf8;
+    utf8.set(g_utf16_to_utf8(string, length, 0, &utf8len, 0));
+
+    // FIXME: assumes no surrogate pairs
+
+    iterator->m_type = type;
+    iterator->m_length = length;
+    if(createdIterator)
+        g_free(iterator->m_log_attrs);
+    iterator->m_log_attrs = g_new0(PangoLogAttr, length + 1);
+    iterator->m_index = -1;
+    pango_get_log_attrs(utf8.get(), utf8len, -1, 0, iterator->m_log_attrs, length + 1);
+
+    return iterator;
+}
+
+TextBreakIterator* characterBreakIterator(const UChar* string, int length)
+{
+    static bool createdCharacterBreakIterator = false;
+    static TextBreakIterator* staticCharacterBreakIterator;
+    return setUpIterator(createdCharacterBreakIterator,
+        staticCharacterBreakIterator, UBRK_CHARACTER, string, length);
+}
+
+TextBreakIterator* wordBreakIterator(const UChar* string, int length)
+{
+    static bool createdWordBreakIterator = false;
+    static TextBreakIterator* staticWordBreakIterator;
+    return setUpIterator(createdWordBreakIterator,
+        staticWordBreakIterator, UBRK_WORD, string, length);
+}
+
+TextBreakIterator* lineBreakIterator(const UChar* string, int length)
+{
+    static bool createdLineBreakIterator = false;
+    static TextBreakIterator* staticLineBreakIterator;
+    return setUpIterator(createdLineBreakIterator,
+        staticLineBreakIterator, UBRK_LINE, string, length);
+}
+
+TextBreakIterator* sentenceBreakIterator(const UChar* string, int length)
+{
+    static bool createdSentenceBreakIterator = false;
+    static TextBreakIterator* staticSentenceBreakIterator;
+    return setUpIterator(createdSentenceBreakIterator,
+        staticSentenceBreakIterator, UBRK_SENTENCE, string, length);
+}
+
+int textBreakFirst(TextBreakIterator* bi)
+{
+    // see textBreakLast
+    
+    int firstCursorPosition = -1;
+    int pos = 0;
+    while(pos <= bi->m_length && (firstCursorPosition < 0)) {
+        if (bi->m_log_attrs[pos].is_cursor_position)
+            firstCursorPosition = pos;
+    }
+    bi->m_index = firstCursorPosition;
+    return firstCursorPosition;
+}
+
+int textBreakLast(TextBreakIterator* bi)
+{
+    // textBreakLast is not meant to find breaks according to bi->m_type but really last character 
+    // (cmp ICU documentation for ubrk_first and ubrk_last)
+    // so we should advance or traverse back based on bi->m_log_attrs cursor positions
+    
+    // from ICU docs for ubrk_last:
+    // "Determine the index immediately beyond the last character in the text being scanned." 
+
+    // If last character position in the original string is a whitespace,
+    // traverse to the left until the first non-white character position is found
+    // and return the position of the first white-space char after this one.
+    // otherwise return m_length, as "the first character beyond the last" is outside our string.
+    
+    bool whiteSpaceAtTheEnd = true;
+    int nextWhiteSpacePos = bi->m_length;
+    
+    int pos = bi->m_length;
+    while (pos >= 0 && whiteSpaceAtTheEnd) {
+        if (bi->m_log_attrs[pos].is_cursor_position) {
+            if (whiteSpaceAtTheEnd = bi->m_log_attrs[pos].is_white)
+                nextWhiteSpacePos = pos;
+        }
+        pos--;
+    }
+    bi->m_index = nextWhiteSpacePos;
+    return nextWhiteSpacePos;
+}
+
+int textBreakNext(TextBreakIterator* bi)
+{
+    for (int i = bi->m_index + 1; i <= bi->m_length; i++) {
+        if (bi->m_type == UBRK_LINE && bi->m_log_attrs[i].is_line_break) {
+            bi->m_index = i;
+            return i;
+        } 
+        if (bi->m_type == UBRK_WORD && (bi->m_log_attrs[i].is_word_start || bi->m_log_attrs[i].is_word_end)) {
+            // FIXME: Single multibyte characters (i.e. white space around them), such as the euro symbol €, 
+            // are not marked as word_start & word_end as opposed to the way ICU does it
+            // This leads - for example - to different word selection behaviour when right clicking.
+            bi->m_index = i;
+            return i;
+        }
+        if (bi->m_type == UBRK_CHARACTER && bi->m_log_attrs[i].is_cursor_position) {
+            bi->m_index = i;
+            return i;
+        } 
+        if (bi->m_type == UBRK_SENTENCE && (bi->m_log_attrs[i].is_sentence_start || bi->m_log_attrs[i].is_sentence_end)) {
+            bi->m_index = i;
+            return i;
+        }
+    }
+    return TextBreakDone;
+}
+
+int textBreakPrevious(TextBreakIterator* bi)
+{
+    for (int i = bi->m_index - 1; i >= 0; i--) {
+        if (bi->m_type == UBRK_LINE && bi->m_log_attrs[i].is_line_break) {
+            bi->m_index = i;
+            return i;
+        } 
+        if (bi->m_type == UBRK_WORD && (bi->m_log_attrs[i].is_word_start || bi->m_log_attrs[i].is_word_end)) {
+            bi->m_index = i;
+            return i;
+        } 
+        if (bi->m_type == UBRK_CHARACTER && bi->m_log_attrs[i].is_cursor_position) {
+            bi->m_index = i;
+            return i;
+        } 
+        if (bi->m_type == UBRK_SENTENCE && (bi->m_log_attrs[i].is_sentence_start || bi->m_log_attrs[i].is_sentence_end)) {
+            bi->m_index = i;
+            return i;
+        }
+    }
+    return textBreakFirst(bi);
+}
+
+int textBreakPreceding(TextBreakIterator* bi, int pos)
+{
+    bi->m_index = pos;
+    return textBreakPrevious(bi);
+}
+
+int textBreakFollowing(TextBreakIterator* bi, int pos)
+{
+    if (pos < 0)
+        pos = -1;
+    bi->m_index = pos;
+    return textBreakNext(bi);
+}
+
+int textBreakCurrent(TextBreakIterator* bi)
+{
+    return bi->m_index;
+}
+
+bool isTextBreak(TextBreakIterator* bi, int pos)
+{
+    if (bi->m_index >= 0) {
+        if (bi->m_type == UBRK_LINE && bi->m_log_attrs[bi->m_index].is_line_break) {
+            return true;
+        } 
+        if (bi->m_type == UBRK_WORD && bi->m_log_attrs[bi->m_index].is_word_end) {
+            return true;
+        } 
+        if (bi->m_type == UBRK_CHARACTER && bi->m_log_attrs[bi->m_index].is_char_break) {
+            return true;
+        } 
+        if (bi->m_type == UBRK_SENTENCE && bi->m_log_attrs[bi->m_index].is_sentence_end) {
+            return true;
+        }
+    }
+    return FALSE;
+}
+
+}
diff -Naur WebKit-r41128/WebCore/platform/text/gtk/TextCodecGtk.cpp WebKit-r41128-nx/WebCore/platform/text/gtk/TextCodecGtk.cpp
--- WebKit-r41128/WebCore/platform/text/gtk/TextCodecGtk.cpp	1969-12-31 19:00:00.000000000 -0500
+++ WebKit-r41128-nx/WebCore/platform/text/gtk/TextCodecGtk.cpp	2009-02-23 16:01:27.160007070 -0500
@@ -0,0 +1,471 @@
+/*
+ * Copyright (C) 2004, 2006, 2007, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2006 Alexey Proskuryakov <ap@nypop.com>
+ * Copyright (C) 2008 Jürg Billeter <j@bitron.ch>
+ * Copyright (C) 2008 Dominik Röttsches <dominik.roettsches@access-company.com>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#include "config.h"
+#include "TextCodecGtk.h"
+
+#include "CString.h"
+#include "PlatformString.h"
+#include <wtf/Assertions.h>
+#include <wtf/HashMap.h>
+#include <wtf/GOwnPtr.h>
+#include "Logging.h"
+
+using std::auto_ptr;
+using std::min;
+
+namespace WebCore {
+
+
+
+// appendOmittingBOM is gone (http://trac.webkit.org/changeset/33380), so we need to avoid generating extra BOM's
+// here. This can be achieved by specifying the UTF-16 codecs' endianness explicitly when initializing iconv
+
+#if (G_BYTE_ORDER == G_BIG_ENDIAN)
+    const gchar* WebCore::TextCodecGtk::m_internalEncodingName = "UTF-16BE";
+#else 
+    const gchar* WebCore::TextCodecGtk::m_internalEncodingName = "UTF-16LE";
+#endif
+
+
+// list of text encodings and their aliases
+// the first entry/"alias" is the canonical name, each alias list must be terminated by a 0
+
+// Unicode
+TextCodecGtk::codecAliasList TextCodecGtk::m_codecAliases_UTF_8            = { "UTF-8", 0}; 
+
+// Western
+TextCodecGtk::codecAliasList TextCodecGtk::m_codecAliases_ISO_8859_1       = { "ISO-8859-1", "CP819", "IBM819", "ISO-IR-100", "ISO8859-1", "ISO_8859-1", "ISO_8859-1:1987",  "L1", "LATIN1", "CSISOLATIN1", 0};
+TextCodecGtk::codecAliasList TextCodecGtk::m_codecAliases_MACROMAN         = { "MACROMAN", "MAC", "MACINTOSH", "CSMACINTOSH", 0};
+
+// Japanese
+TextCodecGtk::codecAliasList TextCodecGtk::m_codecAliases_SHIFT_JIS        = { "Shift_JIS", "MS_KANJI", "SHIFT-JIS", "SJIS", "CSSHIFTJIS", 0};
+TextCodecGtk::codecAliasList TextCodecGtk::m_codecAliases_EUC_JP           = { "EUC_JP", "EUC-JP", "EUCJP", "EXTENDED_UNIX_CODE_PACKED_FORMAT_FOR_JAPANESE", "CSEUCPKDFMTJAPANESE", 0};
+TextCodecGtk::codecAliasList TextCodecGtk::m_codecAliases_ISO_2022_JP      = { "ISO-2022-JP", 0};
+
+// Traditional Chinese
+TextCodecGtk::codecAliasList TextCodecGtk::m_codecAliases_BIG5             = { "BIG5", "BIG-5", "BIG-FIVE", "BIG5", "BIGFIVE", "CN-BIG5", "CSBIG5", 0};
+TextCodecGtk::codecAliasList TextCodecGtk::m_codecAliases_BIG5_HKSCS       = { "BIG5-HKSCS", "BIG5-HKSCS:2004", "BIG5HKSCS", 0};
+TextCodecGtk::codecAliasList TextCodecGtk::m_codecAliases_CP950            = { "CP950", 0};
+
+// Korean
+TextCodecGtk::codecAliasList TextCodecGtk::m_codecAliases_ISO_2022_KR      = { "ISO-2022-KR", "CSISO2022KR", 0};
+TextCodecGtk::codecAliasList TextCodecGtk::m_codecAliases_CP949            = { "CP949", "UHC", 0};
+TextCodecGtk::codecAliasList TextCodecGtk::m_codecAliases_EUC_KR           = { "EUC-KR", "CSEUCKR", 0 };
+
+// Arabic
+TextCodecGtk::codecAliasList TextCodecGtk::m_codecAliases_ISO_8859_6       = { "ISO-8859-6", "ARABIC", "ASMO-708", "ECMA-114", "ISO-IR-127", "ISO8859-6", "ISO_8859-6", "ISO_8859-6:1987", "CSISOLATINARABIC", 0};
+TextCodecGtk::codecAliasList TextCodecGtk::m_codecAliases_CP1256           = { "windows-1256", "CP1256", "MS-ARAB", 0}; // rearranged, windows-1256 now declared the canonical name and put to lowercase to fix /fast/encoding/ahram-org-eg.html test case
+
+// Hebrew
+TextCodecGtk::codecAliasList TextCodecGtk::m_codecAliases_ISO_8859_8       = { "ISO-8859-8", "HEBREW", "ISO-8859-8", "ISO-IR-138", "ISO8859-8", "ISO_8859-8", "ISO_8859-8:1988", "CSISOLATINHEBREW", 0};
+TextCodecGtk::codecAliasList TextCodecGtk::m_codecAliases_CP1255           = { "windows-1255", "CP1255", "MS-HEBR", 0}; // rearranged, moved windows-1255 as canonical and lowercased, fixing /fast/encoding/meta-charset.html
+
+// Greek
+TextCodecGtk::codecAliasList TextCodecGtk::m_codecAliases_ISO_8859_7       = { "ISO-8859-7", "ECMA-118", "ELOT_928", "GREEK", "GREEK8", "ISO-IR-126", "ISO8859-7", "ISO_8859-7", "ISO_8859-7:1987", "ISO_8859-7:2003", "CSI", 0};
+TextCodecGtk::codecAliasList TextCodecGtk::m_codecAliases_CP869            = { "CP869", "869", "CP-GR", "IBM869", "CSIBM869", 0};
+TextCodecGtk::codecAliasList TextCodecGtk::m_codecAliases_WINDOWS_1253     = { "WINDOWS-1253", 0 };
+
+// Cyrillic
+TextCodecGtk::codecAliasList TextCodecGtk::m_codecAliases_ISO_8859_5       = { "ISO-8859-5", "CYRILLIC", "ISO-IR-144", "ISO8859-5", "ISO_8859-5", "ISO_8859-5:1988", "CSISOLATINCYRILLIC", 0};
+TextCodecGtk::codecAliasList TextCodecGtk::m_codecAliases_KOI8_R           = { "KOI8-R", "CSKOI8R", 0};
+TextCodecGtk::codecAliasList TextCodecGtk::m_codecAliases_CP866            = { "CP866", "866", "IBM866", "CSIBM866", 0};
+TextCodecGtk::codecAliasList TextCodecGtk::m_codecAliases_KOI8_U           = { "KOI8-U", 0};
+TextCodecGtk::codecAliasList TextCodecGtk::m_codecAliases_WINDOWS_1251     = { "windows-1251", "CP1251", 0}; // CP1251 added to pass /fast/encoding/charset-cp1251.html
+TextCodecGtk::codecAliasList TextCodecGtk::m_codecAliases_MACCYRILLIC      = { "mac-cyrillic", "MACCYRILLIC", "x-mac-cyrillic", 0}; 
+
+// Thai
+TextCodecGtk::codecAliasList TextCodecGtk::m_codecAliases_CP874            = { "CP874", "WINDOWS-874", 0};
+TextCodecGtk::codecAliasList TextCodecGtk::m_codecAliases_TIS_620          = { "TIS-620", 0};
+
+// Simplified Chinese
+TextCodecGtk::codecAliasList TextCodecGtk::m_codecAliases_GBK              = { "GBK", 0};
+TextCodecGtk::codecAliasList TextCodecGtk::m_codecAliases_HZ               = { "HZ", "HZ-GB-2312", 0};
+TextCodecGtk::codecAliasList TextCodecGtk::m_codecAliases_GB18030          = { "GB18030", 0};
+TextCodecGtk::codecAliasList TextCodecGtk::m_codecAliases_EUC_CN           = { "EUC_CN", "EUCCN", "GB2312", "CN-GB", "CSGB2312", "EUC_CN", 0};
+TextCodecGtk::codecAliasList TextCodecGtk::m_codecAliases_2312_80          = { "GB_2312-80", "CHINESE", "csISO58GB231280", "GB2312.1980-0", "ISO-IR-58" };
+
+// Central European
+TextCodecGtk::codecAliasList TextCodecGtk::m_codecAliases_ISO_8859_2       = { "ISO-8859-2", "ISO-IR-101", "ISO8859-2", "ISO_8859-2", "ISO_8859-2:1987", "L2", "LATIN2", "CSISOLATIN2", 0};
+TextCodecGtk::codecAliasList TextCodecGtk::m_codecAliases_CP1250           = { "CP1250", "MS-EE", "WINDOWS-1250", 0};
+TextCodecGtk::codecAliasList TextCodecGtk::m_codecAliases_MACCENTRALEUROPE = { "MACCENTRALEUROPE", 0};
+
+// Vietnamese
+TextCodecGtk::codecAliasList TextCodecGtk::m_codecAliases_CP1258           = { "CP1258", "WINDOWS-1258", 0};
+
+// Turkish
+TextCodecGtk::codecAliasList TextCodecGtk::m_codecAliases_CP1254           = { "CP1254", "MS-TURK", "WINDOWS-1254", 0};
+TextCodecGtk::codecAliasList TextCodecGtk::m_codecAliases_ISO_8859_9       = { "ISO-8859-9", "ISO-IR-148", "ISO8859-9", "ISO_8859-9", "ISO_8859-9:1989", "L5", "LATIN5", "CSISOLATIN5", 0};
+
+// Baltic
+TextCodecGtk::codecAliasList TextCodecGtk::m_codecAliases_CP1257           = { "CP1257", "WINBALTRIM", "WINDOWS-1257", 0};
+TextCodecGtk::codecAliasList TextCodecGtk::m_codecAliases_ISO_8859_4       = { "ISO-8859-4", "ISO-IR-110", "ISO8859-4", "ISO_8859-4", "ISO_8859-4:1988", "L4", "LATIN4", "CSISOLATIN4", 0};
+
+gconstpointer const TextCodecGtk::m_iconvBaseCodecList[] = { 
+    // Unicode
+    &m_codecAliases_UTF_8,
+
+    // Western
+    &m_codecAliases_ISO_8859_1
+};
+
+gconstpointer const TextCodecGtk::m_iconvExtendedCodecList[] = 
+{
+    // Western
+    &m_codecAliases_MACROMAN,
+
+    // Japanese
+    &m_codecAliases_SHIFT_JIS,
+    &m_codecAliases_EUC_JP,
+    &m_codecAliases_ISO_2022_JP,
+
+    // Simplified Chinese
+    &m_codecAliases_BIG5,
+    &m_codecAliases_BIG5_HKSCS,
+    &m_codecAliases_CP950,
+
+    // Korean
+    &m_codecAliases_ISO_2022_KR,
+    &m_codecAliases_CP949,
+    &m_codecAliases_EUC_KR,
+
+    // Arabic
+    &m_codecAliases_ISO_8859_6,
+    &m_codecAliases_CP1256,
+    
+    // Hebrew
+    &m_codecAliases_ISO_8859_8,
+    &m_codecAliases_CP1255,
+    
+    // Greek
+    &m_codecAliases_ISO_8859_7,
+    &m_codecAliases_CP869,
+    &m_codecAliases_WINDOWS_1253,
+    
+    // Cyrillic
+    &m_codecAliases_ISO_8859_5,
+    &m_codecAliases_KOI8_R,
+    &m_codecAliases_CP866,
+    &m_codecAliases_KOI8_U,
+    &m_codecAliases_WINDOWS_1251,
+    &m_codecAliases_MACCYRILLIC,
+    
+    // Thai
+    &m_codecAliases_CP874,
+    &m_codecAliases_TIS_620,
+    
+    // Traditional Chinese
+    &m_codecAliases_GBK,
+    &m_codecAliases_HZ,
+    &m_codecAliases_GB18030,
+    &m_codecAliases_EUC_CN,
+    &m_codecAliases_2312_80,
+    
+    // Central European
+    &m_codecAliases_ISO_8859_2,
+    &m_codecAliases_CP1250,
+    &m_codecAliases_MACCENTRALEUROPE,
+    
+    // Vietnamese
+    &m_codecAliases_CP1258,
+    
+    // Turkish
+    &m_codecAliases_CP1254,
+    &m_codecAliases_ISO_8859_9,
+    
+    // Baltic
+    &m_codecAliases_CP1257,
+    &m_codecAliases_ISO_8859_4
+};
+
+
+const size_t ConversionBufferSize = 16384;
+    
+
+static auto_ptr<TextCodec> newTextCodecGtk(const TextEncoding& encoding, const void*)
+{
+#ifndef NDEBUG
+    // too noisy if each UTF-8 codec creation is logged
+    // if (strcmp(encoding.name(), "UTF-8"))
+    //     LOG(TextConversion, "creating new text codec for encoding name %s", encoding.name());
+#endif
+
+    return auto_ptr<TextCodec>(new TextCodecGtk(encoding));
+}
+
+gboolean TextCodecGtk::isEncodingAvailable(const gchar* encName)
+{
+    GIConv tester;
+    // test decoding
+    tester = g_iconv_open(m_internalEncodingName, encName);
+    if (tester == reinterpret_cast<GIConv>(-1)) {
+        LOG_ERROR("%s not decodable => not available!", encName);
+        return false;
+    } else {
+        g_iconv_close(tester);
+        // test encoding
+        tester = g_iconv_open(encName, m_internalEncodingName);
+        if (tester == reinterpret_cast<GIConv>(-1)) {
+            LOG_ERROR("%s not encodable => not available!", encName);
+            return false;
+        } else {
+            g_iconv_close(tester);
+            return true;
+        }
+    }
+}
+
+void TextCodecGtk::registerEncodingNames(EncodingNameRegistrar registrar, bool extended)
+{
+    const void* const* encodingList;
+    unsigned int listLength = 0;
+    if (extended) {
+        encodingList = m_iconvExtendedCodecList;
+        listLength = sizeof(m_iconvExtendedCodecList)/sizeof(gpointer);
+    } else {
+        encodingList = m_iconvBaseCodecList;
+        listLength = sizeof(m_iconvBaseCodecList)/sizeof(gpointer);
+    }
+
+    for (unsigned int i = 0; i < listLength; ++i) {
+        codecAliasList *codecAliases = static_cast<codecAliasList*>(encodingList[i]);
+        int codecCount = -1;
+        const gchar *canonicalName, *currentAlias;
+        bool canonicalAvailable = true;
+        
+        // for each of the alias lists:
+        // bail out if canonical is not available,
+        // then continue testing each alias, 
+        // if available, add it to the list, mapping it to its canonical name
+
+        while ((currentAlias = (*codecAliases)[++codecCount]) && canonicalAvailable) {
+            bool currentAvailable = isEncodingAvailable(currentAlias);
+
+            if (codecCount == 0 && currentAvailable) {
+                canonicalName = currentAlias;
+                canonicalAvailable = true;
+                LOG_VERBOSE(TextConversion, "registering encoding canonical %s", canonicalName);
+                registrar(canonicalName, canonicalName);
+            } else if (codecCount == 0 && !currentAvailable)
+                canonicalAvailable = false;
+            else if (codecCount > 0) {
+                if (isEncodingAvailable(currentAlias)) {
+                    LOG_VERBOSE(TextConversion, "registering encoding name alias %s to canonical %s", currentAlias, canonicalName);
+                    registrar(currentAlias, canonicalName);
+                }
+            }
+        }
+
+    }
+}
+
+void TextCodecGtk::registerCodecs(TextCodecRegistrar registrar, bool extended)
+{
+    const void* const* encodingList;
+    unsigned int listLength = 0;
+    if (extended) {
+        encodingList = m_iconvExtendedCodecList;
+        listLength = sizeof(m_iconvExtendedCodecList)/sizeof(gpointer);
+    } else {
+        encodingList = m_iconvBaseCodecList;
+        listLength = sizeof(m_iconvBaseCodecList)/sizeof(gpointer);
+    }
+
+    for (unsigned int i = 0; i < listLength; ++i) {
+        codecAliasList *codecAliases = static_cast<codecAliasList*>(encodingList[i]);
+        // by convention, the first "alias" should be the canonical name, see the definition of the alias lists 
+        const gchar *codecName = (*codecAliases)[0];
+        if (isEncodingAvailable(codecName))
+            registrar(codecName, newTextCodecGtk, 0);
+    }
+}
+
+void TextCodecGtk::registerBaseEncodingNames(EncodingNameRegistrar registrar)
+{
+    registerEncodingNames(registrar, false);
+}
+
+void TextCodecGtk::registerBaseCodecs(TextCodecRegistrar registrar)
+{
+    registerCodecs(registrar, false);
+}
+
+void TextCodecGtk::registerExtendedEncodingNames(EncodingNameRegistrar registrar)
+{
+    registerEncodingNames(registrar, true);
+}
+
+void TextCodecGtk::registerExtendedCodecs(TextCodecRegistrar registrar)
+{
+    registerCodecs(registrar, true);
+}
+
+TextCodecGtk::TextCodecGtk(const TextEncoding& encoding)
+    : m_encoding(encoding)
+    , m_numBufferedBytes(0)
+    , m_iconvDecoder(reinterpret_cast<GIConv>(-1))
+    , m_iconvEncoder(reinterpret_cast<GIConv>(-1))
+{
+}
+
+TextCodecGtk::~TextCodecGtk()
+{
+    releaseIConv();
+}
+
+void TextCodecGtk::releaseIConv() const
+{
+    if (m_iconvDecoder != reinterpret_cast<GIConv>(-1)) {
+        g_iconv_close(m_iconvDecoder);
+        m_iconvDecoder = reinterpret_cast<GIConv>(-1);
+    }
+    if (m_iconvEncoder != reinterpret_cast<GIConv>(-1)) {
+        g_iconv_close(m_iconvEncoder);
+        m_iconvEncoder = reinterpret_cast<GIConv>(-1);
+    }
+}
+
+void TextCodecGtk::createIConvDecoder() const
+{
+    ASSERT(m_iconvDecoder == reinterpret_cast<GIConv>(-1));
+
+    m_iconvDecoder = g_iconv_open(m_internalEncodingName, m_encoding.name());
+}
+
+void TextCodecGtk::createIConvEncoder() const
+{
+    ASSERT(m_iconvDecoder == reinterpret_cast<GIConv>(-1));
+
+    m_iconvEncoder = g_iconv_open(m_encoding.name(), m_internalEncodingName);
+}
+
+String TextCodecGtk::decode(const char* bytes, size_t length, bool flush, bool stopOnError, bool& sawError)
+{
+    // Get a converter for the passed-in encoding.
+    if (m_iconvDecoder == reinterpret_cast<GIConv>(-1)) {
+        createIConvDecoder();
+        ASSERT(m_iconvDecoder != reinterpret_cast<GIConv>(-1));
+        if (m_iconvDecoder == reinterpret_cast<GIConv>(-1)) {
+            LOG_ERROR("error creating IConv encoder even though encoding was in table");
+            return String();
+        }
+    }
+
+    size_t countWritten, countRead, conversionLength;
+    const char* conversionBytes;
+    char* prefixedBytes = 0;
+
+    if (m_numBufferedBytes) {
+        conversionLength = length + m_numBufferedBytes;
+        prefixedBytes = static_cast<char*>(fastMalloc(conversionLength));
+        memcpy(prefixedBytes, m_bufferedBytes, m_numBufferedBytes);
+        memcpy(prefixedBytes + m_numBufferedBytes, bytes, length);
+        
+        conversionBytes = prefixedBytes;
+        
+        // all buffered bytes are consumed now
+        m_numBufferedBytes = 0;
+    } else {
+        // no previously buffered partial data, 
+        // just convert the data that was passed in
+        conversionBytes = bytes;
+        conversionLength = length;
+    }
+
+    GOwnPtr<GError> err;
+    GOwnPtr<UChar> buffer;
+    
+    if (conversionLength == 0) return "";
+
+    buffer.outPtr() = reinterpret_cast<UChar*>(g_convert_with_iconv(conversionBytes, conversionLength, m_iconvDecoder, &countRead, &countWritten, &err.outPtr())); 
+
+
+    if (err) {
+        LOG_ERROR("GIConv conversion error");
+        m_numBufferedBytes = 0; // reset state for subsequent calls to decode
+        fastFree(prefixedBytes);
+        sawError = true;
+        return String();
+    }
+    
+    // Partial input at the end of the string may not result in an error being raised. 
+    // From the gnome library documentation on g_convert_with_iconv:
+    // "Even if the conversion was successful, this may be less than len if there were partial characters at the end of the input."
+    // That's why we need to compare conversionLength against countRead 
+
+    m_numBufferedBytes = conversionLength - countRead;
+    if (m_numBufferedBytes > 0) {
+        if (flush) {
+            LOG_ERROR("Partial bytes at end of input while flush requested.");
+            m_numBufferedBytes = 0; // reset state for subsequent calls to decode
+            fastFree(prefixedBytes);
+            sawError = true;
+            return String();
+        }
+        memcpy(m_bufferedBytes, conversionBytes + countRead, m_numBufferedBytes);
+    }
+
+    fastFree(prefixedBytes);
+    
+    Vector<UChar> result;
+
+    result.append(buffer.get(), countWritten / sizeof(UChar));
+
+    return String::adopt(result);
+}
+
+CString TextCodecGtk::encode(const UChar* characters, size_t length, UnencodableHandling handling)
+{
+    if (!length)
+        return "";
+
+    if (m_iconvEncoder == reinterpret_cast<GIConv>(-1))
+        createIConvEncoder();
+    if (m_iconvEncoder == reinterpret_cast<GIConv>(-1))
+        return CString();
+
+    size_t count;
+
+    GOwnPtr<GError> err;
+    GOwnPtr<char> buffer;
+    
+    if (length == 0) return "";
+
+    buffer.outPtr() = g_convert_with_iconv(reinterpret_cast<const char*>(characters), length * sizeof(UChar), m_iconvEncoder, 0, &count, &err.outPtr());
+    if (err) {
+        LOG_ERROR("GIConv conversion error");
+        return CString();
+    }
+
+    CString result = CString(buffer.get(), count);
+
+    return result;
+}
+
+
+} // namespace WebCore
diff -Naur WebKit-r41128/WebCore/platform/text/gtk/TextCodecGtk.h WebKit-r41128-nx/WebCore/platform/text/gtk/TextCodecGtk.h
--- WebKit-r41128/WebCore/platform/text/gtk/TextCodecGtk.h	1969-12-31 19:00:00.000000000 -0500
+++ WebKit-r41128-nx/WebCore/platform/text/gtk/TextCodecGtk.h	2009-02-23 16:01:27.196007190 -0500
@@ -0,0 +1,149 @@
+/*
+ * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved.
+ * Copyright (C) 2006 Alexey Proskuryakov <ap@nypop.com>
+ * Copyright (C) 2008 Jürg Billeter <j@bitron.ch>
+ * Copyright (C) 2008 Dominik Röttsches <dominik.roettsches@access-company.com>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+ */
+
+#ifndef TextCodecGTK_h
+#define TextCodecGTK_h
+
+#include <glib.h>
+
+#include "TextCodec.h"
+#include "TextEncoding.h"
+
+namespace WebCore {
+
+    class TextCodecGtk : public TextCodec {
+    public:
+        static void registerBaseEncodingNames(EncodingNameRegistrar);
+        static void registerBaseCodecs(TextCodecRegistrar);
+
+        static void registerExtendedEncodingNames(EncodingNameRegistrar);
+        static void registerExtendedCodecs(TextCodecRegistrar);
+
+        TextCodecGtk(const TextEncoding&);
+        virtual ~TextCodecGtk();
+
+        virtual String decode(const char*, size_t length, bool flush, bool stopOnError, bool& sawError);
+        virtual CString encode(const UChar*, size_t length, UnencodableHandling);
+
+    private:
+        void createIConvDecoder() const;
+        void createIConvEncoder() const;
+        void releaseIConv() const;
+
+        static void registerEncodingNames(EncodingNameRegistrar registrar, bool extended);        
+        static void registerCodecs(TextCodecRegistrar registrar, bool extended);
+        static gboolean isEncodingAvailable(const gchar*);
+
+        TextEncoding m_encoding;
+        size_t m_numBufferedBytes;
+        unsigned char m_bufferedBytes[16]; // bigger than any single multi-byte character        
+        mutable GIConv m_iconvDecoder;
+        mutable GIConv m_iconvEncoder;
+
+        static const gchar* m_internalEncodingName;
+
+        typedef const gchar* const codecAliasList[];
+
+        // Unicode
+        static codecAliasList m_codecAliases_UTF_8;
+
+        // Western
+        static codecAliasList m_codecAliases_ISO_8859_1;
+        static codecAliasList m_codecAliases_MACROMAN;
+
+        // Japanese
+        static codecAliasList m_codecAliases_SHIFT_JIS;
+        static codecAliasList m_codecAliases_EUC_JP;
+        static codecAliasList m_codecAliases_ISO_2022_JP;
+
+        // Traditional Chinese
+        static codecAliasList m_codecAliases_BIG5;
+        static codecAliasList m_codecAliases_BIG5_HKSCS;
+        static codecAliasList m_codecAliases_CP950;
+
+        // Korean
+        static codecAliasList m_codecAliases_ISO_2022_KR;
+        static codecAliasList m_codecAliases_CP949;
+        static codecAliasList m_codecAliases_EUC_KR;
+
+        // Arabic
+        static codecAliasList m_codecAliases_ISO_8859_6;
+        static codecAliasList m_codecAliases_CP1256;
+
+        // Hebrew
+        static codecAliasList m_codecAliases_ISO_8859_8;
+        static codecAliasList m_codecAliases_CP1255;
+
+        // Greek
+        static codecAliasList m_codecAliases_ISO_8859_7;
+        static codecAliasList m_codecAliases_CP869;
+        static codecAliasList m_codecAliases_WINDOWS_1253;
+
+        // Cyrillic
+        static codecAliasList m_codecAliases_ISO_8859_5;
+        static codecAliasList m_codecAliases_KOI8_R;
+        static codecAliasList m_codecAliases_CP866;
+        static codecAliasList m_codecAliases_KOI8_U;
+        static codecAliasList m_codecAliases_WINDOWS_1251;
+        static codecAliasList m_codecAliases_MACCYRILLIC;
+
+        // Thai
+        static codecAliasList m_codecAliases_CP874;
+        static codecAliasList m_codecAliases_TIS_620;
+
+        // Simplified Chinese
+        static codecAliasList m_codecAliases_GBK;
+        static codecAliasList m_codecAliases_HZ;
+        static codecAliasList m_codecAliases_GB18030;
+        static codecAliasList m_codecAliases_EUC_CN;
+        static codecAliasList m_codecAliases_2312_80; 
+
+        // Central European
+        static codecAliasList m_codecAliases_ISO_8859_2;
+        static codecAliasList m_codecAliases_CP1250;
+        static codecAliasList m_codecAliases_MACCENTRALEUROPE;
+
+        // Vietnamese
+        static codecAliasList m_codecAliases_CP1258;
+
+        // Turkish
+        static codecAliasList m_codecAliases_CP1254;
+        static codecAliasList m_codecAliases_ISO_8859_9;
+
+        // Baltic
+        static codecAliasList m_codecAliases_CP1257;
+        static codecAliasList m_codecAliases_ISO_8859_4;
+
+        static gconstpointer const m_iconvBaseCodecList[];
+        static gconstpointer const m_iconvExtendedCodecList[];
+
+    };
+
+} // namespace WebCore
+
+#endif // TextCodecGTK_h
diff -Naur WebKit-r41128/WebCore/platform/text/TextBreakIterator.h WebKit-r41128-nx/WebCore/platform/text/TextBreakIterator.h
--- WebKit-r41128/WebCore/platform/text/TextBreakIterator.h	2008-12-24 23:47:41.000000000 -0500
+++ WebKit-r41128-nx/WebCore/platform/text/TextBreakIterator.h	2009-02-23 16:01:27.220006110 -0500
@@ -35,7 +35,9 @@
     TextBreakIterator* sentenceBreakIterator(const UChar*, int length);
 
     int textBreakFirst(TextBreakIterator*);
+    int textBreakLast(TextBreakIterator*);
     int textBreakNext(TextBreakIterator*);
+    int textBreakPrevious(TextBreakIterator*);
     int textBreakCurrent(TextBreakIterator*);
     int textBreakPreceding(TextBreakIterator*, int);
     int textBreakFollowing(TextBreakIterator*, int);
diff -Naur WebKit-r41128/WebCore/platform/text/TextBreakIteratorICU.cpp WebKit-r41128-nx/WebCore/platform/text/TextBreakIteratorICU.cpp
--- WebKit-r41128/WebCore/platform/text/TextBreakIteratorICU.cpp	2009-01-21 00:14:22.000000000 -0500
+++ WebKit-r41128-nx/WebCore/platform/text/TextBreakIteratorICU.cpp	2009-02-23 16:01:27.244006670 -0500
@@ -89,11 +89,21 @@
     return ubrk_first(bi);
 }
 
+int textBreakLast(TextBreakIterator* bi)
+{
+    return ubrk_last(bi);
+}
+
 int textBreakNext(TextBreakIterator* bi)
 {
     return ubrk_next(bi);
 }
 
+int textBreakPrevious(TextBreakIterator* bi)
+{
+    return ubrk_previous(bi);
+}
+
 int textBreakPreceding(TextBreakIterator* bi, int pos)
 {
     return ubrk_preceding(bi, pos);
diff -Naur WebKit-r41128/WebCore/platform/text/TextEncoding.cpp WebKit-r41128-nx/WebCore/platform/text/TextEncoding.cpp
--- WebKit-r41128/WebCore/platform/text/TextEncoding.cpp	2009-01-21 00:14:22.000000000 -0500
+++ WebKit-r41128-nx/WebCore/platform/text/TextEncoding.cpp	2009-02-23 16:01:27.268006710 -0500
@@ -36,6 +36,9 @@
 #include <unicode/unorm.h>
 #elif USE(QT4_UNICODE)
 #include <QString>
+#elif USE(GLIB_UNICODE)
+#include <glib.h>
+#include <wtf/GOwnPtr.h>
 #endif
 #include <wtf/HashSet.h>
 #include <wtf/OwnPtr.h>
@@ -114,6 +117,20 @@
     QString str(reinterpret_cast<const QChar*>(characters), length);
     str = str.normalized(QString::NormalizationForm_C);
     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));
+
+    GOwnPtr<char> utf8normalized;
+    utf8normalized.set(g_utf8_normalize(utf8source.get(), -1, G_NORMALIZE_NFC));
+
+    long utf16length;
+    GOwnPtr<UChar> utf16normalized;
+    utf16normalized.set(g_utf8_to_utf16(utf8normalized.get(), -1, 0, &utf16length, 0));
+
+    CString result = newTextCodec(*this)->encode(utf16normalized.get(), utf16length, handling);
+
+    return result;
 #endif
 }
 
diff -Naur WebKit-r41128/WebCore/platform/text/TextEncodingRegistry.cpp WebKit-r41128-nx/WebCore/platform/text/TextEncodingRegistry.cpp
--- WebKit-r41128/WebCore/platform/text/TextEncodingRegistry.cpp	2009-01-21 00:14:22.000000000 -0500
+++ WebKit-r41128-nx/WebCore/platform/text/TextEncodingRegistry.cpp	2009-02-23 16:01:27.293006590 -0500
@@ -47,6 +47,9 @@
 #if PLATFORM(QT)
 #include "qt/TextCodecQt.h"
 #endif
+#if PLATFORM(GTK)
+#include "gtk/TextCodecGtk.h"
+#endif
 
 using namespace WTF;
 
@@ -189,6 +192,11 @@
     TextCodecICU::registerBaseEncodingNames(addToTextEncodingNameMap);
     TextCodecICU::registerBaseCodecs(addToTextCodecMap);
 #endif
+
+#if USE(GLIB_UNICODE)
+    TextCodecGtk::registerBaseEncodingNames(addToTextEncodingNameMap);
+    TextCodecGtk::registerBaseCodecs(addToTextCodecMap);
+#endif
 }
 
 static void extendTextCodecMaps()
@@ -207,6 +215,11 @@
     TextCodecMac::registerEncodingNames(addToTextEncodingNameMap);
     TextCodecMac::registerCodecs(addToTextCodecMap);
 #endif
+
+#if USE(GLIB_UNICODE)
+    TextCodecGtk::registerExtendedEncodingNames(addToTextEncodingNameMap);
+    TextCodecGtk::registerExtendedCodecs(addToTextCodecMap);
+#endif
 }
 
 std::auto_ptr<TextCodec> newTextCodec(const TextEncoding& encoding)
diff -Naur WebKit-r41128/WebCore/rendering/SVGInlineTextBox.cpp WebKit-r41128-nx/WebCore/rendering/SVGInlineTextBox.cpp
--- WebKit-r41128/WebCore/rendering/SVGInlineTextBox.cpp	2009-02-15 03:48:53.000000000 -0500
+++ WebKit-r41128-nx/WebCore/rendering/SVGInlineTextBox.cpp	2009-02-23 16:01:27.321007310 -0500
@@ -484,7 +484,7 @@
     float thickness = SVGRenderStyle::cssPrimitiveToLength(object, object->style()->svgStyle()->strokeWidth(), 1.0f);
 
     const Font& font = object->style()->font();
-    thickness = max(thickness * powf(font.size(), 2.0f) / font.unitsPerEm(), 1.0f);
+    thickness = max(thickness * (float) pow(font.size(), 2.0f) / font.unitsPerEm(), 1.0f);
 
     if (decoration == UNDERLINE)
         y += thickness * 1.5f; // For compatibility with Batik/Opera
diff -Naur WebKit-r41128/WebCore/svg/SVGLength.cpp WebKit-r41128-nx/WebCore/svg/SVGLength.cpp
--- WebKit-r41128/WebCore/svg/SVGLength.cpp	2009-02-15 03:48:53.000000000 -0500
+++ WebKit-r41128-nx/WebCore/svg/SVGLength.cpp	2009-02-23 16:01:27.346280950 -0500
@@ -314,7 +314,7 @@
     else if (mode == LengthModeHeight)
         return value * height;
     else if (mode == LengthModeOther)
-        return value * sqrtf(powf(width, 2) + powf(height, 2)) / sqrtf(2.0f);
+        return value * sqrtf(pow(width, 2) + pow(height, 2)) / sqrtf(2.0f);
 
     return 0.0f;
 }
diff -Naur WebKit-r41128/WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp WebKit-r41128-nx/WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp
--- WebKit-r41128/WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp	2009-01-21 00:14:25.000000000 -0500
+++ WebKit-r41128-nx/WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp	2009-02-25 20:35:26.076003590 -0500
@@ -23,11 +23,13 @@
 #include "HitTestResult.h"
 #include "KURL.h"
 #include "NotImplemented.h"
+#include "CString.h"
 
 #include <glib-object.h>
 #include <glib/gi18n.h>
 #include <gtk/gtk.h>
 #include "webkitprivate.h"
+#include "webkitwebdownload.h"
 
 using namespace WebCore;
 
@@ -163,7 +165,18 @@
 
 void ContextMenuClient::downloadURL(const KURL& url)
 {
-    notImplemented();
+   WebKitWebDownload* download = webkit_web_download_new(url.string().utf8().data());
+
+   gboolean handled;
+   
+   g_signal_emit_by_name(m_webView, "download-created", download, &handled);
+   
+   if (handled)
+       webkit_web_download_start(download);
+   else {
+       webkit_web_download_cancel(download);
+       g_object_unref(download);
+   }
 }
 
 void ContextMenuClient::copyImageToClipboard(const HitTestResult&)
diff -Naur WebKit-r41128/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp WebKit-r41128-nx/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
--- WebKit-r41128/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp	2009-02-15 03:48:54.000000000 -0500
+++ WebKit-r41128-nx/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp	2009-02-23 16:01:27.369008390 -0500
@@ -21,6 +21,7 @@
 
 #include "config.h"
 #include "FrameLoaderClientGtk.h"
+#include "ResourceHandleClient.h"
 
 #include "Color.h"
 #include "DocumentLoader.h"
@@ -40,6 +41,8 @@
 #include "MouseEvent.h"
 #include "NotImplemented.h"
 #include "PlatformString.h"
+#include "ResourceHandle.h"
+#include "ResourceHandleInternal.h"
 #include "PluginDatabase.h"
 #include "RenderPart.h"
 #include "ResourceRequest.h"
@@ -264,6 +267,19 @@
     m_response = response;
 }
 
+bool FrameLoaderClient::dispatchDecidePolicyForNetworkRequest(const ResourceRequest& resourceRequest)
+{
+	WebKitWebView* page = getViewFromFrame(m_frame);
+	WebKitNetworkRequest* request = webkit_network_request_new(resourceRequest.url().string().utf8().data());
+	
+	gboolean isHandled = false;
+	g_signal_emit_by_name(page, "request-policy-decision-requested", m_frame, resourceRequest.url().string().utf8().data(), request, &isHandled);
+
+	g_object_unref(request);
+	
+	return !isHandled;
+}
+
 void FrameLoaderClient::dispatchDecidePolicyForMIMEType(FramePolicyFunction policyFunction, const String& mimeType, const ResourceRequest& resourceRequest)
 {
     ASSERT(policyFunction);
@@ -423,7 +439,7 @@
     String type = mimeType;
     // We don't use MIMETypeRegistry::getMIMETypeForPath() because it returns "application/octet-stream" upon failure
     if (type.isEmpty())
-        type = MIMETypeRegistry::getMIMETypeForExtension(url.path().substring(url.path().reverseFind('.') + 1));
+        type = MIMETypeRegistry::getMIMETypeForPath/*Extension*/(url.path().substring(url.path().reverseFind('.') + 1));
 
     if (type.isEmpty())
         return WebCore::ObjectContentFrame;
@@ -754,9 +770,23 @@
     g_signal_emit_by_name(m_frame, "load-done", false);
 }
 
-void FrameLoaderClient::download(ResourceHandle*, const ResourceRequest&, const ResourceRequest&, const ResourceResponse&)
+void FrameLoaderClient::download(ResourceHandle* handle, const ResourceRequest& request, const ResourceRequest& initialRequest, const ResourceResponse& response)
 {
-    notImplemented();
+    WebKitWebView* view = getViewFromFrame(m_frame);
+    // FIXME: Use initialRequest?
+    // FIXME: Don't create networkRequest from the URI but from the full object when the new API is merged.
+    WebKitNetworkRequest* networkRequest = webkit_network_request_new(request.url().string().utf8().data());
+    WebKitWebDownload* download = webkit_web_download_new_from_existing_connection(handle, networkRequest, response);
+    gboolean handled;
+    g_signal_emit_by_name(view, "download-created", download, &handled);
+
+    if (handled) {
+        webkit_web_download_start(download);
+    }
+    else {
+        handle->cancel();
+        g_object_unref(download);
+    }
 }
 
 ResourceError FrameLoaderClient::cancelledError(const ResourceRequest&)
diff -Naur WebKit-r41128/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h WebKit-r41128-nx/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h
--- WebKit-r41128/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h	2009-02-15 03:48:54.000000000 -0500
+++ WebKit-r41128-nx/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.h	2009-02-23 16:01:27.397006910 -0500
@@ -90,6 +90,7 @@
         virtual WebCore::Frame* dispatchCreatePage();
         virtual void dispatchShow();
 
+		virtual bool dispatchDecidePolicyForNetworkRequest(const WebCore::ResourceRequest&);
         virtual void dispatchDecidePolicyForMIMEType(WebCore::FramePolicyFunction, const WebCore::String& MIMEType, const WebCore::ResourceRequest&);
         virtual void dispatchDecidePolicyForNewWindowAction(WebCore::FramePolicyFunction, const WebCore::NavigationAction&, const WebCore::ResourceRequest&, WTF::PassRefPtr<WebCore::FormState>, const WebCore::String& frameName);
         virtual void dispatchDecidePolicyForNavigationAction(WebCore::FramePolicyFunction, const WebCore::NavigationAction&, const WebCore::ResourceRequest&, WTF::PassRefPtr<WebCore::FormState>);
diff -Naur WebKit-r41128/WebKit/gtk/webkit/webkitdefines.h WebKit-r41128-nx/WebKit/gtk/webkit/webkitdefines.h
--- WebKit-r41128/WebKit/gtk/webkit/webkitdefines.h	2009-01-21 00:14:25.000000000 -0500
+++ WebKit-r41128-nx/WebKit/gtk/webkit/webkitdefines.h	2009-02-23 16:01:27.421593470 -0500
@@ -68,6 +68,9 @@
 typedef struct _WebKitWebView WebKitWebView;
 typedef struct _WebKitWebViewClass WebKitWebViewClass;
 
+typedef struct _WebKitWebDownload WebKitWebDownload;
+typedef struct _WebKitWebDownloadClass WebKitWebDownloadClass;
+
 G_END_DECLS
 
 #endif
diff -Naur WebKit-r41128/WebKit/gtk/webkit/webkit.h WebKit-r41128-nx/WebKit/gtk/webkit/webkit.h
--- WebKit-r41128/WebKit/gtk/webkit/webkit.h	2009-01-21 00:14:25.000000000 -0500
+++ WebKit-r41128-nx/WebKit/gtk/webkit/webkit.h	2009-02-23 16:01:27.448004190 -0500
@@ -24,6 +24,7 @@
 #include <webkit/webkitversion.h>
 #include <webkit/webkitdefines.h>
 #include <webkit/webkitnetworkrequest.h>
+#include <webkit/webkitwebdownload.h>
 #include <webkit/webkitwebframe.h>
 #include <webkit/webkitwebsettings.h>
 #include <webkit/webkitwebinspector.h>
diff -Naur WebKit-r41128/WebKit/gtk/webkit/webkitprivate.h WebKit-r41128-nx/WebKit/gtk/webkit/webkitprivate.h
--- WebKit-r41128/WebKit/gtk/webkit/webkitprivate.h	2009-01-21 00:14:25.000000000 -0500
+++ WebKit-r41128-nx/WebKit/gtk/webkit/webkitprivate.h	2009-02-23 16:01:27.472007110 -0500
@@ -27,11 +27,14 @@
  * They are using WebCore which musn't be exposed to the outer world.
  */
 
+#include <curl/curl.h>
+
 #include <webkit/webkitdefines.h>
 #include <webkit/webkitwebview.h>
 #include <webkit/webkitwebframe.h>
 #include <webkit/webkitwebpolicydecision.h>
 #include <webkit/webkitwebnavigationaction.h>
+#include <webkit/webkitwebdownload.h>
 #include <webkit/webkitwebsettings.h>
 #include <webkit/webkitwebwindowfeatures.h>
 #include <webkit/webkitwebbackforwardlist.h>
@@ -44,9 +47,13 @@
 #include "InspectorClientGtk.h"
 #include "FrameLoaderClient.h"
 #include "WindowFeatures.h"
+#include "ResourceHandleClient.h"
+#include "ResourceResponse.h"
 
 #include <glib.h>
 
+class DownloadClient;
+
 namespace WebKit {
     WebKitWebView* getViewFromFrame(WebKitWebFrame*);
 
@@ -114,6 +121,20 @@
         gchar* uri;
     };
 
+    #define WEBKIT_WEB_DOWNLOAD_GET_PRIVATE(obj)    (G_TYPE_INSTANCE_GET_PRIVATE((obj), WEBKIT_TYPE_WEB_DOWNLOAD, WebKitWebDownloadPrivate))
+    typedef struct _WebKitWebDownloadPrivate WebKitWebDownloadPrivate;
+    struct _WebKitWebDownloadPrivate {
+        gchar* localUri;
+        gchar* suggestedFilename;
+        guint currentSize;
+        WebKitWebDownloadState state;
+        GIOChannel* outputChannel;
+        DownloadClient* downloadClient;
+        WebKitNetworkRequest* networkRequest;
+        WebCore::ResourceResponse* networkResponse;
+        RefPtr<WebCore::ResourceHandle> resourceHandle;
+    };
+
     PassRefPtr<WebCore::Frame>
     webkit_web_frame_init_with_web_view(WebKitWebView*, WebCore::HTMLFrameOwnerElement*);
 
@@ -144,6 +165,9 @@
     void
     webkit_web_policy_decision_cancel (WebKitWebPolicyDecision* decision);
 
+    WebKitWebDownload*
+    webkit_web_download_new_from_existing_connection(WebCore::ResourceHandle*, WebKitNetworkRequest*, const WebCore::ResourceResponse&);
+
     // FIXME: Move these to webkitwebframe.h once their API has been discussed.
 
     WEBKIT_API GSList*
diff -Naur WebKit-r41128/WebKit/gtk/webkit/webkitwebdownload.cpp WebKit-r41128-nx/WebKit/gtk/webkit/webkitwebdownload.cpp
--- WebKit-r41128/WebKit/gtk/webkit/webkitwebdownload.cpp	1969-12-31 19:00:00.000000000 -0500
+++ WebKit-r41128-nx/WebKit/gtk/webkit/webkitwebdownload.cpp	2009-02-23 16:01:27.496006950 -0500
@@ -0,0 +1,633 @@
+/*
+ * Copyright (C) 2008 Collabora Ltd.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "config.h"
+
+#include "CString.h"
+#include "Noncopyable.h"
+#include "NotImplemented.h"
+#include "ResourceHandle.h"
+#include "ResourceHandleClient.h"
+#include "ResourceRequest.h"
+#include "ResourceResponse.h"
+#include "webkitmarshal.h"
+#include "webkitwebdownload.h"
+#include "webkitprivate.h"
+#include <glib/gstdio.h>
+
+using namespace WebKit;
+using namespace WebCore;
+
+extern "C" {
+
+class DownloadClient : Noncopyable, public WebCore::ResourceHandleClient {
+    public:
+        DownloadClient(WebKitWebDownload*);
+
+        virtual void didReceiveResponse(ResourceHandle*, const ResourceResponse&);
+        virtual void didReceiveData(ResourceHandle*, const char*, int, int);
+        virtual void didFinishLoading(ResourceHandle*);
+        virtual void didFail(ResourceHandle*, const ResourceError&);
+        virtual void wasBlocked(ResourceHandle*);
+        virtual void cannotShowURL(ResourceHandle*);
+
+    private:
+        WebKitWebDownload* m_download;
+};
+
+enum {
+    /* normal signals */
+    STARTED,
+    PROGRESS_UPDATE,
+    FINISHED,
+    ERROR,
+    LAST_SIGNAL
+};
+
+static guint webkit_web_download_signals[LAST_SIGNAL] = { 0, };
+
+enum {
+    PROP_0,
+
+    PROP_NETWORK_REQUEST,
+    PROP_LOCAL_URI,
+    PROP_SUGGESTED_FILENAME,
+    PROP_CURRENT_SIZE,
+    PROP_TOTAL_SIZE,
+};
+
+G_DEFINE_TYPE(WebKitWebDownload, webkit_web_download, G_TYPE_OBJECT);
+
+static void webkit_web_download_finalize(GObject* object)
+{
+    WebKitWebDownload* download = WEBKIT_WEB_DOWNLOAD(object);
+    WebKitWebDownloadPrivate* priv = WEBKIT_WEB_DOWNLOAD_GET_PRIVATE(download);
+
+    /* We don't call webkit_web_download_cancel() because we don't want to emit
+     * signals when finalising an object. */
+    if (priv->resourceHandle) {
+        if (priv->state == WEBKIT_WEB_DOWNLOAD_STATE_STARTED) {
+            priv->resourceHandle->setClient(0);
+            priv->resourceHandle->cancel();
+        }
+        priv->resourceHandle.release();
+    }
+
+    delete priv->downloadClient;
+    delete priv->networkResponse;
+
+    g_free(priv->localUri);
+    g_free(priv->suggestedFilename);
+    if (priv->outputChannel)
+        g_io_channel_unref(priv->outputChannel);
+    g_object_unref(priv->networkRequest);
+
+    G_OBJECT_CLASS(webkit_web_download_parent_class)->finalize(object);
+}
+
+static void webkit_web_download_get_property(GObject* object, guint prop_id, GValue* value, GParamSpec* pspec)
+{
+    WebKitWebDownload* download = WEBKIT_WEB_DOWNLOAD(object);
+
+    switch(prop_id) {
+    case PROP_NETWORK_REQUEST:
+        g_value_set_object(value, webkit_web_download_get_network_request(download));
+        break;
+    case PROP_LOCAL_URI:
+        g_value_set_string(value, webkit_web_download_get_local_uri(download));
+        break;
+    case PROP_SUGGESTED_FILENAME:
+        g_value_set_string(value, webkit_web_download_get_suggested_filename(download));
+        break;
+    case PROP_CURRENT_SIZE:
+        g_value_set_uint64(value, webkit_web_download_get_current_size(download));
+        break;
+    case PROP_TOTAL_SIZE:
+        g_value_set_uint64(value, webkit_web_download_get_total_size(download));
+        break;
+    default:
+        G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
+    }
+}
+
+static void webkit_web_download_set_property(GObject* object, guint prop_id, const GValue* value, GParamSpec *pspec)
+{
+    WebKitWebDownload* download = WEBKIT_WEB_DOWNLOAD(object);
+    WebKitWebDownloadPrivate* priv = WEBKIT_WEB_DOWNLOAD_GET_PRIVATE(download);
+
+    switch(prop_id) {
+    case PROP_NETWORK_REQUEST:
+        priv->networkRequest = (WebKitNetworkRequest*)g_value_dup_object(value);
+        /* This is safe as network-request is a construct only property and suggestedFilename
+         * is initially null. */
+        priv->suggestedFilename = g_path_get_basename(webkit_network_request_get_uri(priv->networkRequest));
+        break;
+    case PROP_LOCAL_URI:
+        webkit_web_download_set_local_uri(download, g_value_get_string(value));
+        break;
+    case PROP_SUGGESTED_FILENAME:
+        webkit_web_download_set_suggested_filename(download, g_value_get_string(value));
+        break;
+    default:
+        G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
+    }
+}
+
+static void webkit_web_download_class_init(WebKitWebDownloadClass* downloadClass)
+{
+    /*
+     * implementations of virtual methods
+     */
+    GObjectClass* objectClass = G_OBJECT_CLASS(downloadClass);
+    objectClass->finalize = webkit_web_download_finalize;
+    objectClass->get_property = webkit_web_download_get_property;
+    objectClass->set_property = webkit_web_download_set_property;
+
+    /**
+     * WebKitWebView::finished:
+     * @download: the object on which the signal is emitted
+     *
+     * The file has been successfully downloaded.
+     */
+    webkit_web_download_signals[FINISHED] = g_signal_new("finished",
+            G_TYPE_FROM_CLASS(downloadClass),
+            (GSignalFlags)(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION),
+            0,
+            NULL,
+            NULL,
+            webkit_marshal_VOID__VOID,
+            G_TYPE_NONE, 0,
+            G_TYPE_NONE);
+
+    /**
+     * WebKitWebView::started:
+     * @download: the object on which the signal is emitted
+     *
+     * The download has started.  Happens just before the first progress-update signal.
+     */
+    webkit_web_download_signals[STARTED] = g_signal_new("started",
+            G_TYPE_FROM_CLASS(downloadClass),
+            (GSignalFlags)(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION),
+            0,
+            NULL,
+            NULL,
+            webkit_marshal_VOID__VOID,
+            G_TYPE_NONE, 0,
+            G_TYPE_NONE);
+
+    /**
+     * WebKitWebView::progress-update:
+     * @download: the object on which the signal is emitted
+     * @current_bytes: the current count of bytes downloaded
+     * @total_bytes: the total bytes count in the downloaded file, aka file size.
+     *  
+     * Indicates progress in the download.
+     */
+    webkit_web_download_signals[PROGRESS_UPDATE] = g_signal_new("progress-update",
+            G_TYPE_FROM_CLASS(downloadClass),
+            (GSignalFlags)(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION),
+            0,
+            NULL,
+            NULL,
+            webkit_marshal_VOID__UINT_UINT,
+            G_TYPE_NONE, 2,
+            G_TYPE_UINT,
+            G_TYPE_UINT);
+
+    /**
+     * WebKitWebView::progress-update:
+     * @download: the object on which the signal is emitted
+     * @current_bytes: the current count of bytes downloaded
+     * @total_bytes: the total bytes count in the downloaded file, aka file size.
+     *  
+     * Indicates progress in the download.
+     */
+    webkit_web_download_signals[ERROR] = g_signal_new("error",
+            G_TYPE_FROM_CLASS(downloadClass),
+            (GSignalFlags)(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION),
+            0,
+            g_signal_accumulator_true_handled,
+            NULL,
+            webkit_marshal_BOOLEAN__INT_INT_STRING,
+            G_TYPE_BOOLEAN, 3,
+            G_TYPE_INT,
+            G_TYPE_INT,
+            G_TYPE_STRING);
+
+    /*
+     * properties
+     */
+    g_object_class_install_property(objectClass,
+                                    PROP_NETWORK_REQUEST,
+                                    g_param_spec_object(
+                                    "network-request",
+                                    "Network Request",
+                                    "The network request for the URI that should be downloaded",
+                                    WEBKIT_TYPE_NETWORK_REQUEST,
+                                    (GParamFlags)(WEBKIT_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)));
+
+    g_object_class_install_property(objectClass,
+                                    PROP_LOCAL_URI,
+                                    g_param_spec_string(
+                                    "local-uri",
+                                    "Local URI",
+                                    "The local URI where to save the file",
+                                    "",
+                                    WEBKIT_PARAM_READWRITE));
+
+    g_object_class_install_property(objectClass,
+                                    PROP_SUGGESTED_FILENAME,
+                                    g_param_spec_string(
+                                    "suggested-filename",
+                                    "Suggested Filename",
+                                    "The filename suggested as default when saving",
+                                    "",
+                                    WEBKIT_PARAM_READWRITE));
+
+    g_object_class_install_property(objectClass,
+                                    PROP_CURRENT_SIZE,
+                                    g_param_spec_uint64(
+                                    "current-size",
+                                    "Current Size",
+                                    "The length of the data already downloaded",
+                                    0, G_MAXUINT64, 0,
+                                    WEBKIT_PARAM_READABLE));
+
+    g_object_class_install_property(objectClass,
+                                    PROP_CURRENT_SIZE,
+                                    g_param_spec_uint64(
+                                    "total-size",
+                                    "Total Size",
+                                    "The total size of the file",
+                                    0, G_MAXUINT64, 0,
+                                    WEBKIT_PARAM_READABLE));
+
+    g_type_class_add_private(downloadClass, sizeof(WebKitWebDownloadPrivate));
+}
+
+static void webkit_web_download_init(WebKitWebDownload* download)
+{
+    WebKitWebDownloadPrivate* priv = WEBKIT_WEB_DOWNLOAD_GET_PRIVATE(download);
+
+    priv->downloadClient = new DownloadClient(download);
+    priv->currentSize = 0;
+    priv->state = WEBKIT_WEB_DOWNLOAD_STATE_CREATED;
+}
+
+WebKitWebDownload* webkit_web_download_new(const gchar* uri)
+{
+    g_return_val_if_fail(uri, 0);
+
+    WebKitNetworkRequest* request = webkit_network_request_new(uri);
+    WebKitWebDownload* download = webkit_web_download_new_from_request(request);
+    g_object_unref(request);
+    return download;
+}
+
+WebKitWebDownload* webkit_web_download_new_from_request(WebKitNetworkRequest* request)
+{
+    g_return_val_if_fail(request, 0);
+
+    WebKitWebDownload* download = WEBKIT_WEB_DOWNLOAD(g_object_new(WEBKIT_TYPE_WEB_DOWNLOAD, "network-request", request, NULL));
+    return download;
+}
+
+// Private function.
+// FIXME Use WebKitNetworkResponse when we have it
+WebKitWebDownload* webkit_web_download_new_from_existing_connection(ResourceHandle* handle, WebKitNetworkRequest* request, const ResourceResponse& response)
+{
+    g_return_val_if_fail(request, 0);
+
+    WebKitWebDownload* download = webkit_web_download_new_from_request (request);
+
+    WebKitWebDownloadPrivate* priv = WEBKIT_WEB_DOWNLOAD_GET_PRIVATE(download);
+    priv->resourceHandle = handle;
+    priv->networkResponse = new ResourceResponse(response);
+
+    return download;
+}
+
+static gboolean webkit_web_download_open_channel_with_tmp_file(WebKitWebDownload* download)
+{
+    gchar* filename;
+    gint fd = g_file_open_tmp("download-XXXXXX", &filename, 0);
+    if (fd < 0)
+        return FALSE;
+
+    gchar* uri = g_filename_to_uri(filename, 0, 0);
+    g_free(filename);
+    if (!uri)
+        return FALSE;
+
+    webkit_web_download_set_local_uri(download, uri);
+    g_free(uri);
+
+    WebKitWebDownloadPrivate* priv = WEBKIT_WEB_DOWNLOAD_GET_PRIVATE(download);
+    priv->outputChannel = g_io_channel_unix_new(fd);
+    if (priv->outputChannel)
+        g_io_channel_set_close_on_unref(priv->outputChannel, TRUE);
+
+    if (priv->outputChannel)
+        g_io_channel_set_encoding(priv->outputChannel, 0, 0);
+
+    return priv->outputChannel != 0;
+}
+
+static gboolean webkit_web_download_open_channel_for_uri(WebKitWebDownload* download, const gchar* uri, gboolean append=FALSE)
+{
+    g_return_val_if_fail(uri, FALSE);
+ 
+    WebKitWebDownloadPrivate* priv = WEBKIT_WEB_DOWNLOAD_GET_PRIVATE(download);
+    gchar* filename = g_filename_from_uri(uri, 0, 0);
+    if (!filename)
+        return FALSE;
+
+    priv->outputChannel = g_io_channel_new_file(filename, append ? "a" : "w", 0);
+    g_free(filename);
+
+    if (priv->outputChannel)
+        g_io_channel_set_encoding(priv->outputChannel, 0, 0);
+
+    return priv->outputChannel != 0;
+}
+
+static void webkit_web_download_close_channel(WebKitWebDownload* download)
+{
+    WebKitWebDownloadPrivate* priv = WEBKIT_WEB_DOWNLOAD_GET_PRIVATE(download);
+    if (priv->outputChannel) {
+        g_io_channel_unref(priv->outputChannel);
+        priv->outputChannel = 0;
+    }
+}
+
+void webkit_web_download_start(WebKitWebDownload* download)
+{    
+    g_return_if_fail(WEBKIT_IS_WEB_DOWNLOAD(download));
+
+    WebKitWebDownloadPrivate* priv = WEBKIT_WEB_DOWNLOAD_GET_PRIVATE(download);
+    g_return_if_fail(priv->state == WEBKIT_WEB_DOWNLOAD_STATE_CREATED);
+
+    if (priv->resourceHandle)
+        priv->resourceHandle->setClient(priv->downloadClient);
+    else {
+        // FIXME use kit(priv->networkRequest) when WebKitNetworkRequest will be finished.
+        ResourceRequest request(webkit_network_request_get_uri(priv->networkRequest));
+        priv->resourceHandle = ResourceHandle::create(request, priv->downloadClient, 0, false, false, false);
+    }
+
+    if (priv->localUri)
+        webkit_web_download_open_channel_for_uri(download, priv->localUri);
+    else
+        webkit_web_download_open_channel_with_tmp_file(download);
+
+    if (!priv->outputChannel) {
+        // FIXME Handle errors.
+        g_warning("Failed to create the output file: %s", priv->localUri);
+        return;
+    }
+}
+
+void webkit_web_download_cancel (WebKitWebDownload* download)
+{
+    g_return_if_fail(WEBKIT_IS_WEB_DOWNLOAD(download));
+
+    WebKitWebDownloadPrivate* priv = WEBKIT_WEB_DOWNLOAD_GET_PRIVATE(download);
+
+    if (priv->resourceHandle)
+        priv->resourceHandle->cancel();
+
+    priv->state = WEBKIT_WEB_DOWNLOAD_STATE_CANCELLED;
+
+    gboolean handled;
+    g_signal_emit_by_name(download, "error", 0, WEBKIT_WEB_DOWNLOAD_ERROR_CANCELLED_BY_USER, "User cancelled the download", &handled);
+}
+
+const gchar* webkit_web_download_get_uri(WebKitWebDownload* download)
+{
+    g_return_val_if_fail(WEBKIT_IS_WEB_DOWNLOAD(download), NULL);
+
+    WebKitWebDownloadPrivate* priv = WEBKIT_WEB_DOWNLOAD_GET_PRIVATE(download);
+    return webkit_network_request_get_uri(priv->networkRequest);
+}
+
+WebKitNetworkRequest* webkit_web_download_get_network_request(WebKitWebDownload* download)
+{
+    g_return_val_if_fail(WEBKIT_IS_WEB_DOWNLOAD(download), NULL);
+
+    WebKitWebDownloadPrivate* priv = WEBKIT_WEB_DOWNLOAD_GET_PRIVATE(download);
+    return priv->networkRequest;
+}
+
+static void webkit_web_download_set_response(WebKitWebDownload* download, const ResourceResponse& response)
+{
+    // FIXME Use WebKitNetworkResponse when it's merged
+    WebKitWebDownloadPrivate* priv = WEBKIT_WEB_DOWNLOAD_GET_PRIVATE(download);
+    priv->networkResponse = new ResourceResponse(response);
+}
+
+const gchar* webkit_web_download_get_suggested_filename(WebKitWebDownload* download)
+{
+    g_return_val_if_fail(WEBKIT_IS_WEB_DOWNLOAD(download), NULL);
+
+    WebKitWebDownloadPrivate* priv = WEBKIT_WEB_DOWNLOAD_GET_PRIVATE(download);
+    return priv->suggestedFilename;
+}
+
+void webkit_web_download_set_suggested_filename(WebKitWebDownload* download, const gchar* filename)
+{
+    g_return_if_fail(WEBKIT_IS_WEB_DOWNLOAD(download));
+    g_return_if_fail(filename);
+
+    WebKitWebDownloadPrivate* priv = WEBKIT_WEB_DOWNLOAD_GET_PRIVATE(download);
+    if (priv->suggestedFilename && !strcmp(priv->suggestedFilename, filename))
+        return;
+
+    g_free(priv->suggestedFilename);
+    priv->suggestedFilename = g_strdup(filename);
+    g_object_notify(G_OBJECT(download), "suggested-filename");
+}
+
+const gchar* webkit_web_download_get_local_uri(WebKitWebDownload* download)
+{   
+    g_return_val_if_fail(WEBKIT_IS_WEB_DOWNLOAD(download), NULL);
+
+    WebKitWebDownloadPrivate* priv = WEBKIT_WEB_DOWNLOAD_GET_PRIVATE(download);
+    return priv->localUri;
+}
+
+void webkit_web_download_set_local_uri(WebKitWebDownload* download, const gchar* localUri)
+{   
+    g_return_if_fail(WEBKIT_IS_WEB_DOWNLOAD(download));
+    g_return_if_fail(localUri);
+
+    WebKitWebDownloadPrivate* priv = WEBKIT_WEB_DOWNLOAD_GET_PRIVATE(download);
+    if (priv->localUri && !strcmp(priv->localUri, localUri))
+        return;
+
+    // FIXME can we have a better check?
+    if (priv->state != WEBKIT_WEB_DOWNLOAD_STATE_CREATED && priv->state != WEBKIT_WEB_DOWNLOAD_STATE_CANCELLED) {
+        ASSERT(priv->localUri);
+
+        gboolean downloading = priv->outputChannel != 0;
+        if (downloading)
+            webkit_web_download_close_channel(download);
+
+        gchar* srcFilename = g_filename_from_uri(priv->localUri, 0, 0);
+        gchar* destFilename = g_filename_from_uri(localUri, 0, 0);
+        if (!srcFilename || !destFilename)
+            return;
+        if (g_rename(srcFilename, destFilename) < 0) {
+            g_warning("Impossible to move the download from %s to %s", srcFilename, destFilename);
+            g_free(srcFilename);
+            g_free(destFilename);
+            return;
+        }
+
+        g_free(srcFilename);
+        g_free(destFilename);
+
+        if (downloading) {
+            if (!webkit_web_download_open_channel_for_uri(download, localUri, TRUE)) {
+                webkit_web_download_cancel(download);
+                return;
+            }
+        }
+    }
+
+    g_free(priv->localUri);
+    priv->localUri = g_strdup(localUri);
+    g_object_notify(G_OBJECT(download), "local-uri");
+}
+
+WebKitWebDownloadState webkit_web_download_get_state (WebKitWebDownload* download)
+{
+    g_return_val_if_fail(WEBKIT_IS_WEB_DOWNLOAD(download), WEBKIT_WEB_DOWNLOAD_STATE_ERROR);
+    
+    WebKitWebDownloadPrivate* priv = WEBKIT_WEB_DOWNLOAD_GET_PRIVATE(download);
+    return priv->state;
+}
+
+// FIXME document that this can be different from expectedContentLength().
+guint64 webkit_web_download_get_total_size (WebKitWebDownload* download)
+{
+    g_return_val_if_fail(WEBKIT_IS_WEB_DOWNLOAD(download), 0);
+    
+    WebKitWebDownloadPrivate* priv = WEBKIT_WEB_DOWNLOAD_GET_PRIVATE(download);
+    if (!priv->networkResponse)
+        return 0;
+
+    return MAX(priv->currentSize, priv->networkResponse->expectedContentLength());
+}
+
+guint64 webkit_web_download_get_current_size (WebKitWebDownload* download)
+{
+    g_return_val_if_fail(WEBKIT_IS_WEB_DOWNLOAD(download), 0);
+
+    WebKitWebDownloadPrivate* priv = WEBKIT_WEB_DOWNLOAD_GET_PRIVATE(download);
+    return priv->currentSize;
+}
+
+static void webkit_web_download_received_data(WebKitWebDownload* download, const gchar* data, int length)
+{
+    WebKitWebDownloadPrivate* priv = WEBKIT_WEB_DOWNLOAD_GET_PRIVATE(download);
+
+    if (priv->currentSize == 0) {
+        priv->state = WEBKIT_WEB_DOWNLOAD_STATE_STARTED;
+        g_signal_emit_by_name(download, "started");
+    }
+
+    ASSERT(priv->outputChannel);
+    /* FIXME Make this async? Note that it's not possible with GIOChannel unless you buffer
+     * the data in memory. */
+    if (g_io_channel_write_chars(priv->outputChannel, data, length, NULL, NULL) != G_IO_STATUS_NORMAL) {
+        // FIXME check errors
+        g_assert_not_reached();
+    }
+
+    priv->currentSize += length;
+    g_object_notify(G_OBJECT(download), "current-size");
+
+    ASSERT(priv->networkResponse);
+    if (priv->currentSize > priv->networkResponse->expectedContentLength())
+        g_object_notify(G_OBJECT(download), "total-size");
+
+    /* FIXME throttle the number of updates?
+     * should we remove the previous g_object_notify()s if we are going to throttle
+     * the progress updates? */
+    g_signal_emit_by_name(download, "progress-update", (guint)priv->currentSize, (guint)webkit_web_download_get_total_size(download));
+}
+
+static void webkit_web_download_finished_loading(WebKitWebDownload* download)
+{
+    webkit_web_download_close_channel(download);
+
+    WebKitWebDownloadPrivate* priv = WEBKIT_WEB_DOWNLOAD_GET_PRIVATE(download);
+    priv->state = WEBKIT_WEB_DOWNLOAD_STATE_FINISHED;
+    g_signal_emit_by_name(download, "finished");
+}
+
+static void webkit_web_download_error(WebKitWebDownload* download, const ResourceError& error)
+{
+    webkit_web_download_close_channel(download);
+
+    WebKitWebDownloadPrivate* priv = WEBKIT_WEB_DOWNLOAD_GET_PRIVATE(download);
+    priv->state = WEBKIT_WEB_DOWNLOAD_STATE_ERROR;
+
+    gboolean handled;
+    g_signal_emit_by_name(download, "error", 0, WEBKIT_WEB_DOWNLOAD_ERROR_NETWORK, error.localizedDescription().utf8().data(), &handled);
+}
+
+DownloadClient::DownloadClient(WebKitWebDownload* download)
+    : m_download(download)
+{
+}
+
+void DownloadClient::didReceiveResponse(ResourceHandle*, const ResourceResponse& response)
+{
+    webkit_web_download_set_response(m_download, response);
+}
+
+void DownloadClient::didReceiveData(ResourceHandle*, const char* data, int length, int lengthReceived)
+{
+    webkit_web_download_received_data(m_download, data, length);
+}
+
+void DownloadClient::didFinishLoading(ResourceHandle*)
+{
+    webkit_web_download_finished_loading(m_download);
+}
+
+void DownloadClient::didFail(ResourceHandle*, const ResourceError& error)
+{
+    webkit_web_download_error(m_download, error);
+}
+
+void DownloadClient::wasBlocked(ResourceHandle*)
+{
+    // FIXME when we have the new frame loader signals and error handling.
+    notImplemented();
+}
+
+void DownloadClient::cannotShowURL(ResourceHandle*)
+{
+    // FIXME when we have the new frame loader signals and error handling.
+    notImplemented();
+}
+
+}
diff -Naur WebKit-r41128/WebKit/gtk/webkit/webkitwebdownload.h WebKit-r41128-nx/WebKit/gtk/webkit/webkitwebdownload.h
--- WebKit-r41128/WebKit/gtk/webkit/webkitwebdownload.h	1969-12-31 19:00:00.000000000 -0500
+++ WebKit-r41128-nx/WebKit/gtk/webkit/webkitwebdownload.h	2009-02-23 16:01:27.523248550 -0500
@@ -0,0 +1,103 @@
+/*
+ * Copyright (C) 2008 Collabora Ltd.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef WEBKIT_WEB_DOWNLOAD_H
+#define WEBKIT_WEB_DOWNLOAD_H
+
+#include <glib-object.h>
+
+#include <webkit/webkitdefines.h>
+
+G_BEGIN_DECLS
+
+#define WEBKIT_TYPE_WEB_DOWNLOAD            (webkit_web_download_get_type())
+#define WEBKIT_WEB_DOWNLOAD(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), WEBKIT_TYPE_WEB_DOWNLOAD, WebKitWebDownload))
+#define WEBKIT_WEB_DOWNLOAD_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass),  WEBKIT_TYPE_WEB_DOWNLOAD, WebKitWebDownloadClass))
+#define WEBKIT_IS_WEB_DOWNLOAD(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), WEBKIT_TYPE_WEB_DOWNLOAD))
+#define WEBKIT_IS_WEB_DOWNLOAD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),  WEBKIT_TYPE_WEB_DOWNLOAD))
+#define WEBKIT_WEB_DOWNLOAD_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj),  WEBKIT_TYPE_WEB_DOWNLOAD, WebKitWebDownloadClass))
+
+typedef enum {    
+    WEBKIT_WEB_DOWNLOAD_STATE_ERROR = -1,
+    WEBKIT_WEB_DOWNLOAD_STATE_CREATED = 0,
+    WEBKIT_WEB_DOWNLOAD_STATE_STARTED,
+    WEBKIT_WEB_DOWNLOAD_STATE_CANCELLED,
+    WEBKIT_WEB_DOWNLOAD_STATE_FINISHED
+} WebKitWebDownloadState;
+
+typedef enum {    
+    WEBKIT_WEB_DOWNLOAD_ERROR_CANCELLED_BY_USER,
+    WEBKIT_WEB_DOWNLOAD_ERROR_NETWORK
+} WebKitWebDownloadError;
+
+struct _WebKitWebDownload {
+    GObject parent;
+};
+
+struct _WebKitWebDownloadClass {
+    GObjectClass parent;
+};
+
+WEBKIT_API GType
+webkit_web_download_get_type                    (void);
+
+WEBKIT_API WebKitWebDownload *
+webkit_web_download_new                         (const gchar *uri);
+
+WEBKIT_API WebKitWebDownload *
+webkit_web_download_new_from_request            (WebKitNetworkRequest *request);
+
+WEBKIT_API void
+webkit_web_download_start                       (WebKitWebDownload    *download);
+
+WEBKIT_API void
+webkit_web_download_cancel                      (WebKitWebDownload    *download);
+
+WEBKIT_API const gchar*
+webkit_web_download_get_uri                     (WebKitWebDownload    *download);
+
+WEBKIT_API WebKitNetworkRequest*
+webkit_web_download_get_network_request         (WebKitWebDownload    *download);
+
+WEBKIT_API const gchar*
+webkit_web_download_get_suggested_filename      (WebKitWebDownload    *download);
+
+WEBKIT_API void
+webkit_web_download_set_suggested_filename      (WebKitWebDownload    *download,
+                                                 const gchar          *filename);
+
+WEBKIT_API const gchar*
+webkit_web_download_get_local_uri               (WebKitWebDownload    *download);
+
+WEBKIT_API void
+webkit_web_download_set_local_uri               (WebKitWebDownload    *download,
+                                                 const gchar          *local_uri);
+
+WEBKIT_API guint64
+webkit_web_download_get_total_size              (WebKitWebDownload    *download);
+
+WEBKIT_API guint64
+webkit_web_download_get_current_size            (WebKitWebDownload    *download);
+
+WEBKIT_API WebKitWebDownloadState
+webkit_web_download_get_state                   (WebKitWebDownload    *download);
+
+G_END_DECLS
+
+#endif
diff -Naur WebKit-r41128/WebKit/gtk/webkit/webkitwebview.cpp WebKit-r41128-nx/WebKit/gtk/webkit/webkitwebview.cpp
--- WebKit-r41128/WebKit/gtk/webkit/webkitwebview.cpp	2009-02-15 03:48:54.000000000 -0500
+++ WebKit-r41128-nx/WebKit/gtk/webkit/webkitwebview.cpp	2009-02-25 19:01:33.377006750 -0500
@@ -25,6 +25,7 @@
 
 #include "config.h"
 
+#include "webkitwebdownload.h"
 #include "webkitwebview.h"
 #include "webkitenumtypes.h"
 #include "webkitmarshal.h"
@@ -49,6 +50,7 @@
 #include "EventHandler.h"
 #include "FloatQuad.h"
 #include "FocusController.h"
+#include "FloatQuad.h"
 #include "FrameLoaderTypes.h"
 #include "HitTestRequest.h"
 #include "HitTestResult.h"
@@ -111,6 +113,7 @@
     NAVIGATION_REQUESTED,
     NAVIGATION_POLICY_DECISION_REQUESTED,
     MIME_TYPE_POLICY_DECISION_REQUESTED,
+    REQUEST_POLICY_DECISION_REQUESTED,
     CREATE_WEB_VIEW,
     WEB_VIEW_READY,
     WINDOW_OBJECT_CLEARED,
@@ -132,6 +135,7 @@
     COPY_CLIPBOARD,
     PASTE_CLIPBOARD,
     CUT_CLIPBOARD,
+    DOWNLOAD_CREATED,
     LAST_SIGNAL
 };
 
@@ -234,14 +238,14 @@
         start.getInlineBoxAndOffset(DOWNSTREAM, startInlineBox, startCaretOffset);
         IntRect startCaretRect = renderer->localCaretRect(startInlineBox, startCaretOffset, &extraWidthToEndOfLine);
         if (startCaretRect != IntRect())
-            startCaretRect = renderer->localToAbsoluteQuad(FloatRect(startCaretRect)).enclosingBoundingBox();
+            startCaretRect = renderer->localToAbsoluteQuad(FloatQuad(startCaretRect)).enclosingBoundingBox();
 
         InlineBox* endInlineBox;
         int endCaretOffset;
         end.getInlineBoxAndOffset(UPSTREAM, endInlineBox, endCaretOffset);
         IntRect endCaretRect = renderer->localCaretRect(endInlineBox, endCaretOffset);
         if (endCaretRect != IntRect())
-            endCaretRect = renderer->localToAbsoluteQuad(FloatRect(endCaretRect)).enclosingBoundingBox();
+            endCaretRect = renderer->localToAbsoluteQuad(FloatQuad(endCaretRect)).enclosingBoundingBox();
 
         IntRect firstRect;
         if (startCaretRect.y() == endCaretRect.y())
@@ -490,6 +494,8 @@
     if (focusedFrame && focusedFrame->editor()->canEdit()) {
 #ifdef MAEMO_CHANGES
         WebKitWebViewPrivate* priv = webView->priv;
+	if (focusedFrame->document()->useSecureKeyboardEntryWhenActive())
+	    g_object_set(G_OBJECT(priv->imContext), "hildon_input_mode", 0x20000000);
         hildon_gtk_im_context_filter_event(priv->imContext, (GdkEvent*)event);
 #endif
     }
@@ -810,6 +816,13 @@
     frame->editor()->command("Paste").execute();
 }
 
+static gboolean webkit_web_view_real_download_created(WebKitWebView* web_view, WebKitWebDownload* download)
+{
+    webkit_web_download_cancel(download);  
+    // Return false to indicate it wasn't handled therefore the download is deleted
+    return FALSE;
+}
+
 static void webkit_web_view_dispose(GObject* object)
 {
     WebKitWebView* webView = WEBKIT_WEB_VIEW(object);
@@ -1056,6 +1069,18 @@
             G_TYPE_STRING,
             WEBKIT_TYPE_WEB_POLICY_DECISION);
 
+    webkit_web_view_signals[REQUEST_POLICY_DECISION_REQUESTED] = g_signal_new("request-policy-decision-requested",
+            G_TYPE_FROM_CLASS(webViewClass),
+            (GSignalFlags)(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION),
+            0,
+            g_signal_accumulator_true_handled,
+            NULL,
+            webkit_marshal_BOOLEAN__OBJECT_OBJECT_STRING,
+            G_TYPE_BOOLEAN, 3,
+            WEBKIT_TYPE_WEB_FRAME,
+            G_TYPE_STRING,
+            WEBKIT_TYPE_NETWORK_REQUEST);
+
     /**
      * WebKitWebView::window-object-cleared:
      * @web_view: the object on which the signal is emitted
@@ -1083,6 +1108,24 @@
             G_TYPE_POINTER,
             G_TYPE_POINTER);
 
+     /**
+     * WebKitWebView::download-created:
+     * @web_view: the object on which the signal is emitted
+     * @download: the message text
+     * @return: TRUE if the download was handled, otherwise it'll be cancelled.
+     *
+     * A new Download has been created
+     */
+    webkit_web_view_signals[DOWNLOAD_CREATED] = g_signal_new("download-created",
+            G_TYPE_FROM_CLASS(webViewClass),
+            (GSignalFlags)(G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION),
+            G_STRUCT_OFFSET(WebKitWebViewClass, download_created),
+            g_signal_accumulator_true_handled,
+            NULL,
+            webkit_marshal_BOOLEAN__OBJECT,
+            G_TYPE_BOOLEAN, 1,
+            G_TYPE_OBJECT);
+
     /**
      * WebKitWebView::load-started:
      * @web_view: the object on which the signal is emitted
@@ -1392,6 +1435,7 @@
     webViewClass->cut_clipboard = webkit_web_view_real_cut_clipboard;
     webViewClass->copy_clipboard = webkit_web_view_real_copy_clipboard;
     webViewClass->paste_clipboard = webkit_web_view_real_paste_clipboard;
+    webViewClass->download_created = webkit_web_view_real_download_created;
 
     GObjectClass* objectClass = G_OBJECT_CLASS(webViewClass);
     objectClass->dispose = webkit_web_view_dispose;
@@ -1870,6 +1914,33 @@
 }
 
 /**
+ * webkit_web_view_inspect:
+ * @web_view: a #WebKitWebView
+ *
+ * Activates the #WebKitWebInspector associated with the
+ * #WebKitWebView. The inspector is started with the document
+ * node of the currently focused frame, or the main frame of
+ * the #WebKitWebView.
+ *
+ * Since: 1.0.3
+ */
+void webkit_web_view_inspect(WebKitWebView* webView)
+{
+    g_return_if_fail(WEBKIT_IS_WEB_VIEW(webView));
+
+    Frame* frame = core(webView)->focusController()->focusedOrMainFrame();
+
+    core(webView)->inspectorController()->inspect(frame->document());
+}
+
+void webkit_web_view_menu_popup(WebKitWebView* webView)
+{
+    g_return_if_fail(WEBKIT_IS_WEB_VIEW(webView));
+
+    webkit_web_view_popup_menu_handler(GTK_WIDGET(webView));
+}
+
+/**
  * webkit_web_view_get_window_features
  * @web_view: a #WebKitWebView
  *
diff -Naur WebKit-r41128/WebKit/gtk/webkit/webkitwebview.h WebKit-r41128-nx/WebKit/gtk/webkit/webkitwebview.h
--- WebKit-r41128/WebKit/gtk/webkit/webkitwebview.h	2009-02-15 03:48:54.000000000 -0500
+++ WebKit-r41128-nx/WebKit/gtk/webkit/webkitwebview.h	2009-02-25 18:52:48.232005950 -0500
@@ -102,6 +102,8 @@
     void                       (* cut_clipboard)          (WebKitWebView        *web_view);
     void                       (* copy_clipboard)         (WebKitWebView        *web_view);
     void                       (* paste_clipboard)        (WebKitWebView        *web_view);
+    gboolean                   (* download_created)       (WebKitWebView        *web_view,
+                                                           WebKitWebDownload    *download);
 
     /*
      * internal
@@ -270,6 +272,9 @@
 WEBKIT_API WebKitWebInspector *
 webkit_web_view_get_inspector                   (WebKitWebView        *web_view);
 
+WEBKIT_API void
+webkit_web_view_inspect                         (WebKitWebView        *web_view);
+
 WEBKIT_API WebKitWebWindowFeatures*
 webkit_web_view_get_window_features             (WebKitWebView        *web_view);
 
@@ -304,6 +309,9 @@
 webkit_web_view_set_full_content_zoom           (WebKitWebView        *web_view,
                                                  gboolean              full_content_zoom);
 
+WEBKIT_API void 
+webkit_web_view_menu_popup						(WebKitWebView        *web_view);
+
 G_END_DECLS
 
 #endif
diff -Naur WebKit-r41128/WebKitTools/DumpRenderTree/gtk/DumpRenderTree.cpp WebKit-r41128-nx/WebKitTools/DumpRenderTree/gtk/DumpRenderTree.cpp
--- WebKit-r41128/WebKitTools/DumpRenderTree/gtk/DumpRenderTree.cpp	2009-01-21 00:14:31.000000000 -0500
+++ WebKit-r41128-nx/WebKitTools/DumpRenderTree/gtk/DumpRenderTree.cpp	2009-02-23 16:01:27.615503310 -0500
@@ -348,7 +348,7 @@
 
 int main(int argc, char* argv[])
 {
-    g_thread_init(NULL);
+//    g_thread_init(NULL);
     gtk_init(&argc, &argv);
 
     struct option options[] = {
diff -Naur WebKit-r41128/WebKitTools/DumpRenderTree/LayoutTestController.cpp WebKit-r41128-nx/WebKitTools/DumpRenderTree/LayoutTestController.cpp
--- WebKit-r41128/WebKitTools/DumpRenderTree/LayoutTestController.cpp	2009-02-15 03:48:56.000000000 -0500
+++ WebKit-r41128-nx/WebKitTools/DumpRenderTree/LayoutTestController.cpp	2009-02-23 16:01:27.632007390 -0500
@@ -734,7 +734,7 @@
         return JSValueMakeUndefined(context);
 
     LayoutTestController* controller = reinterpret_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
-    return JSValueMakeNumber(context, controller->numberOfActiveAnimations());
+    return JSValueMakeUndefined(context);//JSValueMakeNumber(context, controller->numberOfActiveAnimations());
 }
 
 // Static Values
diff -Naur WebKit-r41128/WebKitTools/GtkLauncher/main.c WebKit-r41128-nx/WebKitTools/GtkLauncher/main.c
--- WebKit-r41128/WebKitTools/GtkLauncher/main.c	2009-01-27 02:55:35.000000000 -0500
+++ WebKit-r41128-nx/WebKitTools/GtkLauncher/main.c	2009-02-23 16:01:27.656007070 -0500
@@ -1,6 +1,7 @@
 /*
  * Copyright (C) 2006, 2007 Apple Inc.
  * Copyright (C) 2007 Alp Toker <alp@atoker.com>
+ * Copyright (C) 2008 Collabora, Ltd.  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -106,6 +107,107 @@
     webkit_web_view_go_forward (web_view);
 }
 
+static gboolean
+download_error_cb (WebKitWebDownload* download, guint domain, WebKitWebDownloadError error, const gchar * message, gpointer data)
+{
+    g_warning("Download Error: %s\n", message);
+    return TRUE;
+}
+
+static void
+download_finished_cb (WebKitWebDownload* download, gpointer data)
+{
+    gtk_button_set_label(GTK_BUTTON(data), GTK_STOCK_CLOSE);
+}
+
+static void
+download_progress_cb (WebKitWebDownload* download, guint current_bytes, guint total_bytes, gpointer progress_bar)
+{
+    if(GTK_IS_PROGRESS_BAR(progress_bar))
+    {
+        gdouble progress = (double)current_bytes/total_bytes;
+        gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(progress_bar), progress);
+    }
+}
+
+static void
+download_button_cb (GtkButton* button, WebKitWebDownload* download)
+{
+    if (webkit_web_download_get_state(download) == WEBKIT_WEB_DOWNLOAD_STATE_FINISHED ||
+        webkit_web_download_get_state(download) == WEBKIT_WEB_DOWNLOAD_STATE_ERROR) {
+        GdkWindow* window = gtk_widget_get_parent_window(GTK_WIDGET(button));
+        gdk_window_hide(window);
+        g_object_unref(download);
+    } else 
+        webkit_web_download_cancel(download);
+}
+
+static void
+save_dialog_response_cb (GtkFileChooser *file_chooser, gint response, WebKitWebDownload* download)
+{
+    if (response == GTK_RESPONSE_OK) {
+        webkit_web_download_set_local_uri(download, gtk_file_chooser_get_uri (GTK_FILE_CHOOSER (file_chooser)));
+    } /*else {
+        gtk_widget_destroy (window);
+        handled = FALSE;
+    }*/
+
+    gtk_widget_destroy (file_chooser);
+}
+      
+static gboolean
+download_created_cb (WebKitWebView* view, WebKitWebDownload* download, gpointer data)
+{
+    gboolean handled = TRUE;
+    GtkWidget* window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+    gtk_window_set_title(GTK_WINDOW(window), "Download");
+    
+    GtkWidget* vbox = gtk_vbox_new(TRUE, 0);
+    gtk_container_set_border_width(GTK_CONTAINER(vbox), 5);
+    
+    GtkWidget* uri_label = gtk_label_new(NULL);
+    gtk_label_set_single_line_mode(GTK_LABEL(uri_label), FALSE);
+    gtk_label_set_markup(GTK_LABEL(uri_label), 
+        g_strconcat("<b>URI:</b> ", 
+            webkit_web_download_get_uri(download), 
+            "\n<b>Filename:</b> ",
+            webkit_web_download_get_suggested_filename(download),
+            NULL)
+        );
+    gtk_label_set_justify(GTK_LABEL(uri_label), GTK_JUSTIFY_LEFT);
+    gtk_box_pack_start(GTK_BOX(vbox), uri_label, FALSE, FALSE, 0);
+
+    GtkWidget* progress_bar = gtk_progress_bar_new();         
+    gtk_progress_bar_set_orientation(GTK_PROGRESS_BAR(progress_bar), GTK_PROGRESS_LEFT_TO_RIGHT);
+    gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(progress_bar), 0.0); 
+    gtk_box_pack_start(GTK_BOX(vbox), progress_bar, FALSE, FALSE, 0);
+
+    GtkWidget* button_box = gtk_hbutton_box_new();
+    gtk_button_box_set_layout(GTK_BUTTON_BOX(button_box), GTK_BUTTONBOX_END);
+    GtkWidget* button = gtk_button_new_from_stock(GTK_STOCK_CANCEL);
+    g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK (download_button_cb), download);
+    gtk_box_pack_start(GTK_BOX(button_box), button, FALSE, FALSE, 0);
+    gtk_box_pack_start(GTK_BOX(vbox), button_box, FALSE, FALSE, 0);
+    
+    gtk_container_add(GTK_CONTAINER(window), vbox);
+    
+    gtk_widget_show_all(GTK_WIDGET(window));
+    
+    GtkWidget* file_chooser = gtk_file_chooser_dialog_new("Select destination...", GTK_WINDOW(window), GTK_FILE_CHOOSER_ACTION_SAVE, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_SAVE, GTK_RESPONSE_OK, NULL);
+    gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (file_chooser), webkit_web_download_get_suggested_filename (download));
+    g_signal_connect (G_OBJECT (file_chooser), "response", G_CALLBACK (save_dialog_response_cb), download);
+    gtk_widget_show (file_chooser);
+
+    g_signal_connect (G_OBJECT (download), "finished", G_CALLBACK (download_finished_cb), button);
+    g_signal_connect (G_OBJECT (download), "progress-update", G_CALLBACK (download_progress_cb), progress_bar);
+    g_signal_connect (G_OBJECT (download), "error", G_CALLBACK (download_error_cb), window);
+
+    if (handled)
+        g_object_ref(download);
+
+    return handled;
+}
+
 static GtkWidget*
 create_browser ()
 {
@@ -119,6 +221,7 @@
     g_signal_connect (G_OBJECT (web_view), "load-progress-changed", G_CALLBACK (progress_change_cb), web_view);
     g_signal_connect (G_OBJECT (web_view), "load-committed", G_CALLBACK (load_commit_cb), web_view);
     g_signal_connect (G_OBJECT (web_view), "hovering-over-link", G_CALLBACK (link_hover_cb), web_view);
+    g_signal_connect (G_OBJECT (web_view), "download-created", G_CALLBACK (download_created_cb), web_view);
 
     return scrolled_window;
 }
@@ -183,8 +286,8 @@
 main (int argc, char* argv[])
 {
     gtk_init (&argc, &argv);
-    if (!g_thread_supported ())
-        g_thread_init (NULL);
+/*    if (!g_thread_supported ())
+        g_thread_init (NULL);*/
 
     GtkWidget* vbox = gtk_vbox_new (FALSE, 0);
     gtk_box_pack_start (GTK_BOX (vbox), create_toolbar (), FALSE, FALSE, 0);
