Title: [131422] trunk/Source/WebCore
Revision
131422
Author
tk...@chromium.org
Date
2012-10-16 00:29:57 -0700 (Tue, 16 Oct 2012)

Log Message

Remove unused functions in Locale* classes
https://bugs.webkit.org/show_bug.cgi?id=99425

Reviewed by Yuta Kitamura.

Locale*::currentLocale has been unused since LocalizedDate* and
LocalizedNumber* were removed.

No new tests. This shouldn't change any behavior.

* platform/text/LocaleICU.cpp: Remove createForCurrentLocale and currentLocale.
* platform/text/LocaleICU.h: Ditto.
* platform/text/LocaleWin.cpp: Remove currentLocale.
* platform/text/LocaleWin.h: Ditto.
* platform/text/mac/LocaleMac.h: Remove currentLocale.
* platform/text/mac/LocaleMac.mm: Ditto.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (131421 => 131422)


--- trunk/Source/WebCore/ChangeLog	2012-10-16 06:54:46 UTC (rev 131421)
+++ trunk/Source/WebCore/ChangeLog	2012-10-16 07:29:57 UTC (rev 131422)
@@ -1,3 +1,22 @@
+2012-10-16  Kent Tamura  <tk...@chromium.org>
+
+        Remove unused functions in Locale* classes
+        https://bugs.webkit.org/show_bug.cgi?id=99425
+
+        Reviewed by Yuta Kitamura.
+
+        Locale*::currentLocale has been unused since LocalizedDate* and
+        LocalizedNumber* were removed.
+
+        No new tests. This shouldn't change any behavior.
+
+        * platform/text/LocaleICU.cpp: Remove createForCurrentLocale and currentLocale.
+        * platform/text/LocaleICU.h: Ditto.
+        * platform/text/LocaleWin.cpp: Remove currentLocale.
+        * platform/text/LocaleWin.h: Ditto.
+        * platform/text/mac/LocaleMac.h: Remove currentLocale.
+        * platform/text/mac/LocaleMac.mm: Ditto.
+
 2012-10-15  Kent Tamura  <tk...@chromium.org>
 
         Fix some appearance glitches of multiple fields input elements

Modified: trunk/Source/WebCore/platform/text/LocaleICU.cpp (131421 => 131422)


--- trunk/Source/WebCore/platform/text/LocaleICU.cpp	2012-10-16 06:54:46 UTC (rev 131421)
+++ trunk/Source/WebCore/platform/text/LocaleICU.cpp	2012-10-16 07:29:57 UTC (rev 131422)
@@ -80,17 +80,6 @@
     return adoptPtr(new LocaleICU(localeString));
 }
 
-PassOwnPtr<LocaleICU> LocaleICU::createForCurrentLocale()
-{
-    return adoptPtr(new LocaleICU(0));
-}
-
-LocaleICU* LocaleICU::currentLocale()
-{
-    static LocaleICU* currentLocale = LocaleICU::createForCurrentLocale().leakPtr();
-    return currentLocale;
-}
-
 String LocaleICU::decimalSymbol(UNumberFormatSymbol symbol)
 {
     UErrorCode status = U_ZERO_ERROR;

Modified: trunk/Source/WebCore/platform/text/LocaleICU.h (131421 => 131422)


--- trunk/Source/WebCore/platform/text/LocaleICU.h	2012-10-16 06:54:46 UTC (rev 131421)
+++ trunk/Source/WebCore/platform/text/LocaleICU.h	2012-10-16 07:29:57 UTC (rev 131422)
@@ -47,7 +47,6 @@
 class LocaleICU : public Localizer {
 public:
     static PassOwnPtr<LocaleICU> create(const char* localeString);
-    static LocaleICU* currentLocale();
     virtual ~LocaleICU();
 
     // For LocalizedDate
@@ -70,7 +69,6 @@
 #endif
 
 private:
-    static PassOwnPtr<LocaleICU> createForCurrentLocale();
     explicit LocaleICU(const char*);
     String decimalSymbol(UNumberFormatSymbol);
     String decimalTextAttribute(UNumberFormatTextAttribute);

Modified: trunk/Source/WebCore/platform/text/LocaleWin.cpp (131421 => 131422)


--- trunk/Source/WebCore/platform/text/LocaleWin.cpp	2012-10-16 06:54:46 UTC (rev 131421)
+++ trunk/Source/WebCore/platform/text/LocaleWin.cpp	2012-10-16 07:29:57 UTC (rev 131422)
@@ -119,12 +119,6 @@
     return adoptPtr(new LocaleWin(lcid));
 }
 
-LocaleWin* LocaleWin::currentLocale()
-{
-    static LocaleWin* currentLocale = LocaleWin::create(LCIDFromLocale(defaultLanguage())).leakPtr();
-    return currentLocale;
-}
-
 LocaleWin::~LocaleWin()
 {
 }

Modified: trunk/Source/WebCore/platform/text/LocaleWin.h (131421 => 131422)


--- trunk/Source/WebCore/platform/text/LocaleWin.h	2012-10-16 06:54:46 UTC (rev 131421)
+++ trunk/Source/WebCore/platform/text/LocaleWin.h	2012-10-16 07:29:57 UTC (rev 131422)
@@ -45,7 +45,6 @@
 class LocaleWin : public Localizer {
 public:
     static PassOwnPtr<LocaleWin> create(LCID);
-    static LocaleWin* currentLocale();
     ~LocaleWin();
     virtual double parseDateTime(const String&, DateComponents::Type) OVERRIDE;
     virtual String formatDateTime(const DateComponents&, FormatType = FormatTypeUnspecified) OVERRIDE;

Modified: trunk/Source/WebCore/platform/text/mac/LocaleMac.h (131421 => 131422)


--- trunk/Source/WebCore/platform/text/mac/LocaleMac.h	2012-10-16 06:54:46 UTC (rev 131421)
+++ trunk/Source/WebCore/platform/text/mac/LocaleMac.h	2012-10-16 07:29:57 UTC (rev 131422)
@@ -49,7 +49,6 @@
 public:
     static PassOwnPtr<LocaleMac> create(const String&);
     static PassOwnPtr<LocaleMac> create(NSLocale*);
-    static LocaleMac* currentLocale();
     ~LocaleMac();
     virtual double parseDateTime(const String&, DateComponents::Type) OVERRIDE;
     virtual String formatDateTime(const DateComponents&, FormatType = FormatTypeUnspecified) OVERRIDE;

Modified: trunk/Source/WebCore/platform/text/mac/LocaleMac.mm (131421 => 131422)


--- trunk/Source/WebCore/platform/text/mac/LocaleMac.mm	2012-10-16 06:54:46 UTC (rev 131421)
+++ trunk/Source/WebCore/platform/text/mac/LocaleMac.mm	2012-10-16 07:29:57 UTC (rev 131422)
@@ -108,12 +108,6 @@
     return adoptPtr(new LocaleMac(locale));
 }
 
-LocaleMac* LocaleMac::currentLocale()
-{
-    static LocaleMac* currentLocale = new LocaleMac(determineLocale(defaultLanguage()));
-    return currentLocale;
-}
-
 RetainPtr<NSDateFormatter> LocaleMac::shortDateFormatter()
 {
     return createDateTimeFormatter(m_locale.get(), m_gregorianCalendar.get(), NSDateFormatterShortStyle, NSDateFormatterNoStyle);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to