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

Side by Side Diff: third_party/WebKit/Source/core/html/forms/MonthInputType.h

Issue 1466113002: Oilpan: move BaseChooserOnlyDateAndTimeInputType to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add a prefinalizer Created 5 years 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) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 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 25 matching lines...) Expand all
36 36
37 namespace blink { 37 namespace blink {
38 38
39 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI) 39 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI)
40 using BaseMonthInputType = BaseMultipleFieldsDateAndTimeInputType; 40 using BaseMonthInputType = BaseMultipleFieldsDateAndTimeInputType;
41 #else 41 #else
42 using BaseMonthInputType = BaseChooserOnlyDateAndTimeInputType; 42 using BaseMonthInputType = BaseChooserOnlyDateAndTimeInputType;
43 #endif 43 #endif
44 44
45 class MonthInputType final : public BaseMonthInputType { 45 class MonthInputType final : public BaseMonthInputType {
46 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(MonthInputType);
haraken 2015/11/21 17:10:22 I'm a bit confused. Why does this need to use USIN
sof 2015/11/21 17:26:20 It only needs it !ENABLE(INPUT_MULTIPLE_FIELDS_UI)
sof 2015/11/21 17:41:52 I'll make that more precise, at the cost of some #
46 public: 47 public:
47 static PassRefPtrWillBeRawPtr<InputType> create(HTMLInputElement&); 48 static PassRefPtrWillBeRawPtr<InputType> create(HTMLInputElement&);
49 DEFINE_INLINE_VIRTUAL_TRACE() { BaseMonthInputType::trace(visitor); }
48 50
49 private: 51 private:
50 MonthInputType(HTMLInputElement& element) : BaseMonthInputType(element) { } 52 explicit MonthInputType(HTMLInputElement& element) : BaseMonthInputType(elem ent) { }
53
51 void countUsage() override; 54 void countUsage() override;
52 const AtomicString& formControlType() const override; 55 const AtomicString& formControlType() const override;
53 double valueAsDate() const override; 56 double valueAsDate() const override;
54 String serializeWithMilliseconds(double) const override; 57 String serializeWithMilliseconds(double) const override;
55 Decimal parseToNumber(const String&, const Decimal&) const override; 58 Decimal parseToNumber(const String&, const Decimal&) const override;
56 Decimal defaultValueForStepUp() const override; 59 Decimal defaultValueForStepUp() const override;
57 StepRange createStepRange(AnyStepHandling) const override; 60 StepRange createStepRange(AnyStepHandling) const override;
58 bool parseToDateComponentsInternal(const String&, DateComponents*) const ove rride; 61 bool parseToDateComponentsInternal(const String&, DateComponents*) const ove rride;
59 bool setMillisecondToDateComponents(double, DateComponents*) const override; 62 bool setMillisecondToDateComponents(double, DateComponents*) const override;
60 bool canSetSuggestedValue() override; 63 bool canSetSuggestedValue() override;
61 64
62 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI) 65 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI)
63 // BaseMultipleFieldsDateAndTimeInputType functions 66 // BaseMultipleFieldsDateAndTimeInputType functions
64 String formatDateTimeFieldsState(const DateTimeFieldsState&) const override; 67 String formatDateTimeFieldsState(const DateTimeFieldsState&) const override;
65 void setupLayoutParameters(DateTimeEditElement::LayoutParameters&, const Dat eComponents&) const override; 68 void setupLayoutParameters(DateTimeEditElement::LayoutParameters&, const Dat eComponents&) const override;
66 bool isValidFormat(bool hasYear, bool hasMonth, bool hasWeek, bool hasDay, b ool hasAMPM, bool hasHour, bool hasMinute, bool hasSecond) const override; 69 bool isValidFormat(bool hasYear, bool hasMonth, bool hasWeek, bool hasDay, b ool hasAMPM, bool hasHour, bool hasMinute, bool hasSecond) const override;
67 #endif 70 #endif
68 }; 71 };
69 72
70 } // namespace blink 73 } // namespace blink
71 74
72 #endif // MonthInputType_h 75 #endif // MonthInputType_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698