Title: [115038] trunk/Source/WebCore
Revision
115038
Author
tk...@chromium.org
Date
2012-04-24 05:49:03 -0700 (Tue, 24 Apr 2012)

Log Message

Merge LocalizedCalendar into LocalizedDate
https://bugs.webkit.org/show_bug.cgi?id=84685

Reviewed by Kentaro Hara.

The functionality of LocalizedCalendar is very related to
LocalizedDate. We should merge them.

No new tests. Just refactoring.

* WebCore.gypi: Remove LocalizedCalendar.h and LocalizedCalenderICU.cpp.
* html/shadow/CalendarPickerElement.cpp:
Include LocalizedDate.h instead of LocalizedCalendar.h.
* platform/text/LocalizedCalendar.h:
Removed. Merged into LocalizedDate.h.
* platform/text/LocalizedCalendarICU.cpp:
Removed. Merged into LocalizedDateICU.h.
* platform/text/LocalizedDate.h:
(WebCore): Move some functions from LocalizedCalendar.h.
* platform/text/LocalizedDateICU.cpp:
Move some functions from LocalizedCalendarICU.cpp.

Modified Paths

Removed Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (115037 => 115038)


--- trunk/Source/WebCore/ChangeLog	2012-04-24 12:41:59 UTC (rev 115037)
+++ trunk/Source/WebCore/ChangeLog	2012-04-24 12:49:03 UTC (rev 115038)
@@ -1,3 +1,27 @@
+2012-04-24  Kent Tamura  <tk...@chromium.org>
+
+        Merge LocalizedCalendar into LocalizedDate
+        https://bugs.webkit.org/show_bug.cgi?id=84685
+
+        Reviewed by Kentaro Hara.
+
+        The functionality of LocalizedCalendar is very related to
+        LocalizedDate. We should merge them.
+
+        No new tests. Just refactoring.
+
+        * WebCore.gypi: Remove LocalizedCalendar.h and LocalizedCalenderICU.cpp.
+        * html/shadow/CalendarPickerElement.cpp:
+        Include LocalizedDate.h instead of LocalizedCalendar.h.
+        * platform/text/LocalizedCalendar.h:
+        Removed. Merged into LocalizedDate.h.
+        * platform/text/LocalizedCalendarICU.cpp:
+        Removed. Merged into LocalizedDateICU.h.
+        * platform/text/LocalizedDate.h:
+        (WebCore): Move some functions from LocalizedCalendar.h.
+        * platform/text/LocalizedDateICU.cpp:
+        Move some functions from LocalizedCalendarICU.cpp.
+
 2012-04-24  Pavel Feldman  <pfeld...@chromium.org>
 
         Web Inspector: remove pure delegation code from DebuggerPresentationModel

Modified: trunk/Source/WebCore/WebCore.gypi (115037 => 115038)


--- trunk/Source/WebCore/WebCore.gypi	2012-04-24 12:41:59 UTC (rev 115037)
+++ trunk/Source/WebCore/WebCore.gypi	2012-04-24 12:49:03 UTC (rev 115038)
@@ -4466,8 +4466,6 @@
             'platform/text/LocaleToScriptMapping.h',
             'platform/text/LocaleToScriptMappingDefault.cpp',
             'platform/text/LocaleToScriptMappingICU.cpp',
-            'platform/text/LocalizedCalendar.h',
-            'platform/text/LocalizedCalendarICU.cpp',
             'platform/text/LocalizedDate.h',
             'platform/text/LocalizedDateICU.cpp',
             'platform/text/LocalizedDateNone.cpp',

Modified: trunk/Source/WebCore/html/shadow/CalendarPickerElement.cpp (115037 => 115038)


--- trunk/Source/WebCore/html/shadow/CalendarPickerElement.cpp	2012-04-24 12:41:59 UTC (rev 115037)
+++ trunk/Source/WebCore/html/shadow/CalendarPickerElement.cpp	2012-04-24 12:49:03 UTC (rev 115038)
@@ -43,7 +43,7 @@
 #include "HTMLInputElement.h"
 #include "HTMLNames.h"
 #include "Language.h"
-#include "LocalizedCalendar.h"
+#include "LocalizedDate.h"
 #include "LocalizedStrings.h"
 #include "Page.h"
 #include "RenderDetailsMarker.h"

Deleted: trunk/Source/WebCore/platform/text/LocalizedCalendar.h (115037 => 115038)


--- trunk/Source/WebCore/platform/text/LocalizedCalendar.h	2012-04-24 12:41:59 UTC (rev 115037)
+++ trunk/Source/WebCore/platform/text/LocalizedCalendar.h	2012-04-24 12:49:03 UTC (rev 115038)
@@ -1,55 +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:
- *
- *     * 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 LocalizedCalendar_h
-#define LocalizedCalendar_h
-
-#if ENABLE(CALENDAR_PICKER)
-#include <wtf/Vector.h>
-#include <wtf/text/WTFString.h>
-
-namespace WebCore {
-
-// Returns a vector of string of which size is 12. The first item is a
-// localized string of January, and the last item is a localized
-// string of December. These strings should not be abbreviations.
-const Vector<String>& monthLabels();
-
-// Returns a vector of string of which size is 7. The first item is a
-// localized short string of Monday, and the last item is a localized
-// short string of Saturday. These strings should be short.
-const Vector<String>& weekDayShortLabels();
-
-// The first day of a week. 0 is Sunday, and 6 is Saturday.
-unsigned firstDayOfWeek();
-
-}
-#endif
-#endif

Deleted: trunk/Source/WebCore/platform/text/LocalizedCalendarICU.cpp (115037 => 115038)


--- trunk/Source/WebCore/platform/text/LocalizedCalendarICU.cpp	2012-04-24 12:41:59 UTC (rev 115037)
+++ trunk/Source/WebCore/platform/text/LocalizedCalendarICU.cpp	2012-04-24 12:49:03 UTC (rev 115038)
@@ -1,55 +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:
- *
- *     * 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 "LocalizedCalendar.h"
-
-#if ENABLE(CALENDAR_PICKER)
-#include "ICULocale.h"
-
-namespace WebCore {
-
-const Vector<String>& monthLabels()
-{
-    return ICULocale::currentLocale()->monthLabels();
-}
-
-const Vector<String>& weekDayShortLabels()
-{
-    return ICULocale::currentLocale()->weekDayShortLabels();
-}
-
-unsigned firstDayOfWeek()
-{
-    return ICULocale::currentLocale()->firstDayOfWeek();
-}
-
-}
-#endif

Modified: trunk/Source/WebCore/platform/text/LocalizedDate.h (115037 => 115038)


--- trunk/Source/WebCore/platform/text/LocalizedDate.h	2012-04-24 12:41:59 UTC (rev 115037)
+++ trunk/Source/WebCore/platform/text/LocalizedDate.h	2012-04-24 12:49:03 UTC (rev 115038)
@@ -27,6 +27,7 @@
 #define LocalizedDate_h
 
 #include "DateComponents.h"
+#include <wtf/Vector.h>
 #include <wtf/text/WTFString.h>
 
 namespace WebCore {
@@ -46,6 +47,19 @@
 
 #if ENABLE(CALENDAR_PICKER)
 String localizedDateFormatText();
+
+// Returns a vector of string of which size is 12. The first item is a
+// localized string of January, and the last item is a localized
+// string of December. These strings should not be abbreviations.
+const Vector<String>& monthLabels();
+
+// Returns a vector of string of which size is 7. The first item is a
+// localized short string of Monday, and the last item is a localized
+// short string of Saturday. These strings should be short.
+const Vector<String>& weekDayShortLabels();
+
+// The first day of a week. 0 is Sunday, and 6 is Saturday.
+unsigned firstDayOfWeek();
 #endif
 } // namespace WebCore
 

Modified: trunk/Source/WebCore/platform/text/LocalizedDateICU.cpp (115037 => 115038)


--- trunk/Source/WebCore/platform/text/LocalizedDateICU.cpp	2012-04-24 12:41:59 UTC (rev 115037)
+++ trunk/Source/WebCore/platform/text/LocalizedDateICU.cpp	2012-04-24 12:49:03 UTC (rev 115038)
@@ -75,6 +75,21 @@
 {
     return ICULocale::currentLocale()->localizedDateFormatText();
 }
+
+const Vector<String>& monthLabels()
+{
+    return ICULocale::currentLocale()->monthLabels();
+}
+
+const Vector<String>& weekDayShortLabels()
+{
+    return ICULocale::currentLocale()->weekDayShortLabels();
+}
+
+unsigned firstDayOfWeek()
+{
+    return ICULocale::currentLocale()->firstDayOfWeek();
+}
 #endif
 
 }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to