Change layout item in CFWL_Widget type from void

Previously the LayoutItem was a void*. This Cl changes the LayoutItem to
explicity be a CXFA_FFWidget.

Review-Url: https://codereview.chromium.org/2559643004
diff --git a/xfa/fwl/cfwl_edit.cpp b/xfa/fwl/cfwl_edit.cpp
index 913f08d..5cf3f2f 100644
--- a/xfa/fwl/cfwl_edit.cpp
+++ b/xfa/fwl/cfwl_edit.cpp
@@ -1168,8 +1168,7 @@
     pRect->Offset(rtOuter.left, rtOuter.top);
   }
 
-  CXFA_FFWidget* pXFAWidget =
-      static_cast<CXFA_FFWidget*>(pOuter->GetLayoutItem());
+  CXFA_FFWidget* pXFAWidget = pOuter->GetLayoutItem();
   if (!pXFAWidget)
     return;
 
@@ -1197,8 +1196,7 @@
   while (pOuter->GetOuter())
     pOuter = pOuter->GetOuter();
 
-  CXFA_FFWidget* pXFAWidget =
-      static_cast<CXFA_FFWidget*>(pOuter->GetLayoutItem());
+  CXFA_FFWidget* pXFAWidget = pOuter->GetLayoutItem();
   if (!pXFAWidget)
     return;
 
diff --git a/xfa/fwl/cfwl_widget.h b/xfa/fwl/cfwl_widget.h
index 64fc526..5046aab 100644
--- a/xfa/fwl/cfwl_widget.h
+++ b/xfa/fwl/cfwl_widget.h
@@ -43,6 +43,7 @@
 class CFWL_Widget;
 class CFWL_WidgetMgr;
 class CFWL_WidgetProperties;
+class CXFA_FFWidget;
 class IFWL_ThemeProvider;
 
 class CFWL_Widget : public IFWL_WidgetDelegate {
@@ -105,8 +106,8 @@
   uint32_t GetEventKey() const { return m_nEventKey; }
   void SetEventKey(uint32_t key) { m_nEventKey = key; }
 
-  void* GetLayoutItem() const { return m_pLayoutItem; }
-  void SetLayoutItem(void* pItem) { m_pLayoutItem = pItem; }
+  CXFA_FFWidget* GetLayoutItem() const { return m_pLayoutItem; }
+  void SetLayoutItem(CXFA_FFWidget* pItem) { m_pLayoutItem = pItem; }
 
   void SetFocus(bool bFocus);
   void RepaintRect(const CFX_RectF& pRect);
@@ -189,7 +190,7 @@
   void NotifyDriver();
   bool IsParent(CFWL_Widget* pParent);
 
-  void* m_pLayoutItem;
+  CXFA_FFWidget* m_pLayoutItem;
   uint32_t m_nEventKey;
   IFWL_WidgetDelegate* m_pDelegate;  // Not owned.
 };
diff --git a/xfa/fxfa/app/xfa_fwladapter.cpp b/xfa/fxfa/app/xfa_fwladapter.cpp
index 3f3dc16..3dfa679 100644
--- a/xfa/fxfa/app/xfa_fwladapter.cpp
+++ b/xfa/fxfa/app/xfa_fwladapter.cpp
@@ -17,8 +17,7 @@
   if (!pWidget)
     return;
 
-  CXFA_FFWidget* pFFWidget =
-      static_cast<CXFA_FFWidget*>(pWidget->GetLayoutItem());
+  CXFA_FFWidget* pFFWidget = pWidget->GetLayoutItem();
   if (!pFFWidget)
     return;
 
@@ -30,8 +29,7 @@
                                            FX_FLOAT fMaxHeight,
                                            const CFX_RectF& rtAnchor,
                                            CFX_RectF& rtPopup) {
-  CXFA_FFWidget* pFFWidget =
-      static_cast<CXFA_FFWidget*>(pWidget->GetLayoutItem());
+  CXFA_FFWidget* pFFWidget = pWidget->GetLayoutItem();
   CFX_Matrix mt;
   pFFWidget->GetRotateMatrix(mt);
   CFX_RectF rtRotateAnchor(rtAnchor);
diff --git a/xfa/fxfa/app/xfa_fwltheme.cpp b/xfa/fxfa/app/xfa_fwltheme.cpp
index 2ca6237..5a494f1 100644
--- a/xfa/fxfa/app/xfa_fwltheme.cpp
+++ b/xfa/fxfa/app/xfa_fwltheme.cpp
@@ -38,9 +38,7 @@
   CFWL_Widget* pOuter = pWidget;
   while (pOuter && pOuter->GetOuter())
     pOuter = pOuter->GetOuter();
-
-  return pOuter ? static_cast<CXFA_FFWidget*>(pOuter->GetLayoutItem())
-                : nullptr;
+  return pOuter ? pOuter->GetLayoutItem() : nullptr;
 }
 
 CXFA_FWLTheme::CXFA_FWLTheme(CXFA_FFApp* pApp)