Remove IFWL_CombobBox::DataProvider

The height value returned is always 0. This CL removes the plumbing and uses
the 0 value directly.

R=npm@chromium.org, tsepez@chromium.org

Review URL: https://codereview.chromium.org/2525003002 .
diff --git a/xfa/fwl/core/cfwl_combobox.cpp b/xfa/fwl/core/cfwl_combobox.cpp
index 9af4b8d..7eb04b5 100644
--- a/xfa/fwl/core/cfwl_combobox.cpp
+++ b/xfa/fwl/core/cfwl_combobox.cpp
@@ -21,8 +21,7 @@
 
 }  // namespace
 
-CFWL_ComboBox::CFWL_ComboBox(const CFWL_App* app)
-    : CFWL_Widget(app), m_fMaxListHeight(0) {}
+CFWL_ComboBox::CFWL_ComboBox(const CFWL_App* app) : CFWL_Widget(app) {}
 
 CFWL_ComboBox::~CFWL_ComboBox() {}
 
@@ -49,10 +48,6 @@
     ToComboBox(GetWidget())->RemoveAll();
 }
 
-FX_FLOAT CFWL_ComboBox::GetListHeight(IFWL_Widget* pWidget) {
-  return m_fMaxListHeight;
-}
-
 void CFWL_ComboBox::GetTextByIndex(int32_t iIndex,
                                    CFX_WideString& wsText) const {
   if (!GetWidget())
diff --git a/xfa/fwl/core/cfwl_combobox.h b/xfa/fwl/core/cfwl_combobox.h
index 2b63c50..a670ef2 100644
--- a/xfa/fwl/core/cfwl_combobox.h
+++ b/xfa/fwl/core/cfwl_combobox.h
@@ -13,16 +13,13 @@
 #include "xfa/fwl/core/cfwl_widget.h"
 #include "xfa/fwl/core/ifwl_combobox.h"
 
-class CFWL_ComboBox : public CFWL_Widget, public IFWL_ComboBox::DataProvider {
+class CFWL_ComboBox : public CFWL_Widget, public IFWL_Widget::DataProvider {
  public:
   explicit CFWL_ComboBox(const CFWL_App* pApp);
   ~CFWL_ComboBox() override;
 
   void Initialize();
 
-  // IFWL_ComboBox::DataProvider
-  FX_FLOAT GetListHeight(IFWL_Widget* pWidget) override;
-
   void AddString(const CFX_WideStringC& wsText);
   bool RemoveAt(int32_t iIndex);  // Returns false iff |iIndex| out of range.
   void RemoveAll();
@@ -54,9 +51,6 @@
 
   void GetBBox(CFX_RectF& rect);
   void EditModifyStylesEx(uint32_t dwStylesExAdded, uint32_t dwStylesExRemoved);
-
- private:
-  FX_FLOAT m_fMaxListHeight;
 };
 
 #endif  // XFA_FWL_CORE_CFWL_COMBOBOX_H_
diff --git a/xfa/fwl/core/ifwl_combobox.cpp b/xfa/fwl/core/ifwl_combobox.cpp
index 906fe1d..19d1c3f 100644
--- a/xfa/fwl/core/ifwl_combobox.cpp
+++ b/xfa/fwl/core/ifwl_combobox.cpp
@@ -337,12 +337,6 @@
     m_pEdit->ModifyStylesEx(dwStylesExAdded, dwStylesExRemoved);
 }
 
-FX_FLOAT IFWL_ComboBox::GetDataProviderListHeight() {
-  return static_cast<IFWL_ComboBox::DataProvider*>(
-             m_pProperties->m_pDataProvider)
-      ->GetListHeight(this);
-}
-
 void IFWL_ComboBox::DrawStretchHandler(CFX_Graphics* pGraphics,
                                        const CFX_Matrix* pMatrix) {
   CFWL_ThemeBackground param;
@@ -381,11 +375,6 @@
                         (FWL_STYLEEXT_CMB_Sort | FWL_STYLEEXT_CMB_OwnerDraw);
   m_pListBox->ModifyStylesEx(dwStyleAdd, 0);
   m_pListBox->GetWidgetRect(m_rtList, true);
-  FX_FLOAT fHeight = GetDataProviderListHeight();
-  if (fHeight > 0 && m_rtList.height > fHeight) {
-    m_rtList.height = fHeight;
-    m_pListBox->ModifyStyles(FWL_WGTSTYLE_VScroll, 0);
-  }
 
   CFX_RectF rtAnchor;
   rtAnchor.Set(0, 0, m_pProperties->m_rtWidget.width,
@@ -396,8 +385,7 @@
   if (m_pProperties->m_dwStyleExes & FWL_STYLEEXT_CMB_ListDrag)
     m_rtProxy.height += m_fComboFormHandler;
 
-  FX_FLOAT fMinHeight = 0;
-  GetPopupPos(fMinHeight, m_rtProxy.height, rtAnchor, m_rtProxy);
+  GetPopupPos(0, m_rtProxy.height, rtAnchor, m_rtProxy);
   if (m_pProperties->m_dwStyleExes & FWL_STYLEEXT_CMB_ListDrag) {
     FX_FLOAT fx = 0;
     FX_FLOAT fy = m_rtClient.top + m_rtClient.height / 2;
diff --git a/xfa/fwl/core/ifwl_combobox.h b/xfa/fwl/core/ifwl_combobox.h
index 7ad7420..dfe9d64 100644
--- a/xfa/fwl/core/ifwl_combobox.h
+++ b/xfa/fwl/core/ifwl_combobox.h
@@ -49,11 +49,6 @@
 
 class IFWL_ComboBox : public IFWL_Widget {
  public:
-  class DataProvider : public IFWL_Widget::DataProvider {
-   public:
-    virtual FX_FLOAT GetListHeight(IFWL_Widget* pWidget) = 0;
-  };
-
   explicit IFWL_ComboBox(const CFWL_App* app,
                          std::unique_ptr<CFWL_WidgetProperties> properties);
   ~IFWL_ComboBox() override;
@@ -125,7 +120,6 @@
   int32_t GetCurrentSelection() const { return m_iCurSel; }
 
  private:
-  FX_FLOAT GetDataProviderListHeight();
   bool IsDropDownStyle() const {
     return !!(m_pProperties->m_dwStyleExes & FWL_STYLEEXT_CMB_DropDown);
   }