Cleanup ThemeProvider code

Remove unused methods, fold the arrow data into the CFWL_WidgetTP instead of
a custom class and global object.

Change-Id: Ie942052555d6c8668d27072c1fcc5e8e00597518
Reviewed-on: https://pdfium-review.googlesource.com/2139
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
diff --git a/BUILD.gn b/BUILD.gn
index 1244bcc..92bd524 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -1290,8 +1290,6 @@
       "xfa/fwl/ifwl_themeprovider.h",
       "xfa/fwl/ifwl_widgetdelegate.h",
       "xfa/fwl/ifwl_widgetmgrdelegate.h",
-      "xfa/fwl/theme/cfwl_arrowdata.cpp",
-      "xfa/fwl/theme/cfwl_arrowdata.h",
       "xfa/fwl/theme/cfwl_barcodetp.cpp",
       "xfa/fwl/theme/cfwl_barcodetp.h",
       "xfa/fwl/theme/cfwl_carettp.cpp",
diff --git a/xfa/fwl/theme/cfwl_arrowdata.cpp b/xfa/fwl/theme/cfwl_arrowdata.cpp
deleted file mode 100644
index 523a855..0000000
--- a/xfa/fwl/theme/cfwl_arrowdata.cpp
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright 2016 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
-
-#include "xfa/fwl/theme/cfwl_arrowdata.h"
-
-#include <algorithm>
-
-#include "third_party/base/ptr_util.h"
-
-namespace {
-
-CFWL_ArrowData* g_pInstance = nullptr;
-
-}  // namespace
-
-CFWL_ArrowData* CFWL_ArrowData::GetInstance() {
-  if (!g_pInstance)
-    g_pInstance = new CFWL_ArrowData;
-  return g_pInstance;
-}
-
-bool CFWL_ArrowData::HasInstance() {
-  return !!g_pInstance;
-}
-
-void CFWL_ArrowData::DestroyInstance() {
-  delete g_pInstance;
-  g_pInstance = nullptr;
-}
-
-CFWL_ArrowData::CFWL_ArrowData() : m_pColorData(nullptr) {
-  SetColorData();
-}
-
-CFWL_ArrowData::~CFWL_ArrowData() {}
-
-void CFWL_ArrowData::SetColorData() {
-  if (!m_pColorData)
-    m_pColorData = pdfium::MakeUnique<CColorData>();
-
-  m_pColorData->clrBorder[0] = ArgbEncode(255, 202, 216, 249);
-  m_pColorData->clrBorder[1] = ArgbEncode(255, 171, 190, 233);
-  m_pColorData->clrBorder[2] = ArgbEncode(255, 135, 147, 219);
-  m_pColorData->clrBorder[3] = ArgbEncode(255, 172, 168, 153);
-  m_pColorData->clrStart[0] = ArgbEncode(255, 225, 234, 254);
-  m_pColorData->clrStart[1] = ArgbEncode(255, 253, 255, 255);
-  m_pColorData->clrStart[2] = ArgbEncode(255, 110, 142, 241);
-  m_pColorData->clrStart[3] = ArgbEncode(255, 254, 254, 251);
-  m_pColorData->clrEnd[0] = ArgbEncode(255, 175, 204, 251);
-  m_pColorData->clrEnd[1] = ArgbEncode(255, 185, 218, 251);
-  m_pColorData->clrEnd[2] = ArgbEncode(255, 210, 222, 235);
-  m_pColorData->clrEnd[3] = ArgbEncode(255, 243, 241, 236);
-  m_pColorData->clrSign[0] = ArgbEncode(255, 77, 97, 133);
-  m_pColorData->clrSign[1] = ArgbEncode(255, 77, 97, 133);
-  m_pColorData->clrSign[2] = ArgbEncode(255, 77, 97, 133);
-  m_pColorData->clrSign[3] = ArgbEncode(255, 128, 128, 128);
-}
diff --git a/xfa/fwl/theme/cfwl_arrowdata.h b/xfa/fwl/theme/cfwl_arrowdata.h
deleted file mode 100644
index 0062e4d..0000000
--- a/xfa/fwl/theme/cfwl_arrowdata.h
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright 2016 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 XFA_FWL_THEME_CFWL_ARROWDATA_H_
-#define XFA_FWL_THEME_CFWL_ARROWDATA_H_
-
-#include <memory>
-
-#include "core/fxcrt/fx_system.h"
-#include "core/fxge/fx_dib.h"
-
-class CFWL_ArrowData {
- public:
-  struct CColorData {
-    FX_ARGB clrBorder[4];
-    FX_ARGB clrStart[4];
-    FX_ARGB clrEnd[4];
-    FX_ARGB clrSign[4];
-  };
-
-  static CFWL_ArrowData* GetInstance();
-  static bool HasInstance();
-  static void DestroyInstance();
-
-  std::unique_ptr<CColorData> m_pColorData;
-
- private:
-  CFWL_ArrowData();
-  ~CFWL_ArrowData();
-
-  void SetColorData();
-};
-
-#endif  // XFA_FWL_THEME_CFWL_ARROWDATA_H_
diff --git a/xfa/fwl/theme/cfwl_barcodetp.cpp b/xfa/fwl/theme/cfwl_barcodetp.cpp
index f0bb22f..cafdf17 100644
--- a/xfa/fwl/theme/cfwl_barcodetp.cpp
+++ b/xfa/fwl/theme/cfwl_barcodetp.cpp
@@ -14,10 +14,6 @@
 
 CFWL_BarcodeTP::~CFWL_BarcodeTP() {}
 
-bool CFWL_BarcodeTP::IsValidWidget(CFWL_Widget* pWidget) {
-  return pWidget && pWidget->GetClassID() == FWL_Type::Barcode;
-}
-
 void CFWL_BarcodeTP::DrawBackground(CFWL_ThemeBackground* pParams) {
   if (!pParams)
     return;
diff --git a/xfa/fwl/theme/cfwl_barcodetp.h b/xfa/fwl/theme/cfwl_barcodetp.h
index adc79dc..42b41e7 100644
--- a/xfa/fwl/theme/cfwl_barcodetp.h
+++ b/xfa/fwl/theme/cfwl_barcodetp.h
@@ -16,7 +16,6 @@
   ~CFWL_BarcodeTP() override;
 
   // CFWL_WidgetTP
-  bool IsValidWidget(CFWL_Widget* pWidget) override;
   void DrawBackground(CFWL_ThemeBackground* pParams) override;
 };
 
diff --git a/xfa/fwl/theme/cfwl_carettp.cpp b/xfa/fwl/theme/cfwl_carettp.cpp
index 63d6270..06df3f5 100644
--- a/xfa/fwl/theme/cfwl_carettp.cpp
+++ b/xfa/fwl/theme/cfwl_carettp.cpp
@@ -15,10 +15,6 @@
 CFWL_CaretTP::CFWL_CaretTP() {}
 CFWL_CaretTP::~CFWL_CaretTP() {}
 
-bool CFWL_CaretTP::IsValidWidget(CFWL_Widget* pWidget) {
-  return pWidget && pWidget->GetClassID() == FWL_Type::Caret;
-}
-
 void CFWL_CaretTP::DrawBackground(CFWL_ThemeBackground* pParams) {
   if (!pParams)
     return;
diff --git a/xfa/fwl/theme/cfwl_carettp.h b/xfa/fwl/theme/cfwl_carettp.h
index d618e72..f7d44b7 100644
--- a/xfa/fwl/theme/cfwl_carettp.h
+++ b/xfa/fwl/theme/cfwl_carettp.h
@@ -15,7 +15,6 @@
   ~CFWL_CaretTP() override;
 
   // CFWL_WidgetTP
-  bool IsValidWidget(CFWL_Widget* pWidget) override;
   void DrawBackground(CFWL_ThemeBackground* pParams) override;
 
  protected:
diff --git a/xfa/fwl/theme/cfwl_checkboxtp.cpp b/xfa/fwl/theme/cfwl_checkboxtp.cpp
index 9109cb6..0bc75ec 100644
--- a/xfa/fwl/theme/cfwl_checkboxtp.cpp
+++ b/xfa/fwl/theme/cfwl_checkboxtp.cpp
@@ -36,8 +36,14 @@
     m_pCheckPath->Clear();
 }
 
-bool CFWL_CheckBoxTP::IsValidWidget(CFWL_Widget* pWidget) {
-  return pWidget && pWidget->GetClassID() == FWL_Type::CheckBox;
+void CFWL_CheckBoxTP::Initialize() {
+  CFWL_WidgetTP::Initialize();
+  InitTTO();
+}
+
+void CFWL_CheckBoxTP::Finalize() {
+  FinalizeTTO();
+  CFWL_WidgetTP::Finalize();
 }
 
 void CFWL_CheckBoxTP::DrawText(CFWL_ThemeText* pParams) {
@@ -50,16 +56,6 @@
   CFWL_WidgetTP::DrawText(pParams);
 }
 
-void CFWL_CheckBoxTP::Initialize() {
-  InitTTO();
-  CFWL_WidgetTP::Initialize();
-}
-
-void CFWL_CheckBoxTP::Finalize() {
-  FinalizeTTO();
-  CFWL_WidgetTP::Finalize();
-}
-
 void CFWL_CheckBoxTP::DrawSignCheck(CFX_Graphics* pGraphics,
                                     const CFX_RectF* pRtSign,
                                     FX_ARGB argbFill,
diff --git a/xfa/fwl/theme/cfwl_checkboxtp.h b/xfa/fwl/theme/cfwl_checkboxtp.h
index 1dd204d..979b970 100644
--- a/xfa/fwl/theme/cfwl_checkboxtp.h
+++ b/xfa/fwl/theme/cfwl_checkboxtp.h
@@ -20,7 +20,6 @@
   // CFWL_WidgeTP
   void Initialize() override;
   void Finalize() override;
-  bool IsValidWidget(CFWL_Widget* pWidget) override;
   void DrawText(CFWL_ThemeText* pParams) override;
   void DrawBackground(CFWL_ThemeBackground* pParams) override;
 
diff --git a/xfa/fwl/theme/cfwl_comboboxtp.cpp b/xfa/fwl/theme/cfwl_comboboxtp.cpp
index 8f961c9..567cb2ec 100644
--- a/xfa/fwl/theme/cfwl_comboboxtp.cpp
+++ b/xfa/fwl/theme/cfwl_comboboxtp.cpp
@@ -17,10 +17,6 @@
 
 CFWL_ComboBoxTP::~CFWL_ComboBoxTP() {}
 
-bool CFWL_ComboBoxTP::IsValidWidget(CFWL_Widget* pWidget) {
-  return pWidget && pWidget->GetClassID() == FWL_Type::ComboBox;
-}
-
 void CFWL_ComboBoxTP::DrawBackground(CFWL_ThemeBackground* pParams) {
   if (!pParams)
     return;
diff --git a/xfa/fwl/theme/cfwl_comboboxtp.h b/xfa/fwl/theme/cfwl_comboboxtp.h
index e253281..183d3a0 100644
--- a/xfa/fwl/theme/cfwl_comboboxtp.h
+++ b/xfa/fwl/theme/cfwl_comboboxtp.h
@@ -15,7 +15,6 @@
   ~CFWL_ComboBoxTP() override;
 
   // CFWL_WidgetTP
-  bool IsValidWidget(CFWL_Widget* pWidget) override;
   void DrawBackground(CFWL_ThemeBackground* pParams) override;
 
  protected:
diff --git a/xfa/fwl/theme/cfwl_datetimepickertp.cpp b/xfa/fwl/theme/cfwl_datetimepickertp.cpp
index 5c4c86a..8902ef9 100644
--- a/xfa/fwl/theme/cfwl_datetimepickertp.cpp
+++ b/xfa/fwl/theme/cfwl_datetimepickertp.cpp
@@ -13,10 +13,6 @@
 
 CFWL_DateTimePickerTP::~CFWL_DateTimePickerTP() {}
 
-bool CFWL_DateTimePickerTP::IsValidWidget(CFWL_Widget* pWidget) {
-  return pWidget && pWidget->GetClassID() == FWL_Type::DateTimePicker;
-}
-
 void CFWL_DateTimePickerTP::DrawBackground(CFWL_ThemeBackground* pParams) {
   if (!pParams)
     return;
diff --git a/xfa/fwl/theme/cfwl_datetimepickertp.h b/xfa/fwl/theme/cfwl_datetimepickertp.h
index 2e6ebba..11536a3 100644
--- a/xfa/fwl/theme/cfwl_datetimepickertp.h
+++ b/xfa/fwl/theme/cfwl_datetimepickertp.h
@@ -15,7 +15,6 @@
   ~CFWL_DateTimePickerTP() override;
 
   // CFWL_WidgetTP
-  bool IsValidWidget(CFWL_Widget* pWidget) override;
   void DrawBackground(CFWL_ThemeBackground* pParams) override;
 
  protected:
diff --git a/xfa/fwl/theme/cfwl_edittp.cpp b/xfa/fwl/theme/cfwl_edittp.cpp
index 5d3447e..eee5423 100644
--- a/xfa/fwl/theme/cfwl_edittp.cpp
+++ b/xfa/fwl/theme/cfwl_edittp.cpp
@@ -15,11 +15,8 @@
 #include "xfa/fxgraphics/cfx_path.h"
 
 CFWL_EditTP::CFWL_EditTP() {}
-CFWL_EditTP::~CFWL_EditTP() {}
 
-bool CFWL_EditTP::IsValidWidget(CFWL_Widget* pWidget) {
-  return pWidget && pWidget->GetClassID() == FWL_Type::Edit;
-}
+CFWL_EditTP::~CFWL_EditTP() {}
 
 void CFWL_EditTP::DrawBackground(CFWL_ThemeBackground* pParams) {
   if (CFWL_Part::CombTextLine == pParams->m_iPart) {
@@ -89,13 +86,3 @@
       break;
   }
 }
-
-void CFWL_EditTP::Initialize() {
-  InitTTO();
-  CFWL_WidgetTP::Initialize();
-}
-
-void CFWL_EditTP::Finalize() {
-  FinalizeTTO();
-  CFWL_WidgetTP::Finalize();
-}
diff --git a/xfa/fwl/theme/cfwl_edittp.h b/xfa/fwl/theme/cfwl_edittp.h
index 0230c36..e1c6ac9 100644
--- a/xfa/fwl/theme/cfwl_edittp.h
+++ b/xfa/fwl/theme/cfwl_edittp.h
@@ -15,9 +15,6 @@
   ~CFWL_EditTP() override;
 
   // CFWL_WidgeTTP
-  void Initialize() override;
-  void Finalize() override;
-  bool IsValidWidget(CFWL_Widget* pWidget) override;
   void DrawBackground(CFWL_ThemeBackground* pParams) override;
 };
 
diff --git a/xfa/fwl/theme/cfwl_listboxtp.cpp b/xfa/fwl/theme/cfwl_listboxtp.cpp
index 2fc7ba7..7a9ba92 100644
--- a/xfa/fwl/theme/cfwl_listboxtp.cpp
+++ b/xfa/fwl/theme/cfwl_listboxtp.cpp
@@ -16,10 +16,6 @@
 
 CFWL_ListBoxTP::~CFWL_ListBoxTP() {}
 
-bool CFWL_ListBoxTP::IsValidWidget(CFWL_Widget* pWidget) {
-  return pWidget && pWidget->GetClassID() == FWL_Type::ListBox;
-}
-
 void CFWL_ListBoxTP::DrawBackground(CFWL_ThemeBackground* pParams) {
   if (!pParams)
     return;
@@ -63,16 +59,6 @@
   }
 }
 
-void CFWL_ListBoxTP::Initialize() {
-  InitTTO();
-  CFWL_WidgetTP::Initialize();
-}
-
-void CFWL_ListBoxTP::Finalize() {
-  FinalizeTTO();
-  CFWL_WidgetTP::Finalize();
-}
-
 void CFWL_ListBoxTP::DrawListBoxItem(CFX_Graphics* pGraphics,
                                      uint32_t dwStates,
                                      const CFX_RectF* prtItem,
diff --git a/xfa/fwl/theme/cfwl_listboxtp.h b/xfa/fwl/theme/cfwl_listboxtp.h
index 4113f59..dcf5ec8 100644
--- a/xfa/fwl/theme/cfwl_listboxtp.h
+++ b/xfa/fwl/theme/cfwl_listboxtp.h
@@ -15,9 +15,6 @@
   ~CFWL_ListBoxTP() override;
 
   // CFWL_WidgetTP
-  void Initialize() override;
-  void Finalize() override;
-  bool IsValidWidget(CFWL_Widget* pWidget) override;
   void DrawBackground(CFWL_ThemeBackground* pParams) override;
 
  protected:
diff --git a/xfa/fwl/theme/cfwl_monthcalendartp.cpp b/xfa/fwl/theme/cfwl_monthcalendartp.cpp
index 7e9ea0a..d98cf24 100644
--- a/xfa/fwl/theme/cfwl_monthcalendartp.cpp
+++ b/xfa/fwl/theme/cfwl_monthcalendartp.cpp
@@ -21,8 +21,14 @@
 
 CFWL_MonthCalendarTP::~CFWL_MonthCalendarTP() {}
 
-bool CFWL_MonthCalendarTP::IsValidWidget(CFWL_Widget* pWidget) {
-  return pWidget && pWidget->GetClassID() == FWL_Type::MonthCalendar;
+void CFWL_MonthCalendarTP::Initialize() {
+  CFWL_WidgetTP::Initialize();
+  InitTTO();
+}
+
+void CFWL_MonthCalendarTP::Finalize() {
+  FinalizeTTO();
+  CFWL_WidgetTP::Finalize();
 }
 
 void CFWL_MonthCalendarTP::DrawBackground(CFWL_ThemeBackground* pParams) {
@@ -96,16 +102,6 @@
   CFWL_WidgetTP::DrawText(pParams);
 }
 
-void CFWL_MonthCalendarTP::Initialize() {
-  InitTTO();
-  CFWL_WidgetTP::Initialize();
-}
-
-void CFWL_MonthCalendarTP::Finalize() {
-  FinalizeTTO();
-  CFWL_WidgetTP::Finalize();
-}
-
 void CFWL_MonthCalendarTP::DrawTotalBK(CFWL_ThemeBackground* pParams,
                                        CFX_Matrix* pMatrix) {
   CFX_Path path;
diff --git a/xfa/fwl/theme/cfwl_monthcalendartp.h b/xfa/fwl/theme/cfwl_monthcalendartp.h
index a5ef631..57438a0 100644
--- a/xfa/fwl/theme/cfwl_monthcalendartp.h
+++ b/xfa/fwl/theme/cfwl_monthcalendartp.h
@@ -19,7 +19,6 @@
   // CFWL_WidgetTP
   void Initialize() override;
   void Finalize() override;
-  bool IsValidWidget(CFWL_Widget* pWidget) override;
   void DrawBackground(CFWL_ThemeBackground* pParams) override;
   void DrawText(CFWL_ThemeText* pParams) override;
 
diff --git a/xfa/fwl/theme/cfwl_pictureboxtp.cpp b/xfa/fwl/theme/cfwl_pictureboxtp.cpp
index 1d2f2ec..27abbe2 100644
--- a/xfa/fwl/theme/cfwl_pictureboxtp.cpp
+++ b/xfa/fwl/theme/cfwl_pictureboxtp.cpp
@@ -14,10 +14,6 @@
 
 CFWL_PictureBoxTP::~CFWL_PictureBoxTP() {}
 
-bool CFWL_PictureBoxTP::IsValidWidget(CFWL_Widget* pWidget) {
-  return pWidget && pWidget->GetClassID() == FWL_Type::PictureBox;
-}
-
 void CFWL_PictureBoxTP::DrawBackground(CFWL_ThemeBackground* pParams) {
   if (!pParams)
     return;
diff --git a/xfa/fwl/theme/cfwl_pictureboxtp.h b/xfa/fwl/theme/cfwl_pictureboxtp.h
index 3152103..4a118f2 100644
--- a/xfa/fwl/theme/cfwl_pictureboxtp.h
+++ b/xfa/fwl/theme/cfwl_pictureboxtp.h
@@ -15,7 +15,6 @@
   ~CFWL_PictureBoxTP() override;
 
   // CFWL_WidgetTP
-  bool IsValidWidget(CFWL_Widget* pWidget) override;
   void DrawBackground(CFWL_ThemeBackground* pParams) override;
 };
 
diff --git a/xfa/fwl/theme/cfwl_pushbuttontp.cpp b/xfa/fwl/theme/cfwl_pushbuttontp.cpp
index bf3baed..a1e5783 100644
--- a/xfa/fwl/theme/cfwl_pushbuttontp.cpp
+++ b/xfa/fwl/theme/cfwl_pushbuttontp.cpp
@@ -21,10 +21,6 @@
 
 CFWL_PushButtonTP::~CFWL_PushButtonTP() {}
 
-bool CFWL_PushButtonTP::IsValidWidget(CFWL_Widget* pWidget) {
-  return pWidget && pWidget->GetClassID() == FWL_Type::PushButton;
-}
-
 void CFWL_PushButtonTP::DrawBackground(CFWL_ThemeBackground* pParams) {
   switch (pParams->m_iPart) {
     case CFWL_Part::Border: {
@@ -83,16 +79,6 @@
   }
 }
 
-void CFWL_PushButtonTP::Initialize() {
-  InitTTO();
-  CFWL_WidgetTP::Initialize();
-}
-
-void CFWL_PushButtonTP::Finalize() {
-  FinalizeTTO();
-  CFWL_WidgetTP::Finalize();
-}
-
 void CFWL_PushButtonTP::SetThemeData() {
   m_pThemeData->clrBorder[0] = ArgbEncode(255, 0, 60, 116);
   m_pThemeData->clrBorder[1] = ArgbEncode(255, 0, 60, 116);
diff --git a/xfa/fwl/theme/cfwl_pushbuttontp.h b/xfa/fwl/theme/cfwl_pushbuttontp.h
index 64a0088..b2372bb 100644
--- a/xfa/fwl/theme/cfwl_pushbuttontp.h
+++ b/xfa/fwl/theme/cfwl_pushbuttontp.h
@@ -17,9 +17,6 @@
   ~CFWL_PushButtonTP() override;
 
   // CFWL_WidgetTP
-  void Initialize() override;
-  void Finalize() override;
-  bool IsValidWidget(CFWL_Widget* pWidget) override;
   void DrawBackground(CFWL_ThemeBackground* pParams) override;
 
  protected:
diff --git a/xfa/fwl/theme/cfwl_scrollbartp.cpp b/xfa/fwl/theme/cfwl_scrollbartp.cpp
index 7f5d357..4cd2fb3 100644
--- a/xfa/fwl/theme/cfwl_scrollbartp.cpp
+++ b/xfa/fwl/theme/cfwl_scrollbartp.cpp
@@ -25,10 +25,6 @@
 
 CFWL_ScrollBarTP::~CFWL_ScrollBarTP() {}
 
-bool CFWL_ScrollBarTP::IsValidWidget(CFWL_Widget* pWidget) {
-  return pWidget && pWidget->GetClassID() == FWL_Type::ScrollBar;
-}
-
 void CFWL_ScrollBarTP::DrawBackground(CFWL_ThemeBackground* pParams) {
   if (!pParams)
     return;
diff --git a/xfa/fwl/theme/cfwl_scrollbartp.h b/xfa/fwl/theme/cfwl_scrollbartp.h
index fe625fb..2389eff 100644
--- a/xfa/fwl/theme/cfwl_scrollbartp.h
+++ b/xfa/fwl/theme/cfwl_scrollbartp.h
@@ -17,7 +17,6 @@
   ~CFWL_ScrollBarTP() override;
 
   // CFWL_WidgetTP
-  bool IsValidWidget(CFWL_Widget* pWidget) override;
   void DrawBackground(CFWL_ThemeBackground* pParams) override;
 
  protected:
diff --git a/xfa/fwl/theme/cfwl_widgettp.cpp b/xfa/fwl/theme/cfwl_widgettp.cpp
index 2d61a41..395571c 100644
--- a/xfa/fwl/theme/cfwl_widgettp.cpp
+++ b/xfa/fwl/theme/cfwl_widgettp.cpp
@@ -19,13 +19,20 @@
 #include "xfa/fwl/cfwl_widget.h"
 #include "xfa/fwl/cfwl_widgetmgr.h"
 #include "xfa/fwl/ifwl_themeprovider.h"
-#include "xfa/fwl/theme/cfwl_arrowdata.h"
 #include "xfa/fxgraphics/cfx_color.h"
 #include "xfa/fxgraphics/cfx_path.h"
 #include "xfa/fxgraphics/cfx_shading.h"
 
-bool CFWL_WidgetTP::IsValidWidget(CFWL_Widget* pWidget) {
-  return false;
+CFWL_WidgetTP::CFWL_WidgetTP()
+    : m_dwRefCount(1), m_pFDEFont(nullptr), m_pColorData(nullptr) {}
+
+CFWL_WidgetTP::~CFWL_WidgetTP() {}
+
+void CFWL_WidgetTP::Initialize() {}
+
+void CFWL_WidgetTP::Finalize() {
+  if (m_pTextOut)
+    FinalizeTTO();
 }
 
 void CFWL_WidgetTP::DrawBackground(CFWL_ThemeBackground* pParams) {}
@@ -42,61 +49,36 @@
   m_pTextOut->SetRenderDevice(pGraphics->GetRenderDevice());
   m_pTextOut->SetStyles(pParams->m_dwTTOStyles);
   m_pTextOut->SetAlignment(pParams->m_iTTOAlign);
+
   CFX_Matrix* pMatrix = &pParams->m_matrix;
   pMatrix->Concat(*pGraphics->GetMatrix());
   m_pTextOut->SetMatrix(*pMatrix);
   m_pTextOut->DrawLogicText(pParams->m_wsText.c_str(), iLen, pParams->m_rtPart);
 }
 
-void CFWL_WidgetTP::CalcTextRect(CFWL_ThemeText* pParams, CFX_RectF& rect) {
-  if (!pParams || !m_pTextOut)
+void CFWL_WidgetTP::InitializeArrowColorData() {
+  if (m_pColorData)
     return;
 
-  m_pTextOut->SetAlignment(pParams->m_iTTOAlign);
-  m_pTextOut->SetStyles(pParams->m_dwTTOStyles | FDE_TTOSTYLE_ArabicContext);
-  m_pTextOut->CalcLogicSize(pParams->m_wsText.c_str(),
-                            pParams->m_wsText.GetLength(), rect);
+  m_pColorData = pdfium::MakeUnique<CColorData>();
+  m_pColorData->clrBorder[0] = ArgbEncode(255, 202, 216, 249);
+  m_pColorData->clrBorder[1] = ArgbEncode(255, 171, 190, 233);
+  m_pColorData->clrBorder[2] = ArgbEncode(255, 135, 147, 219);
+  m_pColorData->clrBorder[3] = ArgbEncode(255, 172, 168, 153);
+  m_pColorData->clrStart[0] = ArgbEncode(255, 225, 234, 254);
+  m_pColorData->clrStart[1] = ArgbEncode(255, 253, 255, 255);
+  m_pColorData->clrStart[2] = ArgbEncode(255, 110, 142, 241);
+  m_pColorData->clrStart[3] = ArgbEncode(255, 254, 254, 251);
+  m_pColorData->clrEnd[0] = ArgbEncode(255, 175, 204, 251);
+  m_pColorData->clrEnd[1] = ArgbEncode(255, 185, 218, 251);
+  m_pColorData->clrEnd[2] = ArgbEncode(255, 210, 222, 235);
+  m_pColorData->clrEnd[3] = ArgbEncode(255, 243, 241, 236);
+  m_pColorData->clrSign[0] = ArgbEncode(255, 77, 97, 133);
+  m_pColorData->clrSign[1] = ArgbEncode(255, 77, 97, 133);
+  m_pColorData->clrSign[2] = ArgbEncode(255, 77, 97, 133);
+  m_pColorData->clrSign[3] = ArgbEncode(255, 128, 128, 128);
 }
 
-void CFWL_WidgetTP::Initialize() {}
-
-void CFWL_WidgetTP::Finalize() {
-  if (!m_pTextOut)
-    FinalizeTTO();
-}
-
-CFWL_WidgetTP::~CFWL_WidgetTP() {}
-
-void CFWL_WidgetTP::SetFont(CFWL_Widget* pWidget,
-                            const FX_WCHAR* strFont,
-                            FX_FLOAT fFontSize,
-                            FX_ARGB rgbFont) {
-  if (!m_pTextOut)
-    return;
-
-  m_pFDEFont = CFWL_FontManager::GetInstance()->FindFont(strFont, 0, 0);
-  m_pTextOut->SetFont(m_pFDEFont);
-  m_pTextOut->SetFontSize(fFontSize);
-  m_pTextOut->SetTextColor(rgbFont);
-}
-
-void CFWL_WidgetTP::SetFont(CFWL_Widget* pWidget,
-                            CFGAS_GEFont* pFont,
-                            FX_FLOAT fFontSize,
-                            FX_ARGB rgbFont) {
-  if (!m_pTextOut)
-    return;
-
-  m_pTextOut->SetFont(pFont);
-  m_pTextOut->SetFontSize(fFontSize);
-  m_pTextOut->SetTextColor(rgbFont);
-}
-
-CFGAS_GEFont* CFWL_WidgetTP::GetFont(CFWL_Widget* pWidget) {
-  return m_pFDEFont;
-}
-
-CFWL_WidgetTP::CFWL_WidgetTP() : m_dwRefCount(1), m_pFDEFont(nullptr) {}
 
 void CFWL_WidgetTP::InitTTO() {
   if (m_pTextOut)
@@ -115,136 +97,6 @@
   m_pTextOut.reset();
 }
 
-void CFWL_WidgetTP::Draw3DRect(CFX_Graphics* pGraphics,
-                               FWLTHEME_EDGE eType,
-                               FX_FLOAT fWidth,
-                               const CFX_RectF* pRect,
-                               FX_ARGB cr1,
-                               FX_ARGB cr2,
-                               FX_ARGB cr3,
-                               FX_ARGB cr4,
-                               CFX_Matrix* pMatrix) {
-  if (!pGraphics)
-    return;
-  if (!pRect)
-    return;
-  pGraphics->SaveGraphState();
-  if (eType == FWLTHEME_EDGE_Flat) {
-    CFX_Path path;
-    path.Create();
-    path.AddRectangle(pRect->left, pRect->top, pRect->width, pRect->height);
-    path.AddRectangle(pRect->left + 1, pRect->top + 1, pRect->width - 2,
-                      pRect->height - 2);
-    CFX_Color cr(ArgbEncode(255, 100, 100, 100));
-    pGraphics->SetFillColor(&cr);
-    pGraphics->FillPath(&path, FXFILL_WINDING, pMatrix);
-    path.Clear();
-    path.AddRectangle(pRect->left + 1, pRect->top + 1, pRect->width - 2,
-                      pRect->height - 2);
-    path.AddRectangle(pRect->left + 2, pRect->top + 2, pRect->width - 4,
-                      pRect->height - 4);
-    cr.Set(0xFFFFFFFF);
-    pGraphics->SetFillColor(&cr);
-    pGraphics->FillPath(&path, FXFILL_WINDING, pMatrix);
-  } else {
-    FX_FLOAT fLeft = pRect->left;
-    FX_FLOAT fRight = pRect->right();
-    FX_FLOAT fTop = pRect->top;
-    FX_FLOAT fBottom = pRect->bottom();
-    FX_FLOAT fHalfWidth = fWidth / 2.0f;
-    CFX_Color crLT(eType == FWLTHEME_EDGE_Raised ? cr4 : cr1);
-    pGraphics->SetFillColor(&crLT);
-    CFX_Path pathLT;
-    pathLT.Create();
-    pathLT.MoveTo(fLeft, fBottom - fHalfWidth);
-    pathLT.LineTo(fLeft, fTop);
-    pathLT.LineTo(fRight - fHalfWidth, fTop);
-    pathLT.LineTo(fRight - fHalfWidth, fTop + fHalfWidth);
-    pathLT.LineTo(fLeft + fHalfWidth, fTop + fHalfWidth);
-    pathLT.LineTo(fLeft + fHalfWidth, fBottom - fHalfWidth);
-    pathLT.LineTo(fLeft, fBottom - fHalfWidth);
-    pGraphics->FillPath(&pathLT, FXFILL_WINDING, pMatrix);
-    crLT = CFX_Color(eType == FWLTHEME_EDGE_Raised ? cr3 : cr2);
-    pGraphics->SetFillColor(&crLT);
-    pathLT.Clear();
-    pathLT.MoveTo(fLeft + fHalfWidth, fBottom - fWidth);
-    pathLT.LineTo(fLeft + fHalfWidth, fTop + fHalfWidth);
-    pathLT.LineTo(fRight - fWidth, fTop + fHalfWidth);
-    pathLT.LineTo(fRight - fWidth, fTop + fWidth);
-    pathLT.LineTo(fLeft + fWidth, fTop + fWidth);
-    pathLT.LineTo(fLeft + fWidth, fBottom - fWidth);
-    pathLT.LineTo(fLeft + fHalfWidth, fBottom - fWidth);
-    pGraphics->FillPath(&pathLT, FXFILL_WINDING, pMatrix);
-    CFX_Color crRB(eType == FWLTHEME_EDGE_Raised ? cr1 : cr3);
-    pGraphics->SetFillColor(&crRB);
-    CFX_Path pathRB;
-    pathRB.Create();
-    pathRB.MoveTo(fRight - fHalfWidth, fTop + fHalfWidth);
-    pathRB.LineTo(fRight - fHalfWidth, fBottom - fHalfWidth);
-    pathRB.LineTo(fLeft + fHalfWidth, fBottom - fHalfWidth);
-    pathRB.LineTo(fLeft + fHalfWidth, fBottom - fWidth);
-    pathRB.LineTo(fRight - fWidth, fBottom - fWidth);
-    pathRB.LineTo(fRight - fWidth, fTop + fHalfWidth);
-    pathRB.LineTo(fRight - fHalfWidth, fTop + fHalfWidth);
-    pGraphics->FillPath(&pathRB, FXFILL_WINDING, pMatrix);
-    crRB = CFX_Color(eType == FWLTHEME_EDGE_Raised ? cr2 : cr4);
-    pGraphics->SetFillColor(&crRB);
-    pathRB.Clear();
-    pathRB.MoveTo(fRight, fTop);
-    pathRB.LineTo(fRight, fBottom);
-    pathRB.LineTo(fLeft, fBottom);
-    pathRB.LineTo(fLeft, fBottom - fHalfWidth);
-    pathRB.LineTo(fRight - fHalfWidth, fBottom - fHalfWidth);
-    pathRB.LineTo(fRight - fHalfWidth, fTop);
-    pathRB.LineTo(fRight, fTop);
-    pGraphics->FillPath(&pathRB, FXFILL_WINDING, pMatrix);
-  }
-  pGraphics->RestoreGraphState();
-}
-
-void CFWL_WidgetTP::Draw3DCircle(CFX_Graphics* pGraphics,
-                                 FWLTHEME_EDGE eType,
-                                 FX_FLOAT fWidth,
-                                 const CFX_RectF* pRect,
-                                 FX_ARGB cr1,
-                                 FX_ARGB cr2,
-                                 FX_ARGB cr3,
-                                 FX_ARGB cr4,
-                                 CFX_Matrix* pMatrix) {
-  if (!pGraphics)
-    return;
-  if (!pRect)
-    return;
-  pGraphics->SaveGraphState();
-  CFX_Path path;
-  path.Create();
-  path.AddArc(pRect->left, pRect->top, pRect->width, pRect->height,
-              FX_PI * 3 / 4, FX_PI);
-  CFX_Color crFill1(eType == FWLTHEME_EDGE_Raised ? cr4 : cr1);
-  pGraphics->SetStrokeColor(&crFill1);
-  pGraphics->StrokePath(&path, pMatrix);
-  CFX_RectF rtInner(*pRect);
-  rtInner.Deflate(pRect->width / 4, pRect->height / 4);
-  path.Clear();
-  path.AddArc(rtInner.left, rtInner.top, rtInner.width, rtInner.height,
-              FX_PI * 3 / 4, FX_PI);
-  CFX_Color crFill2(eType == FWLTHEME_EDGE_Raised ? cr3 : cr2);
-  pGraphics->SetStrokeColor(&crFill2);
-  pGraphics->StrokePath(&path, pMatrix);
-  path.Clear();
-  path.AddArc(pRect->left, pRect->top, pRect->width, pRect->height,
-              FX_PI * 7 / 4, FX_PI);
-  CFX_Color crFill3(eType == FWLTHEME_EDGE_Raised ? cr1 : cr3);
-  pGraphics->SetStrokeColor(&crFill3);
-  pGraphics->StrokePath(&path, pMatrix);
-  path.AddArc(rtInner.left, rtInner.top, rtInner.width, rtInner.height,
-              FX_PI * 7 / 4, FX_PI);
-  CFX_Color crFill4(eType == FWLTHEME_EDGE_Raised ? cr2 : cr4);
-  pGraphics->SetStrokeColor(&crFill4);
-  pGraphics->StrokePath(&path, pMatrix);
-  pGraphics->RestoreGraphState();
-}
-
 void CFWL_WidgetTP::DrawBorder(CFX_Graphics* pGraphics,
                                const CFX_RectF* pRect,
                                CFX_Matrix* pMatrix) {
@@ -311,53 +163,6 @@
   pGraphics->RestoreGraphState();
 }
 
-void CFWL_WidgetTP::DrawAnnulusRect(CFX_Graphics* pGraphics,
-                                    FX_ARGB fillColor,
-                                    const CFX_RectF* pRect,
-                                    FX_FLOAT fRingWidth,
-                                    CFX_Matrix* pMatrix) {
-  if (!pGraphics)
-    return;
-  if (!pRect)
-    return;
-  pGraphics->SaveGraphState();
-  CFX_Color cr(fillColor);
-  pGraphics->SetFillColor(&cr);
-  CFX_Path path;
-  path.Create();
-  CFX_RectF rtInner(*pRect);
-  rtInner.Deflate(fRingWidth, fRingWidth);
-  path.AddRectangle(rtInner.left, rtInner.top, rtInner.width, rtInner.height);
-  path.AddRectangle(pRect->left, pRect->top, pRect->width, pRect->height);
-  pGraphics->FillPath(&path, FXFILL_ALTERNATE, pMatrix);
-  pGraphics->RestoreGraphState();
-}
-
-void CFWL_WidgetTP::DrawAnnulusCircle(CFX_Graphics* pGraphics,
-                                      FX_ARGB fillColor,
-                                      const CFX_RectF* pRect,
-                                      FX_FLOAT fWidth,
-                                      CFX_Matrix* pMatrix) {
-  if (!pGraphics)
-    return;
-  if (!pRect)
-    return;
-  if (fWidth > pRect->width / 2) {
-    return;
-  }
-  pGraphics->SaveGraphState();
-  CFX_Color cr(fillColor);
-  pGraphics->SetFillColor(&cr);
-  CFX_Path path;
-  path.Create();
-  path.AddEllipse(*pRect);
-  CFX_RectF rtIn(*pRect);
-  rtIn.Inflate(-fWidth, -fWidth);
-  path.AddEllipse(rtIn);
-  pGraphics->FillPath(&path, FXFILL_ALTERNATE, pMatrix);
-  pGraphics->RestoreGraphState();
-}
-
 void CFWL_WidgetTP::DrawFocus(CFX_Graphics* pGraphics,
                               const CFX_RectF* pRect,
                               CFX_Matrix* pMatrix) {
@@ -376,61 +181,6 @@
   pGraphics->StrokePath(&path, pMatrix);
   pGraphics->RestoreGraphState();
 }
-#define FWLTHEME_ARROW_Denominator 3
-void CFWL_WidgetTP::DrawArrow(CFX_Graphics* pGraphics,
-                              const CFX_RectF* pRect,
-                              FWLTHEME_DIRECTION eDict,
-                              FX_ARGB argbFill,
-                              bool bPressed,
-                              CFX_Matrix* pMatrix) {
-  CFX_RectF rtArrow(*pRect);
-  CFX_Path path;
-  path.Create();
-  FX_FLOAT fBtn =
-      std::min(pRect->width, pRect->height) / FWLTHEME_ARROW_Denominator;
-  rtArrow.left = pRect->left + (pRect->width - fBtn) / 2;
-  rtArrow.top = pRect->top + (pRect->height - fBtn) / 2;
-  rtArrow.width = fBtn;
-  rtArrow.height = fBtn;
-  if (bPressed) {
-    rtArrow.Offset(1, 1);
-  }
-  switch (eDict) {
-    case FWLTHEME_DIRECTION_Up: {
-      path.MoveTo(rtArrow.left, rtArrow.bottom());
-      path.LineTo(rtArrow.right(), rtArrow.bottom());
-      path.LineTo(rtArrow.left + fBtn / 2, rtArrow.top);
-      path.LineTo(rtArrow.left, rtArrow.bottom());
-      break;
-    }
-    case FWLTHEME_DIRECTION_Left: {
-      path.MoveTo(rtArrow.right(), rtArrow.top);
-      path.LineTo(rtArrow.right(), rtArrow.bottom());
-      path.LineTo(rtArrow.left, rtArrow.top + fBtn / 2);
-      path.LineTo(rtArrow.right(), rtArrow.top);
-      break;
-    }
-    case FWLTHEME_DIRECTION_Right: {
-      path.MoveTo(rtArrow.left, rtArrow.top);
-      path.LineTo(rtArrow.left, rtArrow.bottom());
-      path.LineTo(rtArrow.right(), rtArrow.top + fBtn / 2);
-      path.LineTo(rtArrow.left, rtArrow.top);
-      break;
-    }
-    case FWLTHEME_DIRECTION_Down:
-    default: {
-      path.MoveTo(rtArrow.left, rtArrow.top);
-      path.LineTo(rtArrow.right(), rtArrow.top);
-      path.LineTo(rtArrow.left + fBtn / 2, rtArrow.bottom());
-      path.LineTo(rtArrow.left, rtArrow.top);
-    }
-  }
-  pGraphics->SaveGraphState();
-  CFX_Color cr(argbFill);
-  pGraphics->SetFillColor(&cr);
-  pGraphics->FillPath(&path, FXFILL_WINDING, pMatrix);
-  pGraphics->RestoreGraphState();
-}
 
 void CFWL_WidgetTP::DrawArrow(CFX_Graphics* pGraphics,
                               const CFX_RectF* pRect,
@@ -494,20 +244,19 @@
                             CFX_Matrix* pMatrix) {
   CFX_Path path;
   path.Create();
-  if (!CFWL_ArrowData::HasInstance())
-    CFWL_ArrowData::GetInstance();
 
-  CFWL_ArrowData::CColorData* pColorData =
-      CFWL_ArrowData::GetInstance()->m_pColorData.get();
+  InitializeArrowColorData();
+
   FX_FLOAT fRight = pRect->right();
   FX_FLOAT fBottom = pRect->bottom();
   path.AddRectangle(pRect->left, pRect->top, pRect->width, pRect->height);
   DrawAxialShading(pGraphics, pRect->left, pRect->top, fRight, fBottom,
-                   pColorData->clrStart[eState - 1],
-                   pColorData->clrEnd[eState - 1], &path, FXFILL_WINDING,
+                   m_pColorData->clrStart[eState - 1],
+                   m_pColorData->clrEnd[eState - 1], &path, FXFILL_WINDING,
                    pMatrix);
+
   CFX_Color rcStroke;
-  rcStroke.Set(pColorData->clrBorder[eState - 1]);
+  rcStroke.Set(m_pColorData->clrBorder[eState - 1]);
   pGraphics->SetStrokeColor(&rcStroke);
   pGraphics->StrokePath(&path, pMatrix);
 }
@@ -518,12 +267,10 @@
                                  FWLTHEME_STATE eState,
                                  CFX_Matrix* pMatrix) {
   DrawBtn(pGraphics, pRect, eState, pMatrix);
-  if (!CFWL_ArrowData::HasInstance())
-    CFWL_ArrowData::GetInstance();
 
-  CFWL_ArrowData::CColorData* pColorData =
-      CFWL_ArrowData::GetInstance()->m_pColorData.get();
-  DrawArrow(pGraphics, pRect, eDict, pColorData->clrSign[eState - 1], pMatrix);
+  InitializeArrowColorData();
+  DrawArrow(pGraphics, pRect, eDict, m_pColorData->clrSign[eState - 1],
+            pMatrix);
 }
 
 CFWL_FontData::CFWL_FontData() : m_dwStyles(0), m_dwCodePage(0) {}
@@ -587,6 +334,5 @@
 }
 
 void FWLTHEME_Release() {
-  CFWL_ArrowData::DestroyInstance();
   CFWL_FontManager::DestroyInstance();
 }
diff --git a/xfa/fwl/theme/cfwl_widgettp.h b/xfa/fwl/theme/cfwl_widgettp.h
index 50dd478..33a5feb 100644
--- a/xfa/fwl/theme/cfwl_widgettp.h
+++ b/xfa/fwl/theme/cfwl_widgettp.h
@@ -35,48 +35,25 @@
   virtual void Initialize();
   virtual void Finalize();
 
-  virtual bool IsValidWidget(CFWL_Widget* pWidget);
-
   virtual void DrawBackground(CFWL_ThemeBackground* pParams);
   virtual void DrawText(CFWL_ThemeText* pParams);
-  virtual void CalcTextRect(CFWL_ThemeText* pParams, CFX_RectF& rect);
 
   CFGAS_GEFont* GetFont() const { return m_pFDEFont; }
 
-  void SetFont(CFWL_Widget* pWidget,
-               const FX_WCHAR* strFont,
-               FX_FLOAT fFontSize,
-               FX_ARGB rgbFont);
-  void SetFont(CFWL_Widget* pWidget,
-               CFGAS_GEFont* pFont,
-               FX_FLOAT fFontSize,
-               FX_ARGB rgbFont);
-  CFGAS_GEFont* GetFont(CFWL_Widget* pWidget);
-
  protected:
+  struct CColorData {
+    FX_ARGB clrBorder[4];
+    FX_ARGB clrStart[4];
+    FX_ARGB clrEnd[4];
+    FX_ARGB clrSign[4];
+  };
+
   CFWL_WidgetTP();
 
+  void InitializeArrowColorData();
   void InitTTO();
   void FinalizeTTO();
 
-  void Draw3DRect(CFX_Graphics* pGraphics,
-                  FWLTHEME_EDGE eType,
-                  FX_FLOAT fWidth,
-                  const CFX_RectF* pRect,
-                  FX_ARGB cr1,
-                  FX_ARGB cr2,
-                  FX_ARGB cr3,
-                  FX_ARGB cr4,
-                  CFX_Matrix* pMatrix = nullptr);
-  void Draw3DCircle(CFX_Graphics* pGraphics,
-                    FWLTHEME_EDGE eType,
-                    FX_FLOAT fWidth,
-                    const CFX_RectF* pRect,
-                    FX_ARGB cr1,
-                    FX_ARGB cr2,
-                    FX_ARGB cr3,
-                    FX_ARGB cr4,
-                    CFX_Matrix* pMatrix = nullptr);
   void DrawBorder(CFX_Graphics* pGraphics,
                   const CFX_RectF* pRect,
                   CFX_Matrix* pMatrix = nullptr);
@@ -97,28 +74,12 @@
                         CFX_Path* path,
                         int32_t fillMode = FXFILL_WINDING,
                         CFX_Matrix* pMatrix = nullptr);
-  void DrawAnnulusRect(CFX_Graphics* pGraphics,
-                       FX_ARGB fillColor,
-                       const CFX_RectF* pRect,
-                       FX_FLOAT fRingWidth = 1,
-                       CFX_Matrix* pMatrix = nullptr);
-  void DrawAnnulusCircle(CFX_Graphics* pGraphics,
-                         FX_ARGB fillColor,
-                         const CFX_RectF* pRect,
-                         FX_FLOAT fWidth = 1,
-                         CFX_Matrix* pMatrix = nullptr);
   void DrawFocus(CFX_Graphics* pGraphics,
                  const CFX_RectF* pRect,
                  CFX_Matrix* pMatrix = nullptr);
   void DrawArrow(CFX_Graphics* pGraphics,
                  const CFX_RectF* pRect,
                  FWLTHEME_DIRECTION eDict,
-                 FX_ARGB argbFill,
-                 bool bPressed,
-                 CFX_Matrix* pMatrix = nullptr);
-  void DrawArrow(CFX_Graphics* pGraphics,
-                 const CFX_RectF* pRect,
-                 FWLTHEME_DIRECTION eDict,
                  FX_ARGB argSign,
                  CFX_Matrix* pMatrix = nullptr);
   void DrawBtn(CFX_Graphics* pGraphics,
@@ -130,9 +91,11 @@
                     FWLTHEME_DIRECTION eDict,
                     FWLTHEME_STATE eState,
                     CFX_Matrix* pMatrix = nullptr);
+
   uint32_t m_dwRefCount;
   std::unique_ptr<CFDE_TextOut> m_pTextOut;
   CFGAS_GEFont* m_pFDEFont;
+  std::unique_ptr<CColorData> m_pColorData;
 };
 
 void FWLTHEME_Release();