From d1de2f3227e2f67c873c1e94c88f4d467ff0050e Mon Sep 17 00:00:00 2001 From: Henrique Nakashima Date: Fri, 11 May 2018 20:51:46 +0000 Subject: Remove CFWL_ComboBoxProxy. It is never instantiated. Change-Id: I6b97abbe4bd7013e8a540e788da6cea7d0ba978b Reviewed-on: https://pdfium-review.googlesource.com/32410 Commit-Queue: Henrique Nakashima Reviewed-by: Ryan Harrison Reviewed-by: Tom Sepez --- xfa/fwl/cfwl_combobox.cpp | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) (limited to 'xfa/fwl/cfwl_combobox.cpp') diff --git a/xfa/fwl/cfwl_combobox.cpp b/xfa/fwl/cfwl_combobox.cpp index d53a9e4aea..e4dde352d4 100644 --- a/xfa/fwl/cfwl_combobox.cpp +++ b/xfa/fwl/cfwl_combobox.cpp @@ -32,7 +32,6 @@ CFWL_ComboBox::CFWL_ComboBox(const CFWL_App* app) : CFWL_Widget(app, pdfium::MakeUnique(), nullptr), - m_pComboBoxProxy(nullptr), m_bLButtonDown(false), m_iCurSel(-1), m_iBtnState(CFWL_PartState_Normal) { @@ -399,24 +398,6 @@ void CFWL_ComboBox::ProcessSelChanged(bool bLButtonUp) { DispatchEvent(&ev); } -void CFWL_ComboBox::InitProxyForm() { - if (m_pComboBoxProxy) - return; - if (!m_pListBox) - return; - - auto prop = pdfium::MakeUnique(); - prop->m_pOwner = this; - prop->m_dwStyles = FWL_WGTSTYLE_Popup; - prop->m_dwStates = FWL_WGTSTATE_Invisible; - - // TODO(dsinclair): Does this leak? I don't see a delete, but I'm not sure - // if the SetParent call is going to transfer ownership. - m_pComboBoxProxy = new CFWL_ComboBoxProxy(this, m_pOwnerApp.Get(), - std::move(prop), m_pListBox.get()); - m_pListBox->SetParent(m_pComboBoxProxy); -} - void CFWL_ComboBox::InitComboList() { if (m_pListBox) return; @@ -572,8 +553,7 @@ void CFWL_ComboBox::OnMouseMove(CFWL_MessageMouse* pMsg) { } void CFWL_ComboBox::OnMouseLeave(CFWL_MessageMouse* pMsg) { - if (!IsDropListVisible() && - !((m_pProperties->m_dwStates & FWL_WGTSTATE_Disabled) == + if (!((m_pProperties->m_dwStates & FWL_WGTSTATE_Disabled) == FWL_WGTSTATE_Disabled)) { m_iBtnState = CFWL_PartState_Normal; RepaintRect(m_rtBtn); -- cgit v1.2.3