diff --git a/core/fpdfapi/edit/cpdf_creator.cpp b/core/fpdfapi/edit/cpdf_creator.cpp
index 65ddc45..67a3a1c 100644
--- a/core/fpdfapi/edit/cpdf_creator.cpp
+++ b/core/fpdfapi/edit/cpdf_creator.cpp
@@ -597,26 +597,26 @@
   const CPDF_Array* pOldIDArray = m_pParser ? m_pParser->GetIDArray() : nullptr;
   const CPDF_Object* pID1 = pOldIDArray ? pOldIDArray->GetObjectAt(0) : nullptr;
   if (pID1) {
-    m_pIDArray->Add(pID1->Clone());
+    m_pIDArray->Append(pID1->Clone());
   } else {
     ByteString bsBuffer =
         GenerateFileID((uint32_t)(uintptr_t)this, m_dwLastObjNum);
-    m_pIDArray->AddNew<CPDF_String>(bsBuffer, true);
+    m_pIDArray->AppendNew<CPDF_String>(bsBuffer, true);
   }
 
   if (pOldIDArray) {
     const CPDF_Object* pID2 = pOldIDArray->GetObjectAt(1);
     if (m_IsIncremental && m_pEncryptDict && pID2) {
-      m_pIDArray->Add(pID2->Clone());
+      m_pIDArray->Append(pID2->Clone());
       return;
     }
     ByteString bsBuffer =
         GenerateFileID((uint32_t)(uintptr_t)this, m_dwLastObjNum);
-    m_pIDArray->AddNew<CPDF_String>(bsBuffer, true);
+    m_pIDArray->AppendNew<CPDF_String>(bsBuffer, true);
     return;
   }
 
-  m_pIDArray->Add(m_pIDArray->GetObjectAt(0)->Clone());
+  m_pIDArray->Append(m_pIDArray->GetObjectAt(0)->Clone());
   if (m_pEncryptDict) {
     ASSERT(m_pParser);
     int revision = m_pEncryptDict->GetIntegerFor("R");
diff --git a/core/fpdfapi/edit/cpdf_pagecontentmanager.cpp b/core/fpdfapi/edit/cpdf_pagecontentmanager.cpp
index 35a8acd..3f2a4f7 100644
--- a/core/fpdfapi/edit/cpdf_pagecontentmanager.cpp
+++ b/core/fpdfapi/edit/cpdf_pagecontentmanager.cpp
@@ -67,10 +67,10 @@
   // create an array with the old and the new one. The new one's index is 1.
   if (contents_stream_) {
     CPDF_Array* new_contents_array = doc_->NewIndirect<CPDF_Array>();
-    new_contents_array->AddNew<CPDF_Reference>(doc_.Get(),
-                                               contents_stream_->GetObjNum());
-    new_contents_array->AddNew<CPDF_Reference>(doc_.Get(),
-                                               new_stream->GetObjNum());
+    new_contents_array->AppendNew<CPDF_Reference>(
+        doc_.Get(), contents_stream_->GetObjNum());
+    new_contents_array->AppendNew<CPDF_Reference>(doc_.Get(),
+                                                  new_stream->GetObjNum());
 
     CPDF_Dictionary* page_dict = obj_holder_->GetDict();
     page_dict->SetNewFor<CPDF_Reference>("Contents", doc_.Get(),
@@ -82,8 +82,8 @@
 
   // If there is an array, just add the new stream to it, at the last position.
   if (contents_array_) {
-    contents_array_->AddNew<CPDF_Reference>(doc_.Get(),
-                                            new_stream->GetObjNum());
+    contents_array_->AppendNew<CPDF_Reference>(doc_.Get(),
+                                               new_stream->GetObjNum());
     return contents_array_->size() - 1;
   }
 
diff --git a/core/fpdfapi/font/cpdf_cidfont_unittest.cpp b/core/fpdfapi/font/cpdf_cidfont_unittest.cpp
index 225ea3a..28db96d 100644
--- a/core/fpdfapi/font/cpdf_cidfont_unittest.cpp
+++ b/core/fpdfapi/font/cpdf_cidfont_unittest.cpp
@@ -32,7 +32,7 @@
     {
       auto descendant_font = pdfium::MakeRetain<CPDF_Dictionary>();
       descendant_font->SetNewFor<CPDF_Name>("BaseFont", "CourierStd");
-      descendant_fonts->Add(std::move(descendant_font));
+      descendant_fonts->Append(std::move(descendant_font));
     }
     font_dict->SetFor("DescendantFonts", std::move(descendant_fonts));
   }
diff --git a/core/fpdfapi/font/cpdf_fontencoding.cpp b/core/fpdfapi/font/cpdf_fontencoding.cpp
index a4e687e..8e63e52 100644
--- a/core/fpdfapi/font/cpdf_fontencoding.cpp
+++ b/core/fpdfapi/font/cpdf_fontencoding.cpp
@@ -1715,8 +1715,8 @@
     if (pStandard[i] == m_Unicodes[i])
       continue;
 
-    pDiff->AddNew<CPDF_Number>(static_cast<int>(i));
-    pDiff->AddNew<CPDF_Name>(PDF_AdobeNameFromUnicode(m_Unicodes[i]));
+    pDiff->AppendNew<CPDF_Number>(static_cast<int>(i));
+    pDiff->AppendNew<CPDF_Name>(PDF_AdobeNameFromUnicode(m_Unicodes[i]));
   }
 
   auto pDict = pdfium::MakeRetain<CPDF_Dictionary>(pPool);
diff --git a/core/fpdfapi/page/cpdf_docpagedata.cpp b/core/fpdfapi/page/cpdf_docpagedata.cpp
index 9c8bc92..0306e42 100644
--- a/core/fpdfapi/page/cpdf_docpagedata.cpp
+++ b/core/fpdfapi/page/cpdf_docpagedata.cpp
@@ -49,14 +49,14 @@
   }
   if (i == widths.size()) {
     int first = pWidthArray->GetIntegerAt(pWidthArray->size() - 1);
-    pWidthArray->AddNew<CPDF_Number>(first + static_cast<int>(widths.size()) -
-                                     1);
-    pWidthArray->AddNew<CPDF_Number>(widths[0]);
+    pWidthArray->AppendNew<CPDF_Number>(first +
+                                        static_cast<int>(widths.size()) - 1);
+    pWidthArray->AppendNew<CPDF_Number>(widths[0]);
     return;
   }
-  CPDF_Array* pWidthArray1 = pWidthArray->AddNew<CPDF_Array>();
+  CPDF_Array* pWidthArray1 = pWidthArray->AppendNew<CPDF_Array>();
   for (int w : widths)
-    pWidthArray1->AddNew<CPDF_Number>(w);
+    pWidthArray1->AppendNew<CPDF_Number>(w);
 }
 
 #if defined(OS_WIN)
@@ -473,7 +473,7 @@
     for (int charcode = 32; charcode < 128; charcode++) {
       int glyph_index = pEncoding->GlyphFromCharCode(charcode);
       int char_width = pFont->GetGlyphWidth(glyph_index);
-      pWidths->AddNew<CPDF_Number>(char_width);
+      pWidths->AppendNew<CPDF_Number>(char_width);
     }
     if (charset == FX_CHARSET_ANSI || charset == FX_CHARSET_Default ||
         charset == FX_CHARSET_Symbol) {
@@ -481,7 +481,7 @@
       for (int charcode = 128; charcode <= 255; charcode++) {
         int glyph_index = pEncoding->GlyphFromCharCode(charcode);
         int char_width = pFont->GetGlyphWidth(glyph_index);
-        pWidths->AddNew<CPDF_Number>(char_width);
+        pWidths->AppendNew<CPDF_Number>(char_width);
       }
     } else {
       size_t i = CalculateEncodingDict(charset, pBaseDict);
@@ -490,7 +490,7 @@
         for (int j = 0; j < 128; j++) {
           int glyph_index = pEncoding->GlyphFromCharCode(pUnicodes[j]);
           int char_width = pFont->GetGlyphWidth(glyph_index);
-          pWidths->AddNew<CPDF_Number>(char_width);
+          pWidths->AppendNew<CPDF_Number>(char_width);
         }
       }
     }
@@ -507,10 +507,10 @@
   FX_RECT bbox;
   pFont->GetBBox(&bbox);
   auto pBBox = pdfium::MakeRetain<CPDF_Array>();
-  pBBox->AddNew<CPDF_Number>(bbox.left);
-  pBBox->AddNew<CPDF_Number>(bbox.bottom);
-  pBBox->AddNew<CPDF_Number>(bbox.right);
-  pBBox->AddNew<CPDF_Number>(bbox.top);
+  pBBox->AppendNew<CPDF_Number>(bbox.left);
+  pBBox->AppendNew<CPDF_Number>(bbox.bottom);
+  pBBox->AppendNew<CPDF_Number>(bbox.right);
+  pBBox->AppendNew<CPDF_Number>(bbox.top);
   int32_t nStemV = 0;
   if (pFont->GetSubstFont()) {
     nStemV = pFont->GetSubstFont()->m_Weight / 5;
@@ -590,7 +590,7 @@
     GetCharWidth(hDC, 32, 255, char_widths);
     auto pWidths = pdfium::MakeRetain<CPDF_Array>();
     for (size_t i = 0; i < 224; i++)
-      pWidths->AddNew<CPDF_Number>(char_widths[i]);
+      pWidths->AppendNew<CPDF_Number>(char_widths[i]);
     ProcessNonbCJK(pBaseDict, pLogFont->lfWeight > FW_MEDIUM,
                    pLogFont->lfItalic != 0, basefont, std::move(pWidths));
   } else {
@@ -602,7 +602,7 @@
   }
   auto pBBox = pdfium::MakeRetain<CPDF_Array>();
   for (int i = 0; i < 4; i++)
-    pBBox->AddNew<CPDF_Number>(bbox[i]);
+    pBBox->AppendNew<CPDF_Number>(bbox[i]);
   RetainPtr<CPDF_Dictionary> pFontDesc =
       CalculateFontDesc(GetDocument(), basefont, flags, italicangle, ascend,
                         descend, std::move(pBBox), pLogFont->lfWeight / 5);
@@ -633,12 +633,12 @@
   pEncodingDict->SetNewFor<CPDF_Name>("BaseEncoding", "WinAnsiEncoding");
 
   CPDF_Array* pArray = pEncodingDict->SetNewFor<CPDF_Array>("Differences");
-  pArray->AddNew<CPDF_Number>(128);
+  pArray->AppendNew<CPDF_Number>(128);
 
   const uint16_t* pUnicodes = g_FX_CharsetUnicodes[i].m_pUnicodes;
   for (int j = 0; j < 128; j++) {
     ByteString name = PDF_AdobeNameFromUnicode(pUnicodes[j]);
-    pArray->AddNew<CPDF_Name>(name.IsEmpty() ? ".notdef" : name);
+    pArray->AppendNew<CPDF_Name>(name.IsEmpty() ? ".notdef" : name);
   }
   pBaseDict->SetNewFor<CPDF_Reference>("Encoding", GetDocument(),
                                        pEncodingDict->GetObjNum());
@@ -660,36 +660,36 @@
       cmap = "ETenms-B5-H";
       ordering = "CNS1";
       supplement = 4;
-      pWidthArray->AddNew<CPDF_Number>(1);
+      pWidthArray->AppendNew<CPDF_Number>(1);
       Insert(0x20, 0x7e, pWidthArray);
       break;
     case FX_CHARSET_ChineseSimplified:
       cmap = "GBK-EUC-H";
       ordering = "GB1";
       supplement = 2;
-      pWidthArray->AddNew<CPDF_Number>(7716);
+      pWidthArray->AppendNew<CPDF_Number>(7716);
       Insert(0x20, 0x20, pWidthArray);
-      pWidthArray->AddNew<CPDF_Number>(814);
+      pWidthArray->AppendNew<CPDF_Number>(814);
       Insert(0x21, 0x7e, pWidthArray);
       break;
     case FX_CHARSET_Hangul:
       cmap = "KSCms-UHC-H";
       ordering = "Korea1";
       supplement = 2;
-      pWidthArray->AddNew<CPDF_Number>(1);
+      pWidthArray->AppendNew<CPDF_Number>(1);
       Insert(0x20, 0x7e, pWidthArray);
       break;
     case FX_CHARSET_ShiftJIS:
       cmap = "90ms-RKSJ-H";
       ordering = "Japan1";
       supplement = 5;
-      pWidthArray->AddNew<CPDF_Number>(231);
+      pWidthArray->AppendNew<CPDF_Number>(231);
       Insert(0x20, 0x7d, pWidthArray);
-      pWidthArray->AddNew<CPDF_Number>(326);
+      pWidthArray->AppendNew<CPDF_Number>(326);
       Insert(0xa0, 0xa0, pWidthArray);
-      pWidthArray->AddNew<CPDF_Number>(327);
+      pWidthArray->AppendNew<CPDF_Number>(327);
       Insert(0xa1, 0xdf, pWidthArray);
-      pWidthArray->AddNew<CPDF_Number>(631);
+      pWidthArray->AppendNew<CPDF_Number>(631);
       Insert(0x7e, 0x7e, pWidthArray);
       break;
   }
@@ -707,6 +707,6 @@
   pCIDSysInfo->SetNewFor<CPDF_Number>("Supplement", supplement);
 
   CPDF_Array* pArray = pBaseDict->SetNewFor<CPDF_Array>("DescendantFonts");
-  pArray->AddNew<CPDF_Reference>(GetDocument(), pFontDict->GetObjNum());
+  pArray->AppendNew<CPDF_Reference>(GetDocument(), pFontDict->GetObjNum());
   return pFontDict;
 }
diff --git a/core/fpdfapi/page/cpdf_function_unittest.cpp b/core/fpdfapi/page/cpdf_function_unittest.cpp
index e07ff16..e5d350d 100644
--- a/core/fpdfapi/page/cpdf_function_unittest.cpp
+++ b/core/fpdfapi/page/cpdf_function_unittest.cpp
@@ -37,7 +37,7 @@
   pDict->SetNewFor<CPDF_Number>("FunctionType", 0);
 
   CPDF_Array* pArray = pDict->SetNewFor<CPDF_Array>("Domain");
-  pArray->AddNew<CPDF_Number>(0);
-  pArray->AddNew<CPDF_Number>(10);
+  pArray->AppendNew<CPDF_Number>(0);
+  pArray->AppendNew<CPDF_Number>(10);
   EXPECT_EQ(nullptr, CPDF_Function::Load(pDict.Get()));
 }
diff --git a/core/fpdfapi/page/cpdf_image.cpp b/core/fpdfapi/page/cpdf_image.cpp
index ce46538..68703c4 100644
--- a/core/fpdfapi/page/cpdf_image.cpp
+++ b/core/fpdfapi/page/cpdf_image.cpp
@@ -105,8 +105,8 @@
     csname = "DeviceCMYK";
     CPDF_Array* pDecode = pDict->SetNewFor<CPDF_Array>("Decode");
     for (int n = 0; n < 4; n++) {
-      pDecode->AddNew<CPDF_Number>(1);
-      pDecode->AddNew<CPDF_Number>(0);
+      pDecode->AppendNew<CPDF_Number>(1);
+      pDecode->AppendNew<CPDF_Number>(0);
     }
   }
   pDict->SetNewFor<CPDF_Name>("ColorSpace", csname);
@@ -194,14 +194,14 @@
       pDict->SetNewFor<CPDF_Boolean>("ImageMask", true);
       if (reset_a == 0) {
         CPDF_Array* pArray = pDict->SetNewFor<CPDF_Array>("Decode");
-        pArray->AddNew<CPDF_Number>(1);
-        pArray->AddNew<CPDF_Number>(0);
+        pArray->AppendNew<CPDF_Number>(1);
+        pArray->AppendNew<CPDF_Number>(0);
       }
     } else {
       CPDF_Array* pCS = pDict->SetNewFor<CPDF_Array>("ColorSpace");
-      pCS->AddNew<CPDF_Name>("Indexed");
-      pCS->AddNew<CPDF_Name>("DeviceRGB");
-      pCS->AddNew<CPDF_Number>(1);
+      pCS->AppendNew<CPDF_Name>("Indexed");
+      pCS->AppendNew<CPDF_Name>("DeviceRGB");
+      pCS->AppendNew<CPDF_Number>(1);
       ByteString ct;
       {
         // Span's lifetime must end before ReleaseBuffer() below.
@@ -214,7 +214,7 @@
         pBuf[5] = static_cast<char>(set_b);
       }
       ct.ReleaseBuffer(6);
-      pCS->AddNew<CPDF_String>(ct, true);
+      pCS->AppendNew<CPDF_String>(ct, true);
     }
     pDict->SetNewFor<CPDF_Number>("BitsPerComponent", 1);
     dest_pitch = (BitmapWidth + 7) / 8;
@@ -223,9 +223,9 @@
     if (palette_size > 0) {
       ASSERT(palette_size <= 256);
       CPDF_Array* pCS = m_pDocument->NewIndirect<CPDF_Array>();
-      pCS->AddNew<CPDF_Name>("Indexed");
-      pCS->AddNew<CPDF_Name>("DeviceRGB");
-      pCS->AddNew<CPDF_Number>(static_cast<int>(palette_size - 1));
+      pCS->AppendNew<CPDF_Name>("Indexed");
+      pCS->AppendNew<CPDF_Name>("DeviceRGB");
+      pCS->AppendNew<CPDF_Number>(static_cast<int>(palette_size - 1));
       std::unique_ptr<uint8_t, FxFreeDeleter> pColorTable(
           FX_Alloc2D(uint8_t, palette_size, 3));
       uint8_t* ptr = pColorTable.get();
@@ -239,7 +239,7 @@
       auto pNewDict = m_pDocument->New<CPDF_Dictionary>();
       CPDF_Stream* pCTS = m_pDocument->NewIndirect<CPDF_Stream>(
           std::move(pColorTable), palette_size * 3, std::move(pNewDict));
-      pCS->AddNew<CPDF_Reference>(m_pDocument.Get(), pCTS->GetObjNum());
+      pCS->AppendNew<CPDF_Reference>(m_pDocument.Get(), pCTS->GetObjNum());
       pDict->SetNewFor<CPDF_Reference>("ColorSpace", m_pDocument.Get(),
                                        pCS->GetObjNum());
     } else {
diff --git a/core/fpdfapi/page/cpdf_streamparser.cpp b/core/fpdfapi/page/cpdf_streamparser.cpp
index cda9e51..aa8a27b 100644
--- a/core/fpdfapi/page/cpdf_streamparser.cpp
+++ b/core/fpdfapi/page/cpdf_streamparser.cpp
@@ -351,7 +351,7 @@
       RetainPtr<CPDF_Object> pObj =
           ReadNextObject(bAllowNestedArray, true, dwRecursionLevel + 1);
       if (pObj) {
-        pArray->Add(std::move(pObj));
+        pArray->Append(std::move(pObj));
         continue;
       }
       if (!m_WordSize || m_WordBuffer[0] == ']')
diff --git a/core/fpdfapi/parser/cpdf_array.cpp b/core/fpdfapi/parser/cpdf_array.cpp
index 0d66cb0..6cbad88 100644
--- a/core/fpdfapi/parser/cpdf_array.cpp
+++ b/core/fpdfapi/parser/cpdf_array.cpp
@@ -232,7 +232,7 @@
   return pRet;
 }
 
-CPDF_Object* CPDF_Array::Add(RetainPtr<CPDF_Object> pObj) {
+CPDF_Object* CPDF_Array::Append(RetainPtr<CPDF_Object> pObj) {
   CHECK(!IsLocked());
   CHECK(!pObj || pObj->IsInline());
   CPDF_Object* pRet = pObj.Get();
diff --git a/core/fpdfapi/parser/cpdf_array.h b/core/fpdfapi/parser/cpdf_array.h
index 2a12d99..ef995e9 100644
--- a/core/fpdfapi/parser/cpdf_array.h
+++ b/core/fpdfapi/parser/cpdf_array.h
@@ -58,19 +58,19 @@
   // Creates object owned by the array, returns unowned pointer to it.
   // We have special cases for objects that can intern strings from
   // a ByteStringPool. Prefer using these templates over direct calls
-  // to Add()/SetAt()/InsertAt() since by creating a new object with no
+  // to Append()/SetAt()/InsertAt() since by creating a new object with no
   // previous references, they ensure cycles can not be introduced.
   template <typename T, typename... Args>
-  typename std::enable_if<!CanInternStrings<T>::value, T*>::type AddNew(
+  typename std::enable_if<!CanInternStrings<T>::value, T*>::type AppendNew(
       Args&&... args) {
     return static_cast<T*>(
-        Add(pdfium::MakeRetain<T>(std::forward<Args>(args)...)));
+        Append(pdfium::MakeRetain<T>(std::forward<Args>(args)...)));
   }
   template <typename T, typename... Args>
-  typename std::enable_if<CanInternStrings<T>::value, T*>::type AddNew(
+  typename std::enable_if<CanInternStrings<T>::value, T*>::type AppendNew(
       Args&&... args) {
     return static_cast<T*>(
-        Add(pdfium::MakeRetain<T>(m_pPool, std::forward<Args>(args)...)));
+        Append(pdfium::MakeRetain<T>(m_pPool, std::forward<Args>(args)...)));
   }
   template <typename T, typename... Args>
   typename std::enable_if<!CanInternStrings<T>::value, T*>::type SetNewAt(
@@ -102,7 +102,7 @@
   }
 
   // Takes ownership of |pObj|, returns unowned pointer to it.
-  CPDF_Object* Add(RetainPtr<CPDF_Object> pObj);
+  CPDF_Object* Append(RetainPtr<CPDF_Object> pObj);
   CPDF_Object* SetAt(size_t index, RetainPtr<CPDF_Object> pObj);
   CPDF_Object* InsertAt(size_t index, RetainPtr<CPDF_Object> pObj);
 
diff --git a/core/fpdfapi/parser/cpdf_array_unittest.cpp b/core/fpdfapi/parser/cpdf_array_unittest.cpp
index 457961f..aa8287a 100644
--- a/core/fpdfapi/parser/cpdf_array_unittest.cpp
+++ b/core/fpdfapi/parser/cpdf_array_unittest.cpp
@@ -15,10 +15,10 @@
 
 TEST(cpdf_array, GetBooleanAt) {
   auto arr = pdfium::MakeRetain<CPDF_Array>();
-  arr->AddNew<CPDF_Boolean>(true);
-  arr->AddNew<CPDF_Boolean>(false);
-  arr->AddNew<CPDF_Number>(100);
-  arr->AddNew<CPDF_Number>(0);
+  arr->AppendNew<CPDF_Boolean>(true);
+  arr->AppendNew<CPDF_Boolean>(false);
+  arr->AppendNew<CPDF_Number>(100);
+  arr->AppendNew<CPDF_Number>(0);
 
   ASSERT_EQ(4u, arr->size());
   EXPECT_TRUE(arr->GetBooleanAt(0, true));
@@ -38,7 +38,7 @@
     const int elems[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
     auto arr = pdfium::MakeRetain<CPDF_Array>();
     for (size_t i = 0; i < FX_ArraySize(elems); ++i)
-      arr->AddNew<CPDF_Number>(elems[i]);
+      arr->AppendNew<CPDF_Number>(elems[i]);
     for (size_t i = 0; i < 3; ++i)
       arr->RemoveAt(3);
     const int expected[] = {1, 2, 3, 7, 8, 9, 10};
@@ -57,7 +57,7 @@
     const int elems[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
     auto arr = pdfium::MakeRetain<CPDF_Array>();
     for (size_t i = 0; i < FX_ArraySize(elems); ++i)
-      arr->AddNew<CPDF_Number>(elems[i]);
+      arr->AppendNew<CPDF_Number>(elems[i]);
     arr->RemoveAt(11);
     EXPECT_EQ(FX_ArraySize(elems), arr->size());
   }
@@ -68,7 +68,7 @@
   auto arr = pdfium::MakeRetain<CPDF_Array>();
   EXPECT_EQ(0U, arr->size());
   for (size_t i = 0; i < FX_ArraySize(elems); ++i)
-    arr->AddNew<CPDF_Number>(elems[i]);
+    arr->AppendNew<CPDF_Number>(elems[i]);
   EXPECT_EQ(FX_ArraySize(elems), arr->size());
   arr->Clear();
   EXPECT_EQ(0U, arr->size());
diff --git a/core/fpdfapi/parser/cpdf_dictionary.cpp b/core/fpdfapi/parser/cpdf_dictionary.cpp
index 6c4c6e6..a8cc8eb 100644
--- a/core/fpdfapi/parser/cpdf_dictionary.cpp
+++ b/core/fpdfapi/parser/cpdf_dictionary.cpp
@@ -258,21 +258,21 @@
 void CPDF_Dictionary::SetRectFor(const ByteString& key,
                                  const CFX_FloatRect& rect) {
   CPDF_Array* pArray = SetNewFor<CPDF_Array>(key);
-  pArray->AddNew<CPDF_Number>(rect.left);
-  pArray->AddNew<CPDF_Number>(rect.bottom);
-  pArray->AddNew<CPDF_Number>(rect.right);
-  pArray->AddNew<CPDF_Number>(rect.top);
+  pArray->AppendNew<CPDF_Number>(rect.left);
+  pArray->AppendNew<CPDF_Number>(rect.bottom);
+  pArray->AppendNew<CPDF_Number>(rect.right);
+  pArray->AppendNew<CPDF_Number>(rect.top);
 }
 
 void CPDF_Dictionary::SetMatrixFor(const ByteString& key,
                                    const CFX_Matrix& matrix) {
   CPDF_Array* pArray = SetNewFor<CPDF_Array>(key);
-  pArray->AddNew<CPDF_Number>(matrix.a);
-  pArray->AddNew<CPDF_Number>(matrix.b);
-  pArray->AddNew<CPDF_Number>(matrix.c);
-  pArray->AddNew<CPDF_Number>(matrix.d);
-  pArray->AddNew<CPDF_Number>(matrix.e);
-  pArray->AddNew<CPDF_Number>(matrix.f);
+  pArray->AppendNew<CPDF_Number>(matrix.a);
+  pArray->AppendNew<CPDF_Number>(matrix.b);
+  pArray->AppendNew<CPDF_Number>(matrix.c);
+  pArray->AppendNew<CPDF_Number>(matrix.d);
+  pArray->AppendNew<CPDF_Number>(matrix.e);
+  pArray->AppendNew<CPDF_Number>(matrix.f);
 }
 
 ByteString CPDF_Dictionary::MaybeIntern(const ByteString& str) {
diff --git a/core/fpdfapi/parser/cpdf_document.cpp b/core/fpdfapi/parser/cpdf_document.cpp
index 5e93c9a..1505834 100644
--- a/core/fpdfapi/parser/cpdf_document.cpp
+++ b/core/fpdfapi/parser/cpdf_document.cpp
@@ -437,7 +437,7 @@
     CPDF_Array* pPagesList = pPages->GetArrayFor("Kids");
     if (!pPagesList)
       pPagesList = pPages->SetNewFor<CPDF_Array>("Kids");
-    pPagesList->AddNew<CPDF_Reference>(this, pPageDict->GetObjNum());
+    pPagesList->AppendNew<CPDF_Reference>(this, pPageDict->GetObjNum());
     pPages->SetNewFor<CPDF_Number>("Count", nPages + 1);
     pPageDict->SetNewFor<CPDF_Reference>("Parent", this, pPages->GetObjNum());
     ResetTraversal();
diff --git a/core/fpdfapi/parser/cpdf_document_unittest.cpp b/core/fpdfapi/parser/cpdf_document_unittest.cpp
index c2a964e..c5d5da5 100644
--- a/core/fpdfapi/parser/cpdf_document_unittest.cpp
+++ b/core/fpdfapi/parser/cpdf_document_unittest.cpp
@@ -55,38 +55,38 @@
                       pdfium::MakeUnique<CPDF_DocPageData>()) {
     // Set up test
     auto zeroToTwo = pdfium::MakeRetain<CPDF_Array>();
-    zeroToTwo->AddNew<CPDF_Reference>(
+    zeroToTwo->AppendNew<CPDF_Reference>(
         this, AddIndirectObject(CreateNumberedPage(0))->GetObjNum());
-    zeroToTwo->AddNew<CPDF_Reference>(
+    zeroToTwo->AppendNew<CPDF_Reference>(
         this, AddIndirectObject(CreateNumberedPage(1))->GetObjNum());
-    zeroToTwo->AddNew<CPDF_Reference>(
+    zeroToTwo->AppendNew<CPDF_Reference>(
         this, AddIndirectObject(CreateNumberedPage(2))->GetObjNum());
     CPDF_Dictionary* branch1 =
         CreatePageTreeNode(std::move(zeroToTwo), this, 3);
 
     auto zeroToThree = pdfium::MakeRetain<CPDF_Array>();
-    zeroToThree->AddNew<CPDF_Reference>(this, branch1->GetObjNum());
-    zeroToThree->AddNew<CPDF_Reference>(
+    zeroToThree->AppendNew<CPDF_Reference>(this, branch1->GetObjNum());
+    zeroToThree->AppendNew<CPDF_Reference>(
         this, AddIndirectObject(CreateNumberedPage(3))->GetObjNum());
     CPDF_Dictionary* branch2 =
         CreatePageTreeNode(std::move(zeroToThree), this, 4);
 
     auto fourFive = pdfium::MakeRetain<CPDF_Array>();
-    fourFive->AddNew<CPDF_Reference>(
+    fourFive->AppendNew<CPDF_Reference>(
         this, AddIndirectObject(CreateNumberedPage(4))->GetObjNum());
-    fourFive->AddNew<CPDF_Reference>(
+    fourFive->AppendNew<CPDF_Reference>(
         this, AddIndirectObject(CreateNumberedPage(5))->GetObjNum());
     CPDF_Dictionary* branch3 = CreatePageTreeNode(std::move(fourFive), this, 2);
 
     auto justSix = pdfium::MakeRetain<CPDF_Array>();
-    justSix->AddNew<CPDF_Reference>(
+    justSix->AppendNew<CPDF_Reference>(
         this, AddIndirectObject(CreateNumberedPage(6))->GetObjNum());
     CPDF_Dictionary* branch4 = CreatePageTreeNode(std::move(justSix), this, 1);
 
     auto allPages = pdfium::MakeRetain<CPDF_Array>();
-    allPages->AddNew<CPDF_Reference>(this, branch2->GetObjNum());
-    allPages->AddNew<CPDF_Reference>(this, branch3->GetObjNum());
-    allPages->AddNew<CPDF_Reference>(this, branch4->GetObjNum());
+    allPages->AppendNew<CPDF_Reference>(this, branch2->GetObjNum());
+    allPages->AppendNew<CPDF_Reference>(this, branch3->GetObjNum());
+    allPages->AppendNew<CPDF_Reference>(this, branch4->GetObjNum());
     CPDF_Dictionary* pagesDict =
         CreatePageTreeNode(std::move(allPages), this, kNumTestPages);
 
@@ -108,12 +108,12 @@
                       pdfium::MakeUnique<CPDF_DocPageData>()) {
     // Set up test
     auto allPages = pdfium::MakeRetain<CPDF_Array>();
-    allPages->AddNew<CPDF_Reference>(
+    allPages->AppendNew<CPDF_Reference>(
         this, AddIndirectObject(CreateNumberedPage(0))->GetObjNum());
-    allPages->AddNew<CPDF_Reference>(
+    allPages->AppendNew<CPDF_Reference>(
         this, AddIndirectObject(CreateNumberedPage(1))->GetObjNum());
     // Page without pageNum.
-    inlined_page_ = allPages->Add(CreateNumberedPage(2));
+    inlined_page_ = allPages->Append(CreateNumberedPage(2));
     CPDF_Dictionary* pagesDict =
         CreatePageTreeNode(std::move(allPages), this, 3);
     SetRootForTesting(NewIndirect<CPDF_Dictionary>());
diff --git a/core/fpdfapi/parser/cpdf_object_avail_unittest.cpp b/core/fpdfapi/parser/cpdf_object_avail_unittest.cpp
index f27ae63..43e76db 100644
--- a/core/fpdfapi/parser/cpdf_object_avail_unittest.cpp
+++ b/core/fpdfapi/parser/cpdf_object_avail_unittest.cpp
@@ -250,7 +250,7 @@
                                                                 &holder, 2);
   holder.AddObject(2, pdfium::MakeRetain<CPDF_Array>(),
                    TestHolder::ObjectState::Available);
-  holder.GetTestObject(2)->AsArray()->AddNew<CPDF_Reference>(&holder, 2);
+  holder.GetTestObject(2)->AsArray()->AppendNew<CPDF_Reference>(&holder, 2);
 
   // Add string, which is refered by array item. It is should not be checked.
   holder.AddObject(
diff --git a/core/fpdfapi/parser/cpdf_object_unittest.cpp b/core/fpdfapi/parser/cpdf_object_unittest.cpp
index ca02618..8ad3104 100644
--- a/core/fpdfapi/parser/cpdf_object_unittest.cpp
+++ b/core/fpdfapi/parser/cpdf_object_unittest.cpp
@@ -418,7 +418,7 @@
     CFX_Matrix matrix(elems[i][0], elems[i][1], elems[i][2], elems[i][3],
                       elems[i][4], elems[i][5]);
     for (size_t j = 0; j < 6; ++j)
-      arr->AddNew<CPDF_Number>(elems[i][j]);
+      arr->AppendNew<CPDF_Number>(elems[i][j]);
     CFX_Matrix arr_matrix = arr->GetMatrix();
     EXPECT_EQ(matrix.a, arr_matrix.a);
     EXPECT_EQ(matrix.b, arr_matrix.b);
@@ -438,7 +438,7 @@
     auto arr = pdfium::MakeRetain<CPDF_Array>();
     CFX_FloatRect rect(elems[i]);
     for (size_t j = 0; j < 4; ++j)
-      arr->AddNew<CPDF_Number>(elems[i][j]);
+      arr->AppendNew<CPDF_Number>(elems[i][j]);
     CFX_FloatRect arr_rect = arr->GetRect();
     EXPECT_EQ(rect.left, arr_rect.left);
     EXPECT_EQ(rect.right, arr_rect.right);
@@ -553,7 +553,7 @@
     CPDF_Array* vals[3];
     auto arr = pdfium::MakeRetain<CPDF_Array>();
     for (size_t i = 0; i < 3; ++i) {
-      vals[i] = arr->AddNew<CPDF_Array>();
+      vals[i] = arr->AppendNew<CPDF_Array>();
       for (size_t j = 0; j < 3; ++j) {
         int value = j + 100;
         vals[i]->InsertNewAt<CPDF_Number>(i, value);
@@ -575,7 +575,7 @@
     CPDF_Dictionary* vals[3];
     auto arr = pdfium::MakeRetain<CPDF_Array>();
     for (size_t i = 0; i < 3; ++i) {
-      vals[i] = arr->AddNew<CPDF_Dictionary>();
+      vals[i] = arr->AppendNew<CPDF_Dictionary>();
       for (size_t j = 0; j < 3; ++j) {
         std::string key("key");
         char buf[33];
@@ -615,7 +615,7 @@
           FX_Alloc(uint8_t, data_size));
       memcpy(data.get(), content, data_size);
       stream_vals[i] =
-          arr->AddNew<CPDF_Stream>(std::move(data), data_size, vals[i]);
+          arr->AppendNew<CPDF_Stream>(std::move(data), data_size, vals[i]);
     }
     for (size_t i = 0; i < 3; ++i) {
       TestArrayAccessors(arr.Get(), i,     // Array and index.
@@ -644,8 +644,8 @@
     arr->InsertNewAt<CPDF_Null>(10);
 
     CPDF_Array* arr_val = arr->InsertNewAt<CPDF_Array>(11);
-    arr_val->AddNew<CPDF_Number>(1);
-    arr_val->AddNew<CPDF_Number>(2);
+    arr_val->AppendNew<CPDF_Number>(1);
+    arr_val->AppendNew<CPDF_Number>(2);
 
     CPDF_Dictionary* dict_val = arr->InsertNewAt<CPDF_Dictionary>(12);
     dict_val->SetNewFor<CPDF_String>("key1", "Linda", false);
@@ -696,7 +696,7 @@
                   12345.54321f, 0.5f,  1000, 0.000045f};
   auto arr = pdfium::MakeRetain<CPDF_Array>();
   for (size_t i = 0; i < FX_ArraySize(vals); ++i)
-    arr->AddNew<CPDF_Number>(vals[i]);
+    arr->AppendNew<CPDF_Number>(vals[i]);
   for (size_t i = 0; i < FX_ArraySize(vals); ++i) {
     EXPECT_EQ(CPDF_Object::kNumber, arr->GetObjectAt(i)->GetType());
     EXPECT_EQ(vals[i], arr->GetObjectAt(i)->GetNumber());
@@ -707,7 +707,7 @@
   int vals[] = {0, 1, 934435456, 876, 10000, -1, -24354656, -100};
   auto arr = pdfium::MakeRetain<CPDF_Array>();
   for (size_t i = 0; i < FX_ArraySize(vals); ++i)
-    arr->AddNew<CPDF_Number>(vals[i]);
+    arr->AppendNew<CPDF_Number>(vals[i]);
   for (size_t i = 0; i < FX_ArraySize(vals); ++i) {
     EXPECT_EQ(CPDF_Object::kNumber, arr->GetObjectAt(i)->GetType());
     EXPECT_EQ(vals[i], arr->GetObjectAt(i)->GetNumber());
@@ -721,8 +721,8 @@
   auto string_array = pdfium::MakeRetain<CPDF_Array>();
   auto name_array = pdfium::MakeRetain<CPDF_Array>();
   for (const char* val : kVals) {
-    string_array->AddNew<CPDF_String>(val, false);
-    name_array->AddNew<CPDF_Name>(val);
+    string_array->AppendNew<CPDF_String>(val, false);
+    name_array->AppendNew<CPDF_Name>(val);
   }
   for (size_t i = 0; i < FX_ArraySize(kVals); ++i) {
     EXPECT_EQ(CPDF_Object::kString, string_array->GetObjectAt(i)->GetType());
@@ -750,8 +750,9 @@
   for (size_t i = 0; i < FX_ArraySize(indirect_objs); ++i) {
     holder->ReplaceIndirectObjectIfHigherGeneration(obj_nums[i],
                                                     indirect_objs[i]);
-    arr->AddNew<CPDF_Reference>(holder.get(), obj_nums[i]);
-    arr1->AddNew<CPDF_Reference>(holder.get(), indirect_objs[i]->GetObjNum());
+    arr->AppendNew<CPDF_Reference>(holder.get(), obj_nums[i]);
+    arr1->AppendNew<CPDF_Reference>(holder.get(),
+                                    indirect_objs[i]->GetObjNum());
   }
   // Check indirect objects.
   for (size_t i = 0; i < FX_ArraySize(obj_nums); ++i)
@@ -771,7 +772,7 @@
 TEST(PDFArrayTest, CloneDirectObject) {
   CPDF_IndirectObjectHolder objects_holder;
   auto array = pdfium::MakeRetain<CPDF_Array>();
-  array->AddNew<CPDF_Reference>(&objects_holder, 1234);
+  array->AppendNew<CPDF_Reference>(&objects_holder, 1234);
   ASSERT_EQ(1U, array->size());
   CPDF_Object* obj = array->GetObjectAt(0);
   ASSERT_TRUE(obj);
@@ -790,7 +791,7 @@
 TEST(PDFArrayTest, ConvertIndirect) {
   CPDF_IndirectObjectHolder objects_holder;
   auto array = pdfium::MakeRetain<CPDF_Array>();
-  CPDF_Object* pObj = array->AddNew<CPDF_Number>(42);
+  CPDF_Object* pObj = array->AppendNew<CPDF_Number>(42);
   array->ConvertToIndirectObjectAt(0, &objects_holder);
   CPDF_Object* pRef = array->GetObjectAt(0);
   CPDF_Object* pNum = array->GetDirectObjectAt(0);
diff --git a/core/fpdfapi/parser/cpdf_object_walker_unittest.cpp b/core/fpdfapi/parser/cpdf_object_walker_unittest.cpp
index 4dde72f..f925b7d 100644
--- a/core/fpdfapi/parser/cpdf_object_walker_unittest.cpp
+++ b/core/fpdfapi/parser/cpdf_object_walker_unittest.cpp
@@ -69,9 +69,9 @@
   dict->SetFor("1", pdfium::MakeRetain<CPDF_String>());
   dict->SetFor("2", pdfium::MakeRetain<CPDF_Boolean>());
   auto array = pdfium::MakeRetain<CPDF_Array>();
-  array->Add(pdfium::MakeRetain<CPDF_Reference>(nullptr, 0));
-  array->Add(pdfium::MakeRetain<CPDF_Null>());
-  array->Add(pdfium::MakeRetain<CPDF_Stream>(
+  array->Append(pdfium::MakeRetain<CPDF_Reference>(nullptr, 0));
+  array->Append(pdfium::MakeRetain<CPDF_Null>());
+  array->Append(pdfium::MakeRetain<CPDF_Stream>(
       nullptr, 0, pdfium::MakeRetain<CPDF_Dictionary>()));
   dict->SetFor("3", std::move(array));
   // The last number for stream length.
@@ -85,7 +85,7 @@
   auto level_2 =
       pdfium::MakeRetain<CPDF_Stream>(nullptr, 0, std::move(level_3));
   auto level_1 = pdfium::MakeRetain<CPDF_Array>();
-  level_1->Add(std::move(level_2));
+  level_1->Append(std::move(level_2));
   auto level_0 = pdfium::MakeRetain<CPDF_Dictionary>();
   level_0->SetFor("Array", std::move(level_1));
 
@@ -103,11 +103,11 @@
 TEST(CPDF_ObjectWalkerTest, SkipWalkIntoCurrentObject) {
   auto root_array = pdfium::MakeRetain<CPDF_Array>();
   // Add 2 null objects into |root_array|. [ null1, null2 ]
-  root_array->AddNew<CPDF_Null>();
-  root_array->AddNew<CPDF_Null>();
+  root_array->AppendNew<CPDF_Null>();
+  root_array->AppendNew<CPDF_Null>();
   // |root_array| will contain 4 null objects after this.
   // [ null1, null2, [ null3, null4 ] ]
-  root_array->Add(root_array->Clone());
+  root_array->Append(root_array->Clone());
 
   int non_array_objects = 0;
   CPDF_ObjectWalker walker(root_array.Get());
diff --git a/core/fpdfapi/parser/cpdf_page_object_avail_unittest.cpp b/core/fpdfapi/parser/cpdf_page_object_avail_unittest.cpp
index 6a76118..0610029 100644
--- a/core/fpdfapi/parser/cpdf_page_object_avail_unittest.cpp
+++ b/core/fpdfapi/parser/cpdf_page_object_avail_unittest.cpp
@@ -103,7 +103,7 @@
                                                                 2);
   holder.AddObject(2, pdfium::MakeRetain<CPDF_Array>(),
                    TestHolder::ObjectState::Available);
-  holder.GetTestObject(2)->AsArray()->AddNew<CPDF_Reference>(&holder, 3);
+  holder.GetTestObject(2)->AsArray()->AppendNew<CPDF_Reference>(&holder, 3);
 
   holder.AddObject(3, pdfium::MakeRetain<CPDF_Dictionary>(),
                    TestHolder::ObjectState::Available);
diff --git a/core/fpdfapi/parser/cpdf_syntax_parser.cpp b/core/fpdfapi/parser/cpdf_syntax_parser.cpp
index 0a55c27..cf65f6e 100644
--- a/core/fpdfapi/parser/cpdf_syntax_parser.cpp
+++ b/core/fpdfapi/parser/cpdf_syntax_parser.cpp
@@ -469,7 +469,7 @@
     auto pArray = pdfium::MakeRetain<CPDF_Array>();
     while (RetainPtr<CPDF_Object> pObj =
                GetObjectBodyInternal(pObjList, ParseType::kLoose)) {
-      pArray->Add(std::move(pObj));
+      pArray->Append(std::move(pObj));
     }
     return (parse_type == ParseType::kLoose || m_WordBuffer[0] == ']')
                ? std::move(pArray)
diff --git a/core/fpdfapi/parser/fpdf_parser_decode_unittest.cpp b/core/fpdfapi/parser/fpdf_parser_decode_unittest.cpp
index 9c106b1..45f1593 100644
--- a/core/fpdfapi/parser/fpdf_parser_decode_unittest.cpp
+++ b/core/fpdfapi/parser/fpdf_parser_decode_unittest.cpp
@@ -21,94 +21,94 @@
   {
     // 1 decoder is almost always valid.
     auto decoders = pdfium::MakeRetain<CPDF_Array>();
-    decoders->AddNew<CPDF_Name>("FlateEncode");
+    decoders->AppendNew<CPDF_Name>("FlateEncode");
     EXPECT_TRUE(ValidateDecoderPipeline(decoders.Get()));
   }
   {
     // 1 decoder is almost always valid, even with an unknown decoder.
     auto decoders = pdfium::MakeRetain<CPDF_Array>();
-    decoders->AddNew<CPDF_Name>("FooBar");
+    decoders->AppendNew<CPDF_Name>("FooBar");
     EXPECT_TRUE(ValidateDecoderPipeline(decoders.Get()));
   }
   {
     // Valid 2 decoder pipeline.
     auto decoders = pdfium::MakeRetain<CPDF_Array>();
-    decoders->AddNew<CPDF_Name>("AHx");
-    decoders->AddNew<CPDF_Name>("LZWDecode");
+    decoders->AppendNew<CPDF_Name>("AHx");
+    decoders->AppendNew<CPDF_Name>("LZWDecode");
     EXPECT_TRUE(ValidateDecoderPipeline(decoders.Get()));
   }
   {
     // Valid 2 decoder pipeline.
     auto decoders = pdfium::MakeRetain<CPDF_Array>();
-    decoders->AddNew<CPDF_Name>("ASCII85Decode");
-    decoders->AddNew<CPDF_Name>("ASCII85Decode");
+    decoders->AppendNew<CPDF_Name>("ASCII85Decode");
+    decoders->AppendNew<CPDF_Name>("ASCII85Decode");
     EXPECT_TRUE(ValidateDecoderPipeline(decoders.Get()));
   }
   {
     // Valid 5 decoder pipeline.
     auto decoders = pdfium::MakeRetain<CPDF_Array>();
-    decoders->AddNew<CPDF_Name>("ASCII85Decode");
-    decoders->AddNew<CPDF_Name>("A85");
-    decoders->AddNew<CPDF_Name>("RunLengthDecode");
-    decoders->AddNew<CPDF_Name>("FlateDecode");
-    decoders->AddNew<CPDF_Name>("RL");
+    decoders->AppendNew<CPDF_Name>("ASCII85Decode");
+    decoders->AppendNew<CPDF_Name>("A85");
+    decoders->AppendNew<CPDF_Name>("RunLengthDecode");
+    decoders->AppendNew<CPDF_Name>("FlateDecode");
+    decoders->AppendNew<CPDF_Name>("RL");
     EXPECT_TRUE(ValidateDecoderPipeline(decoders.Get()));
   }
   {
     // Valid 5 decoder pipeline, with an image decoder at the end.
     auto decoders = pdfium::MakeRetain<CPDF_Array>();
-    decoders->AddNew<CPDF_Name>("RunLengthDecode");
-    decoders->AddNew<CPDF_Name>("ASCII85Decode");
-    decoders->AddNew<CPDF_Name>("FlateDecode");
-    decoders->AddNew<CPDF_Name>("LZW");
-    decoders->AddNew<CPDF_Name>("DCTDecode");
+    decoders->AppendNew<CPDF_Name>("RunLengthDecode");
+    decoders->AppendNew<CPDF_Name>("ASCII85Decode");
+    decoders->AppendNew<CPDF_Name>("FlateDecode");
+    decoders->AppendNew<CPDF_Name>("LZW");
+    decoders->AppendNew<CPDF_Name>("DCTDecode");
     EXPECT_TRUE(ValidateDecoderPipeline(decoders.Get()));
   }
   {
     // Invalid 1 decoder pipeline due to wrong type.
     auto decoders = pdfium::MakeRetain<CPDF_Array>();
-    decoders->AddNew<CPDF_String>("FlateEncode", false);
+    decoders->AppendNew<CPDF_String>("FlateEncode", false);
     EXPECT_FALSE(ValidateDecoderPipeline(decoders.Get()));
   }
   {
     // Invalid 2 decoder pipeline, with 2 image decoders.
     auto decoders = pdfium::MakeRetain<CPDF_Array>();
-    decoders->AddNew<CPDF_Name>("DCTDecode");
-    decoders->AddNew<CPDF_Name>("CCITTFaxDecode");
+    decoders->AppendNew<CPDF_Name>("DCTDecode");
+    decoders->AppendNew<CPDF_Name>("CCITTFaxDecode");
     EXPECT_FALSE(ValidateDecoderPipeline(decoders.Get()));
   }
   {
     // Invalid 2 decoder pipeline, with 1 image decoder at the start.
     auto decoders = pdfium::MakeRetain<CPDF_Array>();
-    decoders->AddNew<CPDF_Name>("DCTDecode");
-    decoders->AddNew<CPDF_Name>("FlateDecode");
+    decoders->AppendNew<CPDF_Name>("DCTDecode");
+    decoders->AppendNew<CPDF_Name>("FlateDecode");
     EXPECT_FALSE(ValidateDecoderPipeline(decoders.Get()));
   }
   {
     // Invalid 2 decoder pipeline due to wrong type.
     auto decoders = pdfium::MakeRetain<CPDF_Array>();
-    decoders->AddNew<CPDF_String>("AHx", false);
-    decoders->AddNew<CPDF_Name>("LZWDecode");
+    decoders->AppendNew<CPDF_String>("AHx", false);
+    decoders->AppendNew<CPDF_Name>("LZWDecode");
     EXPECT_FALSE(ValidateDecoderPipeline(decoders.Get()));
   }
   {
     // Invalid 5 decoder pipeline.
     auto decoders = pdfium::MakeRetain<CPDF_Array>();
-    decoders->AddNew<CPDF_Name>("FlateDecode");
-    decoders->AddNew<CPDF_Name>("FlateDecode");
-    decoders->AddNew<CPDF_Name>("DCTDecode");
-    decoders->AddNew<CPDF_Name>("FlateDecode");
-    decoders->AddNew<CPDF_Name>("FlateDecode");
+    decoders->AppendNew<CPDF_Name>("FlateDecode");
+    decoders->AppendNew<CPDF_Name>("FlateDecode");
+    decoders->AppendNew<CPDF_Name>("DCTDecode");
+    decoders->AppendNew<CPDF_Name>("FlateDecode");
+    decoders->AppendNew<CPDF_Name>("FlateDecode");
     EXPECT_FALSE(ValidateDecoderPipeline(decoders.Get()));
   }
   {
     // Invalid 5 decoder pipeline due to wrong type.
     auto decoders = pdfium::MakeRetain<CPDF_Array>();
-    decoders->AddNew<CPDF_Name>("ASCII85Decode");
-    decoders->AddNew<CPDF_Name>("A85");
-    decoders->AddNew<CPDF_Name>("RunLengthDecode");
-    decoders->AddNew<CPDF_Name>("FlateDecode");
-    decoders->AddNew<CPDF_String>("RL", false);
+    decoders->AppendNew<CPDF_Name>("ASCII85Decode");
+    decoders->AppendNew<CPDF_Name>("A85");
+    decoders->AppendNew<CPDF_Name>("RunLengthDecode");
+    decoders->AppendNew<CPDF_Name>("FlateDecode");
+    decoders->AppendNew<CPDF_String>("RL", false);
     EXPECT_FALSE(ValidateDecoderPipeline(decoders.Get()));
   }
 }
@@ -150,7 +150,7 @@
     // Valid 1 element filter array.
     auto dict = pdfium::MakeRetain<CPDF_Dictionary>();
     auto* filter_array = dict->SetNewFor<CPDF_Array>("Filter");
-    filter_array->AddNew<CPDF_Name>("FooBar");
+    filter_array->AppendNew<CPDF_Name>("FooBar");
     Optional<DecoderArray> decoder_array = GetDecoderArray(dict.Get());
     ASSERT_TRUE(decoder_array.has_value());
     ASSERT_EQ(1u, decoder_array.value().size());
@@ -160,8 +160,8 @@
     // Valid 2 element filter array.
     auto dict = pdfium::MakeRetain<CPDF_Dictionary>();
     auto* filter_array = dict->SetNewFor<CPDF_Array>("Filter");
-    filter_array->AddNew<CPDF_Name>("AHx");
-    filter_array->AddNew<CPDF_Name>("LZWDecode");
+    filter_array->AppendNew<CPDF_Name>("AHx");
+    filter_array->AppendNew<CPDF_Name>("LZWDecode");
     Optional<DecoderArray> decoder_array = GetDecoderArray(dict.Get());
     ASSERT_TRUE(decoder_array.has_value());
     ASSERT_EQ(2u, decoder_array.value().size());
@@ -172,8 +172,8 @@
     // Invalid 2 element filter array.
     auto dict = pdfium::MakeRetain<CPDF_Dictionary>();
     auto* invalid_filter_array = dict->SetNewFor<CPDF_Array>("Filter");
-    invalid_filter_array->AddNew<CPDF_Name>("DCTDecode");
-    invalid_filter_array->AddNew<CPDF_Name>("CCITTFaxDecode");
+    invalid_filter_array->AppendNew<CPDF_Name>("DCTDecode");
+    invalid_filter_array->AppendNew<CPDF_Name>("CCITTFaxDecode");
     Optional<DecoderArray> decoder_array = GetDecoderArray(dict.Get());
     EXPECT_FALSE(decoder_array.has_value());
   }
diff --git a/core/fpdfapi/render/cpdf_docrenderdata_unittest.cpp b/core/fpdfapi/render/cpdf_docrenderdata_unittest.cpp
index 2fb25b6..bad221e 100644
--- a/core/fpdfapi/render/cpdf_docrenderdata_unittest.cpp
+++ b/core/fpdfapi/render/cpdf_docrenderdata_unittest.cpp
@@ -75,15 +75,15 @@
   func_dict->SetNewFor<CPDF_Number>("FunctionType", 0);
 
   CPDF_Array* domain_array = func_dict->SetNewFor<CPDF_Array>("Domain");
-  domain_array->AddNew<CPDF_Number>(0);
-  domain_array->AddNew<CPDF_Number>(1);
+  domain_array->AppendNew<CPDF_Number>(0);
+  domain_array->AppendNew<CPDF_Number>(1);
 
   CPDF_Array* range_array = func_dict->SetNewFor<CPDF_Array>("Range");
-  range_array->AddNew<CPDF_Number>(0);
-  range_array->AddNew<CPDF_Number>(0.5f);
+  range_array->AppendNew<CPDF_Number>(0);
+  range_array->AppendNew<CPDF_Number>(0.5f);
 
   CPDF_Array* size_array = func_dict->SetNewFor<CPDF_Array>("Size");
-  size_array->AddNew<CPDF_Number>(4);
+  size_array->AppendNew<CPDF_Number>(4);
 
   func_dict->SetNewFor<CPDF_Number>("BitsPerSample", 8);
 
@@ -101,18 +101,18 @@
   func_dict->SetNewFor<CPDF_Number>("N", 1);
 
   CPDF_Array* domain_array = func_dict->SetNewFor<CPDF_Array>("Domain");
-  domain_array->AddNew<CPDF_Number>(0);
-  domain_array->AddNew<CPDF_Number>(1);
+  domain_array->AppendNew<CPDF_Number>(0);
+  domain_array->AppendNew<CPDF_Number>(1);
 
   CPDF_Array* c0_array = func_dict->SetNewFor<CPDF_Array>("C0");
-  c0_array->AddNew<CPDF_Number>(0.1f);
-  c0_array->AddNew<CPDF_Number>(0.2f);
-  c0_array->AddNew<CPDF_Number>(0.8f);
+  c0_array->AppendNew<CPDF_Number>(0.1f);
+  c0_array->AppendNew<CPDF_Number>(0.2f);
+  c0_array->AppendNew<CPDF_Number>(0.8f);
 
   CPDF_Array* c1_array = func_dict->SetNewFor<CPDF_Array>("C1");
-  c1_array->AddNew<CPDF_Number>(0.05f);
-  c1_array->AddNew<CPDF_Number>(0.01f);
-  c1_array->AddNew<CPDF_Number>(0.4f);
+  c1_array->AppendNew<CPDF_Number>(0.05f);
+  c1_array->AppendNew<CPDF_Number>(0.01f);
+  c1_array->AppendNew<CPDF_Number>(0.4f);
 
   return func_dict;
 }
@@ -122,12 +122,12 @@
   func_dict->SetNewFor<CPDF_Number>("FunctionType", 4);
 
   CPDF_Array* domain_array = func_dict->SetNewFor<CPDF_Array>("Domain");
-  domain_array->AddNew<CPDF_Number>(0);
-  domain_array->AddNew<CPDF_Number>(1);
+  domain_array->AppendNew<CPDF_Number>(0);
+  domain_array->AppendNew<CPDF_Number>(1);
 
   CPDF_Array* range_array = func_dict->SetNewFor<CPDF_Array>("Range");
-  range_array->AddNew<CPDF_Number>(-1);
-  range_array->AddNew<CPDF_Number>(1);
+  range_array->AppendNew<CPDF_Number>(-1);
+  range_array->AppendNew<CPDF_Number>(1);
 
   static const char content[] = "{ 360 mul sin 2 div }";
   size_t len = FX_ArraySize(content);
@@ -142,12 +142,12 @@
   func_dict->SetNewFor<CPDF_Number>("FunctionType", 4);
 
   CPDF_Array* domain_array = func_dict->SetNewFor<CPDF_Array>("Domain");
-  domain_array->AddNew<CPDF_Number>(0);
-  domain_array->AddNew<CPDF_Number>(1);
+  domain_array->AppendNew<CPDF_Number>(0);
+  domain_array->AppendNew<CPDF_Number>(1);
 
   CPDF_Array* range_array = func_dict->SetNewFor<CPDF_Array>("Range");
-  range_array->AddNew<CPDF_Number>(-1);
-  range_array->AddNew<CPDF_Number>(1);
+  range_array->AppendNew<CPDF_Number>(-1);
+  range_array->AppendNew<CPDF_Number>(1);
 
   static const char content[] = "garbage";
   size_t len = FX_ArraySize(content);
@@ -202,9 +202,9 @@
 
 TEST(CPDF_DocRenderDataTest, TransferFunctionArray) {
   auto func_array = pdfium::MakeRetain<CPDF_Array>();
-  func_array->Add(CreateType0FunctionStream());
-  func_array->Add(CreateType2FunctionDict());
-  func_array->Add(CreateType4FunctionStream());
+  func_array->Append(CreateType0FunctionStream());
+  func_array->Append(CreateType2FunctionDict());
+  func_array->Append(CreateType4FunctionStream());
 
   TestDocRenderData render_data;
   auto func = render_data.CreateTransferFuncForTesting(func_array.Get());
@@ -255,9 +255,9 @@
 
   {
     auto func_array = pdfium::MakeRetain<CPDF_Array>();
-    func_array->Add(CreateType0FunctionStream());
-    func_array->Add(CreateType2FunctionDict());
-    func_array->Add(CreateBadType4FunctionStream());
+    func_array->Append(CreateType0FunctionStream());
+    func_array->Append(CreateType2FunctionDict());
+    func_array->Append(CreateBadType4FunctionStream());
 
     TestDocRenderData render_data;
     auto func = render_data.CreateTransferFuncForTesting(func_array.Get());
diff --git a/core/fpdfdoc/cpdf_annot_unittest.cpp b/core/fpdfdoc/cpdf_annot_unittest.cpp
index a7625e9..3f8298a 100644
--- a/core/fpdfdoc/cpdf_annot_unittest.cpp
+++ b/core/fpdfdoc/cpdf_annot_unittest.cpp
@@ -18,7 +18,7 @@
     const std::vector<int>& points) {
   auto array = pdfium::MakeRetain<CPDF_Array>();
   for (float point : points)
-    array->AddNew<CPDF_Number>(point);
+    array->AppendNew<CPDF_Number>(point);
   return array;
 }
 
@@ -124,14 +124,14 @@
   EXPECT_EQ(0u, CPDF_Annot::QuadPointCount(array.Get()));
 
   for (int i = 0; i < 7; ++i) {
-    array->AddNew<CPDF_Number>(0);
+    array->AppendNew<CPDF_Number>(0);
     EXPECT_EQ(0u, CPDF_Annot::QuadPointCount(array.Get()));
   }
   for (int i = 0; i < 8; ++i) {
-    array->AddNew<CPDF_Number>(0);
+    array->AppendNew<CPDF_Number>(0);
     EXPECT_EQ(1u, CPDF_Annot::QuadPointCount(array.Get()));
   }
   for (int i = 0; i < 50; ++i)
-    array->AddNew<CPDF_Number>(0);
+    array->AppendNew<CPDF_Number>(0);
   EXPECT_EQ(8u, CPDF_Annot::QuadPointCount(array.Get()));
 }
diff --git a/core/fpdfdoc/cpdf_dest_unittest.cpp b/core/fpdfdoc/cpdf_dest_unittest.cpp
index 07e46b3..265b939 100644
--- a/core/fpdfdoc/cpdf_dest_unittest.cpp
+++ b/core/fpdfdoc/cpdf_dest_unittest.cpp
@@ -21,9 +21,9 @@
 
   // |array| must outlive |dest|.
   auto array = pdfium::MakeRetain<CPDF_Array>();
-  array->AddNew<CPDF_Number>(0);  // Page Index.
-  array->AddNew<CPDF_Name>("XYZ");
-  array->AddNew<CPDF_Number>(4);  // X
+  array->AppendNew<CPDF_Number>(0);  // Page Index.
+  array->AppendNew<CPDF_Name>("XYZ");
+  array->AppendNew<CPDF_Number>(4);  // X
   {
     auto dest = pdfium::MakeUnique<CPDF_Dest>();
     EXPECT_FALSE(dest->GetXYZ(&hasX, &hasY, &hasZoom, &x, &y, &zoom));
@@ -33,8 +33,8 @@
     auto dest = pdfium::MakeUnique<CPDF_Dest>(array.Get());
     EXPECT_FALSE(dest->GetXYZ(&hasX, &hasY, &hasZoom, &x, &y, &zoom));
   }
-  array->AddNew<CPDF_Number>(5);  // Y
-  array->AddNew<CPDF_Number>(6);  // Zoom.
+  array->AppendNew<CPDF_Number>(5);  // Y
+  array->AppendNew<CPDF_Number>(6);  // Zoom.
   {
     auto dest = pdfium::MakeUnique<CPDF_Dest>(array.Get());
     EXPECT_TRUE(dest->GetXYZ(&hasX, &hasY, &hasZoom, &x, &y, &zoom));
diff --git a/core/fpdfdoc/cpdf_formfield.cpp b/core/fpdfdoc/cpdf_formfield.cpp
index 02889fe..3e33c79 100644
--- a/core/fpdfdoc/cpdf_formfield.cpp
+++ b/core/fpdfdoc/cpdf_formfield.cpp
@@ -534,7 +534,7 @@
   if (GetType() != kListBox) {
     m_pDict->SetNewFor<CPDF_String>(pdfium::form_fields::kV, opt_value);
     CPDF_Array* pI = m_pDict->SetNewFor<CPDF_Array>("I");
-    pI->AddNew<CPDF_Number>(index);
+    pI->AppendNew<CPDF_Number>(index);
     return;
   }
 
@@ -547,7 +547,7 @@
   CPDF_Array* pArray = m_pDict->SetNewFor<CPDF_Array>(pdfium::form_fields::kV);
   for (int i = 0; i < CountOptions(); i++) {
     if (i == index || IsItemSelected(i))
-      pArray->AddNew<CPDF_String>(GetOptionValue(i));
+      pArray->AppendNew<CPDF_String>(GetOptionValue(i));
   }
 }
 
@@ -577,7 +577,7 @@
   auto pArray = pdfium::MakeRetain<CPDF_Array>();
   for (int i = 0; i < CountOptions(); i++) {
     if (i != index && IsItemSelected(i))
-      pArray->AddNew<CPDF_String>(GetOptionValue(i));
+      pArray->AppendNew<CPDF_String>(GetOptionValue(i));
   }
   if (pArray->size() > 0) {
     m_pDict->SetFor(pdfium::form_fields::kV, pArray);
@@ -812,7 +812,7 @@
   }
   if (!bReturn) {
     if (bSelected)
-      pArray->AddNew<CPDF_Number>(iOptIndex);
+      pArray->AppendNew<CPDF_Number>(iOptIndex);
     if (pArray->IsEmpty())
       m_pDict->RemoveFor("I");
   }
diff --git a/core/fpdfdoc/cpdf_interactiveform.cpp b/core/fpdfdoc/cpdf_interactiveform.cpp
index c06bad4..b76be9a 100644
--- a/core/fpdfdoc/cpdf_interactiveform.cpp
+++ b/core/fpdfdoc/cpdf_interactiveform.cpp
@@ -1071,7 +1071,7 @@
       if (pV)
         pFieldDict->SetFor(pdfium::form_fields::kV, pV->CloneDirectObject());
     }
-    pFields->Add(pFieldDict);
+    pFields->Append(pFieldDict);
   }
   return pDoc;
 }
diff --git a/core/fpdfdoc/cpdf_nametree_unittest.cpp b/core/fpdfdoc/cpdf_nametree_unittest.cpp
index 13b6b5c..595a7f1 100644
--- a/core/fpdfdoc/cpdf_nametree_unittest.cpp
+++ b/core/fpdfdoc/cpdf_nametree_unittest.cpp
@@ -13,8 +13,8 @@
 namespace {
 
 void AddNameKeyValue(CPDF_Array* pNames, const char* key, const int value) {
-  pNames->AddNew<CPDF_String>(key, false);
-  pNames->AddNew<CPDF_Number>(value);
+  pNames->AppendNew<CPDF_String>(key, false);
+  pNames->AppendNew<CPDF_Number>(value);
 }
 
 void CheckNameKeyValue(CPDF_Array* pNames,
@@ -29,8 +29,8 @@
                     const char* least,
                     const char* greatest) {
   CPDF_Array* pLimits = pNode->SetNewFor<CPDF_Array>("Limits");
-  pLimits->AddNew<CPDF_String>(least, false);
-  pLimits->AddNew<CPDF_String>(greatest, false);
+  pLimits->AppendNew<CPDF_String>(least, false);
+  pLimits->AppendNew<CPDF_String>(greatest, false);
 }
 
 void CheckLimitsArray(CPDF_Dictionary* pNode,
@@ -44,18 +44,18 @@
 
 void FillNameTreeDict(CPDF_Dictionary* pRootDict) {
   CPDF_Array* pKids = pRootDict->SetNewFor<CPDF_Array>("Kids");
-  CPDF_Dictionary* pKid1 = pKids->AddNew<CPDF_Dictionary>();
+  CPDF_Dictionary* pKid1 = pKids->AppendNew<CPDF_Dictionary>();
 
   // Make the lower and upper limit out of order on purpose.
   AddLimitsArray(pKid1, "9.txt", "1.txt");
   pKids = pKid1->SetNewFor<CPDF_Array>("Kids");
-  CPDF_Dictionary* pKid2 = pKids->AddNew<CPDF_Dictionary>();
-  CPDF_Dictionary* pKid3 = pKids->AddNew<CPDF_Dictionary>();
+  CPDF_Dictionary* pKid2 = pKids->AppendNew<CPDF_Dictionary>();
+  CPDF_Dictionary* pKid3 = pKids->AppendNew<CPDF_Dictionary>();
 
   AddLimitsArray(pKid2, "1.txt", "5.txt");
   pKids = pKid2->SetNewFor<CPDF_Array>("Kids");
-  CPDF_Dictionary* pKid4 = pKids->AddNew<CPDF_Dictionary>();
-  CPDF_Dictionary* pKid5 = pKids->AddNew<CPDF_Dictionary>();
+  CPDF_Dictionary* pKid4 = pKids->AppendNew<CPDF_Dictionary>();
+  CPDF_Dictionary* pKid5 = pKids->AppendNew<CPDF_Dictionary>();
 
   AddLimitsArray(pKid3, "9.txt", "9.txt");
   CPDF_Array* pNames = pKid3->SetNewFor<CPDF_Array>("Names");
@@ -85,8 +85,8 @@
   constexpr char kData[] = "\xFE\xFF\x00\x31";
   for (size_t i = 0; i < sizeof(kData); ++i)
     buf.put(kData[i]);
-  pNames->AddNew<CPDF_String>(ByteString(buf), true);
-  pNames->AddNew<CPDF_Number>(100);
+  pNames->AppendNew<CPDF_String>(ByteString(buf), true);
+  pNames->AppendNew<CPDF_Number>(100);
 
   // Check that the key is as expected.
   CPDF_NameTree nameTree(pRootDict.Get());
diff --git a/fpdfsdk/fpdf_annot.cpp b/fpdfsdk/fpdf_annot.cpp
index 20ac0e6..7c3b849 100644
--- a/fpdfsdk/fpdf_annot.cpp
+++ b/fpdfsdk/fpdf_annot.cpp
@@ -190,14 +190,14 @@
   ASSERT(quad_points);
   ASSERT(array);
 
-  array->AddNew<CPDF_Number>(quad_points->x1);
-  array->AddNew<CPDF_Number>(quad_points->y1);
-  array->AddNew<CPDF_Number>(quad_points->x2);
-  array->AddNew<CPDF_Number>(quad_points->y2);
-  array->AddNew<CPDF_Number>(quad_points->x3);
-  array->AddNew<CPDF_Number>(quad_points->y3);
-  array->AddNew<CPDF_Number>(quad_points->x4);
-  array->AddNew<CPDF_Number>(quad_points->y4);
+  array->AppendNew<CPDF_Number>(quad_points->x1);
+  array->AppendNew<CPDF_Number>(quad_points->y1);
+  array->AppendNew<CPDF_Number>(quad_points->x2);
+  array->AppendNew<CPDF_Number>(quad_points->y2);
+  array->AppendNew<CPDF_Number>(quad_points->x3);
+  array->AppendNew<CPDF_Number>(quad_points->y3);
+  array->AppendNew<CPDF_Number>(quad_points->x4);
+  array->AppendNew<CPDF_Number>(quad_points->y4);
 }
 
 void UpdateBBox(CPDF_Dictionary* annot_dict) {
@@ -299,7 +299,7 @@
   CPDF_Array* pAnnotList = pPage->GetDict()->GetArrayFor("Annots");
   if (!pAnnotList)
     pAnnotList = pPage->GetDict()->SetNewFor<CPDF_Array>("Annots");
-  pAnnotList->Add(pDict);
+  pAnnotList->Append(pDict);
 
   // Caller takes ownership.
   return FPDFAnnotationFromCPDFAnnotContext(pNewAnnot.release());
@@ -562,9 +562,9 @@
   else
     pColor = pAnnotDict->SetNewFor<CPDF_Array>(key);
 
-  pColor->AddNew<CPDF_Number>(R / 255.f);
-  pColor->AddNew<CPDF_Number>(G / 255.f);
-  pColor->AddNew<CPDF_Number>(B / 255.f);
+  pColor->AppendNew<CPDF_Number>(R / 255.f);
+  pColor->AppendNew<CPDF_Number>(G / 255.f);
+  pColor->AppendNew<CPDF_Number>(B / 255.f);
 
   return true;
 }
diff --git a/fpdfsdk/fpdf_doc_unittest.cpp b/fpdfsdk/fpdf_doc_unittest.cpp
index 1c673df..c911096 100644
--- a/fpdfsdk/fpdf_doc_unittest.cpp
+++ b/fpdfsdk/fpdf_doc_unittest.cpp
@@ -217,11 +217,11 @@
 
 TEST_F(PDFDocTest, GetLocationInPage) {
   auto array = pdfium::MakeRetain<CPDF_Array>();
-  array->AddNew<CPDF_Number>(0);  // Page Index.
-  array->AddNew<CPDF_Name>("XYZ");
-  array->AddNew<CPDF_Number>(4);  // X
-  array->AddNew<CPDF_Number>(5);  // Y
-  array->AddNew<CPDF_Number>(6);  // Zoom.
+  array->AppendNew<CPDF_Number>(0);  // Page Index.
+  array->AppendNew<CPDF_Name>("XYZ");
+  array->AppendNew<CPDF_Number>(4);  // X
+  array->AppendNew<CPDF_Number>(5);  // Y
+  array->AppendNew<CPDF_Number>(6);  // Zoom.
 
   FPDF_BOOL hasX;
   FPDF_BOOL hasY;
diff --git a/fpdfsdk/fpdf_editpage.cpp b/fpdfsdk/fpdf_editpage.cpp
index 8e979e0..1590152 100644
--- a/fpdfsdk/fpdf_editpage.cpp
+++ b/fpdfsdk/fpdf_editpage.cpp
@@ -655,10 +655,10 @@
     else
       pRectArray = pAnnotDict->SetNewFor<CPDF_Array>("Rect");
 
-    pRectArray->AddNew<CPDF_Number>(rect.left);
-    pRectArray->AddNew<CPDF_Number>(rect.bottom);
-    pRectArray->AddNew<CPDF_Number>(rect.right);
-    pRectArray->AddNew<CPDF_Number>(rect.top);
+    pRectArray->AppendNew<CPDF_Number>(rect.left);
+    pRectArray->AppendNew<CPDF_Number>(rect.bottom);
+    pRectArray->AppendNew<CPDF_Number>(rect.right);
+    pRectArray->AppendNew<CPDF_Number>(rect.top);
 
     // TODO(unknown): Transform AP's rectangle
   }
diff --git a/fpdfsdk/fpdf_edittext.cpp b/fpdfsdk/fpdf_edittext.cpp
index a3b4208..04a5421 100644
--- a/fpdfsdk/fpdf_edittext.cpp
+++ b/fpdfsdk/fpdf_edittext.cpp
@@ -293,14 +293,14 @@
     uint32_t width =
         std::min(pFont->GetGlyphWidth(dwGlyphIndex),
                  static_cast<uint32_t>(std::numeric_limits<int>::max()));
-    widthsArray->AddNew<CPDF_Number>(static_cast<int>(width));
+    widthsArray->AppendNew<CPDF_Number>(static_cast<int>(width));
     uint32_t nextChar =
         FT_Get_Next_Char(pFont->GetFaceRec(), dwCurrentChar, &dwGlyphIndex);
     // Simple fonts have 1-byte charcodes only.
     if (nextChar > kMaxSimpleFontChar || dwGlyphIndex == 0)
       break;
     for (uint32_t i = dwCurrentChar + 1; i < nextChar; i++)
-      widthsArray->AddNew<CPDF_Number>(0);
+      widthsArray->AppendNew<CPDF_Number>(0);
     dwCurrentChar = nextChar;
   }
   pFontDict->SetNewFor<CPDF_Number>("LastChar",
@@ -381,9 +381,9 @@
     if (std::next(it) == widths.end()) {
       // Only one char left, use format c [w]
       auto oneW = pdfium::MakeRetain<CPDF_Array>();
-      oneW->AddNew<CPDF_Number>(w);
-      widthsArray->AddNew<CPDF_Number>(ch);
-      widthsArray->Add(oneW);
+      oneW->AppendNew<CPDF_Number>(w);
+      widthsArray->AppendNew<CPDF_Number>(ch);
+      widthsArray->Append(oneW);
       break;
     }
     ++it;
@@ -392,7 +392,7 @@
     if (next_ch == ch + 1 && next_w == w) {
       // The array can have a group c_first c_last w: all CIDs in the range from
       // c_first to c_last will have width w
-      widthsArray->AddNew<CPDF_Number>(ch);
+      widthsArray->AppendNew<CPDF_Number>(ch);
       ch = next_ch;
       while (true) {
         auto next_it = std::next(it);
@@ -403,31 +403,31 @@
         ++it;
         ch = it->first;
       }
-      widthsArray->AddNew<CPDF_Number>(ch);
-      widthsArray->AddNew<CPDF_Number>(w);
+      widthsArray->AppendNew<CPDF_Number>(ch);
+      widthsArray->AppendNew<CPDF_Number>(w);
       continue;
     }
     // Otherwise we can have a group of the form c [w1 w2 ...]: c has width
     // w1, c+1 has width w2, etc.
-    widthsArray->AddNew<CPDF_Number>(ch);
+    widthsArray->AppendNew<CPDF_Number>(ch);
     auto curWidthArray = pdfium::MakeRetain<CPDF_Array>();
-    curWidthArray->AddNew<CPDF_Number>(w);
-    curWidthArray->AddNew<CPDF_Number>(next_w);
+    curWidthArray->AppendNew<CPDF_Number>(w);
+    curWidthArray->AppendNew<CPDF_Number>(next_w);
     while (true) {
       auto next_it = std::next(it);
       if (next_it == widths.end() || next_it->first != it->first + 1)
         break;
       ++it;
-      curWidthArray->AddNew<CPDF_Number>(static_cast<int>(it->second));
+      curWidthArray->AppendNew<CPDF_Number>(static_cast<int>(it->second));
     }
-    widthsArray->Add(curWidthArray);
+    widthsArray->Append(curWidthArray);
   }
   pCIDFont->SetNewFor<CPDF_Reference>("W", pDoc, widthsArray->GetObjNum());
 
   // TODO(npm): Support vertical writing
 
   auto* pDescendant = pFontDict->SetNewFor<CPDF_Array>("DescendantFonts");
-  pDescendant->AddNew<CPDF_Reference>(pDoc, pCIDFont->GetObjNum());
+  pDescendant->AppendNew<CPDF_Reference>(pDoc, pCIDFont->GetObjNum());
 
   CPDF_Stream* toUnicodeStream = LoadUnicode(pDoc, to_unicode);
   pFontDict->SetNewFor<CPDF_Reference>("ToUnicode", pDoc,
diff --git a/fpdfsdk/fpdf_flatten.cpp b/fpdfsdk/fpdf_flatten.cpp
index 424e1b4..1f949cb 100644
--- a/fpdfsdk/fpdf_flatten.cpp
+++ b/fpdfsdk/fpdf_flatten.cpp
@@ -203,7 +203,7 @@
   if (pContentsArray) {
     pContentsArray->InsertAt(
         0, NewIndirectContentsStream(pDocument, "q")->MakeReference(pDocument));
-    pContentsArray->Add(
+    pContentsArray->Append(
         NewIndirectContentsStream(pDocument, "Q")->MakeReference(pDocument));
   } else {
     ByteString sStream = "q\n";
@@ -215,13 +215,13 @@
     }
     pContentsStream->SetDataAndRemoveFilter(sStream.raw_span());
     pContentsArray = pDocument->NewIndirect<CPDF_Array>();
-    pContentsArray->AddNew<CPDF_Reference>(pDocument,
-                                           pContentsStream->GetObjNum());
+    pContentsArray->AppendNew<CPDF_Reference>(pDocument,
+                                              pContentsStream->GetObjNum());
     pPage->SetNewFor<CPDF_Reference>(pdfium::page_object::kContents, pDocument,
                                      pContentsArray->GetObjNum());
   }
   if (!key.IsEmpty()) {
-    pContentsArray->Add(
+    pContentsArray->Append(
         NewIndirectContentsStream(pDocument, GenerateFlattenedContent(key))
             ->MakeReference(pDocument));
   }
diff --git a/fpdfsdk/fpdf_transformpage.cpp b/fpdfsdk/fpdf_transformpage.cpp
index 86bed33..53de22b 100644
--- a/fpdfsdk/fpdf_transformpage.cpp
+++ b/fpdfsdk/fpdf_transformpage.cpp
@@ -243,12 +243,12 @@
 
   if (CPDF_Array* pContentArray = ToArray(pContentObj)) {
     pContentArray->InsertNewAt<CPDF_Reference>(0, pDoc, pStream->GetObjNum());
-    pContentArray->AddNew<CPDF_Reference>(pDoc, pEndStream->GetObjNum());
+    pContentArray->AppendNew<CPDF_Reference>(pDoc, pEndStream->GetObjNum());
   } else if (pContentObj->IsStream() && !pContentObj->IsInline()) {
     pContentArray = pDoc->NewIndirect<CPDF_Array>();
-    pContentArray->AddNew<CPDF_Reference>(pDoc, pStream->GetObjNum());
-    pContentArray->AddNew<CPDF_Reference>(pDoc, pContentObj->GetObjNum());
-    pContentArray->AddNew<CPDF_Reference>(pDoc, pEndStream->GetObjNum());
+    pContentArray->AppendNew<CPDF_Reference>(pDoc, pStream->GetObjNum());
+    pContentArray->AppendNew<CPDF_Reference>(pDoc, pContentObj->GetObjNum());
+    pContentArray->AppendNew<CPDF_Reference>(pDoc, pEndStream->GetObjNum());
     pPageDict->SetNewFor<CPDF_Reference>(pdfium::page_object::kContents, pDoc,
                                          pContentArray->GetObjNum());
   }
@@ -417,8 +417,8 @@
     pArray->InsertNewAt<CPDF_Reference>(0, pDoc, pStream->GetObjNum());
   } else if (pContentObj->IsStream() && !pContentObj->IsInline()) {
     CPDF_Array* pContentArray = pDoc->NewIndirect<CPDF_Array>();
-    pContentArray->AddNew<CPDF_Reference>(pDoc, pStream->GetObjNum());
-    pContentArray->AddNew<CPDF_Reference>(pDoc, pContentObj->GetObjNum());
+    pContentArray->AppendNew<CPDF_Reference>(pDoc, pStream->GetObjNum());
+    pContentArray->AppendNew<CPDF_Reference>(pDoc, pContentObj->GetObjNum());
     pPageDict->SetNewFor<CPDF_Reference>(pdfium::page_object::kContents, pDoc,
                                          pContentArray->GetObjNum());
   }
diff --git a/testing/fuzzers/pdf_hint_table_fuzzer.cc b/testing/fuzzers/pdf_hint_table_fuzzer.cc
index 1540074..d7ac6c1 100644
--- a/testing/fuzzers/pdf_hint_table_fuzzer.cc
+++ b/testing/fuzzers/pdf_hint_table_fuzzer.cc
@@ -76,9 +76,9 @@
 
   auto hint_info = pdfium::MakeRetain<CPDF_Array>();
   // Add primary hint stream offset
-  hint_info->AddNew<CPDF_Number>(GetData(&data32, &data, &size));
+  hint_info->AppendNew<CPDF_Number>(GetData(&data32, &data, &size));
   // Add primary hint stream size
-  hint_info->AddNew<CPDF_Number>(GetData(&data32, &data, &size));
+  hint_info->AppendNew<CPDF_Number>(GetData(&data32, &data, &size));
   // Set hint stream info.
   linearized_dict->SetFor("H", std::move(hint_info));
 
