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

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

Issue 2612903007: Migrate WTF::Vector::append() to ::push_back() [part 15 of N] (Closed)
Patch Set: Created 3 years, 11 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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 addProperty("shortMonthLabels", m_locale->shortMonthLabels(), data); 169 addProperty("shortMonthLabels", m_locale->shortMonthLabels(), data);
170 addProperty("dayLabels", m_locale->weekDayShortLabels(), data); 170 addProperty("dayLabels", m_locale->weekDayShortLabels(), data);
171 addProperty("isLocaleRTL", m_locale->isRTL(), data); 171 addProperty("isLocaleRTL", m_locale->isRTL(), data);
172 addProperty("isRTL", m_parameters.isAnchorElementRTL, data); 172 addProperty("isRTL", m_parameters.isAnchorElementRTL, data);
173 addProperty("mode", m_parameters.type.getString(), data); 173 addProperty("mode", m_parameters.type.getString(), data);
174 if (m_parameters.suggestions.size()) { 174 if (m_parameters.suggestions.size()) {
175 Vector<String> suggestionValues; 175 Vector<String> suggestionValues;
176 Vector<String> localizedSuggestionValues; 176 Vector<String> localizedSuggestionValues;
177 Vector<String> suggestionLabels; 177 Vector<String> suggestionLabels;
178 for (unsigned i = 0; i < m_parameters.suggestions.size(); i++) { 178 for (unsigned i = 0; i < m_parameters.suggestions.size(); i++) {
179 suggestionValues.append(valueToDateTimeString( 179 suggestionValues.push_back(valueToDateTimeString(
180 m_parameters.suggestions[i].value, m_parameters.type)); 180 m_parameters.suggestions[i].value, m_parameters.type));
181 localizedSuggestionValues.append( 181 localizedSuggestionValues.push_back(
182 m_parameters.suggestions[i].localizedValue); 182 m_parameters.suggestions[i].localizedValue);
183 suggestionLabels.append(m_parameters.suggestions[i].label); 183 suggestionLabels.push_back(m_parameters.suggestions[i].label);
184 } 184 }
185 addProperty("suggestionValues", suggestionValues, data); 185 addProperty("suggestionValues", suggestionValues, data);
186 addProperty("localizedSuggestionValues", localizedSuggestionValues, data); 186 addProperty("localizedSuggestionValues", localizedSuggestionValues, data);
187 addProperty("suggestionLabels", suggestionLabels, data); 187 addProperty("suggestionLabels", suggestionLabels, data);
188 addProperty("inputWidth", 188 addProperty("inputWidth",
189 static_cast<unsigned>(m_parameters.anchorRectInScreen.width()), 189 static_cast<unsigned>(m_parameters.anchorRectInScreen.width()),
190 data); 190 data);
191 addProperty("showOtherDateEntry", 191 addProperty("showOtherDateEntry",
192 LayoutTheme::theme().supportsCalendarPicker(m_parameters.type), 192 LayoutTheme::theme().supportsCalendarPicker(m_parameters.type),
193 data); 193 data);
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 endChooser(); 234 endChooser();
235 } 235 }
236 236
237 void DateTimeChooserImpl::didClosePopup() { 237 void DateTimeChooserImpl::didClosePopup() {
238 DCHECK(m_client); 238 DCHECK(m_client);
239 m_popup = nullptr; 239 m_popup = nullptr;
240 m_client->didEndChooser(); 240 m_client->didEndChooser();
241 } 241 }
242 242
243 } // namespace blink 243 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/ContextMenuClientImpl.cpp ('k') | third_party/WebKit/Source/web/ExternalPopupMenu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698