Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / core / page / PagePopupController.cpp
index 3d16004..5fb282c 100644 (file)
@@ -41,7 +41,6 @@ PagePopupController::PagePopupController(PagePopupClient* client)
     : m_popupClient(client)
 {
     ASSERT(client);
-    ScriptWrappable::init(this);
 }
 
 PassRefPtrWillBeRawPtr<PagePopupController> PagePopupController::create(PagePopupClient* client)
@@ -92,6 +91,17 @@ String PagePopupController::formatShortMonth(int year, int zeroBaseMonth)
     return m_popupClient->locale().formatDateTime(date, Locale::FormatTypeShort);
 }
 
+String PagePopupController::formatWeek(int year, int weekNumber, const String& localizedDateString)
+{
+    if (!m_popupClient)
+        return emptyString();
+    DateComponents week;
+    bool setWeekResult = week.setWeek(year, weekNumber);
+    ASSERT_UNUSED(setWeekResult, setWeekResult);
+    String localizedWeek = m_popupClient->locale().formatDateTime(week);
+    return m_popupClient->locale().queryString(WebLocalizedString::AXCalendarWeekDescription, localizedWeek, localizedDateString);
+}
+
 void PagePopupController::clearPagePopupClient()
 {
     m_popupClient = 0;