Changeset 108191 in webkit


Ignore:
Timestamp:
Feb 19, 2012 11:16:28 AM (12 years ago)
Author:
commit-queue@webkit.org
Message:

[GTK] Fix build on platforms where UChar is wchar_t
https://bugs.webkit.org/show_bug.cgi?id=78996

Patch by Kalev Lember <kalevlember@gmail.com> on 2012-02-19
Reviewed by Martin Robinson.

The ICU backend defines UChar as wchar_t for platforms where wchar_t is
16 bits wide, e.g. win32.

  • platform/graphics/pango/FontPango.cpp:

(WebCore::utf16ToUtf8): Use reinterpret_cast instead of static_cast.

  • platform/gtk/GtkPopupMenu.cpp:

(WebCore::GtkPopupMenu::typeAheadFind): Ditto.

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r108187 r108191  
     12012-02-19  Kalev Lember  <kalevlember@gmail.com>
     2
     3        [GTK] Fix build on platforms where UChar is wchar_t
     4        https://bugs.webkit.org/show_bug.cgi?id=78996
     5
     6        Reviewed by Martin Robinson.
     7
     8        The ICU backend defines UChar as wchar_t for platforms where wchar_t is
     9        16 bits wide, e.g. win32.
     10
     11        * platform/graphics/pango/FontPango.cpp:
     12        (WebCore::utf16ToUtf8): Use reinterpret_cast instead of static_cast.
     13        * platform/gtk/GtkPopupMenu.cpp:
     14        (WebCore::GtkPopupMenu::typeAheadFind): Ditto.
     15
    1162012-02-19  Carlos Garcia Campos  <cgarcia@igalia.com>
    217
  • trunk/Source/WebCore/platform/graphics/pango/FontPango.cpp

    r94876 r108191  
    137137    gchar* utf8Text;
    138138    glong itemsWritten;
    139     utf8Text = g_utf16_to_utf8(static_cast<const gunichar2*>(aText), aLength, 0, &itemsWritten, 0);
     139    utf8Text = g_utf16_to_utf8(reinterpret_cast<const gunichar2*>(aText), aLength, 0, &itemsWritten, 0);
    140140    length = itemsWritten;
    141141
  • trunk/Source/WebCore/platform/gtk/GtkPopupMenu.cpp

    r100470 r108191  
    179179    bool repeatingCharacter = unicodeCharacter != m_previousKeyEventCharacter;
    180180    if (event->time - m_previousKeyEventTimestamp > gSearchTimeoutMs)
    181         m_currentSearchString = String(static_cast<UChar*>(utf16String.get()), charactersWritten);
     181        m_currentSearchString = String(reinterpret_cast<UChar*>(utf16String.get()), charactersWritten);
    182182    else if (repeatingCharacter)
    183         m_currentSearchString.append(String(static_cast<UChar*>(utf16String.get()), charactersWritten));
     183        m_currentSearchString.append(String(reinterpret_cast<UChar*>(utf16String.get()), charactersWritten));
    184184
    185185    m_previousKeyEventTimestamp = event->time;
Note: See TracChangeset for help on using the changeset viewer.