[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.19-706-ge5415e9

eric at webkit.org eric at webkit.org
Thu Feb 4 21:29:39 UTC 2010


The following commit has been merged in the webkit-1.1 branch:
commit b7091c7b24ae5a59ad2b633bc1e4f76f24fcaf8a
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Jan 27 18:19:39 2010 +0000

    2010-01-27  Dominik Röttsches  <dominik.roettsches at access-company.com>
    
            Reviewed by Xan Lopez.
    
            [Gtk] For removing ICU, implement IDN support by means of libidn
            https://bugs.webkit.org/show_bug.cgi?id=31470
    
            In order to avoid a new dependency,
            IDN support now based on GLib for the GLib unicode backend.
    
            * platform/KURL.cpp:
            (WebCore::appendEncodedHostname):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53940 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index c2ab758..08db1ff 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,16 @@
+2010-01-27  Dominik Röttsches  <dominik.roettsches at access-company.com>
+
+        Reviewed by Xan Lopez.
+
+        [Gtk] For removing ICU, implement IDN support by means of libidn
+        https://bugs.webkit.org/show_bug.cgi?id=31470
+
+        In order to avoid a new dependency, 
+        IDN support now based on GLib for the GLib unicode backend.
+
+        * platform/KURL.cpp:
+        (WebCore::appendEncodedHostname):
+
 2010-01-27  Simon Hausmann  <simon.hausmann at nokia.com>
 
         Reviewed by Kenneth Rohde Christiansen.
diff --git a/WebCore/platform/KURL.cpp b/WebCore/platform/KURL.cpp
index 733b943..54fbb6c 100644
--- a/WebCore/platform/KURL.cpp
+++ b/WebCore/platform/KURL.cpp
@@ -38,6 +38,9 @@
 #include <unicode/uidna.h>
 #elif USE(QT4_UNICODE)
 #include <QUrl>
+#elif USE(GLIB_UNICODE)
+#include <glib.h>
+#include <wtf/gtk/GOwnPtr.h>
 #endif
 
 #include <stdio.h>
@@ -1410,6 +1413,19 @@ static void appendEncodedHostname(UCharBuffer& buffer, const UChar* str, unsigne
 #elif USE(QT4_UNICODE)
     QByteArray result = QUrl::toAce(String(str, strLen));
     buffer.append(result.constData(), result.length());
+#elif USE(GLIB_UNICODE)
+    GOwnPtr<gchar> utf8Hostname;
+    GOwnPtr<GError> utf8Err;
+    utf8Hostname.set(g_utf16_to_utf8(str, strLen, 0, 0, &utf8Err.outPtr()));
+    if (utf8Err)
+        return;
+
+    GOwnPtr<gchar> encodedHostname;
+    encodedHostname.set(g_hostname_to_ascii(utf8Hostname.get()));
+    if (!encodedHostname) 
+        return;
+
+    buffer.append(encodedHostname.get(), strlen(encodedHostname.get()));
 #endif
 }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list