Title: [123950] trunk/Source/WebCore
Revision
123950
Author
[email protected]
Date
2012-07-27 21:30:06 -0700 (Fri, 27 Jul 2012)

Log Message

[BlackBerry] Use new LocaleHandler.
https://bugs.webkit.org/show_bug.cgi?id=92548

Patch by Eli Fidler <[email protected]> on 2012-07-27
Reviewed by Yong Li.

RIM PR 128381

* platform/blackberry/LocalizedStringsBlackBerry.cpp:
(WebCore::platformLanguage):
* platform/network/blackberry/ResourceRequestBlackBerry.cpp:
(WebCore::ResourceRequest::initializePlatformRequest):
* platform/text/blackberry/TextBreakIteratorInternalICUBlackBerry.cpp:
(WebCore::currentSearchLocaleID):
(WebCore::currentTextBreakLocaleID):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (123949 => 123950)


--- trunk/Source/WebCore/ChangeLog	2012-07-28 04:29:53 UTC (rev 123949)
+++ trunk/Source/WebCore/ChangeLog	2012-07-28 04:30:06 UTC (rev 123950)
@@ -1,3 +1,20 @@
+2012-07-27  Eli Fidler  <[email protected]>
+
+        [BlackBerry] Use new LocaleHandler.
+        https://bugs.webkit.org/show_bug.cgi?id=92548
+
+        Reviewed by Yong Li.
+
+        RIM PR 128381
+
+        * platform/blackberry/LocalizedStringsBlackBerry.cpp:
+        (WebCore::platformLanguage):
+        * platform/network/blackberry/ResourceRequestBlackBerry.cpp:
+        (WebCore::ResourceRequest::initializePlatformRequest):
+        * platform/text/blackberry/TextBreakIteratorInternalICUBlackBerry.cpp:
+        (WebCore::currentSearchLocaleID):
+        (WebCore::currentTextBreakLocaleID):
+
 2012-07-27  Gyuyoung Kim  <[email protected]>
 
         Change constructor with explicit constructor in WebCore/Modules

Modified: trunk/Source/WebCore/platform/blackberry/LocalizedStringsBlackBerry.cpp (123949 => 123950)


--- trunk/Source/WebCore/platform/blackberry/LocalizedStringsBlackBerry.cpp	2012-07-28 04:29:53 UTC (rev 123949)
+++ trunk/Source/WebCore/platform/blackberry/LocalizedStringsBlackBerry.cpp	2012-07-28 04:30:06 UTC (rev 123950)
@@ -22,7 +22,7 @@
 #include "IntSize.h"
 #include "NotImplemented.h"
 #include "PlatformString.h"
-#include <BlackBerryPlatformClient.h>
+#include <LocaleHandler.h>
 #include <LocalizeResource.h>
 #include <wtf/Vector.h>
 
@@ -62,7 +62,7 @@
 
 static String platformLanguage()
 {
-    String lang = BlackBerry::Platform::Client::get()->getLocale().c_str();
+    String lang = BlackBerry::Platform::LocaleHandler::instance()->language().c_str();
     // getLocale() returns a POSIX locale which uses '_' to separate language and country.
     // However, we use '-' instead of '_' in WebCore (e.g. en_us should read en-us)
     size_t underscorePosition = lang.find('_');

Modified: trunk/Source/WebCore/platform/network/blackberry/ResourceRequestBlackBerry.cpp (123949 => 123950)


--- trunk/Source/WebCore/platform/network/blackberry/ResourceRequestBlackBerry.cpp	2012-07-28 04:29:53 UTC (rev 123949)
+++ trunk/Source/WebCore/platform/network/blackberry/ResourceRequestBlackBerry.cpp	2012-07-28 04:30:06 UTC (rev 123950)
@@ -21,7 +21,7 @@
 
 #include "BlobRegistryImpl.h"
 #include "CookieManager.h"
-#include <BlackBerryPlatformClient.h>
+#include <LocaleHandler.h>
 #include <network/NetworkRequest.h>
 #include <wtf/HashMap.h>
 #include <wtf/text/CString.h>
@@ -218,7 +218,7 @@
 
         if (!httpHeaderFields().contains("Accept-Language")) {
             // Locale has the form "en-US". Construct accept language like "en-US, en;q=0.8".
-            std::string locale = BlackBerry::Platform::Client::get()->getLocale();
+            std::string locale = BlackBerry::Platform::LocaleHandler::instance()->language();
             // POSIX locale has '_' instead of '-'.
             // Replace to conform to HTTP spec.
             size_t underscore = locale.find('_');

Modified: trunk/Source/WebCore/platform/text/blackberry/TextBreakIteratorInternalICUBlackBerry.cpp (123949 => 123950)


--- trunk/Source/WebCore/platform/text/blackberry/TextBreakIteratorInternalICUBlackBerry.cpp	2012-07-28 04:29:53 UTC (rev 123949)
+++ trunk/Source/WebCore/platform/text/blackberry/TextBreakIteratorInternalICUBlackBerry.cpp	2012-07-28 04:30:06 UTC (rev 123950)
@@ -19,20 +19,18 @@
 #include "config.h"
 #include "TextBreakIteratorInternalICU.h"
 
-#include "NotImplemented.h"
+#include <LocaleHandler.h>
 
 namespace WebCore {
 
 const char* currentSearchLocaleID()
 {
-    notImplemented();
-    return "";
+    return BlackBerry::Platform::LocaleHandler::instance()->region().c_str();
 }
 
 const char* currentTextBreakLocaleID()
 {
-    notImplemented();
-    return "en_us";
+    return BlackBerry::Platform::LocaleHandler::instance()->region().c_str();
 }
 
 }
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to