| Index: Source/web/DateTimeChooserImpl.cpp
|
| diff --git a/Source/web/DateTimeChooserImpl.cpp b/Source/web/DateTimeChooserImpl.cpp
|
| index 81ec437ffc9816281392fff5f8667eb2884d71ff..de6ec617127b5ed50230432239f4d556e126b5b2 100644
|
| --- a/Source/web/DateTimeChooserImpl.cpp
|
| +++ b/Source/web/DateTimeChooserImpl.cpp
|
| @@ -43,23 +43,21 @@
|
| #include "web/ChromeClientImpl.h"
|
| #include "web/WebViewImpl.h"
|
|
|
| -using namespace blink;
|
| -
|
| namespace blink {
|
|
|
| -DateTimeChooserImpl::DateTimeChooserImpl(ChromeClientImpl* chromeClient, blink::DateTimeChooserClient* client, const blink::DateTimeChooserParameters& parameters)
|
| +DateTimeChooserImpl::DateTimeChooserImpl(ChromeClientImpl* chromeClient, DateTimeChooserClient* client, const DateTimeChooserParameters& parameters)
|
| : m_chromeClient(chromeClient)
|
| , m_client(client)
|
| , m_popup(0)
|
| , m_parameters(parameters)
|
| - , m_locale(blink::Locale::create(parameters.locale))
|
| + , m_locale(Locale::create(parameters.locale))
|
| {
|
| ASSERT(m_chromeClient);
|
| ASSERT(m_client);
|
| m_popup = m_chromeClient->openPagePopup(this, m_parameters.anchorRectInRootView);
|
| }
|
|
|
| -PassRefPtrWillBeRawPtr<DateTimeChooserImpl> DateTimeChooserImpl::create(ChromeClientImpl* chromeClient, blink::DateTimeChooserClient* client, const blink::DateTimeChooserParameters& parameters)
|
| +PassRefPtrWillBeRawPtr<DateTimeChooserImpl> DateTimeChooserImpl::create(ChromeClientImpl* chromeClient, DateTimeChooserClient* client, const DateTimeChooserParameters& parameters)
|
| {
|
| return adoptRefWillBeNoop(new DateTimeChooserImpl(chromeClient, client, parameters));
|
| }
|
| @@ -75,40 +73,40 @@ void DateTimeChooserImpl::endChooser()
|
| m_chromeClient->closePagePopup(m_popup);
|
| }
|
|
|
| -blink::IntSize DateTimeChooserImpl::contentSize()
|
| +IntSize DateTimeChooserImpl::contentSize()
|
| {
|
| - return blink::IntSize(0, 0);
|
| + return IntSize(0, 0);
|
| }
|
|
|
| static String valueToDateTimeString(double value, AtomicString type)
|
| {
|
| - blink::DateComponents components;
|
| - if (type == blink::InputTypeNames::date)
|
| + DateComponents components;
|
| + if (type == InputTypeNames::date)
|
| components.setMillisecondsSinceEpochForDate(value);
|
| - else if (type == blink::InputTypeNames::datetime_local)
|
| + else if (type == InputTypeNames::datetime_local)
|
| components.setMillisecondsSinceEpochForDateTimeLocal(value);
|
| - else if (type == blink::InputTypeNames::month)
|
| + else if (type == InputTypeNames::month)
|
| components.setMonthsSinceEpoch(value);
|
| - else if (type == blink::InputTypeNames::time)
|
| + else if (type == InputTypeNames::time)
|
| components.setMillisecondsSinceMidnight(value);
|
| - else if (type == blink::InputTypeNames::week)
|
| + else if (type == InputTypeNames::week)
|
| components.setMillisecondsSinceEpochForWeek(value);
|
| else
|
| ASSERT_NOT_REACHED();
|
| - return components.type() == blink::DateComponents::Invalid ? String() : components.toString();
|
| + return components.type() == DateComponents::Invalid ? String() : components.toString();
|
| }
|
|
|
| -void DateTimeChooserImpl::writeDocument(blink::SharedBuffer* data)
|
| +void DateTimeChooserImpl::writeDocument(SharedBuffer* data)
|
| {
|
| String stepString = String::number(m_parameters.step);
|
| String stepBaseString = String::number(m_parameters.stepBase, 11, WTF::TruncateTrailingZeros);
|
| IntRect anchorRectInScreen = m_chromeClient->rootViewToScreen(m_parameters.anchorRectInRootView);
|
| String todayLabelString;
|
| String otherDateLabelString;
|
| - if (m_parameters.type == blink::InputTypeNames::month) {
|
| + if (m_parameters.type == InputTypeNames::month) {
|
| todayLabelString = locale().queryString(WebLocalizedString::ThisMonthButtonLabel);
|
| otherDateLabelString = locale().queryString(WebLocalizedString::OtherMonthLabel);
|
| - } else if (m_parameters.type == blink::InputTypeNames::week) {
|
| + } else if (m_parameters.type == InputTypeNames::week) {
|
| todayLabelString = locale().queryString(WebLocalizedString::ThisWeekButtonLabel);
|
| otherDateLabelString = locale().queryString(WebLocalizedString::OtherWeekLabel);
|
| } else {
|
| @@ -117,10 +115,10 @@ void DateTimeChooserImpl::writeDocument(blink::SharedBuffer* data)
|
| }
|
|
|
| addString("<!DOCTYPE html><head><meta charset='UTF-8'><style>\n", data);
|
| - data->append(blink::Platform::current()->loadResource("pickerCommon.css"));
|
| - data->append(blink::Platform::current()->loadResource("pickerButton.css"));
|
| - data->append(blink::Platform::current()->loadResource("suggestionPicker.css"));
|
| - data->append(blink::Platform::current()->loadResource("calendarPicker.css"));
|
| + data->append(Platform::current()->loadResource("pickerCommon.css"));
|
| + data->append(Platform::current()->loadResource("pickerButton.css"));
|
| + data->append(Platform::current()->loadResource("suggestionPicker.css"));
|
| + data->append(Platform::current()->loadResource("calendarPicker.css"));
|
| addString("</style></head><body><div id=main>Loading...</div><script>\n"
|
| "window.dialogArguments = {\n", data);
|
| addProperty("anchorRectInScreen", anchorRectInScreen, data);
|
| @@ -153,20 +151,20 @@ void DateTimeChooserImpl::writeDocument(blink::SharedBuffer* data)
|
| addProperty("localizedSuggestionValues", localizedSuggestionValues, data);
|
| addProperty("suggestionLabels", suggestionLabels, data);
|
| addProperty("inputWidth", static_cast<unsigned>(m_parameters.anchorRectInRootView.width()), data);
|
| - addProperty("showOtherDateEntry", blink::RenderTheme::theme().supportsCalendarPicker(m_parameters.type), data);
|
| + addProperty("showOtherDateEntry", RenderTheme::theme().supportsCalendarPicker(m_parameters.type), data);
|
| addProperty("otherDateLabel", otherDateLabelString, data);
|
| - addProperty("suggestionHighlightColor", blink::RenderTheme::theme().activeListBoxSelectionBackgroundColor().serialized(), data);
|
| - addProperty("suggestionHighlightTextColor", blink::RenderTheme::theme().activeListBoxSelectionForegroundColor().serialized(), data);
|
| + addProperty("suggestionHighlightColor", RenderTheme::theme().activeListBoxSelectionBackgroundColor().serialized(), data);
|
| + addProperty("suggestionHighlightTextColor", RenderTheme::theme().activeListBoxSelectionForegroundColor().serialized(), data);
|
| }
|
| addString("}\n", data);
|
|
|
| - data->append(blink::Platform::current()->loadResource("pickerCommon.js"));
|
| - data->append(blink::Platform::current()->loadResource("suggestionPicker.js"));
|
| - data->append(blink::Platform::current()->loadResource("calendarPicker.js"));
|
| + data->append(Platform::current()->loadResource("pickerCommon.js"));
|
| + data->append(Platform::current()->loadResource("suggestionPicker.js"));
|
| + data->append(Platform::current()->loadResource("calendarPicker.js"));
|
| addString("</script></body>\n", data);
|
| }
|
|
|
| -blink::Locale& DateTimeChooserImpl::locale()
|
| +Locale& DateTimeChooserImpl::locale()
|
| {
|
| return *m_locale;
|
| }
|
|
|