Remove CFWL_ComboEdit::FlagFocus() and CFWL_ComboList::SetNotifyOwner().
FlagFocus() is only called in one place with a fixed argument of
`true`, so inline the equivalent logic.
SetNotifyOwner() is uncalled.
Change-Id: I9d954e1f1c40075e73b74b60dc29f3b5cb45b955
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/81334
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
diff --git a/xfa/fwl/cfwl_comboedit.cpp b/xfa/fwl/cfwl_comboedit.cpp
index 75c8136..ca78b84 100644
--- a/xfa/fwl/cfwl_comboedit.cpp
+++ b/xfa/fwl/cfwl_comboedit.cpp
@@ -23,20 +23,10 @@
}
void CFWL_ComboEdit::SetSelected() {
- FlagFocus(true);
+ m_Properties.m_dwStates |= FWL_WGTSTATE_Focused;
SelectAll();
}
-void CFWL_ComboEdit::FlagFocus(bool bSet) {
- if (bSet) {
- m_Properties.m_dwStates |= FWL_WGTSTATE_Focused;
- return;
- }
-
- m_Properties.m_dwStates &= ~FWL_WGTSTATE_Focused;
- HideCaret(nullptr);
-}
-
void CFWL_ComboEdit::OnProcessMessage(CFWL_Message* pMessage) {
bool backDefault = true;
switch (pMessage->GetType()) {
diff --git a/xfa/fwl/cfwl_comboedit.h b/xfa/fwl/cfwl_comboedit.h
index 23251b2..839eaed 100644
--- a/xfa/fwl/cfwl_comboedit.h
+++ b/xfa/fwl/cfwl_comboedit.h
@@ -20,7 +20,6 @@
void ClearSelected();
void SetSelected();
- void FlagFocus(bool bSet);
private:
CFWL_ComboEdit(CFWL_App* app,
diff --git a/xfa/fwl/cfwl_combolist.h b/xfa/fwl/cfwl_combolist.h
index f74dcd3..4f06b83 100644
--- a/xfa/fwl/cfwl_combolist.h
+++ b/xfa/fwl/cfwl_combolist.h
@@ -20,7 +20,6 @@
int32_t MatchItem(WideStringView wsMatch);
void ChangeSelected(int32_t iSel);
- void SetNotifyOwner(bool notify) { m_bNotifyOwner = notify; }
private:
CFWL_ComboList(CFWL_App* app,