Add destructors for CFWL_Edit subclasses.

Remove an unused member variable along the way.

Change-Id: I1b1ed1d79608b5614e85e9633db4b3b20c1a27a2
Reviewed-on: https://pdfium-review.googlesource.com/c/49030
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/xfa/fwl/cfwl_comboedit.cpp b/xfa/fwl/cfwl_comboedit.cpp
index 8bc5d25..6ab081a 100644
--- a/xfa/fwl/cfwl_comboedit.cpp
+++ b/xfa/fwl/cfwl_comboedit.cpp
@@ -18,9 +18,10 @@
     std::unique_ptr<CFWL_WidgetProperties> properties,
     CFWL_Widget* pOuter)
     : CFWL_Edit(app, std::move(properties), pOuter) {
-  m_pOuter = static_cast<CFWL_ComboBox*>(pOuter);
 }
 
+CFWL_ComboEdit::~CFWL_ComboEdit() = default;
+
 void CFWL_ComboEdit::ClearSelected() {
   ClearSelection();
   RepaintRect(GetRTClient());
diff --git a/xfa/fwl/cfwl_comboedit.h b/xfa/fwl/cfwl_comboedit.h
index daaa8a9..68e6caa 100644
--- a/xfa/fwl/cfwl_comboedit.h
+++ b/xfa/fwl/cfwl_comboedit.h
@@ -20,6 +20,7 @@
   CFWL_ComboEdit(const CFWL_App* app,
                  std::unique_ptr<CFWL_WidgetProperties> properties,
                  CFWL_Widget* pOuter);
+  ~CFWL_ComboEdit() override;
 
   // CFWL_Edit.
   void OnProcessMessage(CFWL_Message* pMessage) override;
@@ -27,9 +28,6 @@
   void ClearSelected();
   void SetSelected();
   void FlagFocus(bool bSet);
-
- private:
-  CFWL_ComboBox* m_pOuter;
 };
 
 #endif  // XFA_FWL_CFWL_COMBOEDIT_H_
diff --git a/xfa/fwl/cfwl_datetimeedit.cpp b/xfa/fwl/cfwl_datetimeedit.cpp
index 147650d..313e89a 100644
--- a/xfa/fwl/cfwl_datetimeedit.cpp
+++ b/xfa/fwl/cfwl_datetimeedit.cpp
@@ -19,6 +19,8 @@
     CFWL_Widget* pOuter)
     : CFWL_Edit(app, std::move(properties), pOuter) {}
 
+CFWL_DateTimeEdit::~CFWL_DateTimeEdit() = default;
+
 void CFWL_DateTimeEdit::OnProcessMessage(CFWL_Message* pMessage) {
   if (pMessage->GetType() != CFWL_Message::Type::Mouse) {
     CFWL_Edit::OnProcessMessage(pMessage);
diff --git a/xfa/fwl/cfwl_datetimeedit.h b/xfa/fwl/cfwl_datetimeedit.h
index cc80b9e..e617ff4 100644
--- a/xfa/fwl/cfwl_datetimeedit.h
+++ b/xfa/fwl/cfwl_datetimeedit.h
@@ -18,6 +18,7 @@
   CFWL_DateTimeEdit(const CFWL_App* app,
                     std::unique_ptr<CFWL_WidgetProperties> properties,
                     CFWL_Widget* pOuter);
+  ~CFWL_DateTimeEdit() override;
 
   // CFWL_Edit.
   void OnProcessMessage(CFWL_Message* pMessage) override;