Changeset 128257 in webkit
- Timestamp:
- Sep 11, 2012 7:24:57 PM (12 years ago)
- Location:
- trunk/Source
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r128256 r128257 1 2012-09-11 Keishi Hattori <keishi@webkit.org> 2 3 Create Localizer factory method for LocaleICU 4 https://bugs.webkit.org/show_bug.cgi?id=96363 5 6 Reviewed by Kent Tamura. 7 8 Preparing to use Localizer instead of LocaleMac/Win/ICU 9 10 No new tests. Covered in unit test tests/LocalizedNumberICUTest.cpp 11 12 * platform/text/LocaleICU.cpp: 13 (WebCore::Localizer::create): 14 (WebCore): 15 1 16 2012-09-11 Michael Saboff <msaboff@apple.com> 2 17 -
trunk/Source/WebCore/platform/text/LocaleICU.cpp
r128147 r128257 42 42 43 43 namespace WebCore { 44 45 PassOwnPtr<Localizer> Localizer::create(const AtomicString& locale) 46 { 47 return LocaleICU::create(locale.string().utf8().data()); 48 } 44 49 45 50 LocaleICU::LocaleICU(const char* locale) -
trunk/Source/WebKit/chromium/ChangeLog
r128253 r128257 1 2012-09-11 Keishi Hattori <keishi@webkit.org> 2 3 Create Localizer factory method for LocaleICU 4 https://bugs.webkit.org/show_bug.cgi?id=96363 5 6 Reviewed by Kent Tamura. 7 8 * tests/LocalizedNumberICUTest.cpp: 9 (testNumberIsReversible): 10 (testDecimalSeparator): 11 1 12 2012-09-11 Christopher Cameron <ccameron@chromium.org> 2 13 -
trunk/Source/WebKit/chromium/tests/LocalizedNumberICUTest.cpp
r121404 r128257 37 37 using namespace WebCore; 38 38 39 void testNumberIsReversible(const char* localeString, const char* original, const char* shouldHave = 0)39 void testNumberIsReversible(const AtomicString& locale, const char* original, const char* shouldHave = 0) 40 40 { 41 OwnPtr<Local eICU> locale = LocaleICU::create(localeString);42 String localized = local e->convertToLocalizedNumber(original);41 OwnPtr<Localizer> localizer = Localizer::create(locale); 42 String localized = localizer->convertToLocalizedNumber(original); 43 43 if (shouldHave) 44 44 EXPECT_TRUE(localized.contains(shouldHave)); 45 String converted = local e->convertFromLocalizedNumber(localized);45 String converted = localizer->convertFromLocalizedNumber(localized); 46 46 EXPECT_EQ(original, converted); 47 47 } … … 83 83 #if ENABLE(INPUT_TYPE_TIME_MULTIPLE_FIELDS) 84 84 85 static String testDecimalSeparator(const char* localeString)85 static String testDecimalSeparator(const AtomicString& locale) 86 86 { 87 OwnPtr<Local eICU> locale = LocaleICU::create(localeString);88 return local e->localizedDecimalSeparator();87 OwnPtr<Localizer> localizer = Localizer::create(locale); 88 return localizer->localizedDecimalSeparator(); 89 89 } 90 90
Note: See TracChangeset
for help on using the changeset viewer.