Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(458)

Side by Side Diff: third_party/WebKit/Source/web/DateTimeChooserImpl.cpp

Issue 2290233007: Move convertViewportToWindow and convertWindowToViewport from (Closed)
Patch Set: add client to WebSharedWorkerImpl Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 float scaleFactor = m_chromeClient->windowToViewportScalar(1.0f); 131 float scaleFactor = m_chromeClient->windowToViewportScalar(*ownerElement().d ocument().frame()->view(), 1.0f);
132 addProperty("zoomFactor", zoomFactor() / scaleFactor, data); 132 addProperty("zoomFactor", zoomFactor() / scaleFactor, data);
133 addProperty("min", valueToDateTimeString(m_parameters.minimum, m_parameters. type), data); 133 addProperty("min", valueToDateTimeString(m_parameters.minimum, m_parameters. type), data);
134 addProperty("max", valueToDateTimeString(m_parameters.maximum, m_parameters. type), data); 134 addProperty("max", valueToDateTimeString(m_parameters.maximum, m_parameters. type), data);
135 addProperty("step", stepString, data); 135 addProperty("step", stepString, data);
136 addProperty("stepBase", stepBaseString, data); 136 addProperty("stepBase", stepBaseString, data);
137 addProperty("required", m_parameters.required, data); 137 addProperty("required", m_parameters.required, data);
138 addProperty("currentValue", valueToDateTimeString(m_parameters.doubleValue, m_parameters.type), data); 138 addProperty("currentValue", valueToDateTimeString(m_parameters.doubleValue, m_parameters.type), data);
139 addProperty("locale", m_parameters.locale.getString(), data); 139 addProperty("locale", m_parameters.locale.getString(), data);
140 addProperty("todayLabel", todayLabelString, data); 140 addProperty("todayLabel", todayLabelString, data);
141 addProperty("clearLabel", locale().queryString(WebLocalizedString::CalendarC lear), data); 141 addProperty("clearLabel", locale().queryString(WebLocalizedString::CalendarC lear), data);
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 } 203 }
204 204
205 void DateTimeChooserImpl::didClosePopup() 205 void DateTimeChooserImpl::didClosePopup()
206 { 206 {
207 DCHECK(m_client); 207 DCHECK(m_client);
208 m_popup = nullptr; 208 m_popup = nullptr;
209 m_client->didEndChooser(); 209 m_client->didEndChooser();
210 } 210 }
211 211
212 } // namespace blink 212 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/ChromeClientImpl.cpp ('k') | third_party/WebKit/Source/web/InspectorOverlay.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698