summaryrefslogtreecommitdiff
path: root/xfa/fwl
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-04-22 08:16:40 -0700
committerCommit bot <commit-bot@chromium.org>2016-04-22 08:16:40 -0700
commit6d8555d72d31f73c2b32849b602d1ba57b09c469 (patch)
tree42445f4a21bab6203ff7e59c8d8d24f14bf23cf6 /xfa/fwl
parent2178e48e9dc62143f0442c520807606a3ac5f042 (diff)
downloadpdfium-6d8555d72d31f73c2b32849b602d1ba57b09c469.tar.xz
Fix standalone mac build
Missing default statement in the switch. Duplicated the method signature on both sides of the #ifdef to make it clearer what was going on. Review URL: https://codereview.chromium.org/1905303003
Diffstat (limited to 'xfa/fwl')
-rw-r--r--xfa/fwl/core/fwl_formimp.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/xfa/fwl/core/fwl_formimp.cpp b/xfa/fwl/core/fwl_formimp.cpp
index ad3c173590..e31f7e8202 100644
--- a/xfa/fwl/core/fwl_formimp.cpp
+++ b/xfa/fwl/core/fwl_formimp.cpp
@@ -860,15 +860,11 @@ void CFWL_FormImp::DoHeightLimit(FX_FLOAT& fTop,
CFWL_FormImpDelegate::CFWL_FormImpDelegate(CFWL_FormImp* pOwner)
: m_pOwner(pOwner) {}
+#ifdef FWL_UseMacSystemBorder
int32_t CFWL_FormImpDelegate::OnProcessMessage(CFWL_Message* pMessage) {
if (!pMessage)
return 0;
-
- CFWL_MessageType dwMsgCode = pMessage->GetClassID();
-
-#ifdef FWL_UseMacSystemBorder
-
- switch (dwMsgCode) {
+ switch (pMessage->GetClassID()) {
case CFWL_MessageType::Activate: {
m_pOwner->m_pProperties->m_dwStates &= ~FWL_WGTSTATE_Deactivated;
m_pOwner->Repaint(&m_pOwner->m_rtRelative);
@@ -879,11 +875,17 @@ int32_t CFWL_FormImpDelegate::OnProcessMessage(CFWL_Message* pMessage) {
m_pOwner->Repaint(&m_pOwner->m_rtRelative);
break;
}
+ default:
+ break;
}
return FWL_ERR_Succeeded;
+}
#else
+int32_t CFWL_FormImpDelegate::OnProcessMessage(CFWL_Message* pMessage) {
+ if (!pMessage)
+ return 0;
int32_t iRet = 1;
- switch (dwMsgCode) {
+ switch (pMessage->GetClassID()) {
case CFWL_MessageType::Activate: {
m_pOwner->m_pProperties->m_dwStates &= ~FWL_WGTSTATE_Deactivated;
IFWL_Thread* pThread = m_pOwner->GetOwnerThread();
@@ -984,8 +986,8 @@ int32_t CFWL_FormImpDelegate::OnProcessMessage(CFWL_Message* pMessage) {
}
}
return iRet;
-#endif // FWL_UseMacSystemBorder
}
+#endif // FWL_UseMacSystemBorder
FWL_ERR CFWL_FormImpDelegate::OnProcessEvent(CFWL_Event* pEvent) {
if (!pEvent)