Merge IPWL_SystemHandler into IPWL_FillerNotify,

One fewer pure virtual class to worry about. Avoids layer-skipping
the over CFFL layer between the  PWL and CPDFSDK layers. The CFFL_InteractiveFormFiller and CPDF_FormFillEnvironment are 1:1 with
each other so it is a matter of proxying a few calls up a layer.

Change-Id: I8ec500adb4691a9c19f05eeb7a2fe12bad9fe991
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/93530
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
diff --git a/fpdfsdk/cpdfsdk_formfillenvironment.cpp b/fpdfsdk/cpdfsdk_formfillenvironment.cpp
index deac212..d4e05f5 100644
--- a/fpdfsdk/cpdfsdk_formfillenvironment.cpp
+++ b/fpdfsdk/cpdfsdk_formfillenvironment.cpp
@@ -35,22 +35,22 @@
 #endif
 
 static_assert(FXCT_ARROW ==
-                  static_cast<int>(IPWL_SystemHandler::CursorStyle::kArrow),
+                  static_cast<int>(IPWL_FillerNotify::CursorStyle::kArrow),
               "kArrow value mismatch");
 static_assert(FXCT_NESW ==
-                  static_cast<int>(IPWL_SystemHandler::CursorStyle::kNESW),
+                  static_cast<int>(IPWL_FillerNotify::CursorStyle::kNESW),
               "kNEWS value mismatch");
 static_assert(FXCT_NWSE ==
-                  static_cast<int>(IPWL_SystemHandler::CursorStyle::kNWSE),
+                  static_cast<int>(IPWL_FillerNotify::CursorStyle::kNWSE),
               "kNWSE value mismatch");
 static_assert(FXCT_VBEAM ==
-                  static_cast<int>(IPWL_SystemHandler::CursorStyle::kVBeam),
+                  static_cast<int>(IPWL_FillerNotify::CursorStyle::kVBeam),
               "kVBeam value mismatch");
 static_assert(FXCT_HBEAM ==
-                  static_cast<int>(IPWL_SystemHandler::CursorStyle::kHBeam),
+                  static_cast<int>(IPWL_FillerNotify::CursorStyle::kHBeam),
               "HBeam value mismatch");
 static_assert(FXCT_HAND ==
-                  static_cast<int>(IPWL_SystemHandler::CursorStyle::kHand),
+                  static_cast<int>(IPWL_FillerNotify::CursorStyle::kHand),
               "kHand value mismatch");
 
 FPDF_WIDESTRING AsFPDFWideString(ByteString* bsUTF16LE) {
@@ -88,8 +88,9 @@
     m_pInfo->Release(m_pInfo);
 }
 
-void CPDFSDK_FormFillEnvironment::InvalidateRect(PerWindowData* pWidgetData,
-                                                 const CFX_FloatRect& rect) {
+void CPDFSDK_FormFillEnvironment::InvalidateRect(
+    IPWL_FillerNotify::PerWindowData* pWidgetData,
+    const CFX_FloatRect& rect) {
   auto* pPrivateData = static_cast<CFFL_PerWindowData*>(pWidgetData);
   CPDFSDK_Widget* widget = pPrivateData->GetWidget();
   if (!widget)
@@ -111,7 +112,7 @@
 }
 
 void CPDFSDK_FormFillEnvironment::OutputSelectedRect(
-    PerWindowData* pWidgetData,
+    IPWL_FillerNotify::PerWindowData* pWidgetData,
     const CFX_FloatRect& rect) {
   if (!m_pInfo || !m_pInfo->FFI_OutputSelectedRect)
     return;
@@ -357,7 +358,8 @@
   }
 }
 
-void CPDFSDK_FormFillEnvironment::SetCursor(CursorStyle nCursorType) {
+void CPDFSDK_FormFillEnvironment::SetCursor(
+    IPWL_FillerNotify::CursorStyle nCursorType) {
   if (m_pInfo && m_pInfo->FFI_SetCursor)
     m_pInfo->FFI_SetCursor(m_pInfo, static_cast<int>(nCursorType));
 }
@@ -637,10 +639,6 @@
   return this;
 }
 
-IPWL_SystemHandler* CPDFSDK_FormFillEnvironment::GetSysHandler() {
-  return this;
-}
-
 CPDFSDK_PageView* CPDFSDK_FormFillEnvironment::GetPageViewAtIndex(int nIndex) {
   IPDF_Page* pTempPage = GetPage(nIndex);
   return pTempPage ? GetPageView(pTempPage) : nullptr;
diff --git a/fpdfsdk/cpdfsdk_formfillenvironment.h b/fpdfsdk/cpdfsdk_formfillenvironment.h
index 6c3b750..943e7c7 100644
--- a/fpdfsdk/cpdfsdk_formfillenvironment.h
+++ b/fpdfsdk/cpdfsdk_formfillenvironment.h
@@ -26,7 +26,7 @@
 #include "fpdfsdk/cpdfsdk_annot.h"
 #include "fpdfsdk/formfiller/cffl_interactiveformfiller.h"
 #include "fpdfsdk/pwl/cpwl_wnd.h"
-#include "fpdfsdk/pwl/ipwl_systemhandler.h"
+#include "fpdfsdk/pwl/ipwl_fillernotify.h"
 #include "public/fpdf_formfill.h"
 #include "third_party/base/span.h"
 
@@ -56,7 +56,6 @@
 
 class CPDFSDK_FormFillEnvironment final
     : public CFX_Timer::HandlerIface,
-      public IPWL_SystemHandler,
       public CFFL_InteractiveFormFiller::CallbackIface {
  public:
   CPDFSDK_FormFillEnvironment(CPDF_Document* pDoc, FPDF_FORMFILLINFO* pFFinfo);
@@ -67,15 +66,13 @@
   int32_t SetTimer(int32_t uElapse, TimerCallback lpTimerFunc) override;
   void KillTimer(int32_t nTimerID) override;
 
-  // IPWL_SystemHandler:
-  void InvalidateRect(PerWindowData* pWidgetData,
+  // CFFL_InteractiveFormFiller::CallbackIface:
+  void InvalidateRect(IPWL_FillerNotify::PerWindowData* pWidgetData,
                       const CFX_FloatRect& rect) override;
-  void OutputSelectedRect(PerWindowData* pWidgetData,
+  void OutputSelectedRect(IPWL_FillerNotify::PerWindowData* pWidgetData,
                           const CFX_FloatRect& rect) override;
   bool IsSelectionImplemented() const override;
-  void SetCursor(CursorStyle nCursorType) override;
-
-  // CFFL_InteractiveFormFiller::CallbackIface:
+  void SetCursor(IPWL_FillerNotify::CursorStyle nCursorType) override;
   void OnSetFieldInputFocus(const WideString& text) override;
   void OnCalculate(ObservedPtr<CPDFSDK_Annot>& pAnnot) override;
   void OnFormat(ObservedPtr<CPDFSDK_Annot>& pAnnot) override;
@@ -83,7 +80,6 @@
   CPDFSDK_PageView* GetOrCreatePageView(IPDF_Page* pUnderlyingPage) override;
   CPDFSDK_PageView* GetPageView(IPDF_Page* pUnderlyingPage) override;
   CFX_Timer::HandlerIface* GetTimerHandler() override;
-  IPWL_SystemHandler* GetSysHandler() override;
   CPDFSDK_Annot* GetFocusAnnot() const override;
   bool SetFocusAnnot(ObservedPtr<CPDFSDK_Annot>& pAnnot) override;
   bool HasPermissions(uint32_t flags) const override;
diff --git a/fpdfsdk/formfiller/cffl_checkbox.cpp b/fpdfsdk/formfiller/cffl_checkbox.cpp
index 8725378..2cea0e0 100644
--- a/fpdfsdk/formfiller/cffl_checkbox.cpp
+++ b/fpdfsdk/formfiller/cffl_checkbox.cpp
@@ -24,7 +24,7 @@
 
 std::unique_ptr<CPWL_Wnd> CFFL_CheckBox::NewPWLWindow(
     const CPWL_Wnd::CreateParams& cp,
-    std::unique_ptr<IPWL_SystemHandler::PerWindowData> pAttachedData) {
+    std::unique_ptr<IPWL_FillerNotify::PerWindowData> pAttachedData) {
   auto pWnd = std::make_unique<CPWL_CheckBox>(cp, std::move(pAttachedData));
   pWnd->Realize();
   pWnd->SetCheck(m_pWidget->IsChecked());
diff --git a/fpdfsdk/formfiller/cffl_checkbox.h b/fpdfsdk/formfiller/cffl_checkbox.h
index 60242fe..09401d0 100644
--- a/fpdfsdk/formfiller/cffl_checkbox.h
+++ b/fpdfsdk/formfiller/cffl_checkbox.h
@@ -22,8 +22,7 @@
   // CFFL_Button:
   std::unique_ptr<CPWL_Wnd> NewPWLWindow(
       const CPWL_Wnd::CreateParams& cp,
-      std::unique_ptr<IPWL_SystemHandler::PerWindowData> pAttachedData)
-      override;
+      std::unique_ptr<IPWL_FillerNotify::PerWindowData> pAttachedData) override;
   bool OnKeyDown(FWL_VKEYCODE nKeyCode, Mask<FWL_EVENTFLAG> nFlags) override;
   bool OnChar(CPDFSDK_Widget* pWidget,
               uint32_t nChar,
diff --git a/fpdfsdk/formfiller/cffl_combobox.cpp b/fpdfsdk/formfiller/cffl_combobox.cpp
index fef972c..531e17b 100644
--- a/fpdfsdk/formfiller/cffl_combobox.cpp
+++ b/fpdfsdk/formfiller/cffl_combobox.cpp
@@ -42,7 +42,7 @@
 
 std::unique_ptr<CPWL_Wnd> CFFL_ComboBox::NewPWLWindow(
     const CPWL_Wnd::CreateParams& cp,
-    std::unique_ptr<IPWL_SystemHandler::PerWindowData> pAttachedData) {
+    std::unique_ptr<IPWL_FillerNotify::PerWindowData> pAttachedData) {
   static_cast<CFFL_PerWindowData*>(pAttachedData.get())->SetFormField(this);
   auto pWnd = std::make_unique<CPWL_ComboBox>(cp, std::move(pAttachedData));
   pWnd->Realize();
diff --git a/fpdfsdk/formfiller/cffl_combobox.h b/fpdfsdk/formfiller/cffl_combobox.h
index 6f41b01..7df16ad 100644
--- a/fpdfsdk/formfiller/cffl_combobox.h
+++ b/fpdfsdk/formfiller/cffl_combobox.h
@@ -32,8 +32,7 @@
   CPWL_Wnd::CreateParams GetCreateParam() override;
   std::unique_ptr<CPWL_Wnd> NewPWLWindow(
       const CPWL_Wnd::CreateParams& cp,
-      std::unique_ptr<IPWL_SystemHandler::PerWindowData> pAttachedData)
-      override;
+      std::unique_ptr<IPWL_FillerNotify::PerWindowData> pAttachedData) override;
   bool OnChar(CPDFSDK_Widget* pWidget,
               uint32_t nChar,
               Mask<FWL_EVENTFLAG> nFlags) override;
diff --git a/fpdfsdk/formfiller/cffl_formfield.cpp b/fpdfsdk/formfiller/cffl_formfield.cpp
index aeeec61..19f0c67 100644
--- a/fpdfsdk/formfiller/cffl_formfield.cpp
+++ b/fpdfsdk/formfiller/cffl_formfield.cpp
@@ -298,8 +298,8 @@
 
 CPWL_Wnd::CreateParams CFFL_FormField::GetCreateParam() {
   CPWL_Wnd::CreateParams cp(
-      m_pFormFiller->GetCallbackIface()->GetTimerHandler(),
-      m_pFormFiller->GetCallbackIface()->GetSysHandler(), this);
+      m_pFormFiller->GetCallbackIface()->GetTimerHandler(), m_pFormFiller,
+      this);
 
   cp.rcRectWnd = GetPDFAnnotRect();
 
@@ -383,7 +383,7 @@
 }
 
 CFX_Matrix CFFL_FormField::GetWindowMatrix(
-    const IPWL_SystemHandler::PerWindowData* pAttached) {
+    const IPWL_FillerNotify::PerWindowData* pAttached) {
   const auto* pPrivateData = static_cast<const CFFL_PerWindowData*>(pAttached);
   if (!pPrivateData)
     return CFX_Matrix();
diff --git a/fpdfsdk/formfiller/cffl_formfield.h b/fpdfsdk/formfiller/cffl_formfield.h
index c7fed85..eb5bbad 100644
--- a/fpdfsdk/formfiller/cffl_formfield.h
+++ b/fpdfsdk/formfiller/cffl_formfield.h
@@ -17,7 +17,7 @@
 #include "fpdfsdk/formfiller/cffl_fieldaction.h"
 #include "fpdfsdk/formfiller/cffl_interactiveformfiller.h"
 #include "fpdfsdk/pwl/cpwl_wnd.h"
-#include "fpdfsdk/pwl/ipwl_systemhandler.h"
+#include "fpdfsdk/pwl/ipwl_fillernotify.h"
 
 class CPDFSDK_PageView;
 class CPDFSDK_Widget;
@@ -93,7 +93,7 @@
 
   // CPWL_Wnd::ProviderIface:
   CFX_Matrix GetWindowMatrix(
-      const IPWL_SystemHandler::PerWindowData* pAttached) override;
+      const IPWL_FillerNotify::PerWindowData* pAttached) override;
 
   virtual void GetActionData(const CPDFSDK_PageView* pPageView,
                              CPDF_AAction::AActionType type,
@@ -104,7 +104,7 @@
   virtual CPWL_Wnd::CreateParams GetCreateParam();
   virtual std::unique_ptr<CPWL_Wnd> NewPWLWindow(
       const CPWL_Wnd::CreateParams& cp,
-      std::unique_ptr<IPWL_SystemHandler::PerWindowData> pAttachedData) = 0;
+      std::unique_ptr<IPWL_FillerNotify::PerWindowData> pAttachedData) = 0;
   virtual void SavePWLWindowState(const CPDFSDK_PageView* pPageView);
   virtual void RecreatePWLWindowFromSavedState(
       const CPDFSDK_PageView* pPageView);
diff --git a/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp b/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp
index 89d0c2f..ee9a916 100644
--- a/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp
+++ b/fpdfsdk/formfiller/cffl_interactiveformfiller.cpp
@@ -548,8 +548,26 @@
   m_Map.erase(it);
 }
 
+void CFFL_InteractiveFormFiller::InvalidateRect(PerWindowData* pWidgetData,
+                                                const CFX_FloatRect& rect) {
+  GetCallbackIface()->InvalidateRect(pWidgetData, rect);
+}
+
+void CFFL_InteractiveFormFiller::OutputSelectedRect(PerWindowData* pWidgetData,
+                                                    const CFX_FloatRect& rect) {
+  GetCallbackIface()->OutputSelectedRect(pWidgetData, rect);
+}
+
+bool CFFL_InteractiveFormFiller::IsSelectionImplemented() const {
+  return GetCallbackIface()->IsSelectionImplemented();
+}
+
+void CFFL_InteractiveFormFiller::SetCursor(CursorStyle nCursorStyle) {
+  GetCallbackIface()->SetCursor(nCursorStyle);
+}
+
 void CFFL_InteractiveFormFiller::QueryWherePopup(
-    const IPWL_SystemHandler::PerWindowData* pAttached,
+    const IPWL_FillerNotify::PerWindowData* pAttached,
     float fPopupMin,
     float fPopupMax,
     bool* bBottom,
@@ -830,7 +848,7 @@
 }
 
 std::pair<bool, bool> CFFL_InteractiveFormFiller::OnBeforeKeyStroke(
-    const IPWL_SystemHandler::PerWindowData* pAttached,
+    const IPWL_FillerNotify::PerWindowData* pAttached,
     WideString& strChange,
     const WideString& strChangeEx,
     int nSelStart,
@@ -911,7 +929,7 @@
 }
 
 bool CFFL_InteractiveFormFiller::OnPopupPreOpen(
-    const IPWL_SystemHandler::PerWindowData* pAttached,
+    const IPWL_FillerNotify::PerWindowData* pAttached,
     Mask<FWL_EVENTFLAG> nFlag) {
 #ifdef PDF_ENABLE_XFA
   auto* pData = static_cast<const CFFL_PerWindowData*>(pAttached);
@@ -925,7 +943,7 @@
 }
 
 bool CFFL_InteractiveFormFiller::OnPopupPostOpen(
-    const IPWL_SystemHandler::PerWindowData* pAttached,
+    const IPWL_FillerNotify::PerWindowData* pAttached,
     Mask<FWL_EVENTFLAG> nFlag) {
 #ifdef PDF_ENABLE_XFA
   auto* pData = static_cast<const CFFL_PerWindowData*>(pAttached);
diff --git a/fpdfsdk/formfiller/cffl_interactiveformfiller.h b/fpdfsdk/formfiller/cffl_interactiveformfiller.h
index 074228e..8dab3e4 100644
--- a/fpdfsdk/formfiller/cffl_interactiveformfiller.h
+++ b/fpdfsdk/formfiller/cffl_interactiveformfiller.h
@@ -11,12 +11,12 @@
 #include <memory>
 #include <utility>
 
+#include "core/fxcrt/cfx_timer.h"
 #include "core/fxcrt/mask.h"
 #include "core/fxcrt/observed_ptr.h"
 #include "core/fxcrt/unowned_ptr.h"
 #include "fpdfsdk/cpdfsdk_annot.h"
 #include "fpdfsdk/pwl/ipwl_fillernotify.h"
-#include "fpdfsdk/pwl/ipwl_systemhandler.h"
 #include "public/fpdf_fwlevent.h"
 
 class CFFL_FormField;
@@ -36,9 +36,14 @@
     virtual CPDFSDK_PageView* GetOrCreatePageView(IPDF_Page* pPage) = 0;
     virtual CPDFSDK_PageView* GetPageView(IPDF_Page* pPage) = 0;
     virtual CFX_Timer::HandlerIface* GetTimerHandler() = 0;
-    virtual IPWL_SystemHandler* GetSysHandler() = 0;
     virtual CPDFSDK_Annot* GetFocusAnnot() const = 0;
     virtual bool SetFocusAnnot(ObservedPtr<CPDFSDK_Annot>& pAnnot) = 0;
+    virtual void InvalidateRect(PerWindowData* pWidgetData,
+                                const CFX_FloatRect& rect) = 0;
+    virtual void OutputSelectedRect(PerWindowData* pWidgetData,
+                                    const CFX_FloatRect& rect) = 0;
+    virtual bool IsSelectionImplemented() const = 0;
+    virtual void SetCursor(CursorStyle nCursorStyle) = 0;
 
     // See PDF Reference 1.7, table 3.20 for the permission bits. Returns true
     // if any bit in |flags| is set.
@@ -49,7 +54,7 @@
   explicit CFFL_InteractiveFormFiller(CallbackIface* pCallbackIface);
   ~CFFL_InteractiveFormFiller() override;
 
-  CallbackIface* GetCallbackIface() { return m_pCallbackIface.Get(); }
+  CallbackIface* GetCallbackIface() const { return m_pCallbackIface.Get(); }
   bool Annot_HitTest(const CPDFSDK_Widget* pWidget, const CFX_PointF& point);
   FX_RECT GetViewBBox(const CPDFSDK_PageView* pPageView,
                       CPDFSDK_Widget* pWidget);
@@ -149,23 +154,28 @@
       std::map<CPDFSDK_Widget*, std::unique_ptr<CFFL_FormField>>;
 
   // IPWL_FillerNotify:
-  void QueryWherePopup(const IPWL_SystemHandler::PerWindowData* pAttached,
+  void InvalidateRect(PerWindowData* pWidgetData,
+                      const CFX_FloatRect& rect) override;
+  void OutputSelectedRect(PerWindowData* pWidgetData,
+                          const CFX_FloatRect& rect) override;
+  bool IsSelectionImplemented() const override;
+  void SetCursor(CursorStyle nCursorStyle) override;
+  void QueryWherePopup(const PerWindowData* pAttached,
                        float fPopupMin,
                        float fPopupMax,
                        bool* bBottom,
                        float* fPopupRet) override;
   // Returns {bRC, bExit}.
-  std::pair<bool, bool> OnBeforeKeyStroke(
-      const IPWL_SystemHandler::PerWindowData* pAttached,
-      WideString& strChange,
-      const WideString& strChangeEx,
-      int nSelStart,
-      int nSelEnd,
-      bool bKeyDown,
-      Mask<FWL_EVENTFLAG> nFlag) override;
-  bool OnPopupPreOpen(const IPWL_SystemHandler::PerWindowData* pAttached,
+  std::pair<bool, bool> OnBeforeKeyStroke(const PerWindowData* pAttached,
+                                          WideString& strChange,
+                                          const WideString& strChangeEx,
+                                          int nSelStart,
+                                          int nSelEnd,
+                                          bool bKeyDown,
+                                          Mask<FWL_EVENTFLAG> nFlag) override;
+  bool OnPopupPreOpen(const PerWindowData* pAttached,
                       Mask<FWL_EVENTFLAG> nFlag) override;
-  bool OnPopupPostOpen(const IPWL_SystemHandler::PerWindowData* pAttached,
+  bool OnPopupPostOpen(const PerWindowData* pAttached,
                        Mask<FWL_EVENTFLAG> nFlag) override;
 
 #ifdef PDF_ENABLE_XFA
diff --git a/fpdfsdk/formfiller/cffl_listbox.cpp b/fpdfsdk/formfiller/cffl_listbox.cpp
index 42314af..809c5cc 100644
--- a/fpdfsdk/formfiller/cffl_listbox.cpp
+++ b/fpdfsdk/formfiller/cffl_listbox.cpp
@@ -41,7 +41,7 @@
 
 std::unique_ptr<CPWL_Wnd> CFFL_ListBox::NewPWLWindow(
     const CPWL_Wnd::CreateParams& cp,
-    std::unique_ptr<IPWL_SystemHandler::PerWindowData> pAttachedData) {
+    std::unique_ptr<IPWL_FillerNotify::PerWindowData> pAttachedData) {
   static_cast<CFFL_PerWindowData*>(pAttachedData.get())->SetFormField(this);
   auto pWnd = std::make_unique<CPWL_ListBox>(cp, std::move(pAttachedData));
   pWnd->Realize();
diff --git a/fpdfsdk/formfiller/cffl_listbox.h b/fpdfsdk/formfiller/cffl_listbox.h
index bad4deb..2591a07b 100644
--- a/fpdfsdk/formfiller/cffl_listbox.h
+++ b/fpdfsdk/formfiller/cffl_listbox.h
@@ -25,8 +25,7 @@
   CPWL_Wnd::CreateParams GetCreateParam() override;
   std::unique_ptr<CPWL_Wnd> NewPWLWindow(
       const CPWL_Wnd::CreateParams& cp,
-      std::unique_ptr<IPWL_SystemHandler::PerWindowData> pAttachedData)
-      override;
+      std::unique_ptr<IPWL_FillerNotify::PerWindowData> pAttachedData) override;
   bool OnChar(CPDFSDK_Widget* pWidget,
               uint32_t nChar,
               Mask<FWL_EVENTFLAG> nFlags) override;
diff --git a/fpdfsdk/formfiller/cffl_perwindowdata.cpp b/fpdfsdk/formfiller/cffl_perwindowdata.cpp
index d5b86a0..c16c93a 100644
--- a/fpdfsdk/formfiller/cffl_perwindowdata.cpp
+++ b/fpdfsdk/formfiller/cffl_perwindowdata.cpp
@@ -23,7 +23,7 @@
 
 CFFL_PerWindowData::~CFFL_PerWindowData() = default;
 
-std::unique_ptr<IPWL_SystemHandler::PerWindowData> CFFL_PerWindowData::Clone()
+std::unique_ptr<IPWL_FillerNotify::PerWindowData> CFFL_PerWindowData::Clone()
     const {
   // Private constructor.
   return pdfium::WrapUnique(new CFFL_PerWindowData(*this));
diff --git a/fpdfsdk/formfiller/cffl_perwindowdata.h b/fpdfsdk/formfiller/cffl_perwindowdata.h
index ccabf9e..40b0b9b 100644
--- a/fpdfsdk/formfiller/cffl_perwindowdata.h
+++ b/fpdfsdk/formfiller/cffl_perwindowdata.h
@@ -11,13 +11,13 @@
 
 #include "core/fxcrt/observed_ptr.h"
 #include "core/fxcrt/unowned_ptr.h"
-#include "fpdfsdk/pwl/ipwl_systemhandler.h"
+#include "fpdfsdk/pwl/ipwl_fillernotify.h"
 
 class CFFL_FormField;
 class CPDFSDK_PageView;
 class CPDFSDK_Widget;
 
-class CFFL_PerWindowData final : public IPWL_SystemHandler::PerWindowData {
+class CFFL_PerWindowData final : public IPWL_FillerNotify::PerWindowData {
  public:
   CFFL_PerWindowData(CPDFSDK_Widget* pWidget,
                      const CPDFSDK_PageView* pPageView,
@@ -26,8 +26,8 @@
   CFFL_PerWindowData& operator=(const CFFL_PerWindowData& that) = delete;
   ~CFFL_PerWindowData() override;
 
-  // IPWL_SystemHandler::PerWindowData:
-  std::unique_ptr<IPWL_SystemHandler::PerWindowData> Clone() const override;
+  // IPWL_FillerNotify::PerWindowData:
+  std::unique_ptr<IPWL_FillerNotify::PerWindowData> Clone() const override;
 
   CPDFSDK_Widget* GetWidget() const { return m_pWidget.Get(); }
   const CPDFSDK_PageView* GetPageView() const { return m_pPageView; }
diff --git a/fpdfsdk/formfiller/cffl_pushbutton.cpp b/fpdfsdk/formfiller/cffl_pushbutton.cpp
index 3b93223..1b52fcd 100644
--- a/fpdfsdk/formfiller/cffl_pushbutton.cpp
+++ b/fpdfsdk/formfiller/cffl_pushbutton.cpp
@@ -19,7 +19,7 @@
 
 std::unique_ptr<CPWL_Wnd> CFFL_PushButton::NewPWLWindow(
     const CPWL_Wnd::CreateParams& cp,
-    std::unique_ptr<IPWL_SystemHandler::PerWindowData> pAttachedData) {
+    std::unique_ptr<IPWL_FillerNotify::PerWindowData> pAttachedData) {
   auto pWnd = std::make_unique<CPWL_PushButton>(cp, std::move(pAttachedData));
   pWnd->Realize();
   return std::move(pWnd);
diff --git a/fpdfsdk/formfiller/cffl_pushbutton.h b/fpdfsdk/formfiller/cffl_pushbutton.h
index 9ea1d10..6074ded 100644
--- a/fpdfsdk/formfiller/cffl_pushbutton.h
+++ b/fpdfsdk/formfiller/cffl_pushbutton.h
@@ -20,8 +20,7 @@
   // CFFL_Button:
   std::unique_ptr<CPWL_Wnd> NewPWLWindow(
       const CPWL_Wnd::CreateParams& cp,
-      std::unique_ptr<IPWL_SystemHandler::PerWindowData> pAttachedData)
-      override;
+      std::unique_ptr<IPWL_FillerNotify::PerWindowData> pAttachedData) override;
 };
 
 #endif  // FPDFSDK_FORMFILLER_CFFL_PUSHBUTTON_H_
diff --git a/fpdfsdk/formfiller/cffl_radiobutton.cpp b/fpdfsdk/formfiller/cffl_radiobutton.cpp
index 5151ed1..f5505a4 100644
--- a/fpdfsdk/formfiller/cffl_radiobutton.cpp
+++ b/fpdfsdk/formfiller/cffl_radiobutton.cpp
@@ -24,7 +24,7 @@
 
 std::unique_ptr<CPWL_Wnd> CFFL_RadioButton::NewPWLWindow(
     const CPWL_Wnd::CreateParams& cp,
-    std::unique_ptr<IPWL_SystemHandler::PerWindowData> pAttachedData) {
+    std::unique_ptr<IPWL_FillerNotify::PerWindowData> pAttachedData) {
   auto pWnd = std::make_unique<CPWL_RadioButton>(cp, std::move(pAttachedData));
   pWnd->Realize();
   pWnd->SetCheck(m_pWidget->IsChecked());
diff --git a/fpdfsdk/formfiller/cffl_radiobutton.h b/fpdfsdk/formfiller/cffl_radiobutton.h
index 12bc040..46c3c43 100644
--- a/fpdfsdk/formfiller/cffl_radiobutton.h
+++ b/fpdfsdk/formfiller/cffl_radiobutton.h
@@ -22,8 +22,7 @@
   // CFFL_Button:
   std::unique_ptr<CPWL_Wnd> NewPWLWindow(
       const CPWL_Wnd::CreateParams& cp,
-      std::unique_ptr<IPWL_SystemHandler::PerWindowData> pAttachedData)
-      override;
+      std::unique_ptr<IPWL_FillerNotify::PerWindowData> pAttachedData) override;
   bool OnKeyDown(FWL_VKEYCODE nKeyCode, Mask<FWL_EVENTFLAG> nFlags) override;
   bool OnChar(CPDFSDK_Widget* pWidget,
               uint32_t nChar,
diff --git a/fpdfsdk/formfiller/cffl_textfield.cpp b/fpdfsdk/formfiller/cffl_textfield.cpp
index e1ff031..8c9e002 100644
--- a/fpdfsdk/formfiller/cffl_textfield.cpp
+++ b/fpdfsdk/formfiller/cffl_textfield.cpp
@@ -85,7 +85,7 @@
 
 std::unique_ptr<CPWL_Wnd> CFFL_TextField::NewPWLWindow(
     const CPWL_Wnd::CreateParams& cp,
-    std::unique_ptr<IPWL_SystemHandler::PerWindowData> pAttachedData) {
+    std::unique_ptr<IPWL_FillerNotify::PerWindowData> pAttachedData) {
   static_cast<CFFL_PerWindowData*>(pAttachedData.get())->SetFormField(this);
   auto pWnd = std::make_unique<CPWL_Edit>(cp, std::move(pAttachedData));
   pWnd->Realize();
diff --git a/fpdfsdk/formfiller/cffl_textfield.h b/fpdfsdk/formfiller/cffl_textfield.h
index ace7256..91821e1 100644
--- a/fpdfsdk/formfiller/cffl_textfield.h
+++ b/fpdfsdk/formfiller/cffl_textfield.h
@@ -30,8 +30,7 @@
   CPWL_Wnd::CreateParams GetCreateParam() override;
   std::unique_ptr<CPWL_Wnd> NewPWLWindow(
       const CPWL_Wnd::CreateParams& cp,
-      std::unique_ptr<IPWL_SystemHandler::PerWindowData> pAttachedData)
-      override;
+      std::unique_ptr<IPWL_FillerNotify::PerWindowData> pAttachedData) override;
   bool OnChar(CPDFSDK_Widget* pWidget,
               uint32_t nChar,
               Mask<FWL_EVENTFLAG> nFlags) override;
diff --git a/fpdfsdk/pwl/BUILD.gn b/fpdfsdk/pwl/BUILD.gn
index f1586d3..1c41dde 100644
--- a/fpdfsdk/pwl/BUILD.gn
+++ b/fpdfsdk/pwl/BUILD.gn
@@ -34,7 +34,6 @@
     "cpwl_wnd.cpp",
     "cpwl_wnd.h",
     "ipwl_fillernotify.h",
-    "ipwl_systemhandler.h",
   ]
   configs += [
     "../../:pdfium_strict_config",
diff --git a/fpdfsdk/pwl/cpwl_button.cpp b/fpdfsdk/pwl/cpwl_button.cpp
index b95725c..c1a8612 100644
--- a/fpdfsdk/pwl/cpwl_button.cpp
+++ b/fpdfsdk/pwl/cpwl_button.cpp
@@ -10,9 +10,9 @@
 
 CPWL_Button::CPWL_Button(
     const CreateParams& cp,
-    std::unique_ptr<IPWL_SystemHandler::PerWindowData> pAttachedData)
+    std::unique_ptr<IPWL_FillerNotify::PerWindowData> pAttachedData)
     : CPWL_Wnd(cp, std::move(pAttachedData)) {
-  GetCreationParams()->eCursorType = IPWL_SystemHandler::CursorStyle::kHand;
+  GetCreationParams()->eCursorType = IPWL_FillerNotify::CursorStyle::kHand;
 }
 
 CPWL_Button::~CPWL_Button() = default;
diff --git a/fpdfsdk/pwl/cpwl_button.h b/fpdfsdk/pwl/cpwl_button.h
index fcf56c4..4fbe80b 100644
--- a/fpdfsdk/pwl/cpwl_button.h
+++ b/fpdfsdk/pwl/cpwl_button.h
@@ -10,12 +10,12 @@
 #include <memory>
 
 #include "fpdfsdk/pwl/cpwl_wnd.h"
-#include "fpdfsdk/pwl/ipwl_systemhandler.h"
+#include "fpdfsdk/pwl/ipwl_fillernotify.h"
 
 class CPWL_Button : public CPWL_Wnd {
  public:
   CPWL_Button(const CreateParams& cp,
-              std::unique_ptr<IPWL_SystemHandler::PerWindowData> pAttachedData);
+              std::unique_ptr<IPWL_FillerNotify::PerWindowData> pAttachedData);
   ~CPWL_Button() override;
 
   // CPWL_Wnd
diff --git a/fpdfsdk/pwl/cpwl_caret.cpp b/fpdfsdk/pwl/cpwl_caret.cpp
index 295d261..755e24e 100644
--- a/fpdfsdk/pwl/cpwl_caret.cpp
+++ b/fpdfsdk/pwl/cpwl_caret.cpp
@@ -16,7 +16,7 @@
 
 CPWL_Caret::CPWL_Caret(
     const CreateParams& cp,
-    std::unique_ptr<IPWL_SystemHandler::PerWindowData> pAttachedData)
+    std::unique_ptr<IPWL_FillerNotify::PerWindowData> pAttachedData)
     : CPWL_Wnd(cp, std::move(pAttachedData)) {}
 
 CPWL_Caret::~CPWL_Caret() = default;
diff --git a/fpdfsdk/pwl/cpwl_caret.h b/fpdfsdk/pwl/cpwl_caret.h
index 015c511..263cb45 100644
--- a/fpdfsdk/pwl/cpwl_caret.h
+++ b/fpdfsdk/pwl/cpwl_caret.h
@@ -15,7 +15,7 @@
 class CPWL_Caret final : public CPWL_Wnd, public CFX_Timer::CallbackIface {
  public:
   CPWL_Caret(const CreateParams& cp,
-             std::unique_ptr<IPWL_SystemHandler::PerWindowData> pAttachedData);
+             std::unique_ptr<IPWL_FillerNotify::PerWindowData> pAttachedData);
   ~CPWL_Caret() override;
 
   // CPWL_Wnd:
diff --git a/fpdfsdk/pwl/cpwl_cbbutton.cpp b/fpdfsdk/pwl/cpwl_cbbutton.cpp
index e78d0f2..c6190a3 100644
--- a/fpdfsdk/pwl/cpwl_cbbutton.cpp
+++ b/fpdfsdk/pwl/cpwl_cbbutton.cpp
@@ -14,7 +14,7 @@
 
 CPWL_CBButton::CPWL_CBButton(
     const CreateParams& cp,
-    std::unique_ptr<IPWL_SystemHandler::PerWindowData> pAttachedData)
+    std::unique_ptr<IPWL_FillerNotify::PerWindowData> pAttachedData)
     : CPWL_Wnd(cp, std::move(pAttachedData)) {}
 
 CPWL_CBButton::~CPWL_CBButton() = default;
diff --git a/fpdfsdk/pwl/cpwl_cbbutton.h b/fpdfsdk/pwl/cpwl_cbbutton.h
index 7292c26..598946f 100644
--- a/fpdfsdk/pwl/cpwl_cbbutton.h
+++ b/fpdfsdk/pwl/cpwl_cbbutton.h
@@ -10,13 +10,13 @@
 #include <memory>
 
 #include "fpdfsdk/pwl/cpwl_wnd.h"
-#include "fpdfsdk/pwl/ipwl_systemhandler.h"
+#include "fpdfsdk/pwl/ipwl_fillernotify.h"
 
 class CPWL_CBButton final : public CPWL_Wnd {
  public:
   CPWL_CBButton(
       const CreateParams& cp,
-      std::unique_ptr<IPWL_SystemHandler::PerWindowData> pAttachedData);
+      std::unique_ptr<IPWL_FillerNotify::PerWindowData> pAttachedData);
   ~CPWL_CBButton() override;
 
   // CPWL_Wnd:
diff --git a/fpdfsdk/pwl/cpwl_cblistbox.cpp b/fpdfsdk/pwl/cpwl_cblistbox.cpp
index 28994ae..e5b83fc 100644
--- a/fpdfsdk/pwl/cpwl_cblistbox.cpp
+++ b/fpdfsdk/pwl/cpwl_cblistbox.cpp
@@ -15,7 +15,7 @@
 
 CPWL_CBListBox::CPWL_CBListBox(
     const CreateParams& cp,
-    std::unique_ptr<IPWL_SystemHandler::PerWindowData> pAttachedData)
+    std::unique_ptr<IPWL_FillerNotify::PerWindowData> pAttachedData)
     : CPWL_ListBox(cp, std::move(pAttachedData)) {}
 
 CPWL_CBListBox::~CPWL_CBListBox() = default;
diff --git a/fpdfsdk/pwl/cpwl_cblistbox.h b/fpdfsdk/pwl/cpwl_cblistbox.h
index 1f6509a..08036a7 100644
--- a/fpdfsdk/pwl/cpwl_cblistbox.h
+++ b/fpdfsdk/pwl/cpwl_cblistbox.h
@@ -10,14 +10,14 @@
 #include <memory>
 
 #include "fpdfsdk/pwl/cpwl_list_box.h"
-#include "fpdfsdk/pwl/ipwl_systemhandler.h"
+#include "fpdfsdk/pwl/ipwl_fillernotify.h"
 #include "public/fpdf_fwlevent.h"
 
 class CPWL_CBListBox final : public CPWL_ListBox {
  public:
   CPWL_CBListBox(
       const CreateParams& cp,
-      std::unique_ptr<IPWL_SystemHandler::PerWindowData> pAttachedData);
+      std::unique_ptr<IPWL_FillerNotify::PerWindowData> pAttachedData);
   ~CPWL_CBListBox() override;
 
   // CPWL_ListBox
diff --git a/fpdfsdk/pwl/cpwl_combo_box.cpp b/fpdfsdk/pwl/cpwl_combo_box.cpp
index 18fd0c7..8c43da7 100644
--- a/fpdfsdk/pwl/cpwl_combo_box.cpp
+++ b/fpdfsdk/pwl/cpwl_combo_box.cpp
@@ -25,7 +25,7 @@
 
 CPWL_ComboBox::CPWL_ComboBox(
     const CreateParams& cp,
-    std::unique_ptr<IPWL_SystemHandler::PerWindowData> pAttachedData)
+    std::unique_ptr<IPWL_FillerNotify::PerWindowData> pAttachedData)
     : CPWL_Wnd(cp, std::move(pAttachedData)) {
   GetCreationParams()->dwFlags &= ~PWS_VSCROLL;
 }
@@ -164,7 +164,7 @@
   bcp.sBorderColor = kDefaultBlackColor;
   bcp.dwBorderWidth = 2;
   bcp.nBorderStyle = BorderStyle::kBeveled;
-  bcp.eCursorType = IPWL_SystemHandler::CursorStyle::kArrow;
+  bcp.eCursorType = IPWL_FillerNotify::CursorStyle::kArrow;
 
   auto pButton = std::make_unique<CPWL_CBButton>(bcp, CloneAttachedData());
   m_pButton = pButton.get();
@@ -180,7 +180,7 @@
   lcp.dwFlags = PWS_BORDER | PWS_BACKGROUND | PLBS_HOVERSEL | PWS_VSCROLL;
   lcp.nBorderStyle = BorderStyle::kSolid;
   lcp.dwBorderWidth = 1;
-  lcp.eCursorType = IPWL_SystemHandler::CursorStyle::kArrow;
+  lcp.eCursorType = IPWL_FillerNotify::CursorStyle::kArrow;
   lcp.rcRectWnd = CFX_FloatRect();
   lcp.fFontSize =
       (cp.dwFlags & PWS_AUTOFONTSIZE) ? kComboBoxDefaultFontSize : cp.fFontSize;
diff --git a/fpdfsdk/pwl/cpwl_combo_box.h b/fpdfsdk/pwl/cpwl_combo_box.h
index 1da5b09..89ae9cb 100644
--- a/fpdfsdk/pwl/cpwl_combo_box.h
+++ b/fpdfsdk/pwl/cpwl_combo_box.h
@@ -11,7 +11,7 @@
 
 #include "core/fxcrt/unowned_ptr.h"
 #include "fpdfsdk/pwl/cpwl_wnd.h"
-#include "fpdfsdk/pwl/ipwl_systemhandler.h"
+#include "fpdfsdk/pwl/ipwl_fillernotify.h"
 
 class CPWL_Edit;
 class CPWL_CBButton;
@@ -22,7 +22,7 @@
  public:
   CPWL_ComboBox(
       const CreateParams& cp,
-      std::unique_ptr<IPWL_SystemHandler::PerWindowData> pAttachedData);
+      std::unique_ptr<IPWL_FillerNotify::PerWindowData> pAttachedData);
   ~CPWL_ComboBox() override;
 
   CPWL_Edit* GetEdit() const { return m_pEdit.Get(); }
diff --git a/fpdfsdk/pwl/cpwl_edit.cpp b/fpdfsdk/pwl/cpwl_edit.cpp
index ed41331..0a040de 100644
--- a/fpdfsdk/pwl/cpwl_edit.cpp
+++ b/fpdfsdk/pwl/cpwl_edit.cpp
@@ -31,10 +31,10 @@
 
 CPWL_Edit::CPWL_Edit(
     const CreateParams& cp,
-    std::unique_ptr<IPWL_SystemHandler::PerWindowData> pAttachedData)
+    std::unique_ptr<IPWL_FillerNotify::PerWindowData> pAttachedData)
     : CPWL_Wnd(cp, std::move(pAttachedData)),
       m_pEditImpl(std::make_unique<CPWL_EditImpl>()) {
-  GetCreationParams()->eCursorType = IPWL_SystemHandler::CursorStyle::kVBeam;
+  GetCreationParams()->eCursorType = IPWL_FillerNotify::CursorStyle::kVBeam;
 }
 
 CPWL_Edit::~CPWL_Edit() {
@@ -213,7 +213,7 @@
   }
   m_pEditImpl->DrawEdit(
       pDevice, mtUser2Device, GetTextColor().ToFXColor(GetTransparency()),
-      rcClip, CFX_PointF(), pRange, GetSystemHandler(), GetAttachedData());
+      rcClip, CFX_PointF(), pRange, GetFillerNotify(), GetAttachedData());
 }
 
 void CPWL_Edit::OnSetFocus() {
@@ -481,9 +481,9 @@
 
 void CPWL_Edit::SetCursor() {
   if (IsValid()) {
-    GetSystemHandler()->SetCursor(
-        IsWndHorV() ? IPWL_SystemHandler::CursorStyle::kVBeam
-                    : IPWL_SystemHandler::CursorStyle::kHBeam);
+    GetFillerNotify()->SetCursor(IsWndHorV()
+                                     ? IPWL_FillerNotify::CursorStyle::kVBeam
+                                     : IPWL_FillerNotify::CursorStyle::kHBeam);
   }
 }
 
diff --git a/fpdfsdk/pwl/cpwl_edit.h b/fpdfsdk/pwl/cpwl_edit.h
index 26239ca..0656088 100644
--- a/fpdfsdk/pwl/cpwl_edit.h
+++ b/fpdfsdk/pwl/cpwl_edit.h
@@ -15,7 +15,7 @@
 #include "core/fxcrt/unowned_ptr.h"
 #include "core/fxcrt/widestring.h"
 #include "fpdfsdk/pwl/cpwl_wnd.h"
-#include "fpdfsdk/pwl/ipwl_systemhandler.h"
+#include "fpdfsdk/pwl/ipwl_fillernotify.h"
 
 class CPDF_Font;
 class CPWL_Caret;
@@ -29,7 +29,7 @@
 class CPWL_Edit final : public CPWL_Wnd {
  public:
   CPWL_Edit(const CreateParams& cp,
-            std::unique_ptr<IPWL_SystemHandler::PerWindowData> pAttachedData);
+            std::unique_ptr<IPWL_FillerNotify::PerWindowData> pAttachedData);
   ~CPWL_Edit() override;
 
   // CPWL_Wnd:
diff --git a/fpdfsdk/pwl/cpwl_edit_impl.cpp b/fpdfsdk/pwl/cpwl_edit_impl.cpp
index deb071f..3cd89a2 100644
--- a/fpdfsdk/pwl/cpwl_edit_impl.cpp
+++ b/fpdfsdk/pwl/cpwl_edit_impl.cpp
@@ -23,7 +23,7 @@
 #include "core/fxge/cfx_renderdevice.h"
 #include "fpdfsdk/pwl/cpwl_edit.h"
 #include "fpdfsdk/pwl/cpwl_scroll_bar.h"
-#include "fpdfsdk/pwl/ipwl_systemhandler.h"
+#include "fpdfsdk/pwl/ipwl_fillernotify.h"
 #include "third_party/base/check.h"
 #include "third_party/base/check_op.h"
 
@@ -582,8 +582,8 @@
                              const CFX_FloatRect& rcClip,
                              const CFX_PointF& ptOffset,
                              const CPVT_WordRange* pRange,
-                             IPWL_SystemHandler* pSystemHandler,
-                             IPWL_SystemHandler::PerWindowData* pSystemData) {
+                             IPWL_FillerNotify* pFillerNotify,
+                             IPWL_FillerNotify::PerWindowData* pSystemData) {
   const bool bContinuous = GetCharArray() == 0;
   uint16_t SubWord = GetPasswordChar();
   float fFontSize = GetFontSize();
@@ -621,7 +621,7 @@
       bSelect = place > wrSelect.BeginPos && place <= wrSelect.EndPos;
       crCurFill = bSelect ? crWhite : crTextFill;
     }
-    if (pSystemHandler->IsSelectionImplemented()) {
+    if (pFillerNotify->IsSelectionImplemented()) {
       crCurFill = crTextFill;
       crOldFill = crCurFill;
     }
@@ -630,12 +630,12 @@
       if (bSelect) {
         CPVT_Line line;
         pIterator->GetLine(line);
-        if (pSystemHandler->IsSelectionImplemented()) {
+        if (pFillerNotify->IsSelectionImplemented()) {
           CFX_FloatRect rc(word.ptWord.x, line.ptLine.y + line.fLineDescent,
                            word.ptWord.x + word.fWidth,
                            line.ptLine.y + line.fLineAscent);
           rc.Intersect(rcClip);
-          pSystemHandler->OutputSelectedRect(pSystemData, rc);
+          pFillerNotify->OutputSelectedRect(pSystemData, rc);
         } else {
           CFX_Path pathSelBK;
           pathSelBK.AppendRect(word.ptWord.x, line.ptLine.y + line.fLineDescent,
diff --git a/fpdfsdk/pwl/cpwl_edit_impl.h b/fpdfsdk/pwl/cpwl_edit_impl.h
index cef333a..d571b38 100644
--- a/fpdfsdk/pwl/cpwl_edit_impl.h
+++ b/fpdfsdk/pwl/cpwl_edit_impl.h
@@ -18,7 +18,7 @@
 #include "core/fxcrt/fx_codepage_forward.h"
 #include "core/fxcrt/unowned_ptr.h"
 #include "core/fxge/dib/fx_dib.h"
-#include "fpdfsdk/pwl/ipwl_systemhandler.h"
+#include "fpdfsdk/pwl/ipwl_fillernotify.h"
 
 class CFX_RenderDevice;
 class CPWL_Edit;
@@ -51,8 +51,8 @@
                 const CFX_FloatRect& rcClip,
                 const CFX_PointF& ptOffset,
                 const CPVT_WordRange* pRange,
-                IPWL_SystemHandler* pSystemHandler,
-                IPWL_SystemHandler::PerWindowData* pSystemData);
+                IPWL_FillerNotify* pHandler,
+                IPWL_FillerNotify::PerWindowData* pWindowData);
 
   void SetFontMap(IPVT_FontMap* pFontMap);
   void SetNotify(CPWL_Edit* pNotify);
diff --git a/fpdfsdk/pwl/cpwl_list_box.cpp b/fpdfsdk/pwl/cpwl_list_box.cpp
index 5c65795..04bd460 100644
--- a/fpdfsdk/pwl/cpwl_list_box.cpp
+++ b/fpdfsdk/pwl/cpwl_list_box.cpp
@@ -19,7 +19,7 @@
 
 CPWL_ListBox::CPWL_ListBox(
     const CreateParams& cp,
-    std::unique_ptr<IPWL_SystemHandler::PerWindowData> pAttachedData)
+    std::unique_ptr<IPWL_FillerNotify::PerWindowData> pAttachedData)
     : CPWL_Wnd(cp, std::move(pAttachedData)),
       m_pListCtrl(std::make_unique<CPWL_ListCtrl>()) {}
 
@@ -62,7 +62,7 @@
                                                             : rcClient);
     }
 
-    IPWL_SystemHandler* pSysHandler = GetSystemHandler();
+    IPWL_FillerNotify* pSysHandler = GetFillerNotify();
     if (m_pListCtrl->IsItemSelected(i)) {
       if (pSysHandler->IsSelectionImplemented()) {
         m_pListCtrl->GetItemEdit(i)->DrawEdit(
diff --git a/fpdfsdk/pwl/cpwl_list_box.h b/fpdfsdk/pwl/cpwl_list_box.h
index 642cb12..d72672a 100644
--- a/fpdfsdk/pwl/cpwl_list_box.h
+++ b/fpdfsdk/pwl/cpwl_list_box.h
@@ -17,9 +17,8 @@
 
 class CPWL_ListBox : public CPWL_Wnd, public CPWL_ListCtrl::NotifyIface {
  public:
-  CPWL_ListBox(
-      const CreateParams& cp,
-      std::unique_ptr<IPWL_SystemHandler::PerWindowData> pAttachedData);
+  CPWL_ListBox(const CreateParams& cp,
+               std::unique_ptr<IPWL_FillerNotify::PerWindowData> pAttachedData);
   ~CPWL_ListBox() override;
 
   // CPWL_Wnd:
diff --git a/fpdfsdk/pwl/cpwl_sbbutton.cpp b/fpdfsdk/pwl/cpwl_sbbutton.cpp
index bd55556..320e362 100644
--- a/fpdfsdk/pwl/cpwl_sbbutton.cpp
+++ b/fpdfsdk/pwl/cpwl_sbbutton.cpp
@@ -13,10 +13,10 @@
 
 CPWL_SBButton::CPWL_SBButton(
     const CreateParams& cp,
-    std::unique_ptr<IPWL_SystemHandler::PerWindowData> pAttachedData,
+    std::unique_ptr<IPWL_FillerNotify::PerWindowData> pAttachedData,
     Type eButtonType)
     : CPWL_Wnd(cp, std::move(pAttachedData)), m_eSBButtonType(eButtonType) {
-  GetCreationParams()->eCursorType = IPWL_SystemHandler::CursorStyle::kArrow;
+  GetCreationParams()->eCursorType = IPWL_FillerNotify::CursorStyle::kArrow;
 }
 
 CPWL_SBButton::~CPWL_SBButton() = default;
diff --git a/fpdfsdk/pwl/cpwl_sbbutton.h b/fpdfsdk/pwl/cpwl_sbbutton.h
index 9a21aee..fe976cb 100644
--- a/fpdfsdk/pwl/cpwl_sbbutton.h
+++ b/fpdfsdk/pwl/cpwl_sbbutton.h
@@ -10,16 +10,15 @@
 #include <memory>
 
 #include "fpdfsdk/pwl/cpwl_wnd.h"
-#include "fpdfsdk/pwl/ipwl_systemhandler.h"
+#include "fpdfsdk/pwl/ipwl_fillernotify.h"
 
 class CPWL_SBButton final : public CPWL_Wnd {
  public:
   enum class Type : uint8_t { kMinButton, kMaxButton, kPosButton };
 
-  CPWL_SBButton(
-      const CreateParams& cp,
-      std::unique_ptr<IPWL_SystemHandler::PerWindowData> pAttachedData,
-      Type eButtonType);
+  CPWL_SBButton(const CreateParams& cp,
+                std::unique_ptr<IPWL_FillerNotify::PerWindowData> pAttachedData,
+                Type eButtonType);
   ~CPWL_SBButton() override;
 
   // CPWL_Wnd
diff --git a/fpdfsdk/pwl/cpwl_scroll_bar.cpp b/fpdfsdk/pwl/cpwl_scroll_bar.cpp
index 0279ca7..b8ec531 100644
--- a/fpdfsdk/pwl/cpwl_scroll_bar.cpp
+++ b/fpdfsdk/pwl/cpwl_scroll_bar.cpp
@@ -107,9 +107,9 @@
 
 CPWL_ScrollBar::CPWL_ScrollBar(
     const CreateParams& cp,
-    std::unique_ptr<IPWL_SystemHandler::PerWindowData> pAttachedData)
+    std::unique_ptr<IPWL_FillerNotify::PerWindowData> pAttachedData)
     : CPWL_Wnd(cp, std::move(pAttachedData)) {
-  GetCreationParams()->eCursorType = IPWL_SystemHandler::CursorStyle::kArrow;
+  GetCreationParams()->eCursorType = IPWL_FillerNotify::CursorStyle::kArrow;
 }
 
 CPWL_ScrollBar::~CPWL_ScrollBar() = default;
diff --git a/fpdfsdk/pwl/cpwl_scroll_bar.h b/fpdfsdk/pwl/cpwl_scroll_bar.h
index f6f49c7..053d241 100644
--- a/fpdfsdk/pwl/cpwl_scroll_bar.h
+++ b/fpdfsdk/pwl/cpwl_scroll_bar.h
@@ -96,7 +96,7 @@
 
   CPWL_ScrollBar(
       const CreateParams& cp,
-      std::unique_ptr<IPWL_SystemHandler::PerWindowData> pAttachedData);
+      std::unique_ptr<IPWL_FillerNotify::PerWindowData> pAttachedData);
   ~CPWL_ScrollBar() override;
 
   // CPWL_Wnd:
diff --git a/fpdfsdk/pwl/cpwl_special_button.cpp b/fpdfsdk/pwl/cpwl_special_button.cpp
index 730d815..f94cc3e 100644
--- a/fpdfsdk/pwl/cpwl_special_button.cpp
+++ b/fpdfsdk/pwl/cpwl_special_button.cpp
@@ -13,7 +13,7 @@
 
 CPWL_PushButton::CPWL_PushButton(
     const CreateParams& cp,
-    std::unique_ptr<IPWL_SystemHandler::PerWindowData> pAttachedData)
+    std::unique_ptr<IPWL_FillerNotify::PerWindowData> pAttachedData)
     : CPWL_Button(cp, std::move(pAttachedData)) {}
 
 CPWL_PushButton::~CPWL_PushButton() = default;
@@ -25,7 +25,7 @@
 
 CPWL_CheckBox::CPWL_CheckBox(
     const CreateParams& cp,
-    std::unique_ptr<IPWL_SystemHandler::PerWindowData> pAttachedData)
+    std::unique_ptr<IPWL_FillerNotify::PerWindowData> pAttachedData)
     : CPWL_Button(cp, std::move(pAttachedData)) {}
 
 CPWL_CheckBox::~CPWL_CheckBox() = default;
@@ -49,7 +49,7 @@
 
 CPWL_RadioButton::CPWL_RadioButton(
     const CreateParams& cp,
-    std::unique_ptr<IPWL_SystemHandler::PerWindowData> pAttachedData)
+    std::unique_ptr<IPWL_FillerNotify::PerWindowData> pAttachedData)
     : CPWL_Button(cp, std::move(pAttachedData)) {}
 
 CPWL_RadioButton::~CPWL_RadioButton() = default;
diff --git a/fpdfsdk/pwl/cpwl_special_button.h b/fpdfsdk/pwl/cpwl_special_button.h
index f933cb6..018a20e 100644
--- a/fpdfsdk/pwl/cpwl_special_button.h
+++ b/fpdfsdk/pwl/cpwl_special_button.h
@@ -15,7 +15,7 @@
  public:
   CPWL_PushButton(
       const CreateParams& cp,
-      std::unique_ptr<IPWL_SystemHandler::PerWindowData> pAttachedData);
+      std::unique_ptr<IPWL_FillerNotify::PerWindowData> pAttachedData);
   ~CPWL_PushButton() override;
 
   // CPWL_Button:
@@ -26,7 +26,7 @@
  public:
   CPWL_CheckBox(
       const CreateParams& cp,
-      std::unique_ptr<IPWL_SystemHandler::PerWindowData> pAttachedData);
+      std::unique_ptr<IPWL_FillerNotify::PerWindowData> pAttachedData);
   ~CPWL_CheckBox() override;
 
   // CPWL_Button:
@@ -44,7 +44,7 @@
  public:
   CPWL_RadioButton(
       const CreateParams& cp,
-      std::unique_ptr<IPWL_SystemHandler::PerWindowData> pAttachedData);
+      std::unique_ptr<IPWL_FillerNotify::PerWindowData> pAttachedData);
   ~CPWL_RadioButton() override;
 
   // CPWL_Button
diff --git a/fpdfsdk/pwl/cpwl_wnd.cpp b/fpdfsdk/pwl/cpwl_wnd.cpp
index ad0d9d2..da92cd7 100644
--- a/fpdfsdk/pwl/cpwl_wnd.cpp
+++ b/fpdfsdk/pwl/cpwl_wnd.cpp
@@ -34,10 +34,10 @@
     CFX_Color(CFX_Color::Type::kGray, 1);
 
 CPWL_Wnd::CreateParams::CreateParams(CFX_Timer::HandlerIface* timer_handler,
-                                     IPWL_SystemHandler* system_handler,
+                                     IPWL_FillerNotify* filler_notify,
                                      ProviderIface* provider)
     : pTimerHandler(timer_handler),
-      pSystemHandler(system_handler),
+      pFillerNotify(filler_notify),
       pProvider(provider),
       fFontSize(kDefaultFontSize),
       sDash(3, 0, 0) {}
@@ -141,7 +141,7 @@
 
 CPWL_Wnd::CPWL_Wnd(
     const CreateParams& cp,
-    std::unique_ptr<IPWL_SystemHandler::PerWindowData> pAttachedData)
+    std::unique_ptr<IPWL_FillerNotify::PerWindowData> pAttachedData)
     : m_CreationParams(cp), m_pAttachedData(std::move(pAttachedData)) {}
 
 CPWL_Wnd::~CPWL_Wnd() {
@@ -284,7 +284,7 @@
   CFX_FloatRect rcWin = PWLtoWnd(rcRefresh);
   rcWin.Inflate(1, 1);
   rcWin.Normalize();
-  GetSystemHandler()->InvalidateRect(m_pAttachedData.get(), rcWin);
+  GetFillerNotify()->InvalidateRect(m_pAttachedData.get(), rcWin);
   return !!thisObserved;
 }
 
@@ -506,7 +506,7 @@
   CreateParams scp = cp;
   scp.dwFlags = PWS_BACKGROUND | PWS_AUTOTRANSPARENT | PWS_NOREFRESHCLIP;
   scp.sBackgroundColor = kDefaultWhiteColor;
-  scp.eCursorType = IPWL_SystemHandler::CursorStyle::kArrow;
+  scp.eCursorType = IPWL_FillerNotify::CursorStyle::kArrow;
   scp.nTransparency = CPWL_ScrollBar::kTransparency;
 
   auto pBar = std::make_unique<CPWL_ScrollBar>(scp, CloneAttachedData());
@@ -547,7 +547,7 @@
 
 void CPWL_Wnd::OnKillFocus() {}
 
-std::unique_ptr<IPWL_SystemHandler::PerWindowData> CPWL_Wnd::CloneAttachedData()
+std::unique_ptr<IPWL_FillerNotify::PerWindowData> CPWL_Wnd::CloneAttachedData()
     const {
   return m_pAttachedData ? m_pAttachedData->Clone() : nullptr;
 }
@@ -622,7 +622,7 @@
 
 void CPWL_Wnd::SetCursor() {
   if (IsValid())
-    GetSystemHandler()->SetCursor(GetCreationParams()->eCursorType);
+    GetFillerNotify()->SetCursor(GetCreationParams()->eCursorType);
 }
 
 void CPWL_Wnd::CreateMsgControl() {
diff --git a/fpdfsdk/pwl/cpwl_wnd.h b/fpdfsdk/pwl/cpwl_wnd.h
index de9a132..34151b6 100644
--- a/fpdfsdk/pwl/cpwl_wnd.h
+++ b/fpdfsdk/pwl/cpwl_wnd.h
@@ -17,7 +17,7 @@
 #include "core/fxcrt/widestring.h"
 #include "core/fxge/cfx_color.h"
 #include "core/fxge/cfx_renderdevice.h"
-#include "fpdfsdk/pwl/ipwl_systemhandler.h"
+#include "fpdfsdk/pwl/ipwl_fillernotify.h"
 #include "public/fpdf_fwlevent.h"
 
 class CPWL_Edit;
@@ -85,7 +85,7 @@
 
     // get a matrix which map user space to CWnd client space
     virtual CFX_Matrix GetWindowMatrix(
-        const IPWL_SystemHandler::PerWindowData* pAttached) = 0;
+        const IPWL_FillerNotify::PerWindowData* pAttached) = 0;
   };
 
   class FocusHandlerIface {
@@ -98,7 +98,7 @@
   class CreateParams {
    public:
     CreateParams(CFX_Timer::HandlerIface* timer_handler,
-                 IPWL_SystemHandler* system_handler,
+                 IPWL_FillerNotify* filler_notify,
                  ProviderIface* provider);
     CreateParams(const CreateParams& other);
     ~CreateParams();
@@ -106,7 +106,7 @@
     // Required:
     CFX_FloatRect rcRectWnd;
     ObservedPtr<CFX_Timer::HandlerIface> const pTimerHandler;
-    UnownedPtr<IPWL_SystemHandler> const pSystemHandler;
+    UnownedPtr<IPWL_FillerNotify> const pFillerNotify;
     UnownedPtr<IPVT_FontMap> pFontMap;
     ObservedPtr<ProviderIface> pProvider;
 
@@ -124,8 +124,8 @@
 
     // Ignore, used internally only:
     CPWL_MsgControl* pMsgControl = nullptr;
-    IPWL_SystemHandler::CursorStyle eCursorType =
-        IPWL_SystemHandler::CursorStyle::kArrow;
+    IPWL_FillerNotify::CursorStyle eCursorType =
+        IPWL_FillerNotify::CursorStyle::kArrow;
   };
 
   static bool IsSHIFTKeyDown(Mask<FWL_EVENTFLAG> nFlag);
@@ -137,7 +137,7 @@
   static bool IsPlatformShortcutKey(Mask<FWL_EVENTFLAG> nFlag);
 
   CPWL_Wnd(const CreateParams& cp,
-           std::unique_ptr<IPWL_SystemHandler::PerWindowData> pAttachedData);
+           std::unique_ptr<IPWL_FillerNotify::PerWindowData> pAttachedData);
   virtual ~CPWL_Wnd();
 
   // Returns |true| iff this instance is still allocated.
@@ -220,10 +220,10 @@
   const CFX_FloatRect& GetClipRect() const;
 
   CPWL_Wnd* GetParentWindow() const { return m_pParent.Get(); }
-  IPWL_SystemHandler::PerWindowData* GetAttachedData() const {
+  IPWL_FillerNotify::PerWindowData* GetAttachedData() const {
     return m_pAttachedData.get();
   }
-  std::unique_ptr<IPWL_SystemHandler::PerWindowData> CloneAttachedData() const;
+  std::unique_ptr<IPWL_FillerNotify::PerWindowData> CloneAttachedData() const;
 
   bool WndHitTest(const CFX_PointF& point) const;
   bool ClientHitTest(const CFX_PointF& point) const;
@@ -266,8 +266,8 @@
   CFX_Timer::HandlerIface* GetTimerHandler() const {
     return m_CreationParams.pTimerHandler.Get();
   }
-  IPWL_SystemHandler* GetSystemHandler() const {
-    return m_CreationParams.pSystemHandler.Get();
+  IPWL_FillerNotify* GetFillerNotify() const {
+    return m_CreationParams.pFillerNotify.Get();
   }
 
   // Returns |true| iff this instance is still allocated.
@@ -293,7 +293,7 @@
   CPWL_MsgControl* GetMsgControl() const;
 
   CreateParams m_CreationParams;
-  std::unique_ptr<IPWL_SystemHandler::PerWindowData> m_pAttachedData;
+  std::unique_ptr<IPWL_FillerNotify::PerWindowData> m_pAttachedData;
   UnownedPtr<CPWL_Wnd> m_pParent;
   std::vector<std::unique_ptr<CPWL_Wnd>> m_Children;
   UnownedPtr<CPWL_ScrollBar> m_pVScrollBar;
diff --git a/fpdfsdk/pwl/ipwl_fillernotify.h b/fpdfsdk/pwl/ipwl_fillernotify.h
index a699118..3a1f738 100644
--- a/fpdfsdk/pwl/ipwl_fillernotify.h
+++ b/fpdfsdk/pwl/ipwl_fillernotify.h
@@ -7,27 +7,51 @@
 #ifndef FPDFSDK_PWL_IPWL_FILLERNOTIFY_H_
 #define FPDFSDK_PWL_IPWL_FILLERNOTIFY_H_
 
+#include <memory>
 #include <utility>
 
 #include "core/fxcrt/mask.h"
 #include "core/fxcrt/widestring.h"
-#include "fpdfsdk/pwl/cpwl_wnd.h"
-#include "fpdfsdk/pwl/ipwl_systemhandler.h"
+#include "public/fpdf_fwlevent.h"
+
+class CFX_FloatRect;
 
 class IPWL_FillerNotify {
  public:
+  // These must match the values in public/fpdf_formfill.h
+  enum CursorStyle {
+    kArrow = 0,
+    kNESW = 1,
+    kNWSE = 2,
+    kVBeam = 3,
+    kHBeam = 4,
+    kHand = 5,
+  };
+
+  class PerWindowData {
+   public:
+    virtual ~PerWindowData() = default;
+    virtual std::unique_ptr<PerWindowData> Clone() const = 0;
+  };
+
   virtual ~IPWL_FillerNotify() = default;
 
+  virtual void InvalidateRect(PerWindowData* pWidgetData,
+                              const CFX_FloatRect& rect) = 0;
+  virtual void OutputSelectedRect(PerWindowData* pWidgetData,
+                                  const CFX_FloatRect& rect) = 0;
+  virtual bool IsSelectionImplemented() const = 0;
+  virtual void SetCursor(CursorStyle nCursorStyle) = 0;
+
   // Must write to |bBottom| and |fPopupRet|.
-  virtual void QueryWherePopup(
-      const IPWL_SystemHandler::PerWindowData* pAttached,
-      float fPopupMin,
-      float fPopupMax,
-      bool* bBottom,
-      float* fPopupRet) = 0;
+  virtual void QueryWherePopup(const PerWindowData* pAttached,
+                               float fPopupMin,
+                               float fPopupMax,
+                               bool* bBottom,
+                               float* fPopupRet) = 0;
 
   virtual std::pair<bool, bool> OnBeforeKeyStroke(
-      const IPWL_SystemHandler::PerWindowData* pAttached,
+      const PerWindowData* pAttached,
       WideString& strChange,
       const WideString& strChangeEx,
       int nSelStart,
@@ -35,13 +59,11 @@
       bool bKeyDown,
       Mask<FWL_EVENTFLAG> nFlag) = 0;
 
-  virtual bool OnPopupPreOpen(
-      const IPWL_SystemHandler::PerWindowData* pAttached,
-      Mask<FWL_EVENTFLAG> nFlag) = 0;
+  virtual bool OnPopupPreOpen(const PerWindowData* pAttached,
+                              Mask<FWL_EVENTFLAG> nFlag) = 0;
 
-  virtual bool OnPopupPostOpen(
-      const IPWL_SystemHandler::PerWindowData* pAttached,
-      Mask<FWL_EVENTFLAG> nFlag) = 0;
+  virtual bool OnPopupPostOpen(const PerWindowData* pAttached,
+                               Mask<FWL_EVENTFLAG> nFlag) = 0;
 };
 
 #endif  // FPDFSDK_PWL_IPWL_FILLERNOTIFY_H_
diff --git a/fpdfsdk/pwl/ipwl_systemhandler.h b/fpdfsdk/pwl/ipwl_systemhandler.h
deleted file mode 100644
index e7890e2..0000000
--- a/fpdfsdk/pwl/ipwl_systemhandler.h
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright 2019 PDFium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-
-#ifndef FPDFSDK_PWL_IPWL_SYSTEMHANDLER_H_
-#define FPDFSDK_PWL_IPWL_SYSTEMHANDLER_H_
-
-#include <memory>
-
-class CFX_FloatRect;
-
-class IPWL_SystemHandler {
- public:
-  // These must match the values in public/fpdf_formfill.h
-  enum CursorStyle {
-    kArrow = 0,
-    kNESW = 1,
-    kNWSE = 2,
-    kVBeam = 3,
-    kHBeam = 4,
-    kHand = 5,
-  };
-
-  class PerWindowData {
-   public:
-    virtual ~PerWindowData() = default;
-    virtual std::unique_ptr<PerWindowData> Clone() const = 0;
-  };
-
-  virtual ~IPWL_SystemHandler() = default;
-
-  virtual void InvalidateRect(PerWindowData* pWidgetData,
-                              const CFX_FloatRect& rect) = 0;
-  virtual void OutputSelectedRect(PerWindowData* pWidgetData,
-                                  const CFX_FloatRect& rect) = 0;
-  virtual bool IsSelectionImplemented() const = 0;
-  virtual void SetCursor(CursorStyle nCursorStyle) = 0;
-};
-
-#endif  // FPDFSDK_PWL_IPWL_SYSTEMHANDLER_H_