summaryrefslogtreecommitdiff
path: root/fpdfsdk/pdfwindow/cpwl_edit_ctrl.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-07-05 14:11:23 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-07-05 18:53:00 +0000
commit1b4670cab5be6a5938621a25f050da7351c507b2 (patch)
tree8f7d2160982c9cd8660dfbf233f28624997e1edd /fpdfsdk/pdfwindow/cpwl_edit_ctrl.cpp
parent63fbd8d8ece5f49f7f9b8cac29b9aba73d5d7d23 (diff)
downloadpdfium-1b4670cab5be6a5938621a25f050da7351c507b2.tar.xz
Remove PNM_SETCARETINFO and call SetCaret directly
The PNM_SETCARETINFO message is only sent inside CPWL_EditCtrl and is only handled in that class. This CL removes the message from OnNotify and calls SetCaret directly. Change-Id: I7d48f4b9fcd9fe8e828163c957e7d46f369edb06 Reviewed-on: https://pdfium-review.googlesource.com/7254 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.cpp22
1 files changed, 1 insertions, 21 deletions
diff --git a/fpdfsdk/pdfwindow/cpwl_edit_ctrl.cpp b/fpdfsdk/pdfwindow/cpwl_edit_ctrl.cpp
index 2c005a4335..59879bb274 100644
--- a/fpdfsdk/pdfwindow/cpwl_edit_ctrl.cpp
+++ b/fpdfsdk/pdfwindow/cpwl_edit_ctrl.cpp
@@ -78,21 +78,6 @@ void CPWL_EditCtrl::ScrollWindowVertically(float pos) {
m_pEdit->SetScrollPos(CFX_PointF(m_pEdit->GetScrollPos().x, pos));
}
-void CPWL_EditCtrl::OnNotify(CPWL_Wnd* pWnd,
- uint32_t msg,
- intptr_t wParam,
- intptr_t lParam) {
- CPWL_Wnd::OnNotify(pWnd, msg, wParam, lParam);
-
- switch (msg) {
- case PNM_SETCARETINFO: {
- if (PWL_CARET_INFO* pCaretInfo = (PWL_CARET_INFO*)wParam) {
- SetCaret(pCaretInfo->bVisible, pCaretInfo->ptHead, pCaretInfo->ptFoot);
- }
- } break;
- }
-}
-
void CPWL_EditCtrl::CreateChildWnd(const PWL_CREATEPARAM& cp) {
if (!IsReadOnly())
CreateEditCaret(cp);
@@ -452,12 +437,7 @@ void CPWL_EditCtrl::IOnSetCaret(bool bVisible,
const CFX_PointF& ptHead,
const CFX_PointF& ptFoot,
const CPVT_WordPlace& place) {
- PWL_CARET_INFO cInfo;
- cInfo.bVisible = bVisible;
- cInfo.ptHead = ptHead;
- cInfo.ptFoot = ptFoot;
-
- OnNotify(this, PNM_SETCARETINFO, (intptr_t)&cInfo, (intptr_t) nullptr);
+ SetCaret(bVisible, ptHead, ptFoot);
}
void CPWL_EditCtrl::IOnInvalidateRect(CFX_FloatRect* pRect) {