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

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

Issue 2095113002: Fix date picker datalist suggestion dropdown size with use-zoom-for-dsf. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: forgot to rebaseline linux Created 4 years, 5 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
« no previous file with comments | « third_party/WebKit/Source/core/html/forms/DateTimeChooser.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 Vector<String> localizedSuggestionValues; 154 Vector<String> localizedSuggestionValues;
155 Vector<String> suggestionLabels; 155 Vector<String> suggestionLabels;
156 for (unsigned i = 0; i < m_parameters.suggestions.size(); i++) { 156 for (unsigned i = 0; i < m_parameters.suggestions.size(); i++) {
157 suggestionValues.append(valueToDateTimeString(m_parameters.suggestio ns[i].value, m_parameters.type)); 157 suggestionValues.append(valueToDateTimeString(m_parameters.suggestio ns[i].value, m_parameters.type));
158 localizedSuggestionValues.append(m_parameters.suggestions[i].localiz edValue); 158 localizedSuggestionValues.append(m_parameters.suggestions[i].localiz edValue);
159 suggestionLabels.append(m_parameters.suggestions[i].label); 159 suggestionLabels.append(m_parameters.suggestions[i].label);
160 } 160 }
161 addProperty("suggestionValues", suggestionValues, data); 161 addProperty("suggestionValues", suggestionValues, data);
162 addProperty("localizedSuggestionValues", localizedSuggestionValues, data ); 162 addProperty("localizedSuggestionValues", localizedSuggestionValues, data );
163 addProperty("suggestionLabels", suggestionLabels, data); 163 addProperty("suggestionLabels", suggestionLabels, data);
164 addProperty("inputWidth", static_cast<unsigned>(m_parameters.anchorRectI nRootFrame.width()), data); 164 addProperty("inputWidth", static_cast<unsigned>(m_parameters.anchorRectI nScreen.width()), data);
165 addProperty("showOtherDateEntry", LayoutTheme::theme().supportsCalendarP icker(m_parameters.type), data); 165 addProperty("showOtherDateEntry", LayoutTheme::theme().supportsCalendarP icker(m_parameters.type), data);
166 addProperty("otherDateLabel", otherDateLabelString, data); 166 addProperty("otherDateLabel", otherDateLabelString, data);
167 addProperty("suggestionHighlightColor", LayoutTheme::theme().activeListB oxSelectionBackgroundColor().serialized(), data); 167 addProperty("suggestionHighlightColor", LayoutTheme::theme().activeListB oxSelectionBackgroundColor().serialized(), data);
168 addProperty("suggestionHighlightTextColor", LayoutTheme::theme().activeL istBoxSelectionForegroundColor().serialized(), data); 168 addProperty("suggestionHighlightTextColor", LayoutTheme::theme().activeL istBoxSelectionForegroundColor().serialized(), data);
169 } 169 }
170 addString("}\n", data); 170 addString("}\n", data);
171 171
172 data->append(Platform::current()->loadResource("pickerCommon.js")); 172 data->append(Platform::current()->loadResource("pickerCommon.js"));
173 data->append(Platform::current()->loadResource("suggestionPicker.js")); 173 data->append(Platform::current()->loadResource("suggestionPicker.js"));
174 data->append(Platform::current()->loadResource("calendarPicker.js")); 174 data->append(Platform::current()->loadResource("calendarPicker.js"));
(...skipping 28 matching lines...) Expand all
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/core/html/forms/DateTimeChooser.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698