Observe m_pFocusWidget across m_ArrayKeepItems.clear()

Bug: chromium:993771
Change-Id: I24d2d0cb2ea1779b8aa1def9aa6a1dd639284a85
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/59332
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
diff --git a/xfa/fxfa/cxfa_ffdocview.h b/xfa/fxfa/cxfa_ffdocview.h
index e9a094f..092616e 100644
--- a/xfa/fxfa/cxfa_ffdocview.h
+++ b/xfa/fxfa/cxfa_ffdocview.h
@@ -11,14 +11,15 @@
 #include <memory>
 #include <vector>
 
+#include "core/fxcrt/observed_ptr.h"
 #include "core/fxcrt/unowned_ptr.h"
 #include "xfa/fxfa/cxfa_eventparam.h"
 #include "xfa/fxfa/cxfa_ffdoc.h"
+#include "xfa/fxfa/cxfa_ffwidget.h"
 #include "xfa/fxfa/fxfa.h"
 
 class CXFA_BindItems;
 class CXFA_FFDoc;
-class CXFA_FFWidget;
 class CXFA_FFWidgetHandler;
 class CXFA_Node;
 class CXFA_ReadyNodeIterator;
@@ -120,7 +121,7 @@
   std::unique_ptr<CXFA_FFWidgetHandler> m_pWidgetHandler;
   UnownedPtr<CXFA_LayoutProcessor> m_pXFADocLayout;
   UnownedPtr<CXFA_Node> m_pFocusNode;
-  UnownedPtr<CXFA_FFWidget> m_pFocusWidget;
+  ObservedPtr<CXFA_FFWidget> m_pFocusWidget;
   std::deque<CXFA_Node*> m_ValidateNodes;
   std::vector<CXFA_Node*> m_CalculateNodes;
   std::deque<CXFA_BindItems*> m_BindItems;