Index: third_party/WebKit/Source/core/html/forms/BaseChooserOnlyDateAndTimeInputType.h |
diff --git a/third_party/WebKit/Source/core/html/forms/BaseChooserOnlyDateAndTimeInputType.h b/third_party/WebKit/Source/core/html/forms/BaseChooserOnlyDateAndTimeInputType.h |
index ce37c91349de4742ecf73cd2068ecdcf30d6c4c0..00bee9353d70cb3f15af33141f1c98b61ac6490e 100644 |
--- a/third_party/WebKit/Source/core/html/forms/BaseChooserOnlyDateAndTimeInputType.h |
+++ b/third_party/WebKit/Source/core/html/forms/BaseChooserOnlyDateAndTimeInputType.h |
@@ -31,14 +31,26 @@ |
#include "core/html/forms/BaseDateAndTimeInputType.h" |
#include "core/html/forms/DateTimeChooser.h" |
#include "core/html/forms/DateTimeChooserClient.h" |
+#include "platform/heap/Handle.h" |
+ |
+// Not very nice, but the derived {Date,Month,DateTimeLocal,...}InputType will |
+// have to conditionally be a GC mixin - conditional on !ENABLE(INPUT_MULTIPLE_FIELDS_UI). |
+// |
+// Provide a pair of ENABLE(INPUT_MULTIPLE_FIELDS_UI)-dependent macros that expand into |
+// the GC mixin and trace declarations required. |
+#define WILL_BE_USING_DATETIMERCHOOSERCLIENT_GC_MIXIN(T) WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(T) |
+#define DEFINE_BASEDATEANDTIMEINPUTTYPE_VIRTUAL_TRACE(T) DEFINE_INLINE_VIRTUAL_TRACE() { T::trace(visitor); } |
namespace blink { |
class BaseChooserOnlyDateAndTimeInputType : public BaseDateAndTimeInputType, public DateTimeChooserClient { |
+ WILL_BE_USING_PRE_FINALIZER(BaseChooserOnlyDateAndTimeInputType, closeDateTimeChooser); |
protected: |
- BaseChooserOnlyDateAndTimeInputType(HTMLInputElement& element) : BaseDateAndTimeInputType(element) { } |
+ BaseChooserOnlyDateAndTimeInputType(HTMLInputElement&); |
~BaseChooserOnlyDateAndTimeInputType() override; |
+ DECLARE_VIRTUAL_TRACE(); |
+ |
private: |
void closeDateTimeChooser(); |
@@ -59,9 +71,15 @@ private: |
void didChooseValue(double) override; |
void didEndChooser() override; |
- RefPtr<DateTimeChooser> m_dateTimeChooser; |
+ RefPtrWillBeMember<DateTimeChooser> m_dateTimeChooser; |
}; |
-} |
-#endif |
-#endif |
+} // namespace blink |
+ |
+#else |
+#define WILL_BE_USING_DATETIMERCHOOSERCLIENT_GC_MIXIN(T) |
+#define DEFINE_BASEDATEANDTIMEINPUTTYPE_VIRTUAL_TRACE(T) |
+ |
+#endif // ENABLE(INPUT_MULTIPLE_FIELDS_UI) |
+ |
+#endif // BaseChooserOnlyDateAndTimeInputType_h |