Rename RePosChildWnd() to RepositionChildWnd()
Because "reposition" is a single word and there isn't a reason for
a capital P in the name.
Change-Id: If6d2bdf01ab3a87899b86aeab865690ec6ce3ac1
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/107951
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Auto-Submit: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/fpdfsdk/pwl/cpwl_combo_box.cpp b/fpdfsdk/pwl/cpwl_combo_box.cpp
index a691db1..7c122d7 100644
--- a/fpdfsdk/pwl/cpwl_combo_box.cpp
+++ b/fpdfsdk/pwl/cpwl_combo_box.cpp
@@ -202,7 +202,7 @@
m_pList->Realize();
}
-bool CPWL_ComboBox::RePosChildWnd() {
+bool CPWL_ComboBox::RepositionChildWnd() {
ObservedPtr<CPWL_ComboBox> this_observed(this);
const CFX_FloatRect rcClient = GetClientRect();
if (m_bPopup) {
diff --git a/fpdfsdk/pwl/cpwl_combo_box.h b/fpdfsdk/pwl/cpwl_combo_box.h
index 87749fa..45729ae 100644
--- a/fpdfsdk/pwl/cpwl_combo_box.h
+++ b/fpdfsdk/pwl/cpwl_combo_box.h
@@ -34,7 +34,7 @@
void NotifyLButtonDown(CPWL_Wnd* child, const CFX_PointF& pos) override;
void NotifyLButtonUp(CPWL_Wnd* child, const CFX_PointF& pos) override;
void CreateChildWnd(const CreateParams& cp) override;
- bool RePosChildWnd() override;
+ bool RepositionChildWnd() override;
CFX_FloatRect GetFocusRect() const override;
void SetFocus() override;
void KillFocus() override;
diff --git a/fpdfsdk/pwl/cpwl_edit.cpp b/fpdfsdk/pwl/cpwl_edit.cpp
index f079a2f..3657b88 100644
--- a/fpdfsdk/pwl/cpwl_edit.cpp
+++ b/fpdfsdk/pwl/cpwl_edit.cpp
@@ -46,7 +46,7 @@
m_pEditImpl->Paint();
}
-bool CPWL_Edit::RePosChildWnd() {
+bool CPWL_Edit::RepositionChildWnd() {
if (CPWL_ScrollBar* pVSB = GetVScrollBar()) {
CFX_FloatRect rcWindow = m_rcOldWindow;
CFX_FloatRect rcVScroll =
diff --git a/fpdfsdk/pwl/cpwl_edit.h b/fpdfsdk/pwl/cpwl_edit.h
index 696e32c..5e2e5fc 100644
--- a/fpdfsdk/pwl/cpwl_edit.h
+++ b/fpdfsdk/pwl/cpwl_edit.h
@@ -33,7 +33,7 @@
~CPWL_Edit() override;
// CPWL_Wnd:
- bool RePosChildWnd() override;
+ bool RepositionChildWnd() override;
CFX_FloatRect GetClientRect() const override;
void DrawThisAppearance(CFX_RenderDevice* pDevice,
const CFX_Matrix& mtUser2Device) override;
diff --git a/fpdfsdk/pwl/cpwl_list_box.cpp b/fpdfsdk/pwl/cpwl_list_box.cpp
index 5adb004..2203ca9 100644
--- a/fpdfsdk/pwl/cpwl_list_box.cpp
+++ b/fpdfsdk/pwl/cpwl_list_box.cpp
@@ -194,9 +194,10 @@
m_pListCtrl->SetScrollPos(CFX_PointF(0, pos));
}
-bool CPWL_ListBox::RePosChildWnd() {
- if (!CPWL_Wnd::RePosChildWnd())
+bool CPWL_ListBox::RepositionChildWnd() {
+ if (!CPWL_Wnd::RepositionChildWnd()) {
return false;
+ }
m_pListCtrl->SetPlateRect(GetListRect());
return true;
@@ -272,12 +273,12 @@
FXSYS_IsFloatEqual(Info.fPlateWidth,
Info.fContentMax - Info.fContentMin)) {
if (pScroll->IsVisible() && pScroll->SetVisible(false)) {
- RePosChildWnd();
+ RepositionChildWnd();
}
return;
}
if (!pScroll->IsVisible() && pScroll->SetVisible(true)) {
- RePosChildWnd();
+ RepositionChildWnd();
}
}
diff --git a/fpdfsdk/pwl/cpwl_list_box.h b/fpdfsdk/pwl/cpwl_list_box.h
index 5ee56b0..85b0077 100644
--- a/fpdfsdk/pwl/cpwl_list_box.h
+++ b/fpdfsdk/pwl/cpwl_list_box.h
@@ -39,7 +39,7 @@
void SetScrollInfo(const PWL_SCROLL_INFO& info) override;
void SetScrollPosition(float pos) override;
void ScrollWindowVertically(float pos) override;
- bool RePosChildWnd() override;
+ bool RepositionChildWnd() override;
CFX_FloatRect GetFocusRect() const override;
void SetFontSize(float fFontSize) override;
float GetFontSize() const override;
diff --git a/fpdfsdk/pwl/cpwl_scroll_bar.cpp b/fpdfsdk/pwl/cpwl_scroll_bar.cpp
index da98ee9..67c503c 100644
--- a/fpdfsdk/pwl/cpwl_scroll_bar.cpp
+++ b/fpdfsdk/pwl/cpwl_scroll_bar.cpp
@@ -125,7 +125,7 @@
CPWL_Wnd::OnDestroy();
}
-bool CPWL_ScrollBar::RePosChildWnd() {
+bool CPWL_ScrollBar::RepositionChildWnd() {
CFX_FloatRect rcClient = GetClientRect();
CFX_FloatRect rcMinButton;
CFX_FloatRect rcMaxButton;
diff --git a/fpdfsdk/pwl/cpwl_scroll_bar.h b/fpdfsdk/pwl/cpwl_scroll_bar.h
index 91e7c29..91a7516 100644
--- a/fpdfsdk/pwl/cpwl_scroll_bar.h
+++ b/fpdfsdk/pwl/cpwl_scroll_bar.h
@@ -101,7 +101,7 @@
// CPWL_Wnd:
void OnDestroy() override;
- bool RePosChildWnd() override;
+ bool RepositionChildWnd() override;
void DrawThisAppearance(CFX_RenderDevice* pDevice,
const CFX_Matrix& mtUser2Device) override;
bool OnLButtonDown(Mask<FWL_EVENTFLAG> nFlag,
diff --git a/fpdfsdk/pwl/cpwl_wnd.cpp b/fpdfsdk/pwl/cpwl_wnd.cpp
index 8d14656..6a5829c 100644
--- a/fpdfsdk/pwl/cpwl_wnd.cpp
+++ b/fpdfsdk/pwl/cpwl_wnd.cpp
@@ -156,8 +156,9 @@
CreateChildWnd(ccp);
m_bVisible = HasFlag(PWS_VISIBLE);
OnCreated();
- if (!RePosChildWnd())
+ if (!RepositionChildWnd()) {
return;
+ }
m_bCreated = true;
}
@@ -199,8 +200,9 @@
if (bReset) {
if (rcOld.left != rcNew.left || rcOld.right != rcNew.right ||
rcOld.top != rcNew.top || rcOld.bottom != rcNew.bottom) {
- if (!RePosChildWnd())
+ if (!RepositionChildWnd()) {
return false;
+ }
}
}
if (bRefresh && !InvalidateRectMove(rcOld, rcNew))
@@ -567,8 +569,9 @@
if (bVisible != m_bVisible) {
m_bVisible = bVisible;
- if (!RePosChildWnd())
+ if (!RepositionChildWnd()) {
return false;
+ }
if (!InvalidateRect(nullptr))
return false;
@@ -589,7 +592,7 @@
return HasFlag(PWS_READONLY);
}
-bool CPWL_Wnd::RePosChildWnd() {
+bool CPWL_Wnd::RepositionChildWnd() {
CPWL_ScrollBar* pVSB = GetVScrollBar();
if (!pVSB)
return true;
diff --git a/fpdfsdk/pwl/cpwl_wnd.h b/fpdfsdk/pwl/cpwl_wnd.h
index eb22934..b39636c 100644
--- a/fpdfsdk/pwl/cpwl_wnd.h
+++ b/fpdfsdk/pwl/cpwl_wnd.h
@@ -224,7 +224,7 @@
virtual void CreateChildWnd(const CreateParams& cp);
// Returns |true| iff this instance is still allocated.
- [[nodiscard]] virtual bool RePosChildWnd();
+ [[nodiscard]] virtual bool RepositionChildWnd();
virtual void DrawThisAppearance(CFX_RenderDevice* pDevice,
const CFX_Matrix& mtUser2Device);