Changeset 53940 in webkit


Ignore:
Timestamp:
Jan 27, 2010 10:19:39 AM (14 years ago)
Author:
eric@webkit.org
Message:

2010-01-27 Dominik Röttsches <dominik.roettsches@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):
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r53935 r53940  
     12010-01-27  Dominik Röttsches  <dominik.roettsches@access-company.com>
     2
     3        Reviewed by Xan Lopez.
     4
     5        [Gtk] For removing ICU, implement IDN support by means of libidn
     6        https://bugs.webkit.org/show_bug.cgi?id=31470
     7
     8        In order to avoid a new dependency,
     9        IDN support now based on GLib for the GLib unicode backend.
     10
     11        * platform/KURL.cpp:
     12        (WebCore::appendEncodedHostname):
     13
    1142010-01-27  Simon Hausmann  <simon.hausmann@nokia.com>
    215
  • trunk/WebCore/platform/KURL.cpp

    r53712 r53940  
    3939#elif USE(QT4_UNICODE)
    4040#include <QUrl>
     41#elif USE(GLIB_UNICODE)
     42#include <glib.h>
     43#include <wtf/gtk/GOwnPtr.h>
    4144#endif
    4245
     
    14111414    QByteArray result = QUrl::toAce(String(str, strLen));
    14121415    buffer.append(result.constData(), result.length());
     1416#elif USE(GLIB_UNICODE)
     1417    GOwnPtr<gchar> utf8Hostname;
     1418    GOwnPtr<GError> utf8Err;
     1419    utf8Hostname.set(g_utf16_to_utf8(str, strLen, 0, 0, &utf8Err.outPtr()));
     1420    if (utf8Err)
     1421        return;
     1422
     1423    GOwnPtr<gchar> encodedHostname;
     1424    encodedHostname.set(g_hostname_to_ascii(utf8Hostname.get()));
     1425    if (!encodedHostname)
     1426        return;
     1427
     1428    buffer.append(encodedHostname.get(), strlen(encodedHostname.get()));
    14131429#endif
    14141430}
Note: See TracChangeset for help on using the changeset viewer.