From d2bf06228d7572545717cd36ea0dabc67e9b6d84 Mon Sep 17 00:00:00 2001 From: dsinclair Date: Thu, 10 Nov 2016 12:46:33 -0800 Subject: Continue IFWL cleanup Cleaning up more IFWL classes. Review-Url: https://codereview.chromium.org/2492563002 --- xfa/fwl/core/ifwl_combolist.cpp | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'xfa/fwl/core/ifwl_combolist.cpp') diff --git a/xfa/fwl/core/ifwl_combolist.cpp b/xfa/fwl/core/ifwl_combolist.cpp index 535ed68d62..d021088ebb 100644 --- a/xfa/fwl/core/ifwl_combolist.cpp +++ b/xfa/fwl/core/ifwl_combolist.cpp @@ -103,13 +103,14 @@ void IFWL_ComboList::OnProcessMessage(CFWL_Message* pMessage) { OnDropListFocusChanged(pMessage, dwHashCode == CFWL_MessageType::SetFocus); } else if (dwHashCode == CFWL_MessageType::Mouse) { CFWL_MsgMouse* pMsg = static_cast(pMessage); - if (IsShowScrollBar(true) && m_pVertScrollBar) { + IFWL_ScrollBar* vertSB = GetVertScrollBar(); + if (IsShowScrollBar(true) && vertSB) { CFX_RectF rect; - m_pVertScrollBar->GetWidgetRect(rect); + vertSB->GetWidgetRect(rect); if (rect.Contains(pMsg->m_fx, pMsg->m_fy)) { pMsg->m_fx -= rect.left; pMsg->m_fy -= rect.top; - m_pVertScrollBar->GetDelegate()->OnProcessMessage(pMsg); + vertSB->GetDelegate()->OnProcessMessage(pMsg); return; } } @@ -152,13 +153,14 @@ void IFWL_ComboList::OnDropListFocusChanged(CFWL_Message* pMsg, bool bSet) { } int32_t IFWL_ComboList::OnDropListMouseMove(CFWL_MsgMouse* pMsg) { - if (m_rtClient.Contains(pMsg->m_fx, pMsg->m_fy)) { + if (GetRTClient().Contains(pMsg->m_fx, pMsg->m_fy)) { if (m_bNotifyOwner) { m_bNotifyOwner = false; } - if (IsShowScrollBar(true) && m_pVertScrollBar) { + IFWL_ScrollBar* vertSB = GetVertScrollBar(); + if (IsShowScrollBar(true) && vertSB) { CFX_RectF rect; - m_pVertScrollBar->GetWidgetRect(rect); + vertSB->GetWidgetRect(rect); if (rect.Contains(pMsg->m_fx, pMsg->m_fy)) { return 1; } @@ -185,7 +187,7 @@ int32_t IFWL_ComboList::OnDropListMouseMove(CFWL_MsgMouse* pMsg) { } int32_t IFWL_ComboList::OnDropListLButtonDown(CFWL_MsgMouse* pMsg) { - if (m_rtClient.Contains(pMsg->m_fx, pMsg->m_fy)) + if (GetRTClient().Contains(pMsg->m_fx, pMsg->m_fy)) return 0; IFWL_ComboBox* pOuter = static_cast(m_pOuter); @@ -199,9 +201,10 @@ int32_t IFWL_ComboList::OnDropListLButtonUp(CFWL_MsgMouse* pMsg) { ClientToOuter(pMsg->m_fx, pMsg->m_fy); pOuter->GetDelegate()->OnProcessMessage(pMsg); } else { - if (IsShowScrollBar(true) && m_pVertScrollBar) { + IFWL_ScrollBar* vertSB = GetVertScrollBar(); + if (IsShowScrollBar(true) && vertSB) { CFX_RectF rect; - m_pVertScrollBar->GetWidgetRect(rect); + vertSB->GetWidgetRect(rect); if (rect.Contains(pMsg->m_fx, pMsg->m_fy)) { return 1; } -- cgit v1.2.3