From e5e889eec8b362f5c65fc142660ad745a0d5cf21 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Wed, 5 Jul 2017 08:45:40 -0400 Subject: Remove PNM_{ADD|REMOVE}Child MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This OnNotify message is only handled in CPWL_Wnd and it is only emited in CPWL_Wnd. This CL inlines the resulting calls into the original OnNotify callsites and removes the messages. Change-Id: If419f0f51db00dbecc960d80bb10b17ad8bec7e1 Reviewed-on: https://pdfium-review.googlesource.com/7232 Reviewed-by: Nicolás Peña Commit-Queue: dsinclair --- fpdfsdk/pdfwindow/cpwl_wnd.cpp | 17 +++-------------- fpdfsdk/pdfwindow/cpwl_wnd.h | 2 -- 2 files changed, 3 insertions(+), 16 deletions(-) (limited to 'fpdfsdk/pdfwindow') diff --git a/fpdfsdk/pdfwindow/cpwl_wnd.cpp b/fpdfsdk/pdfwindow/cpwl_wnd.cpp index 85a610eea5..e99d71b1de 100644 --- a/fpdfsdk/pdfwindow/cpwl_wnd.cpp +++ b/fpdfsdk/pdfwindow/cpwl_wnd.cpp @@ -152,7 +152,7 @@ void CPWL_Wnd::Create(const PWL_CREATEPARAM& cp) { CreateMsgControl(); if (m_sPrivateParam.pParentWnd) - m_sPrivateParam.pParentWnd->OnNotify(this, PNM_ADDCHILD); + m_sPrivateParam.pParentWnd->AddChild(this); PWL_CREATEPARAM ccp = m_sPrivateParam; @@ -196,7 +196,7 @@ void CPWL_Wnd::Destroy() { } } if (m_sPrivateParam.pParentWnd) - m_sPrivateParam.pParentWnd->OnNotify(this, PNM_REMOVECHILD); + m_sPrivateParam.pParentWnd->RemoveChild(this); m_bCreated = false; } @@ -425,18 +425,7 @@ void CPWL_Wnd::RemoveChild(CPWL_Wnd* pWnd) { void CPWL_Wnd::OnNotify(CPWL_Wnd* pWnd, uint32_t msg, intptr_t wParam, - intptr_t lParam) { - switch (msg) { - case PNM_ADDCHILD: - AddChild(pWnd); - break; - case PNM_REMOVECHILD: - RemoveChild(pWnd); - break; - default: - break; - } -} + intptr_t lParam) {} bool CPWL_Wnd::IsValid() const { return m_bCreated; diff --git a/fpdfsdk/pdfwindow/cpwl_wnd.h b/fpdfsdk/pdfwindow/cpwl_wnd.h index 8d7cc32ec8..39ed4028a9 100644 --- a/fpdfsdk/pdfwindow/cpwl_wnd.h +++ b/fpdfsdk/pdfwindow/cpwl_wnd.h @@ -73,8 +73,6 @@ class IPWL_Provider; #define PRES_TEXTOVERFLOW 0x0400L // notification messages -#define PNM_ADDCHILD 0 -#define PNM_REMOVECHILD 1 #define PNM_SETSCROLLINFO 2 #define PNM_SETSCROLLPOS 3 #define PNM_SCROLLWINDOW 4 -- cgit v1.2.3