Small cleanup to CFWL_App.
No functional change.
- Rename GetOwnerApp() to GetFWLApp() since "owner" adds no information.
- Rename m_pAdapterNative to m_pAdapter, since "native" adds no info.
- Encapsulate callbacks made into CFWL_App::AdapterIface.
- Remove redundant forward declaration.
Change-Id: I38da4b2e80fc1afe8cb54106c101bb8883a119bf
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/72870
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
diff --git a/xfa/fwl/cfwl_app.cpp b/xfa/fwl/cfwl_app.cpp
index 4e5b593..4249732 100644
--- a/xfa/fwl/cfwl_app.cpp
+++ b/xfa/fwl/cfwl_app.cpp
@@ -11,11 +11,11 @@
#include "xfa/fwl/cfwl_widgetmgr.h"
CFWL_App::CFWL_App(AdapterIface* pAdapter)
- : m_pAdapterNative(pAdapter),
+ : m_pAdapter(pAdapter),
m_pWidgetMgr(
std::make_unique<CFWL_WidgetMgr>(pAdapter->GetWidgetMgrAdapter())),
m_pNoteDriver(std::make_unique<CFWL_NoteDriver>()) {
- ASSERT(m_pAdapterNative);
+ ASSERT(m_pAdapter);
}
CFWL_App::~CFWL_App() = default;
diff --git a/xfa/fwl/cfwl_app.h b/xfa/fwl/cfwl_app.h
index 8dfc2ae..176798d 100644
--- a/xfa/fwl/cfwl_app.h
+++ b/xfa/fwl/cfwl_app.h
@@ -13,7 +13,6 @@
#include "xfa/fwl/cfwl_widgetmgr.h"
class CFWL_NoteDriver;
-class CFWL_WidgetMgr;
class IFWL_ThemeProvider;
enum FWL_KeyFlag {
@@ -39,12 +38,20 @@
explicit CFWL_App(AdapterIface* pAdapter);
~CFWL_App();
- AdapterIface* GetAdapterNative() const { return m_pAdapterNative.Get(); }
+ CFWL_WidgetMgr::AdapterIface* GetWidgetMgrAdapter() const {
+ return m_pAdapter->GetWidgetMgrAdapter();
+ }
+ TimerHandlerIface* GetTimerHandler() const {
+ return m_pAdapter->GetTimerHandler();
+ }
+ IFWL_ThemeProvider* GetThemeProvider() const {
+ return m_pAdapter->GetThemeProvider();
+ }
CFWL_WidgetMgr* GetWidgetMgr() const { return m_pWidgetMgr.get(); }
CFWL_NoteDriver* GetNoteDriver() const { return m_pNoteDriver.get(); }
private:
- UnownedPtr<AdapterIface> const m_pAdapterNative;
+ UnownedPtr<AdapterIface> const m_pAdapter;
std::unique_ptr<CFWL_WidgetMgr> m_pWidgetMgr;
std::unique_ptr<CFWL_NoteDriver> m_pNoteDriver;
};
diff --git a/xfa/fwl/cfwl_caret.cpp b/xfa/fwl/cfwl_caret.cpp
index f538329..f705e1a 100644
--- a/xfa/fwl/cfwl_caret.cpp
+++ b/xfa/fwl/cfwl_caret.cpp
@@ -46,9 +46,8 @@
}
void CFWL_Caret::ShowCaret() {
- m_pTimer = std::make_unique<CFX_Timer>(
- GetOwnerApp()->GetAdapterNative()->GetTimerHandler(), this,
- kBlinkPeriodMs);
+ m_pTimer = std::make_unique<CFX_Timer>(GetFWLApp()->GetTimerHandler(), this,
+ kBlinkPeriodMs);
RemoveStates(FWL_WGTSTATE_Invisible);
SetStates(kStateHighlight);
}
diff --git a/xfa/fwl/cfwl_combobox.cpp b/xfa/fwl/cfwl_combobox.cpp
index 50f912e..d2ce0af 100644
--- a/xfa/fwl/cfwl_combobox.cpp
+++ b/xfa/fwl/cfwl_combobox.cpp
@@ -380,14 +380,14 @@
Properties prop;
prop.m_dwStyles = FWL_WGTSTYLE_Border | FWL_WGTSTYLE_VScroll;
prop.m_dwStates = FWL_WGTSTATE_Invisible;
- m_pListBox = std::make_unique<CFWL_ComboList>(GetOwnerApp(), prop, this);
+ m_pListBox = std::make_unique<CFWL_ComboList>(GetFWLApp(), prop, this);
}
void CFWL_ComboBox::InitComboEdit() {
if (m_pEdit)
return;
- m_pEdit = std::make_unique<CFWL_ComboEdit>(GetOwnerApp(), Properties(), this);
+ m_pEdit = std::make_unique<CFWL_ComboEdit>(GetFWLApp(), Properties(), this);
}
void CFWL_ComboBox::OnProcessMessage(CFWL_Message* pMessage) {
diff --git a/xfa/fwl/cfwl_datetimepicker.cpp b/xfa/fwl/cfwl_datetimepicker.cpp
index 270ed3f..aec4edf 100644
--- a/xfa/fwl/cfwl_datetimepicker.cpp
+++ b/xfa/fwl/cfwl_datetimepicker.cpp
@@ -31,13 +31,13 @@
monthProp.m_dwStyles = FWL_WGTSTYLE_Popup | FWL_WGTSTYLE_Border;
monthProp.m_dwStates = FWL_WGTSTATE_Invisible;
m_pMonthCal =
- std::make_unique<CFWL_MonthCalendar>(GetOwnerApp(), monthProp, this);
+ std::make_unique<CFWL_MonthCalendar>(GetFWLApp(), monthProp, this);
m_pMonthCal->SetWidgetRect(
CFX_RectF(0, 0, m_pMonthCal->GetAutosizedWidgetRect().Size()));
m_pEdit =
- std::make_unique<CFWL_DateTimeEdit>(GetOwnerApp(), Properties(), this);
+ std::make_unique<CFWL_DateTimeEdit>(GetFWLApp(), Properties(), this);
RegisterEventTarget(m_pMonthCal.get());
RegisterEventTarget(m_pEdit.get());
diff --git a/xfa/fwl/cfwl_edit.cpp b/xfa/fwl/cfwl_edit.cpp
index 44224f2..c3671c8 100644
--- a/xfa/fwl/cfwl_edit.cpp
+++ b/xfa/fwl/cfwl_edit.cpp
@@ -838,8 +838,7 @@
Properties prop;
prop.m_dwStyleExes = FWL_STYLEEXT_SCB_Vert;
prop.m_dwStates = FWL_WGTSTATE_Disabled | FWL_WGTSTATE_Invisible;
- m_pVertScrollBar =
- std::make_unique<CFWL_ScrollBar>(GetOwnerApp(), prop, this);
+ m_pVertScrollBar = std::make_unique<CFWL_ScrollBar>(GetFWLApp(), prop, this);
}
void CFWL_Edit::InitHorizontalScrollBar() {
@@ -849,8 +848,7 @@
Properties prop;
prop.m_dwStyleExes = FWL_STYLEEXT_SCB_Horz;
prop.m_dwStates = FWL_WGTSTATE_Disabled | FWL_WGTSTATE_Invisible;
- m_pHorzScrollBar =
- std::make_unique<CFWL_ScrollBar>(GetOwnerApp(), prop, this);
+ m_pHorzScrollBar = std::make_unique<CFWL_ScrollBar>(GetFWLApp(), prop, this);
}
void CFWL_Edit::ShowCaret(CFX_RectF* pRect) {
@@ -920,7 +918,7 @@
if (m_pCaret)
return;
- m_pCaret = std::make_unique<CFWL_Caret>(GetOwnerApp(), Properties(), this);
+ m_pCaret = std::make_unique<CFWL_Caret>(GetFWLApp(), Properties(), this);
m_pCaret->SetStates(m_Properties.m_dwStates);
UpdateCursorRect();
}
diff --git a/xfa/fwl/cfwl_listbox.cpp b/xfa/fwl/cfwl_listbox.cpp
index f4de0b6..ae8f323 100644
--- a/xfa/fwl/cfwl_listbox.cpp
+++ b/xfa/fwl/cfwl_listbox.cpp
@@ -592,8 +592,7 @@
Properties prop;
prop.m_dwStyleExes = FWL_STYLEEXT_SCB_Vert;
prop.m_dwStates = FWL_WGTSTATE_Invisible;
- m_pVertScrollBar =
- std::make_unique<CFWL_ScrollBar>(GetOwnerApp(), prop, this);
+ m_pVertScrollBar = std::make_unique<CFWL_ScrollBar>(GetFWLApp(), prop, this);
}
void CFWL_ListBox::InitHorizontalScrollBar() {
@@ -603,8 +602,7 @@
Properties prop;
prop.m_dwStyleExes = FWL_STYLEEXT_SCB_Horz;
prop.m_dwStates = FWL_WGTSTATE_Invisible;
- m_pHorzScrollBar =
- std::make_unique<CFWL_ScrollBar>(GetOwnerApp(), prop, this);
+ m_pHorzScrollBar = std::make_unique<CFWL_ScrollBar>(GetFWLApp(), prop, this);
}
bool CFWL_ListBox::IsShowScrollBar(bool bVert) {
diff --git a/xfa/fwl/cfwl_notedriver.cpp b/xfa/fwl/cfwl_notedriver.cpp
index a9a688c..ab86d99 100644
--- a/xfa/fwl/cfwl_notedriver.cpp
+++ b/xfa/fwl/cfwl_notedriver.cpp
@@ -161,7 +161,7 @@
if (pMsg->m_dwCmd == CFWL_MessageKey::Type::kKeyDown &&
pMsg->m_dwKeyCode == XFA_FWL_VKEY_Return) {
- CFWL_WidgetMgr* pWidgetMgr = pMessageForm->GetOwnerApp()->GetWidgetMgr();
+ CFWL_WidgetMgr* pWidgetMgr = pMessageForm->GetFWLApp()->GetWidgetMgr();
CFWL_Widget* pDefButton = pWidgetMgr->GetDefaultButton(pMessageForm);
if (pDefButton) {
pMsg->SetDstTarget(pDefButton);
@@ -188,7 +188,7 @@
bool CFWL_NoteDriver::DoWheel(CFWL_Message* pMessage,
CFWL_Widget* pMessageForm) {
- CFWL_WidgetMgr* pWidgetMgr = pMessageForm->GetOwnerApp()->GetWidgetMgr();
+ CFWL_WidgetMgr* pWidgetMgr = pMessageForm->GetFWLApp()->GetWidgetMgr();
CFWL_MessageMouseWheel* pMsg = static_cast<CFWL_MessageMouseWheel*>(pMessage);
CFWL_Widget* pDst = pWidgetMgr->GetWidgetAtPoint(pMessageForm, pMsg->pos());
if (!pDst)
@@ -201,7 +201,7 @@
bool CFWL_NoteDriver::DoMouseEx(CFWL_Message* pMessage,
CFWL_Widget* pMessageForm) {
- CFWL_WidgetMgr* pWidgetMgr = pMessageForm->GetOwnerApp()->GetWidgetMgr();
+ CFWL_WidgetMgr* pWidgetMgr = pMessageForm->GetFWLApp()->GetWidgetMgr();
CFWL_Widget* pTarget = nullptr;
if (m_pGrab)
pTarget = m_pGrab.Get();
diff --git a/xfa/fwl/cfwl_scrollbar.cpp b/xfa/fwl/cfwl_scrollbar.cpp
index 1a7bbde..7ba20cd 100644
--- a/xfa/fwl/cfwl_scrollbar.cpp
+++ b/xfa/fwl/cfwl_scrollbar.cpp
@@ -344,9 +344,8 @@
DoMouseDown(4, m_MaxTrackRect, m_iMaxTrackState, point);
if (!SendEvent()) {
- m_pTimer = std::make_unique<CFX_Timer>(
- GetOwnerApp()->GetAdapterNative()->GetTimerHandler(), this,
- FWL_SCROLLBAR_Elapse);
+ m_pTimer = std::make_unique<CFX_Timer>(GetFWLApp()->GetTimerHandler(), this,
+ FWL_SCROLLBAR_Elapse);
}
}
@@ -451,7 +450,7 @@
void CFWL_ScrollBar::OnTimerFired() {
m_pTimer.reset();
if (!SendEvent()) {
- m_pTimer = std::make_unique<CFX_Timer>(
- GetOwnerApp()->GetAdapterNative()->GetTimerHandler(), this, 0);
+ m_pTimer =
+ std::make_unique<CFX_Timer>(GetFWLApp()->GetTimerHandler(), this, 0);
}
}
diff --git a/xfa/fwl/cfwl_widget.cpp b/xfa/fwl/cfwl_widget.cpp
index 9708768..d966921 100644
--- a/xfa/fwl/cfwl_widget.cpp
+++ b/xfa/fwl/cfwl_widget.cpp
@@ -36,7 +36,7 @@
const Properties& properties,
CFWL_Widget* pOuter)
: m_Properties(properties),
- m_pOwnerApp(app),
+ m_pFWLApp(app),
m_pWidgetMgr(app->GetWidgetMgr()),
m_pOuter(pOuter) {
m_pWidgetMgr->InsertWidget(m_pOuter, this);
@@ -104,10 +104,10 @@
if (IsVisible())
return;
- CFWL_NoteDriver* noteDriver = GetOwnerApp()->GetNoteDriver();
+ CFWL_NoteDriver* noteDriver = GetFWLApp()->GetNoteDriver();
noteDriver->NotifyTargetHide(this);
- CFWL_WidgetMgr* widgetMgr = GetOwnerApp()->GetWidgetMgr();
+ CFWL_WidgetMgr* widgetMgr = GetFWLApp()->GetWidgetMgr();
CFWL_Widget* child = widgetMgr->GetFirstChildWidget(this);
while (child) {
noteDriver->NotifyTargetHide(child);
@@ -158,7 +158,7 @@
}
IFWL_ThemeProvider* CFWL_Widget::GetThemeProvider() const {
- return m_pOwnerApp->GetAdapterNative()->GetThemeProvider();
+ return GetFWLApp()->GetThemeProvider();
}
bool CFWL_Widget::IsEnabled() const {
@@ -242,17 +242,17 @@
}
void CFWL_Widget::SetGrab(bool bSet) {
- CFWL_NoteDriver* pDriver = GetOwnerApp()->GetNoteDriver();
+ CFWL_NoteDriver* pDriver = GetFWLApp()->GetNoteDriver();
pDriver->SetGrab(bSet ? this : nullptr);
}
void CFWL_Widget::RegisterEventTarget(CFWL_Widget* pEventSource) {
- CFWL_NoteDriver* pNoteDriver = GetOwnerApp()->GetNoteDriver();
+ CFWL_NoteDriver* pNoteDriver = GetFWLApp()->GetNoteDriver();
pNoteDriver->RegisterEventTarget(this, pEventSource);
}
void CFWL_Widget::UnregisterEventTarget() {
- CFWL_NoteDriver* pNoteDriver = GetOwnerApp()->GetNoteDriver();
+ CFWL_NoteDriver* pNoteDriver = GetFWLApp()->GetNoteDriver();
pNoteDriver->UnregisterEventTarget(this);
}
@@ -261,7 +261,7 @@
m_pOuter->GetDelegate()->OnProcessEvent(pEvent);
return;
}
- CFWL_NoteDriver* pNoteDriver = GetOwnerApp()->GetNoteDriver();
+ CFWL_NoteDriver* pNoteDriver = GetFWLApp()->GetNoteDriver();
pNoteDriver->SendEvent(pEvent);
}
@@ -295,7 +295,7 @@
}
void CFWL_Widget::NotifyDriver() {
- CFWL_NoteDriver* pDriver = GetOwnerApp()->GetNoteDriver();
+ CFWL_NoteDriver* pDriver = GetFWLApp()->GetNoteDriver();
pDriver->NotifyTargetDestroy(this);
}
@@ -304,7 +304,7 @@
return CFX_SizeF();
CFX_SizeF szRet(m_WidgetRect.left, m_WidgetRect.top);
- CFWL_WidgetMgr* pWidgetMgr = GetOwnerApp()->GetWidgetMgr();
+ CFWL_WidgetMgr* pWidgetMgr = GetFWLApp()->GetWidgetMgr();
CFWL_Widget* pDstWidget = GetParent();
while (pDstWidget && pDstWidget != pParent) {
CFX_RectF rtDst = pDstWidget->GetWidgetRect();
diff --git a/xfa/fwl/cfwl_widget.h b/xfa/fwl/cfwl_widget.h
index 9fe3a53..a260734 100644
--- a/xfa/fwl/cfwl_widget.h
+++ b/xfa/fwl/cfwl_widget.h
@@ -126,7 +126,7 @@
return m_pDelegate ? m_pDelegate.Get() : this;
}
- const CFWL_App* GetOwnerApp() const { return m_pOwnerApp.Get(); }
+ const CFWL_App* GetFWLApp() const { return m_pFWLApp.Get(); }
uint64_t GetEventKey() const { return m_nEventKey; }
void SetEventKey(uint64_t key) { m_nEventKey = key; }
@@ -180,7 +180,7 @@
int32_t m_iLock = 0;
uint64_t m_nEventKey = 0;
- UnownedPtr<const CFWL_App> const m_pOwnerApp;
+ UnownedPtr<const CFWL_App> const m_pFWLApp;
UnownedPtr<CFWL_WidgetMgr> const m_pWidgetMgr;
CFWL_Widget* const m_pOuter;
AdapterIface* m_pAdapterIface = nullptr;
diff --git a/xfa/fwl/cfwl_widgetmgr.cpp b/xfa/fwl/cfwl_widgetmgr.cpp
index df99bae..c53096d 100644
--- a/xfa/fwl/cfwl_widgetmgr.cpp
+++ b/xfa/fwl/cfwl_widgetmgr.cpp
@@ -178,7 +178,7 @@
if (!pDstWidget)
return;
- CFWL_NoteDriver* pNoteDriver = pDstWidget->GetOwnerApp()->GetNoteDriver();
+ CFWL_NoteDriver* pNoteDriver = pDstWidget->GetFWLApp()->GetNoteDriver();
pNoteDriver->ProcessMessage(std::move(pMessage));
}
diff --git a/xfa/fxfa/cxfa_ffbarcode.cpp b/xfa/fxfa/cxfa_ffbarcode.cpp
index c719a90..5ba551b 100644
--- a/xfa/fxfa/cxfa_ffbarcode.cpp
+++ b/xfa/fxfa/cxfa_ffbarcode.cpp
@@ -149,7 +149,7 @@
SetNormalWidget(std::move(pNew));
pFWLBarcode->SetAdapterIface(this);
- CFWL_NoteDriver* pNoteDriver = pFWLBarcode->GetOwnerApp()->GetNoteDriver();
+ CFWL_NoteDriver* pNoteDriver = pFWLBarcode->GetFWLApp()->GetNoteDriver();
pNoteDriver->RegisterEventTarget(pFWLBarcode, pFWLBarcode);
m_pOldDelegate = pFWLBarcode->GetDelegate();
pFWLBarcode->SetDelegate(this);
diff --git a/xfa/fxfa/cxfa_ffcheckbutton.cpp b/xfa/fxfa/cxfa_ffcheckbutton.cpp
index 1a85190..a094058 100644
--- a/xfa/fxfa/cxfa_ffcheckbutton.cpp
+++ b/xfa/fxfa/cxfa_ffcheckbutton.cpp
@@ -42,7 +42,7 @@
SetNormalWidget(std::move(pNew));
pCheckBox->SetAdapterIface(this);
- CFWL_NoteDriver* pNoteDriver = pCheckBox->GetOwnerApp()->GetNoteDriver();
+ CFWL_NoteDriver* pNoteDriver = pCheckBox->GetFWLApp()->GetNoteDriver();
pNoteDriver->RegisterEventTarget(pCheckBox, pCheckBox);
m_pOldDelegate = pCheckBox->GetDelegate();
pCheckBox->SetDelegate(this);
diff --git a/xfa/fxfa/cxfa_ffcombobox.cpp b/xfa/fxfa/cxfa_ffcombobox.cpp
index 99b2525..db71ab9 100644
--- a/xfa/fxfa/cxfa_ffcombobox.cpp
+++ b/xfa/fxfa/cxfa_ffcombobox.cpp
@@ -59,7 +59,7 @@
SetNormalWidget(std::move(pNew));
pComboBox->SetAdapterIface(this);
- CFWL_NoteDriver* pNoteDriver = pComboBox->GetOwnerApp()->GetNoteDriver();
+ CFWL_NoteDriver* pNoteDriver = pComboBox->GetFWLApp()->GetNoteDriver();
pNoteDriver->RegisterEventTarget(pComboBox, pComboBox);
m_pOldDelegate = pComboBox->GetDelegate();
pComboBox->SetDelegate(this);
diff --git a/xfa/fxfa/cxfa_ffdatetimeedit.cpp b/xfa/fxfa/cxfa_ffdatetimeedit.cpp
index 4a92bcb..1dd0d3a 100644
--- a/xfa/fxfa/cxfa_ffdatetimeedit.cpp
+++ b/xfa/fxfa/cxfa_ffdatetimeedit.cpp
@@ -52,7 +52,7 @@
SetNormalWidget(std::move(pNewPicker));
pWidget->SetAdapterIface(this);
- CFWL_NoteDriver* pNoteDriver = pWidget->GetOwnerApp()->GetNoteDriver();
+ CFWL_NoteDriver* pNoteDriver = pWidget->GetFWLApp()->GetNoteDriver();
pNoteDriver->RegisterEventTarget(pWidget, pWidget);
m_pOldDelegate = pWidget->GetDelegate();
pWidget->SetDelegate(this);
diff --git a/xfa/fxfa/cxfa_ffimageedit.cpp b/xfa/fxfa/cxfa_ffimageedit.cpp
index fa15c5d..2eba6c5 100644
--- a/xfa/fxfa/cxfa_ffimageedit.cpp
+++ b/xfa/fxfa/cxfa_ffimageedit.cpp
@@ -41,7 +41,7 @@
SetNormalWidget(std::move(pNew));
pPictureBox->SetAdapterIface(this);
- CFWL_NoteDriver* pNoteDriver = pPictureBox->GetOwnerApp()->GetNoteDriver();
+ CFWL_NoteDriver* pNoteDriver = pPictureBox->GetFWLApp()->GetNoteDriver();
pNoteDriver->RegisterEventTarget(pPictureBox, pPictureBox);
m_pOldDelegate = pPictureBox->GetDelegate();
pPictureBox->SetDelegate(this);
diff --git a/xfa/fxfa/cxfa_fflistbox.cpp b/xfa/fxfa/cxfa_fflistbox.cpp
index 655311a..34701da 100644
--- a/xfa/fxfa/cxfa_fflistbox.cpp
+++ b/xfa/fxfa/cxfa_fflistbox.cpp
@@ -33,7 +33,7 @@
return;
CFWL_NoteDriver* pNoteDriver =
- GetNormalWidget()->GetOwnerApp()->GetNoteDriver();
+ GetNormalWidget()->GetFWLApp()->GetNoteDriver();
pNoteDriver->UnregisterEventTarget(GetNormalWidget());
}
@@ -51,7 +51,7 @@
SetNormalWidget(std::move(pNew));
pListBox->SetAdapterIface(this);
- CFWL_NoteDriver* pNoteDriver = pListBox->GetOwnerApp()->GetNoteDriver();
+ CFWL_NoteDriver* pNoteDriver = pListBox->GetFWLApp()->GetNoteDriver();
pNoteDriver->RegisterEventTarget(pListBox, pListBox);
m_pOldDelegate = pListBox->GetDelegate();
pListBox->SetDelegate(this);
diff --git a/xfa/fxfa/cxfa_ffnumericedit.cpp b/xfa/fxfa/cxfa_ffnumericedit.cpp
index da60a3a..5d0412e 100644
--- a/xfa/fxfa/cxfa_ffnumericedit.cpp
+++ b/xfa/fxfa/cxfa_ffnumericedit.cpp
@@ -34,7 +34,7 @@
SetNormalWidget(std::move(pNewEdit));
pWidget->SetAdapterIface(this);
- CFWL_NoteDriver* pNoteDriver = pWidget->GetOwnerApp()->GetNoteDriver();
+ CFWL_NoteDriver* pNoteDriver = pWidget->GetFWLApp()->GetNoteDriver();
pNoteDriver->RegisterEventTarget(pWidget, pWidget);
m_pOldDelegate = pWidget->GetDelegate();
pWidget->SetDelegate(this);
diff --git a/xfa/fxfa/cxfa_ffpasswordedit.cpp b/xfa/fxfa/cxfa_ffpasswordedit.cpp
index 7d222b7..0c25a06 100644
--- a/xfa/fxfa/cxfa_ffpasswordedit.cpp
+++ b/xfa/fxfa/cxfa_ffpasswordedit.cpp
@@ -33,7 +33,7 @@
SetNormalWidget(std::move(pNewEdit));
pWidget->SetAdapterIface(this);
- CFWL_NoteDriver* pNoteDriver = pWidget->GetOwnerApp()->GetNoteDriver();
+ CFWL_NoteDriver* pNoteDriver = pWidget->GetFWLApp()->GetNoteDriver();
pNoteDriver->RegisterEventTarget(pWidget, pWidget);
m_pOldDelegate = pWidget->GetDelegate();
pWidget->SetDelegate(this);
diff --git a/xfa/fxfa/cxfa_ffpushbutton.cpp b/xfa/fxfa/cxfa_ffpushbutton.cpp
index 1bdcf56..8957bae 100644
--- a/xfa/fxfa/cxfa_ffpushbutton.cpp
+++ b/xfa/fxfa/cxfa_ffpushbutton.cpp
@@ -60,7 +60,7 @@
SetNormalWidget(std::move(pNew));
pPushButton->SetAdapterIface(this);
- CFWL_NoteDriver* pNoteDriver = pPushButton->GetOwnerApp()->GetNoteDriver();
+ CFWL_NoteDriver* pNoteDriver = pPushButton->GetFWLApp()->GetNoteDriver();
pNoteDriver->RegisterEventTarget(pPushButton, pPushButton);
{
diff --git a/xfa/fxfa/cxfa_fftextedit.cpp b/xfa/fxfa/cxfa_fftextedit.cpp
index b8579c2..4f6ef70 100644
--- a/xfa/fxfa/cxfa_fftextedit.cpp
+++ b/xfa/fxfa/cxfa_fftextedit.cpp
@@ -37,7 +37,7 @@
CXFA_FFTextEdit::~CXFA_FFTextEdit() {
if (GetNormalWidget()) {
CFWL_NoteDriver* pNoteDriver =
- GetNormalWidget()->GetOwnerApp()->GetNoteDriver();
+ GetNormalWidget()->GetFWLApp()->GetNoteDriver();
pNoteDriver->UnregisterEventTarget(GetNormalWidget());
}
}
@@ -54,7 +54,7 @@
SetNormalWidget(std::move(pNewWidget));
pFWLEdit->SetAdapterIface(this);
- CFWL_NoteDriver* pNoteDriver = pFWLEdit->GetOwnerApp()->GetNoteDriver();
+ CFWL_NoteDriver* pNoteDriver = pFWLEdit->GetFWLApp()->GetNoteDriver();
pNoteDriver->RegisterEventTarget(pFWLEdit, pFWLEdit);
m_pOldDelegate = pFWLEdit->GetDelegate();
pFWLEdit->SetDelegate(this);