Mark CFWL_WidgetMgr::NextTab() as static.

Change-Id: I02162d5370287e6c3ba708403d6432f28af3224a
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/56512
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
diff --git a/xfa/fwl/cfwl_notedriver.cpp b/xfa/fwl/cfwl_notedriver.cpp
index a2fc754..88655e3 100644
--- a/xfa/fwl/cfwl_notedriver.cpp
+++ b/xfa/fwl/cfwl_notedriver.cpp
@@ -174,9 +174,9 @@
     if (m_pFocus && pWidgetMgr->GetSystemFormWidget(m_pFocus.Get()) != pForm)
       pFocus = nullptr;
 
-    CFWL_Widget* pNextTabStop = pWidgetMgr->NextTab(pForm, pFocus);
+    CFWL_Widget* pNextTabStop = CFWL_WidgetMgr::NextTab(pForm, pFocus);
     if (!pNextTabStop)
-      pNextTabStop = pWidgetMgr->NextTab(pForm, nullptr);
+      pNextTabStop = CFWL_WidgetMgr::NextTab(pForm, nullptr);
     if (pNextTabStop == pFocus)
       return true;
     if (pNextTabStop)
diff --git a/xfa/fwl/cfwl_widgetmgr.cpp b/xfa/fwl/cfwl_widgetmgr.cpp
index db39192..184b403 100644
--- a/xfa/fwl/cfwl_widgetmgr.cpp
+++ b/xfa/fwl/cfwl_widgetmgr.cpp
@@ -18,7 +18,21 @@
   m_mapWidgetItem[nullptr] = pdfium::MakeUnique<Item>();
 }
 
-CFWL_WidgetMgr::~CFWL_WidgetMgr() {}
+CFWL_WidgetMgr::~CFWL_WidgetMgr() = default;
+
+// static
+CFWL_Widget* CFWL_WidgetMgr::NextTab(CFWL_Widget* parent, CFWL_Widget* focus) {
+  CFWL_WidgetMgr* pMgr = parent->GetOwnerApp()->GetWidgetMgr();
+  CFWL_Widget* child = pMgr->GetFirstChildWidget(parent);
+  while (child) {
+    CFWL_Widget* bRet = NextTab(child, focus);
+    if (bRet)
+      return bRet;
+
+    child = pMgr->GetNextSiblingWidget(child);
+  }
+  return nullptr;
+}
 
 CFWL_Widget* CFWL_WidgetMgr::GetParentWidget(const CFWL_Widget* pWidget) const {
   Item* pItem = GetWidgetMgrItem(pWidget);
@@ -244,19 +258,6 @@
   return parent;
 }
 
-CFWL_Widget* CFWL_WidgetMgr::NextTab(CFWL_Widget* parent, CFWL_Widget* focus) {
-  CFWL_WidgetMgr* pMgr = parent->GetOwnerApp()->GetWidgetMgr();
-  CFWL_Widget* child = pMgr->GetFirstChildWidget(parent);
-  while (child) {
-    CFWL_Widget* bRet = NextTab(child, focus);
-    if (bRet)
-      return bRet;
-
-    child = pMgr->GetNextSiblingWidget(child);
-  }
-  return nullptr;
-}
-
 CFWL_Widget* CFWL_WidgetMgr::GetDefaultButton(CFWL_Widget* pParent) const {
   if ((pParent->GetClassID() == FWL_Type::PushButton) &&
       (pParent->GetStates() & (1 << (FWL_WGTSTATE_MAX + 2)))) {
diff --git a/xfa/fwl/cfwl_widgetmgr.h b/xfa/fwl/cfwl_widgetmgr.h
index 7059121..75b7250 100644
--- a/xfa/fwl/cfwl_widgetmgr.h
+++ b/xfa/fwl/cfwl_widgetmgr.h
@@ -35,6 +35,8 @@
   explicit CFWL_WidgetMgr(AdapterIface* pAdapterNative);
   ~CFWL_WidgetMgr();
 
+  static CFWL_Widget* NextTab(CFWL_Widget* parent, CFWL_Widget* focus);
+
   void OnProcessMessageToForm(CFWL_Message* pMessage);
   void OnDrawWidget(CFWL_Widget* pWidget,
                     CXFA_Graphics* pGraphics,
@@ -55,7 +57,6 @@
 
   CFWL_Widget* GetWidgetAtPoint(CFWL_Widget* pParent,
                                 const CFX_PointF& point) const;
-  CFWL_Widget* NextTab(CFWL_Widget* parent, CFWL_Widget* focus);
 
   CFWL_Widget* GetDefaultButton(CFWL_Widget* pParent) const;
   void AddRedrawCounts(CFWL_Widget* pWidget);