OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 } | 121 } |
122 | 122 |
123 addString("<!DOCTYPE html><head><meta charset='UTF-8'><style>\n", data); | 123 addString("<!DOCTYPE html><head><meta charset='UTF-8'><style>\n", data); |
124 data->append(Platform::current()->loadResource("pickerCommon.css")); | 124 data->append(Platform::current()->loadResource("pickerCommon.css")); |
125 data->append(Platform::current()->loadResource("pickerButton.css")); | 125 data->append(Platform::current()->loadResource("pickerButton.css")); |
126 data->append(Platform::current()->loadResource("suggestionPicker.css")); | 126 data->append(Platform::current()->loadResource("suggestionPicker.css")); |
127 data->append(Platform::current()->loadResource("calendarPicker.css")); | 127 data->append(Platform::current()->loadResource("calendarPicker.css")); |
128 addString("</style></head><body><div id=main>Loading...</div><script>\n" | 128 addString("</style></head><body><div id=main>Loading...</div><script>\n" |
129 "window.dialogArguments = {\n", data); | 129 "window.dialogArguments = {\n", data); |
130 addProperty("anchorRectInScreen", m_parameters.anchorRectInScreen, data); | 130 addProperty("anchorRectInScreen", m_parameters.anchorRectInScreen, data); |
131 IntRect inScreen = m_chromeClient->viewportToScreen(IntRect(0, 0, 100, 0)); | 131 float scaleFactor = m_chromeClient->windowToViewport(FloatRect(0, 0, 1.0f, 0
)).width(); |
132 float scaleFactor = 100.f / inScreen.width(); | |
133 addProperty("zoomFactor", zoomFactor() / scaleFactor, data); | 132 addProperty("zoomFactor", zoomFactor() / scaleFactor, data); |
134 addProperty("min", valueToDateTimeString(m_parameters.minimum, m_parameters.
type), data); | 133 addProperty("min", valueToDateTimeString(m_parameters.minimum, m_parameters.
type), data); |
135 addProperty("max", valueToDateTimeString(m_parameters.maximum, m_parameters.
type), data); | 134 addProperty("max", valueToDateTimeString(m_parameters.maximum, m_parameters.
type), data); |
136 addProperty("step", stepString, data); | 135 addProperty("step", stepString, data); |
137 addProperty("stepBase", stepBaseString, data); | 136 addProperty("stepBase", stepBaseString, data); |
138 addProperty("required", m_parameters.required, data); | 137 addProperty("required", m_parameters.required, data); |
139 addProperty("currentValue", valueToDateTimeString(m_parameters.doubleValue,
m_parameters.type), data); | 138 addProperty("currentValue", valueToDateTimeString(m_parameters.doubleValue,
m_parameters.type), data); |
140 addProperty("locale", m_parameters.locale.string(), data); | 139 addProperty("locale", m_parameters.locale.string(), data); |
141 addProperty("todayLabel", todayLabelString, data); | 140 addProperty("todayLabel", todayLabelString, data); |
142 addProperty("clearLabel", locale().queryString(WebLocalizedString::CalendarC
lear), data); | 141 addProperty("clearLabel", locale().queryString(WebLocalizedString::CalendarC
lear), data); |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 void DateTimeChooserImpl::didClosePopup() | 206 void DateTimeChooserImpl::didClosePopup() |
208 { | 207 { |
209 ASSERT(m_client); | 208 ASSERT(m_client); |
210 m_popup = nullptr; | 209 m_popup = nullptr; |
211 m_client->didEndChooser(); | 210 m_client->didEndChooser(); |
212 } | 211 } |
213 | 212 |
214 } // namespace blink | 213 } // namespace blink |
215 | 214 |
216 #endif // ENABLE(INPUT_MULTIPLE_FIELDS_UI) | 215 #endif // ENABLE(INPUT_MULTIPLE_FIELDS_UI) |
OLD | NEW |