diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-07-05 09:28:15 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-07-05 15:31:45 +0000 |
commit | fb00ec2af390ccfe8f5e81f49b9113e044f5e5ad (patch) | |
tree | 9f1c89f504db465251d46d5de4cd9042e2d5c663 /fpdfsdk/pdfwindow/cpwl_edit_ctrl.cpp | |
parent | e5e889eec8b362f5c65fc142660ad745a0d5cf21 (diff) | |
download | pdfium-fb00ec2af390ccfe8f5e81f49b9113e044f5e5ad.tar.xz |
Move PNM_SETSCROLLINFO out of OnNotify
This CL moves the SETSCROLLINFO from a OnNotify message to a method
which is called directly.
Change-Id: I5d793c1c7a54c0fa3bdadffac72aae934cb9da57
Reviewed-on: https://pdfium-review.googlesource.com/7251
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fpdfsdk/pdfwindow/cpwl_edit_ctrl.cpp')
-rw-r--r-- | fpdfsdk/pdfwindow/cpwl_edit_ctrl.cpp | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/fpdfsdk/pdfwindow/cpwl_edit_ctrl.cpp b/fpdfsdk/pdfwindow/cpwl_edit_ctrl.cpp index d8a157a189..e6076e15ae 100644 --- a/fpdfsdk/pdfwindow/cpwl_edit_ctrl.cpp +++ b/fpdfsdk/pdfwindow/cpwl_edit_ctrl.cpp @@ -64,6 +64,11 @@ void CPWL_EditCtrl::RePosChildWnd() { m_pEdit->SetPlateRect(GetClientRect()); } +void CPWL_EditCtrl::SetScrollInfo(const PWL_SCROLL_INFO& info) { + if (CPWL_Wnd* pChild = GetVScrollBar()) + pChild->SetScrollInfo(info); +} + void CPWL_EditCtrl::OnNotify(CPWL_Wnd* pWnd, uint32_t msg, intptr_t wParam, @@ -71,15 +76,6 @@ void CPWL_EditCtrl::OnNotify(CPWL_Wnd* pWnd, CPWL_Wnd::OnNotify(pWnd, msg, wParam, lParam); switch (msg) { - case PNM_SETSCROLLINFO: - switch (wParam) { - case SBT_VSCROLL: - if (CPWL_Wnd* pChild = GetVScrollBar()) { - pChild->OnNotify(pWnd, PNM_SETSCROLLINFO, wParam, lParam); - } - break; - } - break; case PNM_SETSCROLLPOS: switch (wParam) { case SBT_VSCROLL: @@ -441,14 +437,12 @@ void CPWL_EditCtrl::IOnSetScrollInfoY(float fPlateMin, float fSmallStep, float fBigStep) { PWL_SCROLL_INFO Info; - Info.fPlateWidth = fPlateMax - fPlateMin; Info.fContentMin = fContentMin; Info.fContentMax = fContentMax; Info.fSmallStep = fSmallStep; Info.fBigStep = fBigStep; - - OnNotify(this, PNM_SETSCROLLINFO, SBT_VSCROLL, (intptr_t)&Info); + SetScrollInfo(Info); if (IsFloatBigger(Info.fPlateWidth, Info.fContentMax - Info.fContentMin) || IsFloatEqual(Info.fPlateWidth, Info.fContentMax - Info.fContentMin)) { |