diff options
author | Tom Sepez <tsepez@chromium.org> | 2018-10-29 17:29:06 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-10-29 17:29:06 +0000 |
commit | ea08d171755bd4088d01261c55d1bfe0ff0f9f39 (patch) | |
tree | edd21e3bbde0b1bd13b067ce7682111f32f0d8e4 /fpdfsdk/pwl/cpwl_scroll_bar.cpp | |
parent | b7c4a0243e82f6c4ff91cd90b5bae336100c3c70 (diff) | |
download | pdfium-ea08d171755bd4088d01261c55d1bfe0ff0f9f39.tar.xz |
Fold virtual CPWL_Wnd::OnCreate into subclass constructors.
All they do is twiddle their own CreateParameters. Since we
now have the create paramters earlier, we need not have a
special method for this.
Change-Id: I5b94c578275c71516afb87bd085f5fb58b3962e2
Reviewed-on: https://pdfium-review.googlesource.com/c/44730
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'fpdfsdk/pwl/cpwl_scroll_bar.cpp')
-rw-r--r-- | fpdfsdk/pwl/cpwl_scroll_bar.cpp | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/fpdfsdk/pwl/cpwl_scroll_bar.cpp b/fpdfsdk/pwl/cpwl_scroll_bar.cpp index 0209ba09c2..d3c8e847ed 100644 --- a/fpdfsdk/pwl/cpwl_scroll_bar.cpp +++ b/fpdfsdk/pwl/cpwl_scroll_bar.cpp @@ -111,14 +111,12 @@ CPWL_SBButton::CPWL_SBButton(const CreateParams& cp, PWL_SBBUTTON_TYPE eButtonType) : CPWL_Wnd(cp, std::move(pAttachedData)), m_eScrollBarType(eScrollBarType), - m_eSBButtonType(eButtonType) {} + m_eSBButtonType(eButtonType) { + GetCreationParams()->eCursorType = FXCT_ARROW; +} CPWL_SBButton::~CPWL_SBButton() = default; -void CPWL_SBButton::OnCreate(CreateParams* pParamsToAdjust) { - pParamsToAdjust->eCursorType = FXCT_ARROW; -} - void CPWL_SBButton::DrawThisAppearance(CFX_RenderDevice* pDevice, const CFX_Matrix& mtUser2Device) { if (!IsVisible()) @@ -302,14 +300,12 @@ bool CPWL_SBButton::OnMouseMove(const CFX_PointF& point, uint32_t nFlag) { CPWL_ScrollBar::CPWL_ScrollBar(const CreateParams& cp, std::unique_ptr<PrivateData> pAttachedData, PWL_SCROLLBAR_TYPE sbType) - : CPWL_Wnd(cp, std::move(pAttachedData)), m_sbType(sbType) {} + : CPWL_Wnd(cp, std::move(pAttachedData)), m_sbType(sbType) { + GetCreationParams()->eCursorType = FXCT_ARROW; +} CPWL_ScrollBar::~CPWL_ScrollBar() = default; -void CPWL_ScrollBar::OnCreate(CreateParams* pParamsToAdjust) { - pParamsToAdjust->eCursorType = FXCT_ARROW; -} - void CPWL_ScrollBar::OnDestroy() { // Until cleanup takes place in the virtual destructor for CPWL_Wnd // subclasses, implement the virtual OnDestroy method that does the |