Remove CFWL_Widget::SetOuter().
The one place it is called does not change the value from what
was specified one line above during creation.
-- Make a const member as a result.
Change-Id: I61690072afc95e74f721ad2bfbda5b97d8a8ccd9
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/72652
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
diff --git a/xfa/fwl/cfwl_combobox.cpp b/xfa/fwl/cfwl_combobox.cpp
index 707739b..b14b7dd 100644
--- a/xfa/fwl/cfwl_combobox.cpp
+++ b/xfa/fwl/cfwl_combobox.cpp
@@ -424,7 +424,6 @@
m_pEdit =
std::make_unique<CFWL_ComboEdit>(GetOwnerApp(), std::move(prop), this);
- m_pEdit->SetOuter(this);
}
void CFWL_ComboBox::OnProcessMessage(CFWL_Message* pMessage) {
diff --git a/xfa/fwl/cfwl_widget.h b/xfa/fwl/cfwl_widget.h
index f6a85da..2a790de 100644
--- a/xfa/fwl/cfwl_widget.h
+++ b/xfa/fwl/cfwl_widget.h
@@ -102,7 +102,6 @@
CFWL_WidgetMgr* GetWidgetMgr() const { return m_pWidgetMgr.Get(); }
CFWL_Widget* GetOwner() { return m_pWidgetMgr->GetOwnerWidget(this); }
CFWL_Widget* GetOuter() const { return m_pOuter; }
- void SetOuter(CFWL_Widget* pOuter) { m_pOuter = pOuter; }
CFWL_Widget* GetOutmost() const;
void ModifyStyles(uint32_t dwStylesAdded, uint32_t dwStylesRemoved);
@@ -186,7 +185,7 @@
UnownedPtr<const CFWL_App> const m_pOwnerApp;
UnownedPtr<CFWL_WidgetMgr> const m_pWidgetMgr;
std::unique_ptr<CFWL_WidgetProperties> m_pProperties;
- CFWL_Widget* m_pOuter;
+ CFWL_Widget* const m_pOuter;
AdapterIface* m_pAdapterIface = nullptr;
UnownedPtr<IFWL_WidgetDelegate> m_pDelegate;
};