summaryrefslogtreecommitdiff
path: root/fpdfsdk/pwl/cpwl_wnd.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-08-20 20:27:01 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-08-20 20:27:01 +0000
commit5b63fd95b651ebf1c8082547824c3d688af85a2a (patch)
tree68efedd0611a6dcbe16d9e6081204ac6b9142b26 /fpdfsdk/pwl/cpwl_wnd.cpp
parent4be873b32a85f475fa2b377371f859857e8f2b0e (diff)
downloadpdfium-5b63fd95b651ebf1c8082547824c3d688af85a2a.tar.xz
Use more UnownedPtr<> in CPWL_Wnd::CreateParams.
Move some initialization/accessors to header while at it. Remove unused GetRootWnd(). Change-Id: Icd4c77ebad0c1edf8a8443f86581e7724aa1b93b Reviewed-on: https://pdfium-review.googlesource.com/40670 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.cpp34
1 files changed, 1 insertions, 33 deletions
diff --git a/fpdfsdk/pwl/cpwl_wnd.cpp b/fpdfsdk/pwl/cpwl_wnd.cpp
index a561b2de60..6b840f2bb2 100644
--- a/fpdfsdk/pwl/cpwl_wnd.cpp
+++ b/fpdfsdk/pwl/cpwl_wnd.cpp
@@ -23,13 +23,8 @@ constexpr float kDefaultFontSize = 9.0f;
CPWL_Wnd::CreateParams::CreateParams()
: rcRectWnd(0, 0, 0, 0),
- pSystemHandler(nullptr),
- pFontMap(nullptr),
- pProvider(nullptr),
- pFocusHandler(nullptr),
dwFlags(0),
sBackgroundColor(),
- pAttachedWidget(nullptr),
nBorderStyle(BorderStyle::SOLID),
dwBorderWidth(1),
sBorderColor(),
@@ -37,8 +32,6 @@ CPWL_Wnd::CreateParams::CreateParams()
nTransparency(255),
fFontSize(kDefaultFontSize),
sDash(3, 0, 0),
- pAttachedData(nullptr),
- pParentWnd(nullptr),
pMsgControl(nullptr),
eCursorType(FXCT_ARROW) {}
@@ -422,10 +415,6 @@ void CPWL_Wnd::NotifyLButtonUp(CPWL_Wnd* child, const CFX_PointF& pos) {}
void CPWL_Wnd::NotifyMouseMove(CPWL_Wnd* child, const CFX_PointF& pos) {}
-CPWL_Wnd* CPWL_Wnd::GetParentWindow() const {
- return m_CreationParams.pParentWnd;
-}
-
CFX_FloatRect CPWL_Wnd::GetWindowRect() const {
return m_rcWindow;
}
@@ -497,10 +486,6 @@ const CPWL_Dash& CPWL_Wnd::GetBorderDash() const {
return m_CreationParams.sDash;
}
-CPWL_Wnd::PrivateData* CPWL_Wnd::GetAttachedData() const {
- return m_CreationParams.pAttachedData.Get();
-}
-
CPWL_ScrollBar* CPWL_Wnd::GetVScrollBar() const {
return HasFlag(PWS_VSCROLL) ? m_pVScrollBar.Get() : nullptr;
}
@@ -569,11 +554,6 @@ bool CPWL_Wnd::ClientHitTest(const CFX_PointF& point) const {
return IsValid() && IsVisible() && GetClientRect().Contains(point);
}
-const CPWL_Wnd* CPWL_Wnd::GetRootWnd() const {
- auto* pParent = m_CreationParams.pParentWnd;
- return pParent ? pParent->GetRootWnd() : this;
-}
-
bool CPWL_Wnd::SetVisible(bool bVisible) {
if (!IsValid())
return true;
@@ -699,19 +679,7 @@ void CPWL_Wnd::SetFontSize(float fFontSize) {
}
CFX_SystemHandler* CPWL_Wnd::GetSystemHandler() const {
- return m_CreationParams.pSystemHandler;
-}
-
-CPWL_Wnd::FocusHandlerIface* CPWL_Wnd::GetFocusHandler() const {
- return m_CreationParams.pFocusHandler.Get();
-}
-
-CPWL_Wnd::ProviderIface* CPWL_Wnd::GetProvider() const {
- return m_CreationParams.pProvider.Get();
-}
-
-IPVT_FontMap* CPWL_Wnd::GetFontMap() const {
- return m_CreationParams.pFontMap;
+ return m_CreationParams.pSystemHandler.Get();
}
CFX_Color CPWL_Wnd::GetBorderLeftTopColor(BorderStyle nBorderStyle) const {