diff options
author | dsinclair <dsinclair@chromium.org> | 2016-12-07 17:58:41 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-12-07 17:58:41 -0800 |
commit | 442997cbb3a9e970946dd294acd1498e9fa9bfc7 (patch) | |
tree | 99041d1d439501ee4616efa87ee2ab76b3d2fca0 /xfa/fwl/core/cfwl_notedriver.cpp | |
parent | 31559c91c4983b42361415d30b0b2a518c7ef383 (diff) | |
download | pdfium-442997cbb3a9e970946dd294acd1498e9fa9bfc7.tar.xz |
Cleanup FWL default values part II.
This CL cleans up the remaining default values in the fwl/core directory. Some
methods are renamed to better represent what they do.
Review-Url: https://codereview.chromium.org/2557103002
Diffstat (limited to 'xfa/fwl/core/cfwl_notedriver.cpp')
-rw-r--r-- | xfa/fwl/core/cfwl_notedriver.cpp | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/xfa/fwl/core/cfwl_notedriver.cpp b/xfa/fwl/core/cfwl_notedriver.cpp index 00a0b3e4b7..8402b2b90c 100644 --- a/xfa/fwl/core/cfwl_notedriver.cpp +++ b/xfa/fwl/core/cfwl_notedriver.cpp @@ -84,19 +84,17 @@ CFWL_NoteLoop* CFWL_NoteDriver::PopNoteLoop() { return p; } -bool CFWL_NoteDriver::SetFocus(CFWL_Widget* pFocus, bool bNotify) { +bool CFWL_NoteDriver::SetFocus(CFWL_Widget* pFocus) { if (m_pFocus == pFocus) return true; CFWL_Widget* pPrev = m_pFocus; m_pFocus = pFocus; if (pPrev) { - CFWL_MsgKillFocus ms(pPrev, pPrev); - if (bNotify) - ms.m_dwExtend = 1; - - if (IFWL_WidgetDelegate* pDelegate = pPrev->GetDelegate()) + if (IFWL_WidgetDelegate* pDelegate = pPrev->GetDelegate()) { + CFWL_MsgKillFocus ms(pPrev, pPrev); pDelegate->OnProcessMessage(&ms); + } } if (pFocus) { CFWL_Widget* pWidget = @@ -105,11 +103,10 @@ bool CFWL_NoteDriver::SetFocus(CFWL_Widget* pFocus, bool bNotify) { if (pForm) pForm->SetSubFocus(pFocus); - CFWL_MsgSetFocus ms(nullptr, pFocus); - if (bNotify) - ms.m_dwExtend = 1; - if (IFWL_WidgetDelegate* pDelegate = pFocus->GetDelegate()) + if (IFWL_WidgetDelegate* pDelegate = pFocus->GetDelegate()) { + CFWL_MsgSetFocus ms(nullptr, pFocus); pDelegate->OnProcessMessage(&ms); + } } return true; } |