Changeset 199815 in webkit
- Timestamp:
- Apr 21, 2016 8:12:11 AM (8 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 1 added
- 2 deleted
- 3 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r199809 r199815 1 2016-04-21 Claudio Saavedra <csaavedra@igalia.com> 2 3 [GTK][EFL] Move non-glib/gtk platform implementations out of platform/gtk 4 https://bugs.webkit.org/show_bug.cgi?id=156847 5 6 Reviewed by Carlos Garcia Campos. 7 8 The Language and Logging implementation don't really need glib, so 9 rework them and move them to a new platform/unix directory so that 10 they can be shared among Unix ports. 11 12 * PlatformEfl.cmake: Use the unix version. 13 * PlatformGTK.cmake: Same. 14 * platform/efl/LanguageEfl.cpp: Removed. 15 * platform/efl/LoggingEfl.cpp: Removed. 16 * platform/unix/LanguageUnix.cpp: Renamed from Source/WebCore/platform/gtk/LanguageGtk.cpp. 17 (WebCore::platformLanguage): 18 (WebCore::platformUserPreferredLanguages): 19 * platform/unix/LoggingUnix.cpp: Renamed from Source/WebCore/platform/gtk/LoggingGtk.cpp. 20 (WebCore::logLevelString): 21 1 22 2016-04-21 Nan Wang <n_wang@apple.com> 2 23 -
trunk/Source/WebCore/PlatformEfl.cmake
r199562 r199815 100 100 platform/efl/FileSystemEfl.cpp 101 101 platform/efl/GamepadsEfl.cpp 102 platform/efl/LanguageEfl.cpp103 102 platform/efl/LocalizedStringsEfl.cpp 104 platform/efl/LoggingEfl.cpp105 103 platform/efl/MIMETypeRegistryEfl.cpp 106 104 platform/efl/MainThreadSharedTimerEfl.cpp … … 220 218 221 219 platform/text/hyphen/HyphenationLibHyphen.cpp 220 221 platform/unix/LanguageUnix.cpp 222 platform/unix/LoggingUnix.cpp 222 223 223 224 rendering/RenderThemeEfl.cpp -
trunk/Source/WebCore/PlatformGTK.cmake
r199772 r199815 142 142 143 143 platform/gtk/ErrorsGtk.cpp 144 platform/gtk/LanguageGtk.cpp145 platform/gtk/LoggingGtk.cpp146 144 platform/gtk/MIMETypeRegistryGtk.cpp 147 145 platform/gtk/ScrollAnimatorGtk.cpp … … 185 183 186 184 platform/text/hyphen/HyphenationLibHyphen.cpp 185 186 platform/unix/LanguageUnix.cpp 187 platform/unix/LoggingUnix.cpp 187 188 ) 188 189 -
trunk/Source/WebCore/platform/unix/LanguageUnix.cpp
r199814 r199815 21 21 #include "Language.h" 22 22 23 #include <locale.h> 23 24 #include <wtf/Vector.h> 24 #include <wtf/glib/GUniquePtr.h>25 #include <wtf/text/CString.h>26 25 #include <wtf/text/WTFString.h> 27 28 #include <glib.h>29 #include <locale.h>30 26 31 27 namespace WebCore { … … 36 32 static String platformLanguage() 37 33 { 38 char* localeDefault = setlocale(LC_CTYPE, NULL); 39 40 if (!localeDefault) 34 String localeDefault(setlocale(LC_CTYPE, nullptr)); 35 if (localeDefault.isEmpty()) 41 36 return String("c"); 42 37 43 GUniquePtr<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()); 38 String normalizedDefault = localeDefault.convertToASCIILowercase(); 39 normalizedDefault.replace('_', '-'); 40 normalizedDefault.truncate(normalizedDefault.find('.')); 41 return normalizedDefault; 55 42 } 56 43 57 44 Vector<String> platformUserPreferredLanguages() 58 45 { 59 Vector<String> userPreferredLanguages; 60 userPreferredLanguages.append(platformLanguage()); 61 return userPreferredLanguages; 46 return { platformLanguage() }; 62 47 } 63 48 64 49 } -
trunk/Source/WebCore/platform/unix/LoggingUnix.cpp
r199814 r199815 25 25 #if !LOG_DISABLED 26 26 27 #include <glib.h>28 27 #include <string.h> 29 28 #include <wtf/text/WTFString.h> … … 39 38 // We set up the logs anyway because some of our logging, such as Soup's is available in release builds. 40 39 #if defined(NDEBUG) 41 g_warning("WEBKIT_DEBUG is not empty, but this is a release build. Notice that many log messages will only appear in a debug build.");40 WTFLogAlways("WEBKIT_DEBUG is not empty, but this is a release build. Notice that many log messages will only appear in a debug build."); 42 41 #endif 43 42 44 43 // To disable logging notImplemented set the DISABLE_NI_WARNING environment variable to 1. 45 String logLevel = "NotYetImplemented,"; 46 logLevel.append(logEnv); 47 return logLevel; 44 return String("NotYetImplemented,") + logEnv; 48 45 } 49 46
Note: See TracChangeset
for help on using the changeset viewer.