diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-07-05 14:10:36 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-07-05 18:22:59 +0000 |
commit | 63fbd8d8ece5f49f7f9b8cac29b9aba73d5d7d23 (patch) | |
tree | 6d07eca9ea6be919963e5411f8dad89c60913354 /fpdfsdk/pdfwindow/cpwl_list_box.cpp | |
parent | 7e0336e278d69f1d66967db7375c75322da55d69 (diff) | |
download | pdfium-63fbd8d8ece5f49f7f9b8cac29b9aba73d5d7d23.tar.xz |
Remove PNM_SCROLLWINDOW and replace with direct method
This CL removes PNM_SCROLLWINDOW from OnNotify and replaces it with a call to
ScrollWindowVerticallyTo.
Change-Id: I62f6da60cdcd4926b0c74b980b3855a28a834411
Reviewed-on: https://pdfium-review.googlesource.com/7253
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
Diffstat (limited to 'fpdfsdk/pdfwindow/cpwl_list_box.cpp')
-rw-r--r-- | fpdfsdk/pdfwindow/cpwl_list_box.cpp | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/fpdfsdk/pdfwindow/cpwl_list_box.cpp b/fpdfsdk/pdfwindow/cpwl_list_box.cpp index be6d00f62b..b6ea701c26 100644 --- a/fpdfsdk/pdfwindow/cpwl_list_box.cpp +++ b/fpdfsdk/pdfwindow/cpwl_list_box.cpp @@ -294,24 +294,8 @@ void CPWL_ListBox::SetScrollPosition(float pos) { pChild->SetScrollPosition(pos); } -void CPWL_ListBox::OnNotify(CPWL_Wnd* pWnd, - uint32_t msg, - intptr_t wParam, - intptr_t lParam) { - CPWL_Wnd::OnNotify(pWnd, msg, wParam, lParam); - - float fPos; - - switch (msg) { - case PNM_SCROLLWINDOW: - fPos = *(float*)lParam; - switch (wParam) { - case SBT_VSCROLL: - m_pList->SetScrollPos(CFX_PointF(0, fPos)); - break; - } - break; - } +void CPWL_ListBox::ScrollWindowVertically(float pos) { + m_pList->SetScrollPos(CFX_PointF(0, pos)); } void CPWL_ListBox::KillFocus() { |