Diff
Modified: releases/WebKitGTK/webkit-2.16/Source/WTF/ChangeLog (214754 => 214755)
--- releases/WebKitGTK/webkit-2.16/Source/WTF/ChangeLog 2017-04-03 09:59:48 UTC (rev 214754)
+++ releases/WebKitGTK/webkit-2.16/Source/WTF/ChangeLog 2017-04-03 09:59:57 UTC (rev 214755)
@@ -1,3 +1,19 @@
+2017-03-16 Carlos Garcia Campos <cgar...@igalia.com>
+
+ [UNIX] Implement currentSearchLocaleID() and currentTextBreakLocaleID()
+ https://bugs.webkit.org/show_bug.cgi?id=169745
+
+ Reviewed by Yusuke Suzuki.
+
+ Add a common implementation for Unix based ports using setlocale.
+
+ * wtf/PlatformGTK.cmake:
+ * wtf/PlatformJSCOnly.cmake:
+ * wtf/text/gtk/TextBreakIteratorInternalICUGtk.cpp: Removed.
+ * wtf/text/unix/TextBreakIteratorInternalICUUnix.cpp: Renamed from Source/WTF/wtf/text/jsconly/TextBreakIteratorInternalICUJSCOnly.cpp.
+ (WTF::currentSearchLocaleID):
+ (WTF::currentTextBreakLocaleID):
+
2017-03-01 Tomas Popela <tpop...@redhat.com>
[WTF] va_list is not ended in StringPrintStream
Modified: releases/WebKitGTK/webkit-2.16/Source/WTF/wtf/PlatformGTK.cmake (214754 => 214755)
--- releases/WebKitGTK/webkit-2.16/Source/WTF/wtf/PlatformGTK.cmake 2017-04-03 09:59:48 UTC (rev 214754)
+++ releases/WebKitGTK/webkit-2.16/Source/WTF/wtf/PlatformGTK.cmake 2017-04-03 09:59:57 UTC (rev 214755)
@@ -10,7 +10,7 @@
PlatformUserPreferredLanguagesUnix.cpp
UniStdExtras.cpp
- text/gtk/TextBreakIteratorInternalICUGtk.cpp
+ text/unix/TextBreakIteratorInternalICUUnix.cpp
)
list(APPEND WTF_LIBRARIES
Deleted: releases/WebKitGTK/webkit-2.16/Source/WTF/wtf/text/gtk/TextBreakIteratorInternalICUGtk.cpp (214754 => 214755)
--- releases/WebKitGTK/webkit-2.16/Source/WTF/wtf/text/gtk/TextBreakIteratorInternalICUGtk.cpp 2017-04-03 09:59:48 UTC (rev 214754)
+++ releases/WebKitGTK/webkit-2.16/Source/WTF/wtf/text/gtk/TextBreakIteratorInternalICUGtk.cpp 2017-04-03 09:59:57 UTC (rev 214755)
@@ -1,37 +0,0 @@
-/*
- * Copyright (C) 2007 Alp Toker <a...@atoker.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include "config.h"
-#include "TextBreakIteratorInternalICU.h"
-
-namespace WTF {
-
-const char* currentSearchLocaleID()
-{
- // FIXME: Should use system locale.
- return "";
-}
-
-const char* currentTextBreakLocaleID()
-{
- // FIXME: Should use system locale.
- return "en_us";
-}
-
-}
Deleted: releases/WebKitGTK/webkit-2.16/Source/WTF/wtf/text/jsconly/TextBreakIteratorInternalICUJSCOnly.cpp (214754 => 214755)
--- releases/WebKitGTK/webkit-2.16/Source/WTF/wtf/text/jsconly/TextBreakIteratorInternalICUJSCOnly.cpp 2017-04-03 09:59:48 UTC (rev 214754)
+++ releases/WebKitGTK/webkit-2.16/Source/WTF/wtf/text/jsconly/TextBreakIteratorInternalICUJSCOnly.cpp 2017-04-03 09:59:57 UTC (rev 214755)
@@ -1,37 +0,0 @@
-/*
- * Copyright (C) 2007 Alp Toker <a...@atoker.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include "config.h"
-#include "TextBreakIteratorInternalICU.h"
-
-namespace WTF {
-
-const char* currentSearchLocaleID()
-{
- // FIXME: Should use system locale.
- return "";
-}
-
-const char* currentTextBreakLocaleID()
-{
- // FIXME: Should use system locale.
- return "en_us";
-}
-
-}
Copied: releases/WebKitGTK/webkit-2.16/Source/WTF/wtf/text/unix/TextBreakIteratorInternalICUUnix.cpp (from rev 214754, releases/WebKitGTK/webkit-2.16/Source/WTF/wtf/text/gtk/TextBreakIteratorInternalICUGtk.cpp) (0 => 214755)
--- releases/WebKitGTK/webkit-2.16/Source/WTF/wtf/text/unix/TextBreakIteratorInternalICUUnix.cpp (rev 0)
+++ releases/WebKitGTK/webkit-2.16/Source/WTF/wtf/text/unix/TextBreakIteratorInternalICUUnix.cpp 2017-04-03 09:59:57 UTC (rev 214755)
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2017 Igalia S.L.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "config.h"
+#include "TextBreakIteratorInternalICU.h"
+
+#include <locale.h>
+
+namespace WTF {
+
+const char* currentSearchLocaleID()
+{
+ if (auto* localeDefault = setlocale(LC_MESSAGES, nullptr))
+ return localeDefault;
+ return "";
+}
+
+const char* currentTextBreakLocaleID()
+{
+ if (auto* localeDefault = setlocale(LC_MESSAGES, nullptr))
+ return localeDefault;
+ return "en_us";
+}
+
+}