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

Side by Side Diff: Source/core/html/shadow/DateTimeFieldElements.h

Issue 1306413003: Make classes and structures in core/html fast-allocated. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 4 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 11 matching lines...) Expand all
22 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 22 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23 * SUCH DAMAGE. 23 * SUCH DAMAGE.
24 */ 24 */
25 25
26 #ifndef DateTimeFieldElements_h 26 #ifndef DateTimeFieldElements_h
27 #define DateTimeFieldElements_h 27 #define DateTimeFieldElements_h
28 28
29 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI) 29 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI)
30 #include "core/html/shadow/DateTimeNumericFieldElement.h" 30 #include "core/html/shadow/DateTimeNumericFieldElement.h"
31 #include "core/html/shadow/DateTimeSymbolicFieldElement.h" 31 #include "core/html/shadow/DateTimeSymbolicFieldElement.h"
32 #include "wtf/Allocator.h"
32 33
33 namespace blink { 34 namespace blink {
34 35
35 class DateTimeAMPMFieldElement final : public DateTimeSymbolicFieldElement { 36 class DateTimeAMPMFieldElement final : public DateTimeSymbolicFieldElement {
36 WTF_MAKE_NONCOPYABLE(DateTimeAMPMFieldElement); 37 WTF_MAKE_NONCOPYABLE(DateTimeAMPMFieldElement);
37 38
38 public: 39 public:
39 static PassRefPtrWillBeRawPtr<DateTimeAMPMFieldElement> create(Document&, Fi eldOwner&, const Vector<String>&); 40 static PassRefPtrWillBeRawPtr<DateTimeAMPMFieldElement> create(Document&, Fi eldOwner&, const Vector<String>&);
40 41
41 private: 42 private:
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 void populateDateTimeFieldsState(DateTimeFieldsState&) override; 220 void populateDateTimeFieldsState(DateTimeFieldsState&) override;
220 void setValueAsDate(const DateComponents&) override; 221 void setValueAsDate(const DateComponents&) override;
221 void setValueAsDateTimeFieldsState(const DateTimeFieldsState&) override; 222 void setValueAsDateTimeFieldsState(const DateTimeFieldsState&) override;
222 }; 223 };
223 224
224 class DateTimeYearFieldElement final : public DateTimeNumericFieldElement { 225 class DateTimeYearFieldElement final : public DateTimeNumericFieldElement {
225 WTF_MAKE_NONCOPYABLE(DateTimeYearFieldElement); 226 WTF_MAKE_NONCOPYABLE(DateTimeYearFieldElement);
226 227
227 public: 228 public:
228 struct Parameters { 229 struct Parameters {
230 STACK_ALLOCATED();
229 int minimumYear; 231 int minimumYear;
230 int maximumYear; 232 int maximumYear;
231 bool minIsSpecified; 233 bool minIsSpecified;
232 bool maxIsSpecified; 234 bool maxIsSpecified;
233 String placeholder; 235 String placeholder;
234 236
235 Parameters() 237 Parameters()
236 : minimumYear(-1) 238 : minimumYear(-1)
237 , maximumYear(-1) 239 , maximumYear(-1)
238 , minIsSpecified(false) 240 , minIsSpecified(false)
(...skipping 17 matching lines...) Expand all
256 int defaultValueForStepUp() const override; 258 int defaultValueForStepUp() const override;
257 259
258 bool m_minIsSpecified; 260 bool m_minIsSpecified;
259 bool m_maxIsSpecified; 261 bool m_maxIsSpecified;
260 }; 262 };
261 263
262 } // namespace blink 264 } // namespace blink
263 265
264 #endif 266 #endif
265 #endif 267 #endif
OLDNEW
« no previous file with comments | « Source/core/html/shadow/DateTimeEditElement.h ('k') | Source/core/html/shadow/DateTimeNumericFieldElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698