Kill some optional parameters that are always supplied.

No need to even bring any .cpp files in line with these headers.

Change-Id: I934169d77ae09adc11f02e5ea92b1f8b078c9477
Reviewed-on: https://pdfium-review.googlesource.com/39876
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
diff --git a/core/fpdfapi/page/cpdf_docpagedata.h b/core/fpdfapi/page/cpdf_docpagedata.h
index 41a5cd6..6aa1da5 100644
--- a/core/fpdfapi/page/cpdf_docpagedata.h
+++ b/core/fpdfapi/page/cpdf_docpagedata.h
@@ -31,7 +31,7 @@
   explicit CPDF_DocPageData(CPDF_Document* pPDFDoc);
   ~CPDF_DocPageData();
 
-  void Clear(bool bRelease = false);
+  void Clear(bool bRelease);
   bool IsForceClear() const { return m_bForceClear; }
 
   CPDF_Font* GetFont(CPDF_Dictionary* pFontDict);
diff --git a/core/fpdfapi/page/cpdf_image.h b/core/fpdfapi/page/cpdf_image.h
index be5883b..e6c6d18 100644
--- a/core/fpdfapi/page/cpdf_image.h
+++ b/core/fpdfapi/page/cpdf_image.h
@@ -52,9 +52,9 @@
   // Returns whether to Continue() or not.
   bool StartLoadDIBSource(const CPDF_Dictionary* pFormResource,
                           CPDF_Dictionary* pPageResource,
-                          bool bStdCS = false,
-                          uint32_t GroupFamily = 0,
-                          bool bLoadMask = false);
+                          bool bStdCS,
+                          uint32_t GroupFamily,
+                          bool bLoadMask);
 
   // Returns whether to Continue() or not.
   bool Continue(PauseIndicatorIface* pPause);
diff --git a/core/fpdfapi/parser/cpdf_data_avail.h b/core/fpdfapi/parser/cpdf_data_avail.h
index 24f59fe..100e2ae 100644
--- a/core/fpdfapi/parser/cpdf_data_avail.h
+++ b/core/fpdfapi/parser/cpdf_data_avail.h
@@ -141,7 +141,7 @@
   std::unique_ptr<CPDF_Object> ParseIndirectObjectAt(
       FX_FILESIZE pos,
       uint32_t objnum,
-      CPDF_IndirectObjectHolder* pObjList = nullptr) const;
+      CPDF_IndirectObjectHolder* pObjList) const;
   std::unique_ptr<CPDF_Object> GetObject(uint32_t objnum,
                                          bool* pExistInFile);
   bool GetPageKids(CPDF_Object* pPages);
diff --git a/core/fpdfdoc/cpdf_formcontrol.h b/core/fpdfdoc/cpdf_formcontrol.h
index 6485af0..d4bcd7b 100644
--- a/core/fpdfdoc/cpdf_formcontrol.h
+++ b/core/fpdfdoc/cpdf_formcontrol.h
@@ -54,7 +54,7 @@
                    CFX_Matrix* pMatrix,
                    CPDF_Page* pPage,
                    CPDF_Annot::AppearanceMode mode,
-                   const CPDF_RenderOptions* pOptions = nullptr);
+                   const CPDF_RenderOptions* pOptions);
 
   ByteString GetCheckedAPState();
   WideString GetExportValue() const;
diff --git a/core/fpdfdoc/cpdf_formfield.h b/core/fpdfdoc/cpdf_formfield.h
index 0b570ef..b6a4ed8 100644
--- a/core/fpdfdoc/cpdf_formfield.h
+++ b/core/fpdfdoc/cpdf_formfield.h
@@ -114,7 +114,7 @@
   CPDF_Dictionary* GetFieldDict() const { return m_pDict.Get(); }
   void SetFieldDict(CPDF_Dictionary* pDict) { m_pDict = pDict; }
 
-  bool ResetField(bool bNotify = false);
+  bool ResetField(bool bNotify);
 
   int CountControls() const {
     return pdfium::CollectionSize<int>(m_ControlList);
@@ -165,7 +165,7 @@
   int GetSelectedOptionIndex(int index) const;
   bool IsOptionSelected(int iOptIndex) const;
   bool SelectOption(int iOptIndex, bool bSelected, bool bNotify = false);
-  bool ClearSelectedOptions(bool bNotify = false);
+  bool ClearSelectedOptions(bool bNotify);
 
   float GetFontSize() const { return m_FontSize; }
   CPDF_Font* GetFont() const { return m_pFont.Get(); }
diff --git a/core/fxcrt/fx_extension.h b/core/fxcrt/fx_extension.h
index 6a49ee1..d1ea795 100644
--- a/core/fxcrt/fx_extension.h
+++ b/core/fxcrt/fx_extension.h
@@ -27,9 +27,7 @@
 #define FX_IsOdd(a) ((a)&1)
 #endif  // PDF_ENABLE_XFA
 
-float FXSYS_wcstof(const wchar_t* pwsStr,
-                   int32_t iLength = -1,
-                   int32_t* pUsedLen = nullptr);
+float FXSYS_wcstof(const wchar_t* pwsStr, int32_t iLength, int32_t* pUsedLen);
 wchar_t* FXSYS_wcsncpy(wchar_t* dstStr, const wchar_t* srcStr, size_t count);
 int32_t FXSYS_wcsnicmp(const wchar_t* s1, const wchar_t* s2, size_t count);
 
diff --git a/fpdfsdk/pwl/cpwl_font_map.h b/fpdfsdk/pwl/cpwl_font_map.h
index c465a0f..159bd7f 100644
--- a/fpdfsdk/pwl/cpwl_font_map.h
+++ b/fpdfsdk/pwl/cpwl_font_map.h
@@ -61,7 +61,7 @@
                        bool bFind);
   int32_t AddFontData(CPDF_Font* pFont,
                       const ByteString& sFontAlias,
-                      int32_t nCharset = FX_CHARSET_Default);
+                      int32_t nCharset);
 
   ByteString EncodeFontAlias(const ByteString& sFontName, int32_t nCharset);
   ByteString EncodeFontAlias(const ByteString& sFontName);
@@ -70,9 +70,7 @@
   std::vector<std::unique_ptr<CPWL_FontMap_Native>> m_NativeFont;
 
  private:
-  int32_t FindFont(const ByteString& sFontName,
-                   int32_t nCharset = FX_CHARSET_Default);
-
+  int32_t FindFont(const ByteString& sFontName, int32_t nCharset);
   ByteString GetNativeFont(int32_t nCharset);
   CPDF_Font* AddFontToDocument(CPDF_Document* pDoc,
                                ByteString& sFontName,
diff --git a/fpdfsdk/pwl/cpwl_scroll_bar.h b/fpdfsdk/pwl/cpwl_scroll_bar.h
index 6921732..1437597 100644
--- a/fpdfsdk/pwl/cpwl_scroll_bar.h
+++ b/fpdfsdk/pwl/cpwl_scroll_bar.h
@@ -117,7 +117,7 @@
 
 class CPWL_ScrollBar : public CPWL_Wnd {
  public:
-  explicit CPWL_ScrollBar(PWL_SCROLLBAR_TYPE sbType = SBT_HSCROLL);
+  explicit CPWL_ScrollBar(PWL_SCROLLBAR_TYPE sbType);
   ~CPWL_ScrollBar() override;
 
   // CPWL_Wnd:
diff --git a/fpdfsdk/pwl/cpwl_wnd.h b/fpdfsdk/pwl/cpwl_wnd.h
index a24635f..cb6e8cf 100644
--- a/fpdfsdk/pwl/cpwl_wnd.h
+++ b/fpdfsdk/pwl/cpwl_wnd.h
@@ -275,7 +275,6 @@
   virtual void OnCreated();
   virtual void OnDestroy();
 
-  void SetNotifyFlag(bool bNotifying = true) { m_bNotifying = bNotifying; }
   bool IsNotifying() const { return m_bNotifying; }
   bool IsValid() const { return m_bCreated; }
   const CreateParams& GetCreationParams() const { return m_CreationParams; }
diff --git a/xfa/fgas/font/cfgas_fontmgr.h b/xfa/fgas/font/cfgas_fontmgr.h
index 5a1e9ba..72578be 100644
--- a/xfa/fgas/font/cfgas_fontmgr.h
+++ b/xfa/fgas/font/cfgas_fontmgr.h
@@ -165,12 +165,12 @@
                   uint16_t wCodePage,
                   uint32_t dwFontStyles,
                   const WideString& FontName,
-                  wchar_t wcUnicode = 0xFFFE);
+                  wchar_t wcUnicode);
   int32_t CalcPenalty(CFX_FontDescriptor* pInstalled,
                       uint16_t wCodePage,
                       uint32_t dwFontStyles,
                       const WideString& FontName,
-                      wchar_t wcUnicode = 0xFFFE);
+                      wchar_t wcUnicode);
   RetainPtr<CFGAS_GEFont> LoadFont(const WideString& wsFaceName,
                                    int32_t iFaceIndex,
                                    int32_t* pFaceCount);
diff --git a/xfa/fwl/theme/cfwl_carettp.h b/xfa/fwl/theme/cfwl_carettp.h
index 8b88fee..64bf51b 100644
--- a/xfa/fwl/theme/cfwl_carettp.h
+++ b/xfa/fwl/theme/cfwl_carettp.h
@@ -22,7 +22,7 @@
                    uint32_t dwStates,
                    const CFX_RectF* pRect,
                    CXFA_GEColor* crFill,
-                   CFX_Matrix* pMatrix = nullptr);
+                   CFX_Matrix* pMatrix);
 };
 
 #endif  // XFA_FWL_THEME_CFWL_CARETTP_H_
diff --git a/xfa/fwl/theme/cfwl_listboxtp.h b/xfa/fwl/theme/cfwl_listboxtp.h
index 5dc45af..cc4691c 100644
--- a/xfa/fwl/theme/cfwl_listboxtp.h
+++ b/xfa/fwl/theme/cfwl_listboxtp.h
@@ -21,8 +21,8 @@
   void DrawListBoxItem(CXFA_Graphics* pGraphics,
                        uint32_t dwStates,
                        const CFX_RectF* prtItem,
-                       void* pData = nullptr,
-                       CFX_Matrix* pMatrix = nullptr);
+                       void* pData,
+                       CFX_Matrix* pMatrix);
 };
 
 #endif  // XFA_FWL_THEME_CFWL_LISTBOXTP_H_
diff --git a/xfa/fwl/theme/cfwl_scrollbartp.h b/xfa/fwl/theme/cfwl_scrollbartp.h
index bae4e19..8398706 100644
--- a/xfa/fwl/theme/cfwl_scrollbartp.h
+++ b/xfa/fwl/theme/cfwl_scrollbartp.h
@@ -33,24 +33,24 @@
                     const CFX_RectF* pRect,
                     bool bVert,
                     FWLTHEME_STATE eState,
-                    bool bPawButton = true,
-                    CFX_Matrix* pMatrix = nullptr);
+                    bool bPawButton,
+                    CFX_Matrix* pMatrix);
   void DrawTrack(CXFA_Graphics* pGraphics,
                  const CFX_RectF* pRect,
                  bool bVert,
                  FWLTHEME_STATE eState,
                  bool bLowerTrack,
-                 CFX_Matrix* pMatrix = nullptr);
+                 CFX_Matrix* pMatrix);
   void DrawMaxMinBtn(CXFA_Graphics* pGraphics,
                      const CFX_RectF* pRect,
                      FWLTHEME_DIRECTION eDict,
                      FWLTHEME_STATE eState,
-                     CFX_Matrix* pMatrix = nullptr);
+                     CFX_Matrix* pMatrix);
   void DrawPaw(CXFA_Graphics* pGraphics,
                const CFX_RectF* pRect,
                bool bVert,
                FWLTHEME_STATE eState,
-               CFX_Matrix* pMatrix = nullptr);
+               CFX_Matrix* pMatrix);
 
   std::unique_ptr<SBThemeData> m_pThemeData;
 
diff --git a/xfa/fwl/theme/cfwl_widgettp.h b/xfa/fwl/theme/cfwl_widgettp.h
index f62098d..0facb1e 100644
--- a/xfa/fwl/theme/cfwl_widgettp.h
+++ b/xfa/fwl/theme/cfwl_widgettp.h
@@ -56,31 +56,31 @@
 
   void DrawBorder(CXFA_Graphics* pGraphics,
                   const CFX_RectF* pRect,
-                  CFX_Matrix* pMatrix = nullptr);
+                  CFX_Matrix* pMatrix);
   void FillBackground(CXFA_Graphics* pGraphics,
                       const CFX_RectF* pRect,
-                      CFX_Matrix* pMatrix = nullptr);
+                      CFX_Matrix* pMatrix);
   void FillSolidRect(CXFA_Graphics* pGraphics,
                      FX_ARGB fillColor,
                      const CFX_RectF* pRect,
-                     CFX_Matrix* pMatrix = nullptr);
+                     CFX_Matrix* pMatrix);
   void DrawFocus(CXFA_Graphics* pGraphics,
                  const CFX_RectF* pRect,
-                 CFX_Matrix* pMatrix = nullptr);
+                 CFX_Matrix* pMatrix);
   void DrawArrow(CXFA_Graphics* pGraphics,
                  const CFX_RectF* pRect,
                  FWLTHEME_DIRECTION eDict,
                  FX_ARGB argSign,
-                 CFX_Matrix* pMatrix = nullptr);
+                 CFX_Matrix* pMatrix);
   void DrawBtn(CXFA_Graphics* pGraphics,
                const CFX_RectF* pRect,
                FWLTHEME_STATE eState,
-               CFX_Matrix* pMatrix = nullptr);
+               CFX_Matrix* pMatrix);
   void DrawArrowBtn(CXFA_Graphics* pGraphics,
                     const CFX_RectF* pRect,
                     FWLTHEME_DIRECTION eDict,
                     FWLTHEME_STATE eState,
-                    CFX_Matrix* pMatrix = nullptr);
+                    CFX_Matrix* pMatrix);
 
   uint32_t m_dwRefCount;
   std::unique_ptr<CFDE_TextOut> m_pTextOut;
diff --git a/xfa/fxfa/cxfa_ffwidgethandler.h b/xfa/fxfa/cxfa_ffwidgethandler.h
index f2b6ae0..58e531f 100644
--- a/xfa/fxfa/cxfa_ffwidgethandler.h
+++ b/xfa/fxfa/cxfa_ffwidgethandler.h
@@ -25,7 +25,7 @@
 
   CXFA_FFWidget* CreateWidget(CXFA_FFWidget* hParent,
                               XFA_WIDGETTYPE eType,
-                              CXFA_FFWidget* hBefore = nullptr);
+                              CXFA_FFWidget* hBefore);
 
   bool OnMouseEnter(CXFA_FFWidget* hWidget);
   bool OnMouseExit(CXFA_FFWidget* hWidget);
diff --git a/xfa/fxfa/fxfa.h b/xfa/fxfa/fxfa.h
index 6de20f0..254d99f 100644
--- a/xfa/fxfa/fxfa.h
+++ b/xfa/fxfa/fxfa.h
@@ -158,9 +158,9 @@
    * user, refer to XFA_ID.
    */
   virtual int32_t MsgBox(const WideString& wsMessage,
-                         const WideString& wsTitle = L"",
-                         uint32_t dwIconType = 0,
-                         uint32_t dwButtonType = 0) = 0;
+                         const WideString& wsTitle,
+                         uint32_t dwIconType,
+                         uint32_t dwButtonType) = 0;
 
   /**
    * Get a response from the user.
@@ -171,9 +171,9 @@
    * @return A string containing the user's response.
    */
   virtual WideString Response(const WideString& wsQuestion,
-                              const WideString& wsTitle = L"",
-                              const WideString& wsDefaultAnswer = L"",
-                              bool bMask = true) = 0;
+                              const WideString& wsTitle,
+                              const WideString& wsDefaultAnswer,
+                              bool bMask) = 0;
 
   /**
    * Download something from somewhere.
diff --git a/xfa/fxfa/parser/cxfa_layoutpagemgr.h b/xfa/fxfa/parser/cxfa_layoutpagemgr.h
index 42fa4e6..7c9055d 100644
--- a/xfa/fxfa/parser/cxfa_layoutpagemgr.h
+++ b/xfa/fxfa/parser/cxfa_layoutpagemgr.h
@@ -45,8 +45,8 @@
   bool ProcessOverflow(CXFA_Node* pFormNode,
                        CXFA_Node*& pLeaderNode,
                        CXFA_Node*& pTrailerNode,
-                       bool bDataMerge = false,
-                       bool bCreatePage = true);
+                       bool bDataMerge,
+                       bool bCreatePage);
   CXFA_Node* QueryOverflow(CXFA_Node* pFormNode);
   bool ProcessBookendLeaderOrTrailer(CXFA_Node* pBookendNode,
                                      bool bLeader,
@@ -78,7 +78,7 @@
   CXFA_Node* BreakOverflow(CXFA_Node* pOverflowNode,
                            CXFA_Node*& pLeaderTemplate,
                            CXFA_Node*& pTrailerTemplate,
-                           bool bCreatePage = true);
+                           bool bCreatePage);
   bool ResolveBookendLeaderOrTrailer(CXFA_Node* pBookendNode,
                                      bool bLeader,
                                      CXFA_Node*& pBookendAppendTemplate);
@@ -94,16 +94,16 @@
   void CreateNextMinRecord(CXFA_Node* pRecordNode);
   bool FindPageAreaFromPageSet(CXFA_Node* pPageSet,
                                CXFA_Node* pStartChild,
-                               CXFA_Node* pTargetPageArea = nullptr,
-                               CXFA_Node* pTargetContentArea = nullptr,
-                               bool bNewPage = false,
-                               bool bQuery = false);
+                               CXFA_Node* pTargetPageArea,
+                               CXFA_Node* pTargetContentArea,
+                               bool bNewPage,
+                               bool bQuery);
   bool FindPageAreaFromPageSet_Ordered(CXFA_Node* pPageSet,
                                        CXFA_Node* pStartChild,
-                                       CXFA_Node* pTargetPageArea = nullptr,
-                                       CXFA_Node* pTargetContentArea = nullptr,
-                                       bool bNewPage = false,
-                                       bool bQuery = false);
+                                       CXFA_Node* pTargetPageArea,
+                                       CXFA_Node* pTargetContentArea,
+                                       bool bNewPage,
+                                       bool bQuery);
   bool FindPageAreaFromPageSet_SimplexDuplex(
       CXFA_Node* pPageSet,
       CXFA_Node* pStartChild,
diff --git a/xfa/fxfa/parser/cxfa_nodehelper.h b/xfa/fxfa/parser/cxfa_nodehelper.h
index b53e1f4..49e537c 100644
--- a/xfa/fxfa/parser/cxfa_nodehelper.h
+++ b/xfa/fxfa/parser/cxfa_nodehelper.h
@@ -25,7 +25,7 @@
 
   CXFA_Node* ResolveNodes_GetOneChild(CXFA_Node* parent,
                                       const wchar_t* pwsName,
-                                      bool bIsClassName = false);
+                                      bool bIsClassName);
   CXFA_Node* ResolveNodes_GetParent(
       CXFA_Node* pNode,
       XFA_LOGIC_TYPE eLogicType = XFA_LOGIC_NoTransparent);
@@ -39,15 +39,15 @@
   int32_t NodeAcc_TraverseAnySiblings(CXFA_Node* parent,
                                       uint32_t dNameHash,
                                       std::vector<CXFA_Node*>* pSiblings,
-                                      bool bIsClassName = false);
+                                      bool bIsClassName);
   int32_t CountSiblings(CXFA_Node* pNode,
                         XFA_LOGIC_TYPE eLogicType,
                         std::vector<CXFA_Node*>* pSiblings,
-                        bool bIsClassName = false);
+                        bool bIsClassName);
   int32_t GetIndex(CXFA_Node* pNode,
-                   XFA_LOGIC_TYPE eLogicType = XFA_LOGIC_NoTransparent,
-                   bool bIsProperty = false,
-                   bool bIsClassIndex = false);
+                   XFA_LOGIC_TYPE eLogicType,
+                   bool bIsProperty,
+                   bool bIsClassIndex);
   WideString GetNameExpression(
       CXFA_Node* refNode,
       bool bIsAllPath,