Remove CPWL_Icon entirely

It does nothing beyond its CPWL_Wnd superclass.

Change-Id: I6c0f72adbfa95060043e848b2f2e149603cd793a
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/79671
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
diff --git a/fpdfsdk/cpdfsdk_appstream.cpp b/fpdfsdk/cpdfsdk_appstream.cpp
index 13d49e8..d5b4026 100644
--- a/fpdfsdk/cpdfsdk_appstream.cpp
+++ b/fpdfsdk/cpdfsdk_appstream.cpp
@@ -29,7 +29,6 @@
 #include "fpdfsdk/cpdfsdk_widget.h"
 #include "fpdfsdk/pwl/cpwl_edit.h"
 #include "fpdfsdk/pwl/cpwl_edit_impl.h"
-#include "fpdfsdk/pwl/cpwl_icon.h"
 #include "fpdfsdk/pwl/cpwl_wnd.h"
 #include "third_party/base/stl_util.h"
 
@@ -686,20 +685,20 @@
   if (rcIcon.IsEmpty() || !pIconStream)
     return ByteString();
 
+  auto pPDFIcon = std::make_unique<CPDF_Icon>(pIconStream);
+
   CPWL_Wnd::CreateParams cp;
   cp.dwFlags = PWS_VISIBLE;
-
-  auto pPDFIcon = std::make_unique<CPDF_Icon>(pIconStream);
-  auto pIcon = std::make_unique<CPWL_Icon>(cp);
-  pIcon->Realize();
-  if (!pIcon->Move(rcIcon, false, false))
+  auto pWnd = std::make_unique<CPWL_Wnd>(cp, nullptr);
+  pWnd->Realize();
+  if (!pWnd->Move(rcIcon, false, false))
     return ByteString();
 
   ByteString sAlias = pPDFIcon->GetImageAlias();
   if (sAlias.GetLength() <= 0)
     return ByteString();
 
-  CFX_FloatRect rcPlate = pIcon->GetClientRect();
+  CFX_FloatRect rcPlate = pWnd->GetClientRect();
   CFX_SizeF image_size = pPDFIcon->GetImageSize();
   CFX_Matrix mt = pPDFIcon->GetImageMatrix().GetInverse();
 
@@ -728,8 +727,7 @@
         << kSetLineWidthOperator << " /" << sAlias << " "
         << kInvokeNamedXObjectOperator << "\n";
   }
-  pIcon->Destroy();
-
+  pWnd->Destroy();
   return ByteString(str);
 }
 
diff --git a/fpdfsdk/pwl/BUILD.gn b/fpdfsdk/pwl/BUILD.gn
index a1b5ac0..112aef9 100644
--- a/fpdfsdk/pwl/BUILD.gn
+++ b/fpdfsdk/pwl/BUILD.gn
@@ -21,8 +21,6 @@
     "cpwl_edit.h",
     "cpwl_edit_impl.cpp",
     "cpwl_edit_impl.h",
-    "cpwl_icon.cpp",
-    "cpwl_icon.h",
     "cpwl_list_box.cpp",
     "cpwl_list_box.h",
     "cpwl_list_ctrl.cpp",
diff --git a/fpdfsdk/pwl/README.md b/fpdfsdk/pwl/README.md
index d9be3b1..9381b5f 100644
--- a/fpdfsdk/pwl/README.md
+++ b/fpdfsdk/pwl/README.md
@@ -11,7 +11,6 @@
     * CPWL_Caret
     * CPWL_EditCtrl
         * CPWL_Edit
-    * CPWL_Icon
     * CPWL_ListBox
         * CPWL_CBListBox (combo box)
     * CPWL_ScrollBar
diff --git a/fpdfsdk/pwl/cpwl_icon.cpp b/fpdfsdk/pwl/cpwl_icon.cpp
deleted file mode 100644
index be9be00..0000000
--- a/fpdfsdk/pwl/cpwl_icon.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2014 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 "fpdfsdk/pwl/cpwl_icon.h"
-
-#include <algorithm>
-#include <sstream>
-#include <utility>
-
-#include "core/fpdfdoc/cpdf_icon.h"
-#include "core/fpdfdoc/cpdf_iconfit.h"
-#include "fpdfsdk/pwl/cpwl_wnd.h"
-#include "third_party/base/check.h"
-
-CPWL_Icon::CPWL_Icon(const CreateParams& cp) : CPWL_Wnd(cp, nullptr) {}
-
-CPWL_Icon::~CPWL_Icon() = default;
diff --git a/fpdfsdk/pwl/cpwl_icon.h b/fpdfsdk/pwl/cpwl_icon.h
deleted file mode 100644
index cb66c50..0000000
--- a/fpdfsdk/pwl/cpwl_icon.h
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2014 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_CPWL_ICON_H_
-#define FPDFSDK_PWL_CPWL_ICON_H_
-
-#include "fpdfsdk/pwl/cpwl_wnd.h"
-
-class CPWL_Icon final : public CPWL_Wnd {
- public:
-  CPWL_Icon(const CreateParams& cp);
-  ~CPWL_Icon() override;
-};
-
-#endif  // FPDFSDK_PWL_CPWL_ICON_H_