Replace FX_LPCRECT typedef with underlying types

Helps with transparency. Also remove default args and
use override consistently in the affected methods.

R=dsinclair@chromium.org

Review URL: https://codereview.chromium.org/1751093002 .
diff --git a/core/include/fxcrt/fx_coordinates.h b/core/include/fxcrt/fx_coordinates.h
index 2f52f78..53b4c1a 100644
--- a/core/include/fxcrt/fx_coordinates.h
+++ b/core/include/fxcrt/fx_coordinates.h
@@ -537,10 +537,6 @@
 };
 typedef CFX_RTemplate<int32_t> CFX_Rect;
 typedef CFX_RTemplate<FX_FLOAT> CFX_RectF;
-typedef CFX_RTemplate<int32_t>* FX_LPRECT;
-typedef CFX_RTemplate<FX_FLOAT>* FX_LPRECTF;
-typedef CFX_RTemplate<int32_t> const* FX_LPCRECT;
-typedef CFX_RTemplate<FX_FLOAT> const* FX_LPCRECTF;
 typedef CFX_ArrayTemplate<CFX_RectF> CFX_RectFArray;
 
 class CFX_Matrix {
diff --git a/xfa/src/fee/include/ifde_txtedtpage.h b/xfa/src/fee/include/ifde_txtedtpage.h
index c16e94f..884b752 100644
--- a/xfa/src/fee/include/ifde_txtedtpage.h
+++ b/xfa/src/fee/include/ifde_txtedtpage.h
@@ -32,11 +32,10 @@
 
   virtual int32_t GetDisplayPos(const CFX_RectF& rtClip,
                                 FXTEXT_CHARPOS*& pCharPos,
-                                FX_LPRECTF pBBox = NULL) const = 0;
-  virtual FX_BOOL IsLoaded(FX_LPCRECTF pClipBox = NULL) = 0;
-  virtual int32_t LoadPage(FX_LPCRECTF pClipBox = NULL,
-                           IFX_Pause* pPause = NULL) = 0;
-  virtual void UnloadPage(FX_LPCRECTF pClipBox = NULL) = 0;
+                                CFX_RectF* pBBox) const = 0;
+  virtual FX_BOOL IsLoaded(const CFX_RectF* pClipBox) = 0;
+  virtual int32_t LoadPage(const CFX_RectF* pClipBox, IFX_Pause* pPause) = 0;
+  virtual void UnloadPage(const CFX_RectF* pClipBox) = 0;
   virtual const CFX_RectF& GetContentsBox() = 0;
 };
 
diff --git a/xfa/src/fee/src/fee/fde_txtedtpage.cpp b/xfa/src/fee/src/fee/fde_txtedtpage.cpp
index 40d0155..14e7a94 100644
--- a/xfa/src/fee/src/fee/fde_txtedtpage.cpp
+++ b/xfa/src/fee/src/fee/fde_txtedtpage.cpp
@@ -290,7 +290,7 @@
 }
 int32_t CFDE_TxtEdtPage::GetDisplayPos(const CFX_RectF& rtClip,
                                        FXTEXT_CHARPOS*& pCharPos,
-                                       FX_LPRECTF pBBox) const {
+                                       CFX_RectF* pBBox) const {
   pCharPos = FX_Alloc(FXTEXT_CHARPOS, m_nCharCount);
   int32_t nCharPosCount = 0;
   FDE_HVISUALOBJ hVisualObj = NULL;
@@ -376,10 +376,11 @@
   pIter->Release();
   return nRet;
 }
-FX_BOOL CFDE_TxtEdtPage::IsLoaded(FX_LPCRECTF pClipBox) {
+FX_BOOL CFDE_TxtEdtPage::IsLoaded(const CFX_RectF* pClipBox) {
   return m_bLoaded;
 }
-int32_t CFDE_TxtEdtPage::LoadPage(FX_LPCRECTF pClipBox, IFX_Pause* pPause) {
+int32_t CFDE_TxtEdtPage::LoadPage(const CFX_RectF* pClipBox,
+                                  IFX_Pause* pPause) {
   if (m_nRefCount > 0) {
     m_nRefCount++;
     return m_nRefCount;
@@ -558,7 +559,7 @@
   m_bLoaded = TRUE;
   return 0;
 }
-void CFDE_TxtEdtPage::UnloadPage(FX_LPCRECTF pClipBox) {
+void CFDE_TxtEdtPage::UnloadPage(const CFX_RectF* pClipBox) {
   FXSYS_assert(m_nRefCount > 0);
   m_nRefCount--;
   if (m_nRefCount == 0) {
diff --git a/xfa/src/fee/src/fee/fde_txtedtpage.h b/xfa/src/fee/src/fee/fde_txtedtpage.h
index cc7ff24..9b67b6f 100644
--- a/xfa/src/fee/src/fee/fde_txtedtpage.h
+++ b/xfa/src/fee/src/fee/fde_txtedtpage.h
@@ -99,42 +99,45 @@
  public:
   CFDE_TxtEdtPage(IFDE_TxtEdtEngine* pEngine, int32_t nLineIndex);
 
-  virtual void Release();
-  virtual IFDE_TxtEdtEngine* GetEngine() const;
+  // IFDE_TxtEditPage:
+  void Release() override;
+  IFDE_TxtEdtEngine* GetEngine() const override;
+  int32_t GetCharRect(int32_t nIndex,
+                      CFX_RectF& rect,
+                      FX_BOOL bBBox = FALSE) const override;
+  int32_t GetCharIndex(const CFX_PointF& fPoint, FX_BOOL& bBefore) override;
+  void CalcRangeRectArray(int32_t nStart,
+                          int32_t nCount,
+                          CFX_RectFArray& RectFArr) const override;
+  int32_t SelectWord(const CFX_PointF& fPoint, int32_t& nCount) override;
+  int32_t GetCharStart() const override;
+  int32_t GetCharCount() const override;
+  int32_t GetDisplayPos(const CFX_RectF& rtClip,
+                        FXTEXT_CHARPOS*& pCharPos,
+                        CFX_RectF* pBBox) const override;
+  FX_BOOL IsLoaded(const CFX_RectF* pClipBox) override;
+  int32_t LoadPage(const CFX_RectF* pClipBox, IFX_Pause* pPause) override;
+  void UnloadPage(const CFX_RectF* pClipBox) override;
+  const CFX_RectF& GetContentsBox() override;
 
-  virtual FDE_VISUALOBJTYPE GetType();
-  virtual FX_BOOL GetBBox(FDE_HVISUALOBJ hVisualObj, CFX_RectF& bbox);
-  virtual FX_BOOL GetMatrix(FDE_HVISUALOBJ hVisualObj, CFX_Matrix& matrix);
-  virtual FX_BOOL GetRect(FDE_HVISUALOBJ hVisualObj, CFX_RectF& rt);
-  virtual FX_BOOL GetClip(FDE_HVISUALOBJ hVisualObj, CFX_RectF& rt);
-  virtual int32_t GetCharRect(int32_t nIndex,
-                              CFX_RectF& rect,
-                              FX_BOOL bBBox = FALSE) const;
-  virtual int32_t GetCharIndex(const CFX_PointF& fPoint, FX_BOOL& bBefore);
-  virtual int32_t SelectWord(const CFX_PointF& fPoint, int32_t& nCount);
-  virtual int32_t GetCharStart() const;
-  virtual int32_t GetCharCount() const;
-  virtual void CalcRangeRectArray(int32_t nStart,
-                                  int32_t nCount,
-                                  CFX_RectFArray& RectFArr) const;
-  virtual int32_t GetDisplayPos(const CFX_RectF& rtClip,
-                                FXTEXT_CHARPOS*& pCharPos,
-                                FX_LPRECTF pBBox) const;
+  // IFDE_VisualSet:
+  FDE_VISUALOBJTYPE GetType() override;
+  FX_BOOL GetBBox(FDE_HVISUALOBJ hVisualObj, CFX_RectF& bbox) override;
+  FX_BOOL GetMatrix(FDE_HVISUALOBJ hVisualObj, CFX_Matrix& matrix) override;
+  FX_BOOL GetRect(FDE_HVISUALOBJ hVisualObj, CFX_RectF& rt) override;
+  FX_BOOL GetClip(FDE_HVISUALOBJ hVisualObj, CFX_RectF& rt) override;
 
-  virtual FX_BOOL IsLoaded(FX_LPCRECTF pClipBox = NULL);
-  virtual int32_t LoadPage(FX_LPCRECTF pClipBox = NULL,
-                           IFX_Pause* pPause = NULL);
-  virtual void UnloadPage(FX_LPCRECTF pClipBox = NULL);
+  // IFDE_CanvasSet:
+  FX_POSITION GetFirstPosition(FDE_HVISUALOBJ hCanvas) override;
+  FDE_HVISUALOBJ GetNext(FDE_HVISUALOBJ hCanvas,
+                         FX_POSITION& pos,
+                         IFDE_VisualSet*& pVisualSet) override;
+  FDE_HVISUALOBJ GetParentCanvas(FDE_HVISUALOBJ hCanvas,
+                                 IFDE_VisualSet*& pVisualSet) override;
 
-  virtual const CFX_RectF& GetContentsBox();
-  virtual FX_POSITION GetFirstPosition(FDE_HVISUALOBJ hCanvas);
-  virtual FDE_HVISUALOBJ GetNext(FDE_HVISUALOBJ hCanvas,
-                                 FX_POSITION& pos,
-                                 IFDE_VisualSet*& pVisualSet);
-  virtual FDE_HVISUALOBJ GetParentCanvas(FDE_HVISUALOBJ hCanvas,
-                                         IFDE_VisualSet*& pVisualSet);
-  virtual FX_WCHAR GetChar(void* pIdentity, int32_t index) const;
-  virtual int32_t GetWidth(void* pIdentity, int32_t index) const;
+  // IFX_TxtAccess:
+  FX_WCHAR GetChar(void* pIdentity, int32_t index) const override;
+  int32_t GetWidth(void* pIdentity, int32_t index) const override;
 
  protected:
   virtual ~CFDE_TxtEdtPage();
@@ -143,13 +146,13 @@
   void NormalizePt2Rect(CFX_PointF& ptF,
                         const CFX_RectF& rtF,
                         FX_FLOAT fTolerance) const;
+
   IFX_CharIter* m_pIter;
   CFDE_TxtEdtTextSet* m_pTextSet;
   CFDE_TxtEdtEngine* m_pEditEngine;
   CFDE_TXTEDTPieceMassArray m_PieceMassArr;
   CFDE_TxtEdtParag* m_pBgnParag;
   CFDE_TxtEdtParag* m_pEndParag;
-
   int32_t m_nRefCount;
   int32_t m_nPageStart;
   int32_t m_nCharCount;
diff --git a/xfa/src/fgas/include/fx_rbk.h b/xfa/src/fgas/include/fx_rbk.h
index 043361b..ef76ab6 100644
--- a/xfa/src/fgas/include/fx_rbk.h
+++ b/xfa/src/fgas/include/fx_rbk.h
@@ -89,7 +89,7 @@
   FX_DWORD dwLayoutStyles;
   int32_t iCharRotation;
   int32_t iBidiLevel;
-  FX_LPCRECTF pRect;
+  const CFX_RectF* pRect;
   FX_WCHAR wLineBreakChar;
   int32_t iHorizontalScale;
   int32_t iVerticalScale;
diff --git a/xfa/src/fgas/include/fx_tbk.h b/xfa/src/fgas/include/fx_tbk.h
index 0732288..aa207a5 100644
--- a/xfa/src/fgas/include/fx_tbk.h
+++ b/xfa/src/fgas/include/fx_tbk.h
@@ -109,7 +109,7 @@
   int32_t iVerticalScale;
   int32_t iCharRotation;
   FX_DWORD dwCharStyles;
-  FX_LPCRECTF pRect;
+  const CFX_RectF* pRect;
   FX_WCHAR wLineBreakChar;
   FX_BOOL bSkipSpace;
 };
diff --git a/xfa/src/fgas/src/font/fx_gefont.cpp b/xfa/src/fgas/src/font/fx_gefont.cpp
index 37066a2..468e28e 100644
--- a/xfa/src/fgas/src/font/fx_gefont.cpp
+++ b/xfa/src/fgas/src/font/fx_gefont.cpp
@@ -447,10 +447,10 @@
       }
     }
   }
-  if (pRect == NULL) {
+  if (!pRect)
     return FALSE;
-  }
-  bbox = *(FX_LPCRECT)pRect;
+
+  bbox = *static_cast<const CFX_Rect*>(pRect);
   return TRUE;
 }
 FX_BOOL CFX_GEFont::GetBBox(CFX_Rect& bbox) {
diff --git a/xfa/src/fwl/src/basewidget/fwl_editimp.cpp b/xfa/src/fwl/src/basewidget/fwl_editimp.cpp
index 4cbf92b..74c7ef2 100644
--- a/xfa/src/fwl/src/basewidget/fwl_editimp.cpp
+++ b/xfa/src/fwl/src/basewidget/fwl_editimp.cpp
@@ -866,7 +866,7 @@
   IFDE_TxtEdtPage* pPage = pEdtEngine->GetPage(nPageIndex);
   if (!pPage)
     return FALSE;
-  pPage->LoadPage();
+  pPage->LoadPage(nullptr, nullptr);
   return TRUE;
 }
 FX_BOOL CFWL_EditImp::On_PageUnload(IFDE_TxtEdtEngine* pEdit,
@@ -876,7 +876,7 @@
   IFDE_TxtEdtPage* pPage = pEdtEngine->GetPage(nPageIndex);
   if (!pPage)
     return FALSE;
-  pPage->UnloadPage();
+  pPage->UnloadPage(nullptr);
   return TRUE;
 }
 
@@ -1186,23 +1186,23 @@
   params.pEventSink = this;
   m_pEdtEngine->SetEditParams(params);
 }
+
 void CFWL_EditImp::UpdateEditLayout() {
-  if (m_pEdtEngine->GetTextLength() <= 0) {
-    m_pEdtEngine->SetTextByStream(NULL);
-  }
+  if (m_pEdtEngine->GetTextLength() <= 0)
+    m_pEdtEngine->SetTextByStream(nullptr);
+
   IFDE_TxtEdtPage* pPage = m_pEdtEngine->GetPage(0);
-  if (pPage) {
-    pPage->UnloadPage();
-    pPage = NULL;
-  }
+  if (pPage)
+    pPage->UnloadPage(nullptr);
+
   m_pEdtEngine->StartLayout();
-  m_pEdtEngine->DoLayout(NULL);
+  m_pEdtEngine->DoLayout(nullptr);
   m_pEdtEngine->EndLayout();
   pPage = m_pEdtEngine->GetPage(0);
-  if (pPage) {
-    pPage->LoadPage();
-  }
+  if (pPage)
+    pPage->LoadPage(nullptr, nullptr);
 }
+
 FX_BOOL CFWL_EditImp::UpdateOffset() {
   CFX_RectF rtCaret;
   m_pEdtEngine->GetCaretRect(rtCaret);