[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373
kov at webkit.org
kov at webkit.org
Wed Apr 7 23:13:42 UTC 2010
The following commit has been merged in the webkit-1.2 branch:
commit 434c6cc30cf5107643bba3a8d564b3294656a7a3
Author: kov at webkit.org <kov at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Oct 28 22:42:42 2009 +0000
LayoutTests
Reviewed by Xan Lopez.
[GTK] Fails new test fast/js/navigator-language.html
https://bugs.webkit.org/show_bug.cgi?id=30440
Unskip the test that now passes.
* platform/gtk/Skipped:
WebCore
Reviewed by Xan Lopez.
[GTK] Fails new test fast/js/navigator-language.html
https://bugs.webkit.org/show_bug.cgi?id=30440
Reimplement WebCore::defaultLanguage to account for changes in
locale done by setLocale.
Already existing test: fast/js/navigator-language.html
* platform/gtk/Language.cpp:
(WebCore::defaultLanguage):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50244 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 8dfbb78..304e447 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,14 @@
+2009-10-28 Gustavo Noronha Silva <gustavo.noronha at collabora.co.uk>
+
+ Reviewed by Xan Lopez.
+
+ [GTK] Fails new test fast/js/navigator-language.html
+ https://bugs.webkit.org/show_bug.cgi?id=30440
+
+ Unskip the test that now passes.
+
+ * platform/gtk/Skipped:
+
2009-10-28 Jonathan Dixon <joth at chromium.org>
Reviewed by Eric Seidel.
diff --git a/LayoutTests/platform/gtk/Skipped b/LayoutTests/platform/gtk/Skipped
index 33b49cf..55923b1 100644
--- a/LayoutTests/platform/gtk/Skipped
+++ b/LayoutTests/platform/gtk/Skipped
@@ -1460,9 +1460,6 @@ fast/events/drag-and-drop-none.html
fast/events/drag-and-drop.html
fast/events/drag-parent-node.html
-# https://bugs.webkit.org/show_bug.cgi?id=30440
-fast/js/navigator-language.html
-
fast/xmlhttprequest/null-document-xmlhttprequest-open.html
# Tests timing out
fast/loader/null-request-after-willSendRequest.html
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index c42a4af..a6ad901 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,18 @@
+2009-10-28 Gustavo Noronha Silva <gustavo.noronha at collabora.co.uk>
+
+ Reviewed by Xan Lopez.
+
+ [GTK] Fails new test fast/js/navigator-language.html
+ https://bugs.webkit.org/show_bug.cgi?id=30440
+
+ Reimplement WebCore::defaultLanguage to account for changes in
+ locale done by setLocale.
+
+ Already existing test: fast/js/navigator-language.html
+
+ * platform/gtk/Language.cpp:
+ (WebCore::defaultLanguage):
+
2009-10-28 Eric Carlson <eric.carlson at apple.com>
Reviewed by Simon Fraser.
diff --git a/WebCore/platform/gtk/Language.cpp b/WebCore/platform/gtk/Language.cpp
index 171cd84..fea2df6 100644
--- a/WebCore/platform/gtk/Language.cpp
+++ b/WebCore/platform/gtk/Language.cpp
@@ -21,16 +21,37 @@
#include "Language.h"
#include "CString.h"
+#include "GOwnPtr.h"
#include "PlatformString.h"
#include <gtk/gtk.h>
+#include <locale.h>
#include <pango/pango.h>
namespace WebCore {
+// Using pango_language_get_default() here is not an option, because
+// it doesn't support changing the locale in runtime, so it returns
+// always the same value.
String defaultLanguage()
{
- return pango_language_to_string(gtk_get_default_language());
+ char* localeDefault = setlocale(LC_CTYPE, NULL);
+
+ if (!localeDefault)
+ return String("c");
+
+ GOwnPtr<gchar> normalizedDefault(g_ascii_strdown(localeDefault, -1));
+ char* ptr = strchr(normalizedDefault.get(), '_');
+
+ if(ptr)
+ *ptr = '-';
+
+ ptr = strchr(normalizedDefault.get(), '.');
+
+ if(ptr)
+ *ptr = '\0';
+
+ return String(normalizedDefault.get());
}
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list