| OLD | NEW | 
|---|
| 1 // Copyright 2016 PDFium Authors. All rights reserved. | 1 // Copyright 2016 PDFium Authors. All rights reserved. | 
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be | 
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. | 
| 4 | 4 | 
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 
| 6 | 6 | 
| 7 #include "xfa/fwl/core/ifwl_comboboxproxy.h" | 7 #include "xfa/fwl/core/ifwl_comboboxproxy.h" | 
| 8 | 8 | 
| 9 #include "xfa/fwl/core/fwl_noteimp.h" | 9 #include "xfa/fwl/core/fwl_noteimp.h" | 
| 10 #include "xfa/fwl/core/ifwl_app.h" | 10 #include "xfa/fwl/core/ifwl_app.h" | 
| (...skipping 23 matching lines...) Expand all  Loading... | 
| 34           OnLButtonDown(pMsg); | 34           OnLButtonDown(pMsg); | 
| 35           break; | 35           break; | 
| 36         case FWL_MouseCommand::LeftButtonUp: | 36         case FWL_MouseCommand::LeftButtonUp: | 
| 37           OnLButtonUp(pMsg); | 37           OnLButtonUp(pMsg); | 
| 38           break; | 38           break; | 
| 39         default: | 39         default: | 
| 40           break; | 40           break; | 
| 41       } | 41       } | 
| 42       break; | 42       break; | 
| 43     } | 43     } | 
| 44     case CFWL_MessageType::Deactivate: |  | 
| 45       OnDeactive(static_cast<CFWL_MsgDeactivate*>(pMessage)); |  | 
| 46       break; |  | 
| 47     case CFWL_MessageType::KillFocus: | 44     case CFWL_MessageType::KillFocus: | 
| 48       OnFocusChanged(static_cast<CFWL_MsgKillFocus*>(pMessage), false); | 45       OnFocusChanged(static_cast<CFWL_MsgKillFocus*>(pMessage), false); | 
| 49       break; | 46       break; | 
| 50     case CFWL_MessageType::SetFocus: | 47     case CFWL_MessageType::SetFocus: | 
| 51       OnFocusChanged(static_cast<CFWL_MsgKillFocus*>(pMessage), true); | 48       OnFocusChanged(static_cast<CFWL_MsgKillFocus*>(pMessage), true); | 
| 52       break; | 49       break; | 
| 53     default: | 50     default: | 
| 54       break; | 51       break; | 
| 55   } | 52   } | 
| 56   IFWL_Widget::OnProcessMessage(pMessage); | 53   IFWL_Widget::OnProcessMessage(pMessage); | 
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 96     rect.left = rect.top = 0; | 93     rect.left = rect.top = 0; | 
| 97     if (!rect.Contains(pMsg->m_fx, pMsg->m_fy) && | 94     if (!rect.Contains(pMsg->m_fx, pMsg->m_fy) && | 
| 98         m_pComboBox->IsDropListVisible()) { | 95         m_pComboBox->IsDropListVisible()) { | 
| 99       m_pComboBox->ShowDropList(false); | 96       m_pComboBox->ShowDropList(false); | 
| 100     } | 97     } | 
| 101   } else { | 98   } else { | 
| 102     m_bLButtonUpSelf = true; | 99     m_bLButtonUpSelf = true; | 
| 103   } | 100   } | 
| 104 } | 101 } | 
| 105 | 102 | 
| 106 void IFWL_ComboBoxProxy::OnDeactive(CFWL_MsgDeactivate* pMsg) { |  | 
| 107   m_pComboBox->ShowDropList(false); |  | 
| 108 } |  | 
| 109 |  | 
| 110 void IFWL_ComboBoxProxy::OnFocusChanged(CFWL_MsgKillFocus* pMsg, bool bSet) { | 103 void IFWL_ComboBoxProxy::OnFocusChanged(CFWL_MsgKillFocus* pMsg, bool bSet) { | 
| 111   if (bSet) | 104   if (bSet) | 
| 112     return; | 105     return; | 
| 113 | 106 | 
| 114   if (!pMsg->m_pSetFocus) | 107   if (!pMsg->m_pSetFocus) | 
| 115     m_pComboBox->ShowDropList(false); | 108     m_pComboBox->ShowDropList(false); | 
| 116 } | 109 } | 
| OLD | NEW | 
|---|