Title: [129876] trunk/Source/WebCore
Revision
129876
Author
[email protected]
Date
2012-09-28 05:02:32 -0700 (Fri, 28 Sep 2012)

Log Message

Remove LocalizedNumber*.*
https://bugs.webkit.org/show_bug.cgi?id=97876

Reviewed by Yuta Kitamura.

LocalizedNumber.h functions are replaced with Localizer class.

* CMakeLists.txt: Remove LocalizedNumberNone.*.
* GNUmakefile.list.am: ditto.
* Target.pri: ditto.
* WebCore.vcpproj/WebCore.vcproj: ditto.
* WebCore.gyp/WebCore.gyp: Remove LocalizedNumber*.*.
* WebCore.gypi: ditto.
* WebCore.xcodeproj/project.pbxproj: ditto.

* html/NumberInputType.cpp: Use Localizer for the element locale.
(WebCore::NumberInputType::localizeValue):
(WebCore::NumberInputType::convertFromVisibleValue):

* platform/text/Localizer.h: Move some comments from LocalizedNumber.h

* platform/text/LocalizedNumber.h: Removed.
* platform/text/LocalizedNumberICU.cpp: Removed.
* platform/text/LocalizedNumberNone.cpp: Removed.
* platform/text/mac/LocalizedNumberMac.mm: Removed.
* platform/text/win/LocalizedNumberWin.cpp: Removed.

Modified Paths

Removed Paths

Diff

Modified: trunk/Source/WebCore/CMakeLists.txt (129875 => 129876)


--- trunk/Source/WebCore/CMakeLists.txt	2012-09-28 11:21:38 UTC (rev 129875)
+++ trunk/Source/WebCore/CMakeLists.txt	2012-09-28 12:02:32 UTC (rev 129876)
@@ -1987,7 +1987,6 @@
     platform/text/LocaleNone.cpp
     platform/text/LocaleToScriptMappingDefault.cpp
     platform/text/LocalizedDateNone.cpp
-    platform/text/LocalizedNumberNone.cpp
     platform/text/Localizer.cpp
     platform/text/QuotedPrintable.cpp
     platform/text/RegularExpression.cpp

Modified: trunk/Source/WebCore/ChangeLog (129875 => 129876)


--- trunk/Source/WebCore/ChangeLog	2012-09-28 11:21:38 UTC (rev 129875)
+++ trunk/Source/WebCore/ChangeLog	2012-09-28 12:02:32 UTC (rev 129876)
@@ -1,3 +1,32 @@
+2012-09-28  Kent Tamura  <[email protected]>
+
+        Remove LocalizedNumber*.*
+        https://bugs.webkit.org/show_bug.cgi?id=97876
+
+        Reviewed by Yuta Kitamura.
+
+        LocalizedNumber.h functions are replaced with Localizer class.
+
+        * CMakeLists.txt: Remove LocalizedNumberNone.*.
+        * GNUmakefile.list.am: ditto.
+        * Target.pri: ditto.
+        * WebCore.vcpproj/WebCore.vcproj: ditto.
+        * WebCore.gyp/WebCore.gyp: Remove LocalizedNumber*.*.
+        * WebCore.gypi: ditto.
+        * WebCore.xcodeproj/project.pbxproj: ditto.
+
+        * html/NumberInputType.cpp: Use Localizer for the element locale.
+        (WebCore::NumberInputType::localizeValue):
+        (WebCore::NumberInputType::convertFromVisibleValue):
+
+        * platform/text/Localizer.h: Move some comments from LocalizedNumber.h
+
+        * platform/text/LocalizedNumber.h: Removed.
+        * platform/text/LocalizedNumberICU.cpp: Removed.
+        * platform/text/LocalizedNumberNone.cpp: Removed.
+        * platform/text/mac/LocalizedNumberMac.mm: Removed.
+        * platform/text/win/LocalizedNumberWin.cpp: Removed.
+
 2012-09-28  Gyuyoung Kim  <[email protected]>
 
         Unreviewed, rolling out r129863.

Modified: trunk/Source/WebCore/GNUmakefile.list.am (129875 => 129876)


--- trunk/Source/WebCore/GNUmakefile.list.am	2012-09-28 11:21:38 UTC (rev 129875)
+++ trunk/Source/WebCore/GNUmakefile.list.am	2012-09-28 12:02:32 UTC (rev 129876)
@@ -4781,8 +4781,6 @@
 	Source/WebCore/platform/text/LocaleToScriptMappingDefault.cpp \
 	Source/WebCore/platform/text/LocalizedDate.h \
 	Source/WebCore/platform/text/LocalizedDateNone.cpp \
-	Source/WebCore/platform/text/LocalizedNumber.h \
-	Source/WebCore/platform/text/LocalizedNumberNone.cpp \
 	Source/WebCore/platform/text/Localizer.cpp \
 	Source/WebCore/platform/text/Localizer.h \
 	Source/WebCore/platform/text/ParserUtilities.h \

Modified: trunk/Source/WebCore/Target.pri (129875 => 129876)


--- trunk/Source/WebCore/Target.pri	2012-09-28 11:21:38 UTC (rev 129875)
+++ trunk/Source/WebCore/Target.pri	2012-09-28 12:02:32 UTC (rev 129876)
@@ -921,7 +921,6 @@
     platform/text/LocaleNone.cpp \
     platform/text/LocaleToScriptMappingDefault.cpp \
     platform/text/LocalizedDateNone.cpp \
-    platform/text/LocalizedNumberNone.cpp \
     platform/text/Localizer.cpp \
     platform/text/QuotedPrintable.cpp \
     platform/CalculationValue.cpp \

Modified: trunk/Source/WebCore/WebCore.gyp/WebCore.gyp (129875 => 129876)


--- trunk/Source/WebCore/WebCore.gyp/WebCore.gyp	2012-09-28 11:21:38 UTC (rev 129875)
+++ trunk/Source/WebCore/WebCore.gyp/WebCore.gyp	2012-09-28 12:02:32 UTC (rev 129876)
@@ -1648,7 +1648,6 @@
         ['exclude', 'platform/sql/SQLiteFileSystem\\.cpp$'],
         ['exclude', 'platform/text/LocaleToScriptMappingICU\\.cpp$'],
         ['exclude', 'platform/text/LocalizedDateNone\\.cpp$'],
-        ['exclude', 'platform/text/LocalizedNumberNone\\.cpp$'],
         ['exclude', 'platform/text/TextEncodingDetectorNone\\.cpp$'],
       ],
       'conditions': [
@@ -1777,16 +1776,13 @@
 
             ['include', 'WebKit/mac/WebCoreSupport/WebSystemInterface\\.mm$'],
 
-            # We use LocalizedDateMac.cpp and LocalizedNumberMac.mm with
-            # LocaleMac.mm instead of LocalizedDateICU.cpp in order to apply
-            # system locales.
+            # We use LocalizedDateMac.cpp with LocaleMac.mm instead of
+            # LocalizedDateICU.cpp in order to apply system locales.
             ['exclude', 'platform/text/LocaleICU\\.cpp$'],
             ['exclude', 'platform/text/LocaleICU\\.h$'],
             ['exclude', 'platform/text/LocalizedDateICU\\.cpp$'],
-            ['exclude', 'platform/text/LocalizedNumberICU\\.cpp$'],
             ['include', 'platform/text/mac/LocaleMac\\.mm$'],
             ['include', 'platform/text/mac/LocalizedDateMac\\.cpp$'],
-            ['include', 'platform/text/mac/LocalizedNumberMac\\.mm$'],
 
             # The Mac uses platform/mac/KillRingMac.mm instead of the dummy
             # implementation.
@@ -1864,11 +1860,9 @@
             ['exclude', 'platform/text/LocaleICU\\.cpp$'],
             ['exclude', 'platform/text/LocaleICU\\.h$'],
             ['exclude', 'platform/text/LocalizedDateICU\.cpp$'],
-            ['exclude', 'platform/text/LocalizedNumberICU\.cpp$'],
             ['include', 'platform/text/LocalizedDateWin\.cpp$'],
             ['include', 'platform/text/LocaleWin\.cpp$'],
             ['include', 'platform/text/LocaleWin\.h$'],
-            ['include', 'platform/text/win/LocalizedNumberWin\\.cpp$'],
           ],
         },{ # OS!="win"
           'sources/': [

Modified: trunk/Source/WebCore/WebCore.gypi (129875 => 129876)


--- trunk/Source/WebCore/WebCore.gypi	2012-09-28 11:21:38 UTC (rev 129875)
+++ trunk/Source/WebCore/WebCore.gypi	2012-09-28 12:02:32 UTC (rev 129876)
@@ -5689,9 +5689,6 @@
             'platform/text/LocalizedDateICU.cpp',
             'platform/text/LocalizedDateNone.cpp',
             'platform/text/LocalizedDateWin.cpp',
-            'platform/text/LocalizedNumber.h',
-            'platform/text/LocalizedNumberICU.cpp',
-            'platform/text/LocalizedNumberNone.cpp',
             'platform/text/Localizer.cpp',
             'platform/text/Localizer.h',
             'platform/text/ParserUtilities.h',
@@ -5733,7 +5730,6 @@
             'platform/text/mac/LocaleMac.h',
             'platform/text/mac/LocaleMac.mm',
             'platform/text/mac/LocalizedDateMac.cpp',
-            'platform/text/mac/LocalizedNumberMac.mm',
             'platform/text/mac/StringImplMac.mm',
             'platform/text/mac/StringMac.mm',
             'platform/text/mac/TextBoundaries.mm',
@@ -5745,7 +5741,6 @@
             'platform/text/qt/TextCodecQt.h',
             'platform/text/transcoder/FontTranscoder.cpp',
             'platform/text/transcoder/FontTranscoder.h',
-            'platform/text/win/LocalizedNumberWin.cpp',
             'platform/text/win/TextBreakIteratorInternalICUWin.cpp',
             'platform/text/win/TextCodecWin.cpp',
             'platform/text/win/TextCodecWin.h',

Modified: trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj (129875 => 129876)


--- trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj	2012-09-28 11:21:38 UTC (rev 129875)
+++ trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj	2012-09-28 12:02:32 UTC (rev 129876)
@@ -33726,13 +33726,6 @@
 					>
 				</File>
 				<File
-					RelativePath="..\platform\text\LocalizedNumber.h"
-					>
-				</File>
-				<File
-					RelativePath="..\platform\text\LocalizedNumberNone.cpp"
-					>
-				<File
 					RelativePath="..\platform\text\Localizer.cpp"
 					>
 				</File>
@@ -33740,7 +33733,6 @@
 					RelativePath="..\platform\text\Localizer.h"
 					>
 				</File>
-				</File>
 				<File
 					RelativePath="..\platform\text\ParserUtilities.h"
 					>

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (129875 => 129876)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2012-09-28 11:21:38 UTC (rev 129875)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2012-09-28 12:02:32 UTC (rev 129876)
@@ -6234,7 +6234,6 @@
 		F508246F1548D96200A119AB /* MockPagePopupDriver.h in Headers */ = {isa = PBXBuildFile; fileRef = F508246D1548D96200A119AB /* MockPagePopupDriver.h */; };
 		F5122C901547FA1B0028A93B /* PagePopupDriver.h in Headers */ = {isa = PBXBuildFile; fileRef = F5122C8F1547FA1B0028A93B /* PagePopupDriver.h */; };
 		F513A3EA15FF4841001526DB /* ValidationMessageClient.h in Headers */ = {isa = PBXBuildFile; fileRef = F513A3E915FF4841001526DB /* ValidationMessageClient.h */; };
-		F5142C69123F12B000F5BD4C /* LocalizedNumber.h in Headers */ = {isa = PBXBuildFile; fileRef = F5142C68123F12B000F5BD4C /* LocalizedNumber.h */; };
 		F52AD5E41534245F0059FBE6 /* EmptyClients.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F52AD5E31534245F0059FBE6 /* EmptyClients.cpp */; };
 		F544F78815CFB2A800AF33A8 /* Localizer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F544F78615CFB2A800AF33A8 /* Localizer.cpp */; };
 		F544F78915CFB2A800AF33A8 /* Localizer.h in Headers */ = {isa = PBXBuildFile; fileRef = F544F78715CFB2A800AF33A8 /* Localizer.h */; };
@@ -6301,7 +6300,6 @@
 		F5C041E50FFCA96D00839D4A /* DOMHTMLDataListElementInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = F5C041E00FFCA96D00839D4A /* DOMHTMLDataListElementInternal.h */; };
 		F5C041E60FFCA96D00839D4A /* JSHTMLDataListElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5C041E10FFCA96D00839D4A /* JSHTMLDataListElement.cpp */; };
 		F5C041E70FFCA96D00839D4A /* JSHTMLDataListElement.h in Headers */ = {isa = PBXBuildFile; fileRef = F5C041E20FFCA96D00839D4A /* JSHTMLDataListElement.h */; };
-		F5CC42DC12F801CA00D5F7E3 /* LocalizedNumberMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = F5CC42DB12F801CA00D5F7E3 /* LocalizedNumberMac.mm */; };
 		F7A034C4126BF6BE007DC19E /* FontOrientation.h in Headers */ = {isa = PBXBuildFile; fileRef = F7A034C3126BF6BE007DC19E /* FontOrientation.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		F916C48D0DB510F80076CD83 /* JSXMLHttpRequestProgressEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F916C48B0DB510F80076CD83 /* JSXMLHttpRequestProgressEvent.cpp */; };
 		F916C48E0DB510F80076CD83 /* JSXMLHttpRequestProgressEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = F916C48C0DB510F80076CD83 /* JSXMLHttpRequestProgressEvent.h */; };
@@ -13630,7 +13628,6 @@
 		F508246D1548D96200A119AB /* MockPagePopupDriver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MockPagePopupDriver.h; path = testing/MockPagePopupDriver.h; sourceTree = SOURCE_ROOT; };
 		F5122C8F1547FA1B0028A93B /* PagePopupDriver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PagePopupDriver.h; sourceTree = "<group>"; };
 		F513A3E915FF4841001526DB /* ValidationMessageClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ValidationMessageClient.h; sourceTree = "<group>"; };
-		F5142C68123F12B000F5BD4C /* LocalizedNumber.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LocalizedNumber.h; sourceTree = "<group>"; };
 		F523D23B02DE4396018635CA /* HTMLDocument.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLDocument.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
 		F523D23C02DE4396018635CA /* HTMLDocument.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = HTMLDocument.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
 		F523D23E02DE4396018635CA /* HTMLElement.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLElement.cpp; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
@@ -13715,7 +13712,6 @@
 		F5C2869302846DCD018635CA /* ApplicationServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ApplicationServices.framework; path = /System/Library/Frameworks/ApplicationServices.framework; sourceTree = "<absolute>"; };
 		F5C2869402846DCD018635CA /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = "<absolute>"; };
 		F5C2869502846DCD018635CA /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
-		F5CC42DB12F801CA00D5F7E3 /* LocalizedNumberMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = LocalizedNumberMac.mm; sourceTree = "<group>"; };
 		F7A034C3126BF6BE007DC19E /* FontOrientation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FontOrientation.h; sourceTree = "<group>"; };
 		F8216299029F4FB501000131 /* _javascript_Core.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = _javascript_Core.framework; sourceTree = BUILT_PRODUCTS_DIR; };
 		F916C48B0DB510F80076CD83 /* JSXMLHttpRequestProgressEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSXMLHttpRequestProgressEvent.cpp; sourceTree = "<group>"; };
@@ -20032,7 +20028,6 @@
 				7633A72513D8B33A008501B6 /* LocaleToScriptMappingDefault.cpp */,
 				A5732B0C136A16C4005C8D7C /* LocalizedDate.h */,
 				A5732B0E136A1715005C8D7C /* LocalizedDateNone.cpp */,
-				F5142C68123F12B000F5BD4C /* LocalizedNumber.h */,
 				F544F78615CFB2A800AF33A8 /* Localizer.cpp */,
 				F544F78715CFB2A800AF33A8 /* Localizer.h */,
 				BC76AC110DD7AD5C00415F34 /* ParserUtilities.h */,
@@ -20091,7 +20086,6 @@
 				375CD239119D44EA00A2A859 /* HyphenationMac.mm */,
 				F5973DDE15CFB2030027F804 /* LocaleMac.h */,
 				F5973DDF15CFB2030027F804 /* LocaleMac.mm */,
-				F5CC42DB12F801CA00D5F7E3 /* LocalizedNumberMac.mm */,
 				B2AFFC860D00A5DF0030074D /* mac-encodings.txt */,
 				B2AFFC870D00A5DF0030074D /* make-charset-table.pl */,
 				B2AFFC8A0D00A5DF0030074D /* StringImplMac.mm */,
@@ -24422,7 +24416,6 @@
 				7633A72613D8B33A008501B6 /* LocaleToScriptMapping.h in Headers */,
 				89878568122CA064003AABDA /* LocalFileSystem.h in Headers */,
 				A5732B0D136A16C4005C8D7C /* LocalizedDate.h in Headers */,
-				F5142C69123F12B000F5BD4C /* LocalizedNumber.h in Headers */,
 				935207BE09BD410A00F2038D /* LocalizedStrings.h in Headers */,
 				F544F78915CFB2A800AF33A8 /* Localizer.h in Headers */,
 				BCE1C41B0D982980003B02F2 /* Location.h in Headers */,
@@ -27736,7 +27729,6 @@
 				7633A72713D8B33A008501B6 /* LocaleToScriptMappingDefault.cpp in Sources */,
 				89878567122CA064003AABDA /* LocalFileSystem.cpp in Sources */,
 				A5732B0F136A1715005C8D7C /* LocalizedDateNone.cpp in Sources */,
-				F5CC42DC12F801CA00D5F7E3 /* LocalizedNumberMac.mm in Sources */,
 				C046E1AC1208A9FE00BA2CF7 /* LocalizedStrings.cpp in Sources */,
 				BC25B52A131C6D3900180E10 /* LocalizedStringsMac.cpp in Sources */,
 				F544F78815CFB2A800AF33A8 /* Localizer.cpp in Sources */,

Modified: trunk/Source/WebCore/html/NumberInputType.cpp (129875 => 129876)


--- trunk/Source/WebCore/html/NumberInputType.cpp	2012-09-28 11:21:38 UTC (rev 129875)
+++ trunk/Source/WebCore/html/NumberInputType.cpp	2012-09-28 12:02:32 UTC (rev 129876)
@@ -39,7 +39,7 @@
 #include "HTMLParserIdioms.h"
 #include "InputTypeNames.h"
 #include "KeyboardEvent.h"
-#include "LocalizedNumber.h"
+#include "Localizer.h"
 #include "RenderTextControl.h"
 #include <limits>
 #include <wtf/ASCIICType.h>
@@ -235,7 +235,7 @@
     // We don't localize scientific notations.
     if (proposedValue.find(isE) != notFound)
         return proposedValue;
-    return convertToLocalizedNumber(proposedValue);
+    return element()->document()->getLocalizer(element()->computeInheritedLanguage()).convertToLocalizedNumber(proposedValue);
 }
 
 String NumberInputType::visibleValue() const
@@ -250,7 +250,7 @@
     // We don't localize scientific notations.
     if (visibleValue.find(isE) != notFound)
         return visibleValue;
-    return convertFromLocalizedNumber(visibleValue);
+    return element()->document()->getLocalizer(element()->computeInheritedLanguage()).convertFromLocalizedNumber(visibleValue);
 }
 
 bool NumberInputType::isAcceptableValue(const String& proposedValue)

Deleted: trunk/Source/WebCore/platform/text/LocalizedNumber.h (129875 => 129876)


--- trunk/Source/WebCore/platform/text/LocalizedNumber.h	2012-09-28 11:21:38 UTC (rev 129875)
+++ trunk/Source/WebCore/platform/text/LocalizedNumber.h	2012-09-28 12:02:32 UTC (rev 129876)
@@ -1,58 +0,0 @@
-/*
- * Copyright (C) 2011 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef LocalizedNumber_h
-#define LocalizedNumber_h
-
-#include <wtf/text/WTFString.h>
-
-namespace WebCore {
-
-// Converts the specified number string to another number string
-// localized for the browser's current locale. The input string must
-// conform to HTML floating-point numbers, and is not empty.
-String convertToLocalizedNumber(const String&);
-
-// Converts the specified localized number string to a number string
-// in the HTML floating-point number format. The input string is
-// provided by a end user, and might not be a number string. It's ok
-// that the function returns a string which is not conforms to the
-// HTML floating-point number format, callers of this function are
-// responsible to check the format of the resultant string.
-String convertFromLocalizedNumber(const String&);
-
-#if ENABLE(INPUT_MULTIPLE_FIELDS_UI)
-// Returns localized decimal separator, e.g. "." for English, "," for French.
-String localizedDecimalSeparator();
-#endif
-
-} // namespace WebCore
-
-#endif // LocalizedNumber_h

Deleted: trunk/Source/WebCore/platform/text/LocalizedNumberICU.cpp (129875 => 129876)


--- trunk/Source/WebCore/platform/text/LocalizedNumberICU.cpp	2012-09-28 11:21:38 UTC (rev 129875)
+++ trunk/Source/WebCore/platform/text/LocalizedNumberICU.cpp	2012-09-28 12:02:32 UTC (rev 129876)
@@ -1,56 +0,0 @@
-/*
- * Copyright (C) 2011 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-
-#include "LocaleICU.h"
-#include "LocalizedNumber.h"
-
-namespace WebCore {
-
-String convertToLocalizedNumber(const String& canonicalNumberString)
-{
-    return LocaleICU::currentLocale()->convertToLocalizedNumber(canonicalNumberString);
-}
-
-String convertFromLocalizedNumber(const String& localizedNumberString)
-{
-    return LocaleICU::currentLocale()->convertFromLocalizedNumber(localizedNumberString);
-}
-
-#if ENABLE(INPUT_MULTIPLE_FIELDS_UI)
-
-String localizedDecimalSeparator()
-{
-    return LocaleICU::currentLocale()->localizedDecimalSeparator();
-}
-
-#endif
-} // namespace WebCore

Deleted: trunk/Source/WebCore/platform/text/LocalizedNumberNone.cpp (129875 => 129876)


--- trunk/Source/WebCore/platform/text/LocalizedNumberNone.cpp	2012-09-28 11:21:38 UTC (rev 129875)
+++ trunk/Source/WebCore/platform/text/LocalizedNumberNone.cpp	2012-09-28 12:02:32 UTC (rev 129876)
@@ -1,59 +0,0 @@
-/*
- * Copyright (C) 2011 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "LocalizedNumber.h"
-
-#include <limits>
-
-using namespace std;
-
-namespace WebCore {
-
-String convertToLocalizedNumber(const String& canonicalNumberString)
-{
-    return canonicalNumberString;
-}
-
-String convertFromLocalizedNumber(const String& localizedNumberString)
-{
-    return localizedNumberString;
-}
-
-#if ENABLE(INPUT_MULTIPLE_FIELDS_UI)
-
-UChar localizedDecimalSeparator()
-{
-    return '.';
-}
-
-#endif
-
-} // namespace WebCore

Modified: trunk/Source/WebCore/platform/text/Localizer.h (129875 => 129876)


--- trunk/Source/WebCore/platform/text/Localizer.h	2012-09-28 11:21:38 UTC (rev 129875)
+++ trunk/Source/WebCore/platform/text/Localizer.h	2012-09-28 12:02:32 UTC (rev 129876)
@@ -35,9 +35,22 @@
 
 public:
     static PassOwnPtr<Localizer> create(const AtomicString&);
+
+    // Converts the specified number string to another number string localized
+    // for the browser's current locale. The input string must conform to HTML
+    // floating-point numbers, and is not empty.
     String convertToLocalizedNumber(const String&);
+
+    // Converts the specified localized number string to a number string in the
+    // HTML floating-point number format. The input string is provided by a end
+    // user, and might not be a number string. It's ok that the function returns
+    // a string which is not conforms to the HTML floating-point number format,
+    // callers of this function are responsible to check the format of the
+    // resultant string.
     String convertFromLocalizedNumber(const String&);
+
 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI)
+    // Returns localized decimal separator, e.g. "." for English, "," for French.
     String localizedDecimalSeparator();
 
     // Returns time format in Unicode TR35 LDML[1] containing hour, minute, and

Deleted: trunk/Source/WebCore/platform/text/mac/LocalizedNumberMac.mm (129875 => 129876)


--- trunk/Source/WebCore/platform/text/mac/LocalizedNumberMac.mm	2012-09-28 11:21:38 UTC (rev 129875)
+++ trunk/Source/WebCore/platform/text/mac/LocalizedNumberMac.mm	2012-09-28 12:02:32 UTC (rev 129876)
@@ -1,56 +0,0 @@
-/*
- * Copyright (C) 2011,2012 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import "config.h"
-#import "LocalizedNumber.h"
-
-#include "LocaleMac.h"
-
-namespace WebCore {
-
-String convertToLocalizedNumber(const String& canonicalNumberString)
-{
-    return LocaleMac::currentLocale()->convertToLocalizedNumber(canonicalNumberString);
-}
-
-String convertFromLocalizedNumber(const String& localizedNumberString)
-{
-    return LocaleMac::currentLocale()->convertFromLocalizedNumber(localizedNumberString);
-}
-
-#if ENABLE(INPUT_MULTIPLE_FIELDS_UI)
-String localizedDecimalSeparator()
-{
-    return LocaleMac::currentLocale()->localizedDecimalSeparator();
-}
-#endif
-
-} // namespace WebCore
-

Deleted: trunk/Source/WebCore/platform/text/win/LocalizedNumberWin.cpp (129875 => 129876)


--- trunk/Source/WebCore/platform/text/win/LocalizedNumberWin.cpp	2012-09-28 11:21:38 UTC (rev 129875)
+++ trunk/Source/WebCore/platform/text/win/LocalizedNumberWin.cpp	2012-09-28 12:02:32 UTC (rev 129876)
@@ -1,49 +0,0 @@
-/*
- * Copyright (C) 2012 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 2.  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- */
-
-#include "config.h"
-#include "LocalizedNumber.h"
-
-#include "LocaleWin.h"
-
-namespace WebCore {
-
-String convertToLocalizedNumber(const String& canonicalNumberString)
-{
-    return LocaleWin::currentLocale()->convertToLocalizedNumber(canonicalNumberString);
-}
-
-String convertFromLocalizedNumber(const String& localizedNumberString)
-{
-    return LocaleWin::currentLocale()->convertFromLocalizedNumber(localizedNumberString);
-}
-
-#if ENABLE(INPUT_MULTIPLE_FIELDS_UI)
-String localizedDecimalSeparator()
-{
-    return LocaleWin::currentLocale()->localizedDecimalSeparator();
-}
-#endif
-} // namespace WebCore
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to