diff options
author | Tom Sepez <tsepez@chromium.org> | 2018-10-26 23:56:27 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-10-26 23:56:27 +0000 |
commit | b7c4a0243e82f6c4ff91cd90b5bae336100c3c70 (patch) | |
tree | 782b8b225dbc01d78c0dff7b126f90f606d13fb1 /fpdfsdk/pwl/cpwl_wnd.cpp | |
parent | 314380e271d0a1e3117c67cb5a417cbc5b5b81b3 (diff) | |
download | pdfium-chromium/3594.tar.xz |
Pass CreateParams to CPWL_Wnd constructor.chromium/3595chromium/3594
The previous reshuffling means we always have the create params
earlier, so pass them in at create time.
Clean up two forward declarations that were not needed as
noticed in the process.
Change-Id: I5d3861f3c1e3508e0d25950e919859244fac5f8b
Reviewed-on: https://pdfium-review.googlesource.com/c/44710
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fpdfsdk/pwl/cpwl_wnd.cpp')
-rw-r--r-- | fpdfsdk/pwl/cpwl_wnd.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/fpdfsdk/pwl/cpwl_wnd.cpp b/fpdfsdk/pwl/cpwl_wnd.cpp index 8ed57de646..90aa15cfee 100644 --- a/fpdfsdk/pwl/cpwl_wnd.cpp +++ b/fpdfsdk/pwl/cpwl_wnd.cpp @@ -111,17 +111,17 @@ class CPWL_MsgControl final : public Observable<CPWL_MsgControl> { UnownedPtr<CPWL_Wnd> m_pMainKeyboardWnd; }; -CPWL_Wnd::CPWL_Wnd(std::unique_ptr<PrivateData> pAttachedData) - : m_pAttachedData(std::move(pAttachedData)) {} +CPWL_Wnd::CPWL_Wnd(const CreateParams& cp, + std::unique_ptr<PrivateData> pAttachedData) + : m_CreationParams(cp), m_pAttachedData(std::move(pAttachedData)) {} CPWL_Wnd::~CPWL_Wnd() { ASSERT(!m_bCreated); } -void CPWL_Wnd::Realize(const CreateParams& cp) { +void CPWL_Wnd::Realize() { ASSERT(!m_bCreated); - m_CreationParams = cp; OnCreate(&m_CreationParams); m_CreationParams.rcRectWnd.Normalize(); m_rcWindow = m_CreationParams.rcRectWnd; @@ -484,20 +484,17 @@ void CPWL_Wnd::CreateVScrollBar(const CreateParams& cp) { return; CreateParams scp = cp; - - // flags scp.dwFlags = PWS_CHILD | PWS_BACKGROUND | PWS_AUTOTRANSPARENT | PWS_NOREFRESHCLIP; - scp.sBackgroundColor = PWL_DEFAULT_WHITECOLOR; scp.eCursorType = FXCT_ARROW; scp.nTransparency = PWL_SCROLLBAR_TRANSPARENCY; auto pBar = - pdfium::MakeUnique<CPWL_ScrollBar>(CloneAttachedData(), SBT_VSCROLL); + pdfium::MakeUnique<CPWL_ScrollBar>(scp, CloneAttachedData(), SBT_VSCROLL); m_pVScrollBar = pBar.get(); AddChild(std::move(pBar)); - m_pVScrollBar->Realize(scp); + m_pVScrollBar->Realize(); } void CPWL_Wnd::SetCapture() { |