Cleaning up nits in fwl/core files.

This Cl cleans up the nits in the first set of cfwl_* files. The unused Event
and Message classes are removed.

Review-Url: https://codereview.chromium.org/2505703003
diff --git a/xfa/fwl/core/cfwl_combobox.cpp b/xfa/fwl/core/cfwl_combobox.cpp
index d1f9503..a8211e9 100644
--- a/xfa/fwl/core/cfwl_combobox.cpp
+++ b/xfa/fwl/core/cfwl_combobox.cpp
@@ -47,9 +47,9 @@
 }
 
 bool CFWL_ComboBox::RemoveAt(int32_t iIndex) {
-  if (iIndex < 0 || static_cast<size_t>(iIndex) >= m_ItemArray.size()) {
+  if (iIndex < 0 || static_cast<size_t>(iIndex) >= m_ItemArray.size())
     return false;
-  }
+
   m_ItemArray.erase(m_ItemArray.begin() + iIndex);
   return true;
 }
@@ -167,7 +167,6 @@
                                       int32_t nIndex) const {
   if (nIndex < 0 || static_cast<size_t>(nIndex) >= m_ItemArray.size())
     return nullptr;
-
   return m_ItemArray[nIndex].get();
 }
 
@@ -183,9 +182,7 @@
 
 uint32_t CFWL_ComboBox::GetItemStyles(IFWL_Widget* pWidget,
                                       CFWL_ListItem* pItem) {
-  if (!pItem)
-    return 0;
-  return static_cast<CFWL_ListItem*>(pItem)->m_dwStyles;
+  return pItem ? static_cast<CFWL_ListItem*>(pItem)->m_dwStyles : 0;
 }
 
 void CFWL_ComboBox::GetItemText(IFWL_Widget* pWidget,
@@ -200,6 +197,7 @@
                                 CFX_RectF& rtItem) {
   if (!pItem)
     return;
+
   CFWL_ListItem* pComboItem = static_cast<CFWL_ListItem*>(pItem);
   rtItem.Set(pComboItem->m_rtItem.left, pComboItem->m_rtItem.top,
              pComboItem->m_rtItem.width, pComboItem->m_rtItem.height);
diff --git a/xfa/fwl/core/cfwl_datetimepicker.cpp b/xfa/fwl/core/cfwl_datetimepicker.cpp
index cead904..809392d 100644
--- a/xfa/fwl/core/cfwl_datetimepicker.cpp
+++ b/xfa/fwl/core/cfwl_datetimepicker.cpp
@@ -59,7 +59,7 @@
 
 void CFWL_DateTimePicker::GetCaption(IFWL_Widget* pWidget,
                                      CFX_WideString& wsCaption) {
-  wsCaption = m_wsData;
+  wsCaption = L"";
 }
 
 void CFWL_DateTimePicker::GetToday(IFWL_Widget* pWidget,
diff --git a/xfa/fwl/core/cfwl_datetimepicker.h b/xfa/fwl/core/cfwl_datetimepicker.h
index f27082f..a43f69c 100644
--- a/xfa/fwl/core/cfwl_datetimepicker.h
+++ b/xfa/fwl/core/cfwl_datetimepicker.h
@@ -36,9 +36,6 @@
   void GetBBox(CFX_RectF& rect);
   void SetEditLimit(int32_t nLimit);
   void ModifyEditStylesEx(uint32_t dwStylesExAdded, uint32_t dwStylesExRemoved);
-
- private:
-  CFX_WideString m_wsData;
 };
 
 #endif  // XFA_FWL_CORE_CFWL_DATETIMEPICKER_H_
diff --git a/xfa/fwl/core/cfwl_event.h b/xfa/fwl/core/cfwl_event.h
index 0052c4e..4b74c02 100644
--- a/xfa/fwl/core/cfwl_event.h
+++ b/xfa/fwl/core/cfwl_event.h
@@ -34,18 +34,12 @@
   Click,
   Close,
   CloseUp,
-  ContextMenu,
-  DataSelected,
-  DateChanged,
-  Draw,
   DrawItem,
   DropDown,
   EditChanged,
   HoverChanged,
-  Idle,
   Key,
   KillFocus,
-  MenuCommand,
   Mouse,
   MouseWheel,
   PostDropDown,
@@ -144,9 +138,6 @@
               CFWL_EventType::KillFocus,
               IFWL_Widget* m_pKillFocus;)
 
-FWL_EVENT_DEF(CFWL_EvtDraw, CFWL_EventType::Draw, CFX_Graphics* m_pGraphics;
-              IFWL_Widget * m_pWidget;)
-
 FWL_EVENT_DEF(CFWL_EvtClick, CFWL_EventType::Click)
 
 FWL_EVENT_DEF(CFWL_EvtScroll, CFWL_EventType::Scroll, FWL_SCBCODE m_iScrollCode;
@@ -155,23 +146,10 @@
 
 FWL_EVENT_DEF(CFWL_EvtClose, CFWL_EventType::Close)
 
-FWL_EVENT_DEF(CFWL_EvtContextMenu,
-              CFWL_EventType::ContextMenu,
-              FX_FLOAT m_fPosX;
-              FX_FLOAT m_fPosY;
-              IFWL_Widget * m_pOwner;)
-
-FWL_EVENT_DEF(CFWL_EvtMenuCommand,
-              CFWL_EventType::MenuCommand,
-              int32_t m_iCommand;
-              void* m_pData;)
-
 FWL_EVENT_DEF(CFWL_EvtSizeChanged,
               CFWL_EventType::SizeChanged,
               IFWL_Widget* m_pWidget;
               CFX_RectF m_rtOld;
               CFX_RectF m_rtNew;)
 
-FWL_EVENT_DEF(CFWL_EvtIdle, CFWL_EventType::Idle)
-
 #endif  // XFA_FWL_CORE_CFWL_EVENT_H_
diff --git a/xfa/fwl/core/cfwl_listbox.cpp b/xfa/fwl/core/cfwl_listbox.cpp
index 8742729..c5bf881 100644
--- a/xfa/fwl/core/cfwl_listbox.cpp
+++ b/xfa/fwl/core/cfwl_listbox.cpp
@@ -44,16 +44,15 @@
 
 bool CFWL_ListBox::DeleteString(CFWL_ListItem* pItem) {
   int32_t nIndex = GetItemIndex(GetWidget(), pItem);
-  if (nIndex < 0 || static_cast<size_t>(nIndex) >= m_ItemArray.size()) {
+  if (nIndex < 0 || static_cast<size_t>(nIndex) >= m_ItemArray.size())
     return false;
-  }
+
   int32_t iCount = CountItems(m_pIface.get());
   int32_t iSel = nIndex + 1;
   if (iSel >= iCount) {
     iSel = nIndex - 1;
-    if (iSel < 0) {
+    if (iSel < 0)
       iSel = -1;
-    }
   }
   if (iSel >= 0) {
     CFWL_ListItem* pSel =
@@ -77,9 +76,7 @@
 }
 
 int32_t CFWL_ListBox::GetSelIndex(int32_t nIndex) {
-  if (!GetWidget())
-    return 0;
-  return ToListBox(GetWidget())->GetSelIndex(nIndex);
+  return GetWidget() ? ToListBox(GetWidget())->GetSelIndex(nIndex) : 0;
 }
 
 void CFWL_ListBox::SetSelItem(CFWL_ListItem* pItem, bool bSelect) {
@@ -95,15 +92,13 @@
 CFWL_ListItem* CFWL_ListBox::GetItem(int32_t nIndex) {
   if (nIndex < 0 || nIndex >= CountItems(nullptr))
     return nullptr;
-
   return m_ItemArray[nIndex].get();
 }
 
 uint32_t CFWL_ListBox::GetItemStates(CFWL_ListItem* pItem) {
   if (!pItem)
     return 0;
-  CFWL_ListItem* pListItem = static_cast<CFWL_ListItem*>(pItem);
-  return pListItem->m_dwStates | pListItem->m_dwCheckState;
+  return pItem->m_dwStates | pItem->m_dwCheckState;
 }
 
 void CFWL_ListBox::GetCaption(IFWL_Widget* pWidget, CFX_WideString& wsCaption) {
diff --git a/xfa/fwl/core/cfwl_message.h b/xfa/fwl/core/cfwl_message.h
index 0bfafb5..56e8185 100644
--- a/xfa/fwl/core/cfwl_message.h
+++ b/xfa/fwl/core/cfwl_message.h
@@ -14,22 +14,11 @@
 
 enum class CFWL_MessageType {
   None = 0,
-
-  Activate,
-  Close,
-  Cursor,
-  Deactivate,
-  DropFiles,
   Key,
   KillFocus,
   Mouse,
   MouseWheel,
-  Post,
-  SetFocus,
-  Size,
-  TaskClicked,
-  WindowMove,
-  WindowWillMove
+  SetFocus
 };
 
 enum class FWL_MouseCommand {
@@ -39,9 +28,6 @@
   RightButtonDown,
   RightButtonUp,
   RightButtonDblClk,
-  MiddleButtonDown,
-  MiddleButtonUp,
-  MiddleButtonDblClk,
   Move,
   Enter,
   Leave,
@@ -100,30 +86,19 @@
   return this;
 }
 
-#define FWL_MESSAGE_CLASS_DEF(classname, msgType, ...)              \
-  class classname : public CFWL_Message {                           \
-   public:                                                          \
-    classname();                                                    \
-    ~classname() override;                                          \
-    CFWL_Message* Clone() override;                                 \
-    CFWL_MessageType GetClassID() const override;                   \
-    __VA_ARGS__                                                     \
-  };
-
-#define FWL_MESSAGE_FUNCTION_DEF(classname, msgType, ...)                   \
-  inline classname::classname() {}                                          \
-  inline classname::~classname() {}                                         \
-  inline CFWL_Message* classname::Clone() { return new classname(*this); }  \
-  inline CFWL_MessageType classname::GetClassID() const { return msgType; } \
-  __VA_ARGS__
-
-#define FWL_MESSAGE_DEF(classname, msgType, ...)         \
-  FWL_MESSAGE_CLASS_DEF(classname, msgType, __VA_ARGS__) \
-  FWL_MESSAGE_FUNCTION_DEF(classname, msgType)
-
-FWL_MESSAGE_DEF(CFWL_MsgActivate, CFWL_MessageType::Activate)
-
-FWL_MESSAGE_DEF(CFWL_MsgDeactivate, CFWL_MessageType::Deactivate)
+#define FWL_MESSAGE_DEF(classname, msgType, ...)                           \
+  class classname : public CFWL_Message {                                  \
+   public:                                                                 \
+    classname();                                                           \
+    ~classname() override;                                                 \
+    CFWL_Message* Clone() override;                                        \
+    CFWL_MessageType GetClassID() const override;                          \
+    __VA_ARGS__                                                            \
+  };                                                                       \
+  inline classname::classname() {}                                         \
+  inline classname::~classname() {}                                        \
+  inline CFWL_Message* classname::Clone() { return new classname(*this); } \
+  inline CFWL_MessageType classname::GetClassID() const { return msgType; }
 
 FWL_MESSAGE_DEF(CFWL_MsgMouse, CFWL_MessageType::Mouse, FX_FLOAT m_fx;
                 FX_FLOAT m_fy;
@@ -148,38 +123,4 @@
                 uint32_t m_dwFlags;
                 FWL_KeyCommand m_dwCmd;)
 
-FWL_MESSAGE_DEF(CFWL_MsgCursor, CFWL_MessageType::Cursor)
-
-FWL_MESSAGE_DEF(CFWL_MsgSize, CFWL_MessageType::Size, int32_t m_iWidth;
-                int32_t m_iHeight;)
-
-FWL_MESSAGE_DEF(CFWL_MsgWindowMove, CFWL_MessageType::WindowMove, FX_FLOAT m_fx;
-                FX_FLOAT m_fy;)
-
-FWL_MESSAGE_CLASS_DEF(CFWL_MsgDropFiles,
-                      CFWL_MessageType::DropFiles,
-                      CFWL_MsgDropFiles(const CFWL_MsgDropFiles& copy);
-                      FX_FLOAT m_fx;
-                      FX_FLOAT m_fy;
-                      CFX_WideStringArray m_files;)
-FWL_MESSAGE_FUNCTION_DEF(
-    CFWL_MsgDropFiles,
-    CFWL_MessageType::DropFiles,
-    inline CFWL_MsgDropFiles::CFWL_MsgDropFiles(const CFWL_MsgDropFiles& copy) {
-      m_pDstTarget = copy.m_pDstTarget;
-      m_pSrcTarget = copy.m_pSrcTarget;
-      m_fx = copy.m_fx;
-      m_fy = copy.m_fy;
-      m_files.Append(copy.m_files);
-    })
-
-FWL_MESSAGE_DEF(CFWL_MsgTaskClicked,
-                CFWL_MessageType::TaskClicked,
-                FX_FLOAT m_fx;
-                FX_FLOAT m_fy;)
-
-FWL_MESSAGE_DEF(CFWL_MsgClose, CFWL_MessageType::Close)
-
-FWL_MESSAGE_DEF(CFWL_MsgWindowWillMove, CFWL_MessageType::WindowWillMove)
-
 #endif  // XFA_FWL_CORE_CFWL_MESSAGE_H_
diff --git a/xfa/fwl/core/fwl_noteimp.cpp b/xfa/fwl/core/fwl_noteimp.cpp
index f04d38d..716aa24 100644
--- a/xfa/fwl/core/fwl_noteimp.cpp
+++ b/xfa/fwl/core/fwl_noteimp.cpp
@@ -232,15 +232,6 @@
                                       IFWL_Widget* pMessageForm) {
   bool bRet = false;
   switch (pMessage->GetClassID()) {
-    case CFWL_MessageType::Activate: {
-      bRet = DoActivate(static_cast<CFWL_MsgActivate*>(pMessage), pMessageForm);
-      break;
-    }
-    case CFWL_MessageType::Deactivate: {
-      bRet = DoDeactivate(static_cast<CFWL_MsgDeactivate*>(pMessage),
-                          pMessageForm);
-      break;
-    }
     case CFWL_MessageType::SetFocus: {
       bRet = DoSetFocus(static_cast<CFWL_MsgSetFocus*>(pMessage), pMessageForm);
       break;
@@ -262,24 +253,6 @@
       bRet = DoWheel(static_cast<CFWL_MsgMouseWheel*>(pMessage), pMessageForm);
       break;
     }
-    case CFWL_MessageType::Size: {
-      bRet = DoSize(static_cast<CFWL_MsgSize*>(pMessage));
-      break;
-    }
-    case CFWL_MessageType::Cursor: {
-      bRet = true;
-      break;
-    }
-    case CFWL_MessageType::WindowMove: {
-      bRet = DoWindowMove(static_cast<CFWL_MsgWindowMove*>(pMessage),
-                          pMessageForm);
-      break;
-    }
-    case CFWL_MessageType::DropFiles: {
-      bRet =
-          DoDragFiles(static_cast<CFWL_MsgDropFiles*>(pMessage), pMessageForm);
-      break;
-    }
     default: {
       bRet = true;
       break;
@@ -294,43 +267,6 @@
   return bRet;
 }
 
-bool CFWL_NoteDriver::DoActivate(CFWL_MsgActivate* pMsg,
-                                 IFWL_Widget* pMessageForm) {
-  pMsg->m_pDstTarget = pMessageForm;
-  return !!(pMsg->m_pDstTarget->GetStates() & FWL_WGTSTATE_Deactivated);
-}
-
-bool CFWL_NoteDriver::DoDeactivate(CFWL_MsgDeactivate* pMsg,
-                                   IFWL_Widget* pMessageForm) {
-  int32_t iTrackLoop = m_noteLoopQueue.GetSize();
-  if (iTrackLoop <= 0)
-    return false;
-  if (iTrackLoop == 1) {
-    if (pMessageForm->IsInstance(FX_WSTRC(L"FWL_FORMPROXY"))) {
-      return false;
-    }
-    if (pMsg->m_pSrcTarget &&
-        pMsg->m_pSrcTarget->IsInstance(FX_WSTRC(L"FWL_FORMPROXY"))) {
-      return false;
-    }
-    if (pMsg->m_pSrcTarget &&
-        pMsg->m_pSrcTarget->GetClassID() == FWL_Type::ToolTip) {
-      return false;
-    }
-    return true;
-  }
-  IFWL_Widget* pDst = pMsg->m_pDstTarget;
-  if (!pDst)
-    return false;
-#if (_FX_OS_ == _FX_MACOSX_)
-  if (pDst == pMessageForm && pDst->IsInstance(L"FWL_FORMPROXY")) {
-    return true;
-  }
-#endif
-  return pDst != pMessageForm &&
-         !pDst->IsInstance(FX_WSTRC(L"FWL_FORMPROXY")) &&
-         !pMessageForm->IsInstance(FX_WSTRC(L"FWL_FORMPROXY"));
-}
 bool CFWL_NoteDriver::DoSetFocus(CFWL_MsgSetFocus* pMsg,
                                  IFWL_Widget* pMessageForm) {
   CFWL_WidgetMgr* pWidgetMgr = pMessageForm->GetOwnerApp()->GetWidgetMgr();
@@ -444,23 +380,7 @@
   pMsg->m_pDstTarget = pDst;
   return true;
 }
-bool CFWL_NoteDriver::DoSize(CFWL_MsgSize* pMsg) {
-  CFWL_WidgetMgr* pWidgetMgr =
-      pMsg->m_pDstTarget->GetOwnerApp()->GetWidgetMgr();
-  if (!pWidgetMgr)
-    return false;
-  pWidgetMgr->NotifySizeChanged(pMsg->m_pDstTarget, (FX_FLOAT)pMsg->m_iWidth,
-                                (FX_FLOAT)pMsg->m_iHeight);
-  return true;
-}
-bool CFWL_NoteDriver::DoWindowMove(CFWL_MsgWindowMove* pMsg,
-                                   IFWL_Widget* pMessageForm) {
-  return pMsg->m_pDstTarget == pMessageForm;
-}
-bool CFWL_NoteDriver::DoDragFiles(CFWL_MsgDropFiles* pMsg,
-                                  IFWL_Widget* pMessageForm) {
-  return pMsg->m_pDstTarget == pMessageForm;
-}
+
 bool CFWL_NoteDriver::DoMouseEx(CFWL_MsgMouse* pMsg,
                                 IFWL_Widget* pMessageForm) {
   CFWL_WidgetMgr* pWidgetMgr = pMessageForm->GetOwnerApp()->GetWidgetMgr();
@@ -512,9 +432,6 @@
   DispatchMessage(&msHover, nullptr);
 }
 bool CFWL_NoteDriver::IsValidMessage(CFWL_Message* pMessage) {
-  if (pMessage->GetClassID() == CFWL_MessageType::Post)
-    return true;
-
   int32_t iCount = m_noteLoopQueue.GetSize();
   for (int32_t i = 0; i < iCount; i++) {
     CFWL_NoteLoop* pNoteLoop = static_cast<CFWL_NoteLoop*>(m_noteLoopQueue[i]);
@@ -591,8 +508,7 @@
     IFWL_Widget* pSource = nullptr;
     uint32_t dwFilter = 0;
     m_eventSources.GetNextAssoc(pos, (void*&)pSource, dwFilter);
-    if (pSource == pEvent->m_pSrcTarget ||
-        pEvent->GetClassID() == CFWL_EventType::Idle) {
+    if (pSource == pEvent->m_pSrcTarget) {
       if (IsFilterEvent(pEvent, dwFilter)) {
         pDelegate->OnProcessEvent(pEvent);
         return true;
@@ -617,14 +533,10 @@
     case CFWL_EventType::SetFocus:
     case CFWL_EventType::KillFocus:
       return !!(dwFilter & FWL_EVENT_FOCUSCHANGED_MASK);
-    case CFWL_EventType::Draw:
-      return !!(dwFilter & FWL_EVENT_DRAW_MASK);
     case CFWL_EventType::Close:
       return !!(dwFilter & FWL_EVENT_CLOSE_MASK);
     case CFWL_EventType::SizeChanged:
       return !!(dwFilter & FWL_EVENT_SIZECHANGED_MASK);
-    case CFWL_EventType::Idle:
-      return !!(dwFilter & FWL_EVENT_IDLE_MASK);
     default:
       return !!(dwFilter & FWL_EVENT_CONTROL_MASK);
   }
diff --git a/xfa/fwl/core/fwl_noteimp.h b/xfa/fwl/core/fwl_noteimp.h
index 45a92e7..320ea44 100644
--- a/xfa/fwl/core/fwl_noteimp.h
+++ b/xfa/fwl/core/fwl_noteimp.h
@@ -17,16 +17,11 @@
 #include "xfa/fxgraphics/cfx_graphics.h"
 
 class CFWL_EventTarget;
-class CFWL_MsgActivate;
-class CFWL_MsgDeactivate;
-class CFWL_MsgDropFiles;
 class CFWL_MsgKey;
 class CFWL_MsgKillFocus;
 class CFWL_MsgMouse;
 class CFWL_MsgMouseWheel;
 class CFWL_MsgSetFocus;
-class CFWL_MsgSize;
-class CFWL_MsgWindowMove;
 class CFWL_TargetImp;
 class IFWL_ToolTip;
 class IFWL_Widget;
@@ -83,16 +78,11 @@
 
  private:
   bool DispatchMessage(CFWL_Message* pMessage, IFWL_Widget* pMessageForm);
-  bool DoActivate(CFWL_MsgActivate* pMsg, IFWL_Widget* pMessageForm);
-  bool DoDeactivate(CFWL_MsgDeactivate* pMsg, IFWL_Widget* pMessageForm);
   bool DoSetFocus(CFWL_MsgSetFocus* pMsg, IFWL_Widget* pMessageForm);
   bool DoKillFocus(CFWL_MsgKillFocus* pMsg, IFWL_Widget* pMessageForm);
   bool DoKey(CFWL_MsgKey* pMsg, IFWL_Widget* pMessageForm);
   bool DoMouse(CFWL_MsgMouse* pMsg, IFWL_Widget* pMessageForm);
   bool DoWheel(CFWL_MsgMouseWheel* pMsg, IFWL_Widget* pMessageForm);
-  bool DoSize(CFWL_MsgSize* pMsg);
-  bool DoWindowMove(CFWL_MsgWindowMove* pMsg, IFWL_Widget* pMessageForm);
-  bool DoDragFiles(CFWL_MsgDropFiles* pMsg, IFWL_Widget* pMessageForm);
   bool DoMouseEx(CFWL_MsgMouse* pMsg, IFWL_Widget* pMessageForm);
   void MouseSecondary(CFWL_MsgMouse* pMsg);
   bool IsValidMessage(CFWL_Message* pMessage);
diff --git a/xfa/fwl/core/ifwl_checkbox.cpp b/xfa/fwl/core/ifwl_checkbox.cpp
index 76a377a..e309a35 100644
--- a/xfa/fwl/core/ifwl_checkbox.cpp
+++ b/xfa/fwl/core/ifwl_checkbox.cpp
@@ -374,9 +374,6 @@
     return;
 
   switch (pMessage->GetClassID()) {
-    case CFWL_MessageType::Activate:
-      OnActivate(pMessage);
-      break;
     case CFWL_MessageType::SetFocus:
       OnFocusChanged(pMessage, true);
       break;
@@ -421,11 +418,6 @@
   DrawWidget(pGraphics, pMatrix);
 }
 
-void IFWL_CheckBox::OnActivate(CFWL_Message* pMsg) {
-  m_pProperties->m_dwStates &= ~FWL_WGTSTATE_Deactivated;
-  Repaint(&(m_rtClient));
-}
-
 void IFWL_CheckBox::OnFocusChanged(CFWL_Message* pMsg, bool bSet) {
   if (bSet)
     m_pProperties->m_dwStates |= FWL_WGTSTATE_Focused;
diff --git a/xfa/fwl/core/ifwl_checkbox.h b/xfa/fwl/core/ifwl_checkbox.h
index cda02b5..06e8f70 100644
--- a/xfa/fwl/core/ifwl_checkbox.h
+++ b/xfa/fwl/core/ifwl_checkbox.h
@@ -77,7 +77,6 @@
   uint32_t GetPartStates();
   void UpdateTextOutStyles();
   void NextStates();
-  void OnActivate(CFWL_Message* pMsg);
   void OnFocusChanged(CFWL_Message* pMsg, bool bSet);
   void OnLButtonDown(CFWL_MsgMouse* pMsg);
   void OnLButtonUp(CFWL_MsgMouse* pMsg);
diff --git a/xfa/fwl/core/ifwl_comboboxproxy.cpp b/xfa/fwl/core/ifwl_comboboxproxy.cpp
index e7ce1bd..2ca65d7 100644
--- a/xfa/fwl/core/ifwl_comboboxproxy.cpp
+++ b/xfa/fwl/core/ifwl_comboboxproxy.cpp
@@ -41,9 +41,6 @@
       }
       break;
     }
-    case CFWL_MessageType::Deactivate:
-      OnDeactive(static_cast<CFWL_MsgDeactivate*>(pMessage));
-      break;
     case CFWL_MessageType::KillFocus:
       OnFocusChanged(static_cast<CFWL_MsgKillFocus*>(pMessage), false);
       break;
@@ -103,10 +100,6 @@
   }
 }
 
-void IFWL_ComboBoxProxy::OnDeactive(CFWL_MsgDeactivate* pMsg) {
-  m_pComboBox->ShowDropList(false);
-}
-
 void IFWL_ComboBoxProxy::OnFocusChanged(CFWL_MsgKillFocus* pMsg, bool bSet) {
   if (bSet)
     return;
diff --git a/xfa/fwl/core/ifwl_comboboxproxy.h b/xfa/fwl/core/ifwl_comboboxproxy.h
index ec048fe..2439377 100644
--- a/xfa/fwl/core/ifwl_comboboxproxy.h
+++ b/xfa/fwl/core/ifwl_comboboxproxy.h
@@ -29,7 +29,6 @@
  private:
   void OnLButtonDown(CFWL_MsgMouse* pMsg);
   void OnLButtonUp(CFWL_MsgMouse* pMsg);
-  void OnDeactive(CFWL_MsgDeactivate* pMsg);
   void OnFocusChanged(CFWL_MsgKillFocus* pMsg, bool bSet);
 
   bool m_bLButtonDown;
diff --git a/xfa/fwl/core/ifwl_datetimepicker.h b/xfa/fwl/core/ifwl_datetimepicker.h
index eddb596..5a40a05 100644
--- a/xfa/fwl/core/ifwl_datetimepicker.h
+++ b/xfa/fwl/core/ifwl_datetimepicker.h
@@ -41,10 +41,6 @@
               CFWL_EventType::EditChanged,
               CFX_WideString m_wsText;)
 
-FWL_EVENT_DEF(CFWL_Event_DtpHoverChanged,
-              CFWL_EventType::HoverChanged,
-              int32_t hoverday;)
-
 FWL_EVENT_DEF(CFWL_Event_DtpSelectChanged,
               CFWL_EventType::SelectChanged,
               int32_t iYear;
diff --git a/xfa/fwl/core/ifwl_edit.cpp b/xfa/fwl/core/ifwl_edit.cpp
index 55ee785..3e864ba 100644
--- a/xfa/fwl/core/ifwl_edit.cpp
+++ b/xfa/fwl/core/ifwl_edit.cpp
@@ -1348,12 +1348,6 @@
 
   CFWL_MessageType dwMsgCode = pMessage->GetClassID();
   switch (dwMsgCode) {
-    case CFWL_MessageType::Activate:
-      DoActivate(static_cast<CFWL_MsgActivate*>(pMessage));
-      break;
-    case CFWL_MessageType::Deactivate:
-      DoDeactivate(static_cast<CFWL_MsgDeactivate*>(pMessage));
-      break;
     case CFWL_MessageType::SetFocus:
     case CFWL_MessageType::KillFocus:
       OnFocusChanged(pMessage, dwMsgCode == CFWL_MessageType::SetFocus);
@@ -1415,16 +1409,6 @@
   DrawWidget(pGraphics, pMatrix);
 }
 
-void IFWL_Edit::DoActivate(CFWL_MsgActivate* pMsg) {
-  m_pProperties->m_dwStates |= ~FWL_WGTSTATE_Deactivated;
-  Repaint(&m_rtClient);
-}
-
-void IFWL_Edit::DoDeactivate(CFWL_MsgDeactivate* pMsg) {
-  m_pProperties->m_dwStates &= FWL_WGTSTATE_Deactivated;
-  Repaint(&m_rtClient);
-}
-
 void IFWL_Edit::DoButtonDown(CFWL_MsgMouse* pMsg) {
   if ((m_pProperties->m_dwStates & FWL_WGTSTATE_Focused) == 0)
     SetFocus(true);
diff --git a/xfa/fwl/core/ifwl_edit.h b/xfa/fwl/core/ifwl_edit.h
index 2acc385..262d16e 100644
--- a/xfa/fwl/core/ifwl_edit.h
+++ b/xfa/fwl/core/ifwl_edit.h
@@ -86,8 +86,6 @@
 
 class IFDE_TxtEdtDoRecord;
 class IFWL_Edit;
-class CFWL_MsgActivate;
-class CFWL_MsgDeactivate;
 class CFWL_MsgMouse;
 class CFWL_WidgetProperties;
 class IFWL_Caret;
@@ -196,8 +194,6 @@
                         int32_t nCount,
                         FX_FLOAT fOffSetX,
                         FX_FLOAT fOffSetY);
-  void DoActivate(CFWL_MsgActivate* pMsg);
-  void DoDeactivate(CFWL_MsgDeactivate* pMsg);
   void DoButtonDown(CFWL_MsgMouse* pMsg);
   void OnFocusChanged(CFWL_Message* pMsg, bool bSet);
   void OnLButtonDown(CFWL_MsgMouse* pMsg);
diff --git a/xfa/fwl/core/ifwl_form.cpp b/xfa/fwl/core/ifwl_form.cpp
index 9e632a0..42827ab 100644
--- a/xfa/fwl/core/ifwl_form.cpp
+++ b/xfa/fwl/core/ifwl_form.cpp
@@ -666,62 +666,13 @@
 }
 
 #ifdef FWL_UseMacSystemBorder
-void IFWL_Form::OnProcessMessage(CFWL_Message* pMessage) {
-  if (!pMessage)
-    return;
-
-  switch (pMessage->GetClassID()) {
-    case CFWL_MessageType::Activate: {
-      m_pProperties->m_dwStates &= ~FWL_WGTSTATE_Deactivated;
-      Repaint(&m_rtRelative);
-      break;
-    }
-    case CFWL_MessageType::Deactivate: {
-      m_pProperties->m_dwStates |= FWL_WGTSTATE_Deactivated;
-      Repaint(&m_rtRelative);
-      break;
-    }
-    default:
-      break;
-  }
-}
+void IFWL_Form::OnProcessMessage(CFWL_Message* pMessage) {}
 #else
 void IFWL_Form::OnProcessMessage(CFWL_Message* pMessage) {
   if (!pMessage)
     return;
 
   switch (pMessage->GetClassID()) {
-    case CFWL_MessageType::Activate: {
-      m_pProperties->m_dwStates &= ~FWL_WGTSTATE_Deactivated;
-      const IFWL_App* pApp = GetOwnerApp();
-      CFWL_NoteDriver* pDriver =
-          static_cast<CFWL_NoteDriver*>(pApp->GetNoteDriver());
-      IFWL_Widget* pSubFocus = GetSubFocus();
-      if (pSubFocus && pSubFocus != pDriver->GetFocus())
-        pDriver->SetFocus(pSubFocus);
-
-      Repaint(&m_rtRelative);
-      break;
-    }
-    case CFWL_MessageType::Deactivate: {
-      m_pProperties->m_dwStates |= FWL_WGTSTATE_Deactivated;
-      const IFWL_App* pApp = GetOwnerApp();
-      CFWL_NoteDriver* pDriver =
-          static_cast<CFWL_NoteDriver*>(pApp->GetNoteDriver());
-      IFWL_Widget* pSubFocus = GetSubFocus();
-      if (pSubFocus) {
-        if (pSubFocus == pDriver->GetFocus()) {
-          pDriver->SetFocus(nullptr);
-        } else if (pSubFocus->GetStates() & FWL_WGTSTATE_Focused) {
-          if (IFWL_WidgetDelegate* pDelegate = pSubFocus->GetDelegate()) {
-            CFWL_MsgKillFocus ms;
-            pDelegate->OnProcessMessage(&ms);
-          }
-        }
-      }
-      Repaint(&m_rtRelative);
-      break;
-    }
     case CFWL_MessageType::Mouse: {
       CFWL_MsgMouse* pMsg = static_cast<CFWL_MsgMouse*>(pMessage);
       switch (pMsg->m_dwCmd) {
@@ -745,30 +696,6 @@
       }
       break;
     }
-    case CFWL_MessageType::Size: {
-      CFWL_WidgetMgr* pWidgetMgr = GetOwnerApp()->GetWidgetMgr();
-      if (!pWidgetMgr)
-        return;
-
-      pWidgetMgr->AddRedrawCounts(this);
-      if (!m_bSetMaximize)
-        break;
-
-      m_bSetMaximize = false;
-      CFWL_MsgSize* pMsg = static_cast<CFWL_MsgSize*>(pMessage);
-      m_pProperties->m_rtWidget.left = 0;
-      m_pProperties->m_rtWidget.top = 0;
-      m_pProperties->m_rtWidget.width = (FX_FLOAT)pMsg->m_iWidth;
-      m_pProperties->m_rtWidget.height = (FX_FLOAT)pMsg->m_iHeight;
-      Update();
-      break;
-    }
-    case CFWL_MessageType::WindowMove:
-      OnWindowMove(static_cast<CFWL_MsgWindowMove*>(pMessage));
-      break;
-    case CFWL_MessageType::Close:
-      OnClose(static_cast<CFWL_MsgClose*>(pMessage));
-      break;
     default:
       break;
   }
@@ -901,17 +828,6 @@
   }
 }
 
-void IFWL_Form::OnWindowMove(CFWL_MsgWindowMove* pMsg) {
-  m_pProperties->m_rtWidget.left = pMsg->m_fx;
-  m_pProperties->m_rtWidget.top = pMsg->m_fy;
-}
-
-void IFWL_Form::OnClose(CFWL_MsgClose* pMsg) {
-  CFWL_EvtClose eClose;
-  eClose.m_pSrcTarget = this;
-  DispatchEvent(&eClose);
-}
-
 CFWL_SysBtn::CFWL_SysBtn() {
   m_rtBtn.Set(0, 0, 0, 0);
   m_dwState = 0;
diff --git a/xfa/fwl/core/ifwl_form.h b/xfa/fwl/core/ifwl_form.h
index 77acbd8..d4244d5 100644
--- a/xfa/fwl/core/ifwl_form.h
+++ b/xfa/fwl/core/ifwl_form.h
@@ -69,8 +69,6 @@
 };
 
 class CFWL_MsgMouse;
-class CFWL_MsgClose;
-class CFWL_MsgWindowMove;
 class CFWL_NoteLoop;
 class IFWL_Widget;
 class IFWL_ThemeProvider;
@@ -136,8 +134,6 @@
   void OnMouseMove(CFWL_MsgMouse* pMsg);
   void OnMouseLeave(CFWL_MsgMouse* pMsg);
   void OnLButtonDblClk(CFWL_MsgMouse* pMsg);
-  void OnWindowMove(CFWL_MsgWindowMove* pMsg);
-  void OnClose(CFWL_MsgClose* pMsg);
 
 #if (_FX_OS_ == _FX_MACOSX_)
   bool m_bMouseIn;
diff --git a/xfa/fwl/core/ifwl_monthcalendar.h b/xfa/fwl/core/ifwl_monthcalendar.h
index 20aecce..78b2b6b 100644
--- a/xfa/fwl/core/ifwl_monthcalendar.h
+++ b/xfa/fwl/core/ifwl_monthcalendar.h
@@ -22,18 +22,6 @@
 #define FWL_ITEMSTATE_MCD_Selected (1L << 1)
 #define FWL_ITEMSTATE_MCD_Focused (1L << 2)
 
-FWL_EVENT_DEF(CFWL_Event_McdDateSelected,
-              CFWL_EventType::DataSelected,
-              int32_t m_iStartDay;
-              int32_t m_iEndDay;)
-
-FWL_EVENT_DEF(CFWL_EventMcdDateChanged,
-              CFWL_EventType::DateChanged,
-              int32_t m_iOldYear;
-              int32_t m_iOldMonth;
-              int32_t m_iStartDay;
-              int32_t m_iEndDay;)
-
 class CFWL_MsgMouse;
 class IFWL_Widget;