Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(208)

Unified Diff: xfa/fwl/core/ifwl_datetimeedit.cpp

Issue 2506083002: Continue formatting fwl/core (Closed)
Patch Set: format Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fwl/core/ifwl_combolist.cpp ('k') | xfa/fwl/core/ifwl_datetimepicker.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fwl/core/ifwl_datetimeedit.cpp
diff --git a/xfa/fwl/core/ifwl_datetimeedit.cpp b/xfa/fwl/core/ifwl_datetimeedit.cpp
index c2aa6e371f527bd70e6442bd74ec164897bbbb9d..f612f504cdc424a2c542b8ed8778f8926b1d7b96 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);
« no previous file with comments | « xfa/fwl/core/ifwl_combolist.cpp ('k') | xfa/fwl/core/ifwl_datetimepicker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698