diff options
author | dsinclair <dsinclair@chromium.org> | 2016-11-16 12:15:27 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-11-16 12:15:27 -0800 |
commit | 14a60c50b10de1d9e4edd3629ea210a816940a75 (patch) | |
tree | 7cf8c062b28245a9f01a3ed7aace12726ddbba85 /xfa/fwl/core/ifwl_datetimeedit.cpp | |
parent | af177fe1c062d20b663a4a1c14924be85d0e631e (diff) | |
download | pdfium-14a60c50b10de1d9e4edd3629ea210a816940a75.tar.xz |
Continue formatting fwl/core
Review-Url: https://codereview.chromium.org/2506083002
Diffstat (limited to 'xfa/fwl/core/ifwl_datetimeedit.cpp')
-rw-r--r-- | xfa/fwl/core/ifwl_datetimeedit.cpp | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/xfa/fwl/core/ifwl_datetimeedit.cpp b/xfa/fwl/core/ifwl_datetimeedit.cpp index c2aa6e371f..f612f504cd 100644 --- a/xfa/fwl/core/ifwl_datetimeedit.cpp +++ b/xfa/fwl/core/ifwl_datetimeedit.cpp @@ -32,24 +32,26 @@ void IFWL_DateTimeEdit::OnProcessMessage(CFWL_Message* pMessage) { void IFWL_DateTimeEdit::DisForm_OnProcessMessage(CFWL_Message* pMessage) { CFWL_MessageType dwHashCode = pMessage->GetClassID(); - if (m_pWidgetMgr->IsFormDisabled()) { - if (dwHashCode == CFWL_MessageType::Mouse) { - CFWL_MsgMouse* pMouse = static_cast<CFWL_MsgMouse*>(pMessage); - if (pMouse->m_dwCmd == FWL_MouseCommand::LeftButtonDown || - pMouse->m_dwCmd == FWL_MouseCommand::RightButtonDown) { - if ((m_pProperties->m_dwStates & FWL_WGTSTATE_Focused) == 0) - m_pProperties->m_dwStates |= FWL_WGTSTATE_Focused; - - IFWL_DateTimePicker* pDateTime = - static_cast<IFWL_DateTimePicker*>(m_pOuter); - if (pDateTime->IsMonthCalendarVisible()) { - CFX_RectF rtInvalidate; - pDateTime->GetWidgetRect(rtInvalidate); - pDateTime->ShowMonthCalendar(false); - rtInvalidate.Offset(-rtInvalidate.left, -rtInvalidate.top); - pDateTime->Repaint(&rtInvalidate); - } - } + if (!m_pWidgetMgr->IsFormDisabled() || + dwHashCode != CFWL_MessageType::Mouse) { + IFWL_Edit::OnProcessMessage(pMessage); + return; + } + + CFWL_MsgMouse* pMouse = static_cast<CFWL_MsgMouse*>(pMessage); + if (pMouse->m_dwCmd == FWL_MouseCommand::LeftButtonDown || + pMouse->m_dwCmd == FWL_MouseCommand::RightButtonDown) { + if ((m_pProperties->m_dwStates & FWL_WGTSTATE_Focused) == 0) + m_pProperties->m_dwStates |= FWL_WGTSTATE_Focused; + + IFWL_DateTimePicker* pDateTime = + static_cast<IFWL_DateTimePicker*>(m_pOuter); + if (pDateTime->IsMonthCalendarVisible()) { + CFX_RectF rtInvalidate; + pDateTime->GetWidgetRect(rtInvalidate); + pDateTime->ShowMonthCalendar(false); + rtInvalidate.Offset(-rtInvalidate.left, -rtInvalidate.top); + pDateTime->Repaint(&rtInvalidate); } } IFWL_Edit::OnProcessMessage(pMessage); |