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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 date.setMillisecondsSinceEpochForDate(m_parameters.minimum); | 86 date.setMillisecondsSinceEpochForDate(m_parameters.minimum); |
87 String minString = date.toString(); | 87 String minString = date.toString(); |
88 date.setMillisecondsSinceEpochForDate(m_parameters.maximum); | 88 date.setMillisecondsSinceEpochForDate(m_parameters.maximum); |
89 String maxString = date.toString(); | 89 String maxString = date.toString(); |
90 String stepString = String::number(m_parameters.step); | 90 String stepString = String::number(m_parameters.step); |
91 String stepBaseString = String::number(m_parameters.stepBase, 11, WTF::Trunc
ateTrailingZeros); | 91 String stepBaseString = String::number(m_parameters.stepBase, 11, WTF::Trunc
ateTrailingZeros); |
92 IntRect anchorRectInScreen = m_chromeClient->rootViewToScreen(m_parameters.a
nchorRectInRootView); | 92 IntRect anchorRectInScreen = m_chromeClient->rootViewToScreen(m_parameters.a
nchorRectInRootView); |
93 FrameView* view = static_cast<WebViewImpl*>(m_chromeClient->webView())->page
()->mainFrame()->view(); | 93 FrameView* view = static_cast<WebViewImpl*>(m_chromeClient->webView())->page
()->mainFrame()->view(); |
94 IntRect rootViewVisibleContentRect = view->visibleContentRect(true /* includ
e scrollbars */); | 94 IntRect rootViewVisibleContentRect = view->visibleContentRect(true /* includ
e scrollbars */); |
95 IntRect rootViewRectInScreen = m_chromeClient->rootViewToScreen(rootViewVisi
bleContentRect); | 95 IntRect rootViewRectInScreen = m_chromeClient->rootViewToScreen(rootViewVisi
bleContentRect); |
| 96 rootViewRectInScreen.move(-view->scrollX(), -view->scrollY()); |
96 | 97 |
97 addString("<!DOCTYPE html><head><meta charset='UTF-8'><style>\n", writer); | 98 addString("<!DOCTYPE html><head><meta charset='UTF-8'><style>\n", writer); |
98 writer.addData(WebCore::pickerCommonCss, sizeof(WebCore::pickerCommonCss)); | 99 writer.addData(WebCore::pickerCommonCss, sizeof(WebCore::pickerCommonCss)); |
99 writer.addData(WebCore::suggestionPickerCss, sizeof(WebCore::suggestionPicke
rCss)); | 100 writer.addData(WebCore::suggestionPickerCss, sizeof(WebCore::suggestionPicke
rCss)); |
100 writer.addData(WebCore::calendarPickerCss, sizeof(WebCore::calendarPickerCss
)); | 101 writer.addData(WebCore::calendarPickerCss, sizeof(WebCore::calendarPickerCss
)); |
101 CString extraStyle = WebCore::RenderTheme::defaultTheme()->extraCalendarPick
erStyleSheet(); | 102 CString extraStyle = WebCore::RenderTheme::defaultTheme()->extraCalendarPick
erStyleSheet(); |
102 if (extraStyle.length()) | 103 if (extraStyle.length()) |
103 writer.addData(extraStyle.data(), extraStyle.length()); | 104 writer.addData(extraStyle.data(), extraStyle.length()); |
104 addString("</style></head><body><div id=main>Loading...</div><script>\n" | 105 addString("</style></head><body><div id=main>Loading...</div><script>\n" |
105 "window.dialogArguments = {\n", writer); | 106 "window.dialogArguments = {\n", writer); |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 void DateTimeChooserImpl::didClosePopup() | 158 void DateTimeChooserImpl::didClosePopup() |
158 { | 159 { |
159 ASSERT(m_client); | 160 ASSERT(m_client); |
160 m_popup = 0; | 161 m_popup = 0; |
161 m_client->didEndChooser(); | 162 m_client->didEndChooser(); |
162 } | 163 } |
163 | 164 |
164 } // namespace WebKit | 165 } // namespace WebKit |
165 | 166 |
166 #endif // ENABLE(CALENDAR_PICKER) | 167 #endif // ENABLE(CALENDAR_PICKER) |
OLD | NEW |