Remove more default arg = nullptr cases.

Bring in line with standards.
Remove argument entirely for mac code that is always nullptr.

Change-Id: I0710bdbd51fc0bc2e1d428ef44976be39a631147
Reviewed-on: https://pdfium-review.googlesource.com/40091
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
diff --git a/core/fpdfapi/page/cpdf_streamcontentparser.cpp b/core/fpdfapi/page/cpdf_streamcontentparser.cpp
index 860f6d6..d0be6b3 100644
--- a/core/fpdfapi/page/cpdf_streamcontentparser.cpp
+++ b/core/fpdfapi/page/cpdf_streamcontentparser.cpp
@@ -1201,14 +1201,14 @@
       }
       return CPDF_ColorSpace::GetStockCS(PDFCS_DEVICECMYK);
     }
-    return m_pDocument->LoadColorSpace(pDefObj);
+    return m_pDocument->LoadColorSpace(pDefObj, nullptr);
   }
   const CPDF_Object* pCSObj = FindResourceObj("ColorSpace", name);
   if (!pCSObj) {
     m_bResourceMissing = true;
     return nullptr;
   }
-  return m_pDocument->LoadColorSpace(pCSObj);
+  return m_pDocument->LoadColorSpace(pCSObj, nullptr);
 }
 
 CPDF_Pattern* CPDF_StreamContentParser::FindPattern(const ByteString& name,
diff --git a/core/fpdfapi/page/cpdf_streamparser.cpp b/core/fpdfapi/page/cpdf_streamparser.cpp
index 8652490..4b27cb3 100644
--- a/core/fpdfapi/page/cpdf_streamparser.cpp
+++ b/core/fpdfapi/page/cpdf_streamparser.cpp
@@ -141,7 +141,7 @@
   if (pCSObj) {
     uint32_t bpc = pDict->GetIntegerFor("BitsPerComponent");
     uint32_t nComponents = 1;
-    CPDF_ColorSpace* pCS = pDoc->LoadColorSpace(pCSObj);
+    CPDF_ColorSpace* pCS = pDoc->LoadColorSpace(pCSObj, nullptr);
     if (pCS) {
       nComponents = pCS->CountComponents();
       pDoc->GetPageData()->ReleaseColorSpace(pCSObj);
diff --git a/core/fpdfapi/parser/cpdf_document.h b/core/fpdfapi/parser/cpdf_document.h
index 81860a9..8261441 100644
--- a/core/fpdfapi/parser/cpdf_document.h
+++ b/core/fpdfapi/parser/cpdf_document.h
@@ -90,7 +90,7 @@
   // |pFontDict| must not be null.
   CPDF_Font* LoadFont(CPDF_Dictionary* pFontDict);
   CPDF_ColorSpace* LoadColorSpace(const CPDF_Object* pCSObj,
-                                  const CPDF_Dictionary* pResources = nullptr);
+                                  const CPDF_Dictionary* pResources);
 
   CPDF_Pattern* LoadPattern(CPDF_Object* pObj,
                             bool bShading,
diff --git a/core/fpdfapi/render/cpdf_renderstatus.cpp b/core/fpdfapi/render/cpdf_renderstatus.cpp
index 568e350..85e446f 100644
--- a/core/fpdfapi/render/cpdf_renderstatus.cpp
+++ b/core/fpdfapi/render/cpdf_renderstatus.cpp
@@ -2633,7 +2633,7 @@
   if (pGroup)
     pCSObj = pGroup->GetDirectObjectFor(pdfium::transparency::kCS);
   const CPDF_ColorSpace* pCS =
-      m_pContext->GetDocument()->LoadColorSpace(pCSObj);
+      m_pContext->GetDocument()->LoadColorSpace(pCSObj, nullptr);
   if (!pCS)
     return kDefaultColor;
 
diff --git a/core/fxcodec/codec/ccodec_gifmodule.h b/core/fxcodec/codec/ccodec_gifmodule.h
index e7b250f..cbc8fc6 100644
--- a/core/fxcodec/codec/ccodec_gifmodule.h
+++ b/core/fxcodec/codec/ccodec_gifmodule.h
@@ -42,7 +42,7 @@
   ~CCodec_GifModule();
 
   std::unique_ptr<Context> Start(Delegate* pDelegate);
-  uint32_t GetAvailInput(Context* context, uint8_t** avail_buf_ptr = nullptr);
+  uint32_t GetAvailInput(Context* context, uint8_t** avail_buf_ptr);
   void Input(Context* context, const uint8_t* src_buf, uint32_t src_size);
   CFX_GifDecodeStatus ReadHeader(Context* context,
                                  int* width,
diff --git a/core/fxcodec/codec/fx_codec_progress.cpp b/core/fxcodec/codec/fx_codec_progress.cpp
index d1c04b9..8ebb119 100644
--- a/core/fxcodec/codec/fx_codec_progress.cpp
+++ b/core/fxcodec/codec/fx_codec_progress.cpp
@@ -457,7 +457,7 @@
 #ifdef PDF_ENABLE_XFA_GIF
 void CCodec_ProgressiveDecoder::GifRecordCurrentPosition(uint32_t& cur_pos) {
   uint32_t remain_size =
-      m_pCodecMgr->GetGifModule()->GetAvailInput(m_pGifContext.get());
+      m_pCodecMgr->GetGifModule()->GetAvailInput(m_pGifContext.get(), nullptr);
   cur_pos = m_offSet - remain_size;
 }
 
diff --git a/core/fxge/apple/apple_int.h b/core/fxge/apple/apple_int.h
index d579891..e84387a 100644
--- a/core/fxge/apple/apple_int.h
+++ b/core/fxge/apple/apple_int.h
@@ -31,8 +31,7 @@
                           uint16_t* glyphIndices,
                           CGPoint* glyphPositions,
                           int32_t chars,
-                          FX_ARGB argb,
-                          CFX_Matrix* matrix = nullptr);
+                          FX_ARGB argb);
   void saveGraphicsState(void* graphics);
   void restoreGraphicsState(void* graphics);
 };
diff --git a/core/fxge/apple/fx_apple_platform.cpp b/core/fxge/apple/fx_apple_platform.cpp
index 3c1e4d7..cafe447 100644
--- a/core/fxge/apple/fx_apple_platform.cpp
+++ b/core/fxge/apple/fx_apple_platform.cpp
@@ -76,9 +76,9 @@
     new_matrix.d = -new_matrix.d;
   }
   quartz2d.setGraphicsTextMatrix(pContext, &new_matrix);
-  return quartz2d.drawGraphicsString(
-      pContext, pFont->GetPlatformFont(), font_size, glyph_indices.data(),
-      glyph_positions.data(), nChars, argb, nullptr);
+  return quartz2d.drawGraphicsString(pContext, pFont->GetPlatformFont(),
+                                     font_size, glyph_indices.data(),
+                                     glyph_positions.data(), nChars, argb);
 }
 
 }  // namespace
diff --git a/core/fxge/apple/fx_quartz_device.cpp b/core/fxge/apple/fx_quartz_device.cpp
index 709f201..62b9b9e 100644
--- a/core/fxge/apple/fx_quartz_device.cpp
+++ b/core/fxge/apple/fx_quartz_device.cpp
@@ -79,20 +79,14 @@
                                    uint16_t* glyphIndices,
                                    CGPoint* glyphPositions,
                                    int32_t charsCount,
-                                   FX_ARGB argb,
-                                   CFX_Matrix* matrix) {
+                                   FX_ARGB argb) {
   if (!graphics)
     return false;
+
   CGContextRef context = (CGContextRef)graphics;
   CGContextSetFont(context, (CGFontRef)font);
   CGContextSetFontSize(context, fontSize);
-  if (matrix) {
-    CGAffineTransform m = CGContextGetTextMatrix(context);
-    m = CGAffineTransformConcat(
-        m, CGAffineTransformMake(matrix->a, matrix->b, matrix->c, matrix->d,
-                                 matrix->e, matrix->f));
-    CGContextSetTextMatrix(context, m);
-  }
+
   int32_t a;
   int32_t r;
   int32_t g;
diff --git a/fpdfsdk/cpdfsdk_interform.h b/fpdfsdk/cpdfsdk_interform.h
index 14772ef..c44688f 100644
--- a/fpdfsdk/cpdfsdk_interform.h
+++ b/fpdfsdk/cpdfsdk_interform.h
@@ -67,7 +67,7 @@
 
   bool OnKeyStrokeCommit(CPDF_FormField* pFormField, const WideString& csValue);
   bool OnValidate(CPDF_FormField* pFormField, const WideString& csValue);
-  void OnCalculate(CPDF_FormField* pFormField = nullptr);
+  void OnCalculate(CPDF_FormField* pFormField);
   WideString OnFormat(CPDF_FormField* pFormField, bool& bFormatted);
 
   void ResetFieldAppearance(CPDF_FormField* pFormField,
diff --git a/fpdfsdk/fpdf_annot_embeddertest.cpp b/fpdfsdk/fpdf_annot_embeddertest.cpp
index 5fd5d58..767a5c7 100644
--- a/fpdfsdk/fpdf_annot_embeddertest.cpp
+++ b/fpdfsdk/fpdf_annot_embeddertest.cpp
@@ -320,7 +320,7 @@
   // Open the saved document.
   const char md5[] = "dba153419f67b7c0c0e3d22d3e8910d5";
 
-  OpenSavedDocument();
+  OpenSavedDocument(nullptr);
   page = LoadSavedPage(0);
   VerifySavedRendering(page, 612, 792, md5);
 
@@ -762,7 +762,7 @@
   UnloadPage(page);
 
   // Open the saved document.
-  OpenSavedDocument();
+  OpenSavedDocument(nullptr);
   page = LoadSavedPage(0);
   VerifySavedRendering(page, 595, 842, md5_new_annot);
 
@@ -1076,7 +1076,7 @@
 #endif
 
   // Open the saved annotation.
-  OpenSavedDocument();
+  OpenSavedDocument(nullptr);
   page = LoadSavedPage(0);
   VerifySavedRendering(page, 595, 842, md5);
   {
@@ -1198,7 +1198,7 @@
   EXPECT_TRUE(FPDF_SaveAsCopy(document(), this, 0));
   UnloadPage(page);
 
-  OpenSavedDocument();
+  OpenSavedDocument(nullptr);
   page = LoadSavedPage(0);
   {
     ScopedFPDFAnnotation new_annot(FPDFPage_GetAnnot(page, 0));
diff --git a/fpdfsdk/fpdf_edit_embeddertest.cpp b/fpdfsdk/fpdf_edit_embeddertest.cpp
index 3c2b05e..e692a94 100644
--- a/fpdfsdk/fpdf_edit_embeddertest.cpp
+++ b/fpdfsdk/fpdf_edit_embeddertest.cpp
@@ -464,7 +464,7 @@
   UnloadPage(page);
 
   // Re-open the file and check the changes were kept in the saved .pdf.
-  OpenSavedDocument();
+  OpenSavedDocument(nullptr);
   FPDF_PAGE saved_page = LoadSavedPage(0);
   EXPECT_EQ(2, FPDFPage_CountObjects(saved_page));
   {
@@ -732,7 +732,7 @@
   UnloadPage(page);
 
   // Re-open the file and check the prime marks are not there anymore.
-  OpenSavedDocument();
+  OpenSavedDocument(nullptr);
   FPDF_PAGE saved_page = LoadSavedPage(0);
 
   CheckMarkCounts(saved_page, 1, kExpectedObjectCount, 0, 4, 9, 1);
@@ -784,7 +784,7 @@
   UnloadPage(page);
 
   // Re-open the file and check the "Factor" parameters are still gone.
-  OpenSavedDocument();
+  OpenSavedDocument(nullptr);
   FPDF_PAGE saved_page = LoadSavedPage(0);
 
   size_t square_count = 0;
@@ -839,7 +839,7 @@
 
   UnloadPage(page);
 
-  OpenSavedDocument();
+  OpenSavedDocument(nullptr);
   FPDF_PAGE saved_page = LoadSavedPage(0);
 
   CheckMarkCounts(saved_page, 2, 18, 8, 3, 9, 1);
@@ -870,7 +870,7 @@
 
   UnloadPage(page);
 
-  OpenSavedDocument();
+  OpenSavedDocument(nullptr);
   FPDF_PAGE saved_page = LoadSavedPage(0);
 
   CheckMarkCounts(saved_page, 2, 18, 8, 3, 9, 1);
@@ -901,7 +901,7 @@
   FPDFPageObj_Destroy(page_object);
 
   // Re-open the file and check the page object count is still 1.
-  OpenSavedDocument();
+  OpenSavedDocument(nullptr);
   FPDF_PAGE saved_page = LoadSavedPage(0);
   EXPECT_EQ(1, FPDFPage_CountObjects(saved_page));
   CloseSavedPage(saved_page);
@@ -942,7 +942,7 @@
   FPDFPageObj_Destroy(page_object);
 
   // Re-open the file and check the page object count is still 2.
-  OpenSavedDocument();
+  OpenSavedDocument(nullptr);
   FPDF_PAGE saved_page = LoadSavedPage(0);
 
   EXPECT_EQ(2, FPDFPage_CountObjects(saved_page));
@@ -989,7 +989,7 @@
   FPDFPageObj_Destroy(page_object);
 
   // Re-open the file and check the page object count is still 2.
-  OpenSavedDocument();
+  OpenSavedDocument(nullptr);
   FPDF_PAGE saved_page = LoadSavedPage(0);
 
   EXPECT_EQ(2, FPDFPage_CountObjects(saved_page));
@@ -1104,7 +1104,7 @@
 
   // Re-open the file and check the page object count is still 16, and that
   // content stream 1 was removed.
-  OpenSavedDocument();
+  OpenSavedDocument(nullptr);
   FPDF_PAGE saved_page = LoadSavedPage(0);
 
   // Content stream 0: page objects 0-14.
@@ -1171,7 +1171,7 @@
   UnloadPage(page);
 
   // Re-open the file and check the page object count is still 0.
-  OpenSavedDocument();
+  OpenSavedDocument(nullptr);
   FPDF_PAGE saved_page = LoadSavedPage(0);
 
   EXPECT_EQ(0, FPDFPage_CountObjects(saved_page));
@@ -1235,7 +1235,7 @@
   UnloadPage(page);
 
   // Re-open the file and check the page object count is still 0.
-  OpenSavedDocument();
+  OpenSavedDocument(nullptr);
   FPDF_PAGE saved_page = LoadSavedPage(0);
 
   ASSERT_EQ(1, FPDFPage_CountObjects(saved_page));
@@ -1303,7 +1303,7 @@
   UnloadPage(page);
 
   // Re-open the file and check the page object count is still 0.
-  OpenSavedDocument();
+  OpenSavedDocument(nullptr);
   FPDF_PAGE saved_page = LoadSavedPage(0);
 
   ASSERT_EQ(1, FPDFPage_CountObjects(saved_page));
@@ -1359,7 +1359,7 @@
   UnloadPage(page);
 
   // Re-open the file and check the page object count is still 0.
-  OpenSavedDocument();
+  OpenSavedDocument(nullptr);
   FPDF_PAGE saved_page = LoadSavedPage(0);
 
   EXPECT_EQ(0, FPDFPage_CountObjects(saved_page));
@@ -1394,7 +1394,7 @@
   UnloadPage(page);
 
   // Re-open the file and check the page object count is still 3.
-  OpenSavedDocument();
+  OpenSavedDocument(nullptr);
   FPDF_PAGE saved_page = LoadSavedPage(0);
   EXPECT_EQ(3, FPDFPage_CountObjects(saved_page));
   CloseSavedPage(saved_page);
@@ -1427,7 +1427,7 @@
   UnloadPage(page);
 
   // Re-open the file and check the page object count is still 3.
-  OpenSavedDocument();
+  OpenSavedDocument(nullptr);
   FPDF_PAGE saved_page = LoadSavedPage(0);
   EXPECT_EQ(3, FPDFPage_CountObjects(saved_page));
   CloseSavedPage(saved_page);
@@ -1563,7 +1563,7 @@
   EXPECT_TRUE(FPDF_SaveAsCopy(document(), this, 0));
   UnloadPage(page);
 
-  OpenSavedDocument();
+  OpenSavedDocument(nullptr);
   FPDF_PAGE saved_page = LoadSavedPage(0);
   VerifySavedRendering(saved_page, 612, 792,
                        "ad04e5bd0f471a9a564fb034bd0fb073");
@@ -2359,7 +2359,7 @@
   UnloadPage(page);
 
   // Re-open the file and check the new mark is present.
-  OpenSavedDocument();
+  OpenSavedDocument(nullptr);
   FPDF_PAGE saved_page = LoadSavedPage(0);
 
   CheckMarkCounts(saved_page, 1, kExpectedObjectCount, 8, 4, 9, 2);
@@ -2415,7 +2415,7 @@
   UnloadPage(page);
 
   // Re-open the file and cerify "Position" still maps to "End".
-  OpenSavedDocument();
+  OpenSavedDocument(nullptr);
   FPDF_PAGE saved_page = LoadSavedPage(0);
 
   CheckMarkCounts(saved_page, 1, kExpectedObjectCount, 8, 4, 9, 1);
@@ -2525,7 +2525,7 @@
   FPDF_ClosePage(page);
 
   // Re-open the file and check the changes were kept in the saved .pdf.
-  OpenSavedDocument();
+  OpenSavedDocument(nullptr);
   FPDF_PAGE saved_page = LoadSavedPage(0);
   EXPECT_EQ(1, FPDFPage_CountObjects(saved_page));
 
diff --git a/fpdfsdk/fpdf_editpath_embeddertest.cpp b/fpdfsdk/fpdf_editpath_embeddertest.cpp
index 59e5dbb..dcf3f2c 100644
--- a/fpdfsdk/fpdf_editpath_embeddertest.cpp
+++ b/fpdfsdk/fpdf_editpath_embeddertest.cpp
@@ -31,7 +31,7 @@
   FPDF_ClosePage(page);
   page = nullptr;
 
-  OpenSavedDocument();
+  OpenSavedDocument(nullptr);
   page = LoadSavedPage(0);
   ASSERT(page);
 
diff --git a/fpdfsdk/fpdf_save_embeddertest.cpp b/fpdfsdk/fpdf_save_embeddertest.cpp
index 64a305f..510660e 100644
--- a/fpdfsdk/fpdf_save_embeddertest.cpp
+++ b/fpdfsdk/fpdf_save_embeddertest.cpp
@@ -82,7 +82,7 @@
   EXPECT_EQ(8219u, GetString().length());
 
   // Make sure new document renders the same as the old one.
-  EXPECT_TRUE(OpenSavedDocument());
+  EXPECT_TRUE(OpenSavedDocument(nullptr));
   for (int i = 0; i < kPageCount; ++i) {
     FPDF_PAGE page = LoadSavedPage(i);
     ASSERT_TRUE(page);
diff --git a/fxjs/cfxjse_context.h b/fxjs/cfxjse_context.h
index 5a29942..2e47adb 100644
--- a/fxjs/cfxjse_context.h
+++ b/fxjs/cfxjse_context.h
@@ -37,7 +37,7 @@
   void EnableCompatibleMode();
   bool ExecuteScript(const char* szScript,
                      CFXJSE_Value* lpRetValue,
-                     CFXJSE_Value* lpNewThisObject = nullptr);
+                     CFXJSE_Value* lpNewThisObject);
 
  private:
   CFXJSE_Context(const CFXJSE_Context&) = delete;
diff --git a/fxjs/cfxjse_engine.cpp b/fxjs/cfxjse_engine.cpp
index bf5778b..ef6212e 100644
--- a/fxjs/cfxjse_engine.cpp
+++ b/fxjs/cfxjse_engine.cpp
@@ -514,7 +514,8 @@
       CreateVariablesContext(pScriptNode, pThisObject);
   AutoRestorer<CXFA_Object*> nodeRestorer(&m_pThisObject);
   m_pThisObject = pThisObject;
-  return pVariablesContext->ExecuteScript(btScript.c_str(), hRetValue.get());
+  return pVariablesContext->ExecuteScript(btScript.c_str(), hRetValue.get(),
+                                          nullptr);
 }
 
 bool CFXJSE_Engine::QueryVariableValue(CXFA_Node* pScriptNode,
diff --git a/fxjs/cfxjse_formcalc_context.cpp b/fxjs/cfxjse_formcalc_context.cpp
index a2773b2..0eee3d4 100644
--- a/fxjs/cfxjse_formcalc_context.cpp
+++ b/fxjs/cfxjse_formcalc_context.cpp
@@ -3429,7 +3429,8 @@
 
   auto returnValue = pdfium::MakeUnique<CFXJSE_Value>(pIsolate);
   pNewContext->ExecuteScript(
-      FX_UTF8Encode(wsJavaScriptBuf.AsStringView()).c_str(), returnValue.get());
+      FX_UTF8Encode(wsJavaScriptBuf.AsStringView()).c_str(), returnValue.get(),
+      nullptr);
 
   args.GetReturnValue()->Assign(returnValue.get());
 }
diff --git a/fxjs/cjs_document.cpp b/fxjs/cjs_document.cpp
index b135805..fa9826d 100644
--- a/fxjs/cjs_document.cpp
+++ b/fxjs/cjs_document.cpp
@@ -1199,7 +1199,7 @@
     return CJS_Return(JSMessage::kPermissionError);
   }
 
-  m_pFormFillEnv->GetInterForm()->OnCalculate();
+  m_pFormFillEnv->GetInterForm()->OnCalculate(nullptr);
   return CJS_Return();
 }
 
diff --git a/testing/embedder_test.cpp b/testing/embedder_test.cpp
index e874640..3f953d2 100644
--- a/testing/embedder_test.cpp
+++ b/testing/embedder_test.cpp
@@ -420,7 +420,7 @@
 }
 
 void EmbedderTest::VerifySavedDocument(int width, int height, const char* md5) {
-  OpenSavedDocument();
+  OpenSavedDocument(nullptr);
   FPDF_PAGE page = LoadSavedPage(0);
   VerifySavedRendering(page, width, height, md5);
   CloseSavedPage(page);
diff --git a/testing/embedder_test.h b/testing/embedder_test.h
index b0dada0..ef4fe02 100644
--- a/testing/embedder_test.h
+++ b/testing/embedder_test.h
@@ -192,7 +192,7 @@
                                 unsigned long size);
 
   // See comments in the respective non-Saved versions of these methods.
-  FPDF_DOCUMENT OpenSavedDocument(const char* password = nullptr);
+  FPDF_DOCUMENT OpenSavedDocument(const char* password);
   void CloseSavedDocument();
   FPDF_PAGE LoadSavedPage(int page_number);
   void CloseSavedPage(FPDF_PAGE page);
diff --git a/xfa/fxfa/cxfa_ffwidgethandler.cpp b/xfa/fxfa/cxfa_ffwidgethandler.cpp
index eb9a4ca..212a029 100644
--- a/xfa/fxfa/cxfa_ffwidgethandler.cpp
+++ b/xfa/fxfa/cxfa_ffwidgethandler.cpp
@@ -332,32 +332,32 @@
 CXFA_Node* CXFA_FFWidgetHandler::CreatePushButton(CXFA_Node* pParent,
                                                   CXFA_Node* pBefore) const {
   CXFA_Node* pField = CreateField(XFA_Element::Button, pParent, pBefore);
-  CXFA_Node* pCaption = CreateCopyNode(XFA_Element::Caption, pField);
-  CXFA_Node* pValue = CreateCopyNode(XFA_Element::Value, pCaption);
-  CXFA_Node* pText = CreateCopyNode(XFA_Element::Text, pValue);
+  CXFA_Node* pCaption = CreateCopyNode(XFA_Element::Caption, pField, nullptr);
+  CXFA_Node* pValue = CreateCopyNode(XFA_Element::Value, pCaption, nullptr);
+  CXFA_Node* pText = CreateCopyNode(XFA_Element::Text, pValue, nullptr);
   pText->JSObject()->SetContent(L"Button", L"Button", false, false, true);
 
-  CXFA_Node* pPara = CreateCopyNode(XFA_Element::Para, pCaption);
+  CXFA_Node* pPara = CreateCopyNode(XFA_Element::Para, pCaption, nullptr);
   pPara->JSObject()->SetEnum(XFA_Attribute::VAlign, XFA_AttributeEnum::Middle,
                              false);
   pPara->JSObject()->SetEnum(XFA_Attribute::HAlign, XFA_AttributeEnum::Center,
                              false);
   CreateFontNode(pCaption);
 
-  CXFA_Node* pBorder = CreateCopyNode(XFA_Element::Border, pField);
+  CXFA_Node* pBorder = CreateCopyNode(XFA_Element::Border, pField, nullptr);
   pBorder->JSObject()->SetEnum(XFA_Attribute::Hand, XFA_AttributeEnum::Right,
                                false);
 
-  CXFA_Node* pEdge = CreateCopyNode(XFA_Element::Edge, pBorder);
+  CXFA_Node* pEdge = CreateCopyNode(XFA_Element::Edge, pBorder, nullptr);
   pEdge->JSObject()->SetEnum(XFA_Attribute::Stroke, XFA_AttributeEnum::Raised,
                              false);
 
-  CXFA_Node* pFill = CreateCopyNode(XFA_Element::Fill, pBorder);
-  CXFA_Node* pColor = CreateCopyNode(XFA_Element::Color, pFill);
+  CXFA_Node* pFill = CreateCopyNode(XFA_Element::Fill, pBorder, nullptr);
+  CXFA_Node* pColor = CreateCopyNode(XFA_Element::Color, pFill, nullptr);
   pColor->JSObject()->SetCData(XFA_Attribute::Value, L"212, 208, 200", false,
                                false);
 
-  CXFA_Node* pBind = CreateCopyNode(XFA_Element::Bind, pField);
+  CXFA_Node* pBind = CreateCopyNode(XFA_Element::Bind, pField, nullptr);
   pBind->JSObject()->SetEnum(XFA_Attribute::Match, XFA_AttributeEnum::None,
                              false);
 
@@ -439,7 +439,7 @@
 CXFA_Node* CXFA_FFWidgetHandler::CreatePasswordEdit(CXFA_Node* pParent,
                                                     CXFA_Node* pBefore) const {
   CXFA_Node* pField = CreateField(XFA_Element::PasswordEdit, pParent, pBefore);
-  CXFA_Node* pBind = CreateCopyNode(XFA_Element::Bind, pField);
+  CXFA_Node* pBind = CreateCopyNode(XFA_Element::Bind, pField, nullptr);
   pBind->JSObject()->SetEnum(XFA_Attribute::Match, XFA_AttributeEnum::None,
                              false);
   return pField;
@@ -449,7 +449,8 @@
                                              CXFA_Node* pParent,
                                              CXFA_Node* pBefore) const {
   CXFA_Node* pField = CreateFormItem(XFA_Element::Field, pParent, pBefore);
-  CreateCopyNode(eElement, CreateCopyNode(XFA_Element::Ui, pField));
+  CreateCopyNode(eElement, CreateCopyNode(XFA_Element::Ui, pField, nullptr),
+                 nullptr);
   CreateFontNode(pField);
   return pField;
 }
@@ -468,7 +469,7 @@
                                              CXFA_Node* pBefore) const {
   CXFA_Node* pField = CreateDraw(XFA_Element::Image, pParent, pBefore);
   CreateCopyNode(XFA_Element::ImageEdit,
-                 CreateCopyNode(XFA_Element::Ui, pField));
+                 CreateCopyNode(XFA_Element::Ui, pField, nullptr), nullptr);
   return pField;
 }
 
@@ -481,7 +482,7 @@
                                             CXFA_Node* pBefore) const {
   CXFA_Node* pField = CreateDraw(XFA_Element::Text, pParent, pBefore);
   CreateCopyNode(XFA_Element::TextEdit,
-                 CreateCopyNode(XFA_Element::Ui, pField));
+                 CreateCopyNode(XFA_Element::Ui, pField, nullptr), nullptr);
   CreateFontNode(pField);
   return pField;
 }
@@ -543,7 +544,7 @@
 }
 
 CXFA_Node* CXFA_FFWidgetHandler::CreateFontNode(CXFA_Node* pParent) const {
-  CXFA_Node* pFont = CreateCopyNode(XFA_Element::Font, pParent);
+  CXFA_Node* pFont = CreateCopyNode(XFA_Element::Font, pParent, nullptr);
   pFont->JSObject()->SetCData(XFA_Attribute::Typeface, L"Myriad Pro", false,
                               false);
   return pFont;
@@ -552,7 +553,7 @@
 CXFA_Node* CXFA_FFWidgetHandler::CreateMarginNode(CXFA_Node* pParent,
                                                   uint32_t dwFlags,
                                                   float fInsets[4]) const {
-  CXFA_Node* pMargin = CreateCopyNode(XFA_Element::Margin, pParent);
+  CXFA_Node* pMargin = CreateCopyNode(XFA_Element::Margin, pParent, nullptr);
   if (dwFlags & 0x01)
     pMargin->JSObject()->SetMeasure(XFA_Attribute::LeftInset,
                                     CXFA_Measurement(fInsets[0], XFA_Unit::Pt),
@@ -574,8 +575,8 @@
 
 CXFA_Node* CXFA_FFWidgetHandler::CreateValueNode(XFA_Element eValue,
                                                  CXFA_Node* pParent) const {
-  CXFA_Node* pValue = CreateCopyNode(XFA_Element::Value, pParent);
-  CreateCopyNode(eValue, pValue);
+  CXFA_Node* pValue = CreateCopyNode(XFA_Element::Value, pParent, nullptr);
+  CreateCopyNode(eValue, pValue, nullptr);
   return pValue;
 }
 
diff --git a/xfa/fxfa/cxfa_ffwidgethandler.h b/xfa/fxfa/cxfa_ffwidgethandler.h
index 58e531f..283e6d5 100644
--- a/xfa/fxfa/cxfa_ffwidgethandler.h
+++ b/xfa/fxfa/cxfa_ffwidgethandler.h
@@ -112,7 +112,7 @@
                             CXFA_Node* pBefore) const;
   CXFA_Node* CreateCopyNode(XFA_Element eElement,
                             CXFA_Node* pParent,
-                            CXFA_Node* pBefore = nullptr) const;
+                            CXFA_Node* pBefore) const;
   CXFA_Node* CreateTemplateNode(XFA_Element eElement,
                                 CXFA_Node* pParent,
                                 CXFA_Node* pBefore) const;
diff --git a/xfa/fxfa/parser/cxfa_pattern.cpp b/xfa/fxfa/parser/cxfa_pattern.cpp
index f580925..81391c9 100644
--- a/xfa/fxfa/parser/cxfa_pattern.cpp
+++ b/xfa/fxfa/parser/cxfa_pattern.cpp
@@ -79,7 +79,7 @@
       break;
   }
 
-  CXFA_GEPattern pattern(iHatch, crEnd, crStart);
+  CXFA_GEPattern pattern(iHatch, crEnd, crStart, nullptr);
 
   pGS->SaveGraphState();
   pGS->SetFillColor(CXFA_GEColor(&pattern, 0x0));
diff --git a/xfa/fxgraphics/cxfa_gepattern.h b/xfa/fxgraphics/cxfa_gepattern.h
index 0f4ced2..499d4ff 100644
--- a/xfa/fxgraphics/cxfa_gepattern.h
+++ b/xfa/fxgraphics/cxfa_gepattern.h
@@ -19,7 +19,7 @@
   CXFA_GEPattern(FX_HatchStyle hatchStyle,
                  const FX_ARGB foreArgb,
                  const FX_ARGB backArgb,
-                 CFX_Matrix* matrix = nullptr);
+                 CFX_Matrix* matrix);
 
   virtual ~CXFA_GEPattern();