Changeset 50244 in webkit
- Timestamp:
- Oct 28, 2009 3:42:42 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r50237 r50244 1 2009-10-28 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> 2 3 Reviewed by Xan Lopez. 4 5 [GTK] Fails new test fast/js/navigator-language.html 6 https://bugs.webkit.org/show_bug.cgi?id=30440 7 8 Unskip the test that now passes. 9 10 * platform/gtk/Skipped: 11 1 12 2009-10-28 Jonathan Dixon <joth@chromium.org> 2 13 -
trunk/LayoutTests/platform/gtk/Skipped
r50190 r50244 1460 1460 fast/events/drag-and-drop.html 1461 1461 fast/events/drag-parent-node.html 1462 1463 # https://bugs.webkit.org/show_bug.cgi?id=304401464 fast/js/navigator-language.html1465 1462 1466 1463 fast/xmlhttprequest/null-document-xmlhttprequest-open.html -
trunk/WebCore/ChangeLog
r50242 r50244 1 2009-10-28 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> 2 3 Reviewed by Xan Lopez. 4 5 [GTK] Fails new test fast/js/navigator-language.html 6 https://bugs.webkit.org/show_bug.cgi?id=30440 7 8 Reimplement WebCore::defaultLanguage to account for changes in 9 locale done by setLocale. 10 11 Already existing test: fast/js/navigator-language.html 12 13 * platform/gtk/Language.cpp: 14 (WebCore::defaultLanguage): 15 1 16 2009-10-28 Eric Carlson <eric.carlson@apple.com> 2 17 -
trunk/WebCore/platform/gtk/Language.cpp
r46333 r50244 22 22 23 23 #include "CString.h" 24 #include "GOwnPtr.h" 24 25 #include "PlatformString.h" 25 26 26 27 #include <gtk/gtk.h> 28 #include <locale.h> 27 29 #include <pango/pango.h> 28 30 29 31 namespace WebCore { 30 32 33 // Using pango_language_get_default() here is not an option, because 34 // it doesn't support changing the locale in runtime, so it returns 35 // always the same value. 31 36 String defaultLanguage() 32 37 { 33 return pango_language_to_string(gtk_get_default_language()); 38 char* localeDefault = setlocale(LC_CTYPE, NULL); 39 40 if (!localeDefault) 41 return String("c"); 42 43 GOwnPtr<gchar> normalizedDefault(g_ascii_strdown(localeDefault, -1)); 44 char* ptr = strchr(normalizedDefault.get(), '_'); 45 46 if(ptr) 47 *ptr = '-'; 48 49 ptr = strchr(normalizedDefault.get(), '.'); 50 51 if(ptr) 52 *ptr = '\0'; 53 54 return String(normalizedDefault.get()); 34 55 } 35 56
Note: See TracChangeset
for help on using the changeset viewer.