Fix 24 ClangTidy - Readability/Naming findings in /pdfium/.

These fixes are automatically created by various analysis tools, but
have been manually triggered to be applied.  See go/code-findings-fixes.

* function 'CPDF_FontGlobals::Set' has a definition with different
  parameter names
* function 'PDF_DataDecode' has a definition with different parameter
  names
* function 'CBA_FontMap::GetAnnotDefaultFont' has a definition with
  different parameter names
* function 'CPDF_AnnotList::DisplayAnnots' has a definition with
  different parameter names
* function 'CPDF_StructElement::LoadKid' has a definition with
  different parameter names
* function 'CPDF_StructTree::AddPageNode' has a definition with
  different parameter names
* function 'CPDF_TextPage::IsSameAsPreTextObject' has a definition with
  different parameter names
* function 'fxcodec::BasicModule::RunLengthEncode' has a definition
  with different parameter names
* function 'fxcodec::BasicModule::A85Encode' has a definition with
  different parameter names
* function 'fxcodec::FaxModule::CreateDecoder' has a definition with
  different parameter names
* function 'fxcodec::FlateScanlineDecoder::FlateScanlineDecoder'
  has a definition with different parameter names
* function 'fxcodec::FlatePredictorScanlineDecoder
  ::FlatePredictorScanlineDecoder' has a definition with different
  parameter names
* function 'fxcodec::FlateModule::CreateDecoder' has a definition with
  different parameter names
* function 'fxcodec::FlateModule::FlateOrLZWDecode' has a definition
  with different parameter names
* function 'CJBig2_BitStream::readNBits' has a definition with
  different parameter names (2 times)
* function 'CJBig2_Image::CJBig2_Image' has a definition with different
  parameter names
* function 'CJBig2_Image::SetPixel' has a definition with different
  parameter names
* function 'fxcodec::(anonymous namespace)::JpegDecoder::Create' has a
  definition with different parameter names
* function 'fxcodec::JpegModule::CreateDecoder' has a definition with
  different parameter names
* function 'CFX_Face::New' has a definition with different parameter
  names
* function 'agg::vertex_sequence::close' has a definition with different
  parameter names
* function 'FPDFImageObj_GetMatrix' has a definition with different
  parameter names
* function 'FPDFDest_GetLocationInPage' has a definition with different
  parameter names

CLEANUP=go/code-findings-fixes
CODESEARCH_LAYER=clang-tidy-readability-naming
PiperOrigin-RevId: 255794566
Change-Id: I201d8f4c6f89d8ee86bfc0cc5d008481988a040f
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/56991
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/core/fpdfapi/font/cpdf_fontglobals.h b/core/fpdfapi/font/cpdf_fontglobals.h
index 1f856e3..6ae9064 100644
--- a/core/fpdfapi/font/cpdf_fontglobals.h
+++ b/core/fpdfapi/font/cpdf_fontglobals.h
@@ -28,7 +28,7 @@
   CPDF_Font* Find(CPDF_Document* pDoc, CFX_FontMapper::StandardFont index);
 
   // Takes ownership of |pFont|, returns unowned pointer to it.
-  CPDF_Font* Set(CPDF_Document* key,
+  CPDF_Font* Set(CPDF_Document* pDoc,
                  CFX_FontMapper::StandardFont index,
                  std::unique_ptr<CPDF_Font> pFont);
 
diff --git a/core/fpdfapi/parser/fpdf_parser_decode.h b/core/fpdfapi/parser/fpdf_parser_decode.h
index 197fe07..6a1a1ce 100644
--- a/core/fpdfapi/parser/fpdf_parser_decode.h
+++ b/core/fpdfapi/parser/fpdf_parser_decode.h
@@ -86,6 +86,6 @@
     std::unique_ptr<uint8_t, FxFreeDeleter>* dest_buf,
     uint32_t* dest_size,
     ByteString* ImageEncoding,
-    UnownedPtr<const CPDF_Dictionary>* pImageParms);
+    UnownedPtr<const CPDF_Dictionary>* pImageParams);
 
 #endif  // CORE_FPDFAPI_PARSER_FPDF_PARSER_DECODE_H_
diff --git a/core/fpdfdoc/cba_fontmap.h b/core/fpdfdoc/cba_fontmap.h
index 9d27380..89455b2 100644
--- a/core/fpdfdoc/cba_fontmap.h
+++ b/core/fpdfdoc/cba_fontmap.h
@@ -55,7 +55,7 @@
   CPDF_Font* FindResFontSameCharset(const CPDF_Dictionary* pResDict,
                                     ByteString* sFontAlias,
                                     int32_t nCharset);
-  CPDF_Font* GetAnnotDefaultFont(ByteString* csNameTag);
+  CPDF_Font* GetAnnotDefaultFont(ByteString* sAlias);
   void AddFontToAnnotDict(CPDF_Font* pFont, const ByteString& sAlias);
 
   bool KnowWord(int32_t nFontIndex, uint16_t word);
diff --git a/core/fpdfdoc/cpdf_annotlist.h b/core/fpdfdoc/cpdf_annotlist.h
index 6de9952..204d29b 100644
--- a/core/fpdfdoc/cpdf_annotlist.h
+++ b/core/fpdfdoc/cpdf_annotlist.h
@@ -38,7 +38,7 @@
                      CFX_RenderDevice* pDevice,
                      CPDF_RenderContext* pContext,
                      bool bPrinting,
-                     const CFX_Matrix* pMatrix,
+                     const CFX_Matrix* pUser2Device,
                      uint32_t dwAnnotFlags,
                      CPDF_RenderOptions* pOptions,
                      FX_RECT* pClipRect);
diff --git a/core/fpdfdoc/cpdf_structelement.h b/core/fpdfdoc/cpdf_structelement.h
index d4981a5..49044e9 100644
--- a/core/fpdfdoc/cpdf_structelement.h
+++ b/core/fpdfdoc/cpdf_structelement.h
@@ -57,7 +57,7 @@
 
   void LoadKids(const CPDF_Dictionary* pDict);
   void LoadKid(uint32_t PageObjNum,
-               const CPDF_Object* pObj,
+               const CPDF_Object* pKidObj,
                CPDF_StructKid* pKid);
 
   UnownedPtr<CPDF_StructTree> const m_pTree;
diff --git a/core/fpdfdoc/cpdf_structtree.h b/core/fpdfdoc/cpdf_structtree.h
index 13bf148..8d8172b 100644
--- a/core/fpdfdoc/cpdf_structtree.h
+++ b/core/fpdfdoc/cpdf_structtree.h
@@ -38,7 +38,7 @@
       std::map<const CPDF_Dictionary*, RetainPtr<CPDF_StructElement>>;
 
   void LoadPageTree(const CPDF_Dictionary* pPageDict);
-  RetainPtr<CPDF_StructElement> AddPageNode(const CPDF_Dictionary* pElement,
+  RetainPtr<CPDF_StructElement> AddPageNode(const CPDF_Dictionary* pDict,
                                             StructElementMap* map,
                                             int nLevel);
   bool AddTopLevelNode(const CPDF_Dictionary* pDict,
diff --git a/core/fpdftext/cpdf_textpage.h b/core/fpdftext/cpdf_textpage.h
index 4e92432..db53057 100644
--- a/core/fpdftext/cpdf_textpage.h
+++ b/core/fpdftext/cpdf_textpage.h
@@ -136,7 +136,7 @@
   Optional<PAGECHAR_INFO> GenerateCharInfo(wchar_t unicode);
   bool IsSameAsPreTextObject(CPDF_TextObject* pTextObj,
                              const CPDF_PageObjectHolder* pObjList,
-                             CPDF_PageObjectHolder::const_iterator ObjPos);
+                             CPDF_PageObjectHolder::const_iterator iter);
   bool IsSameTextObject(CPDF_TextObject* pTextObj1, CPDF_TextObject* pTextObj2);
   void CloseTempLine();
   FPDFText_MarkedContent PreMarkedContent(PDFTEXT_Obj pObj);
diff --git a/core/fxcodec/basic/basicmodule.h b/core/fxcodec/basic/basicmodule.h
index 6b70d89..1f4b4e0 100644
--- a/core/fxcodec/basic/basicmodule.h
+++ b/core/fxcodec/basic/basicmodule.h
@@ -26,11 +26,11 @@
       int nComps,
       int bpc);
 
-  static bool RunLengthEncode(pdfium::span<const uint8_t> src_buf,
+  static bool RunLengthEncode(pdfium::span<const uint8_t> src_span,
                               std::unique_ptr<uint8_t, FxFreeDeleter>* dest_buf,
                               uint32_t* dest_size);
 
-  static bool A85Encode(pdfium::span<const uint8_t> src_buf,
+  static bool A85Encode(pdfium::span<const uint8_t> src_span,
                         std::unique_ptr<uint8_t, FxFreeDeleter>* dest_buf,
                         uint32_t* dest_size);
 
diff --git a/core/fxcodec/fax/faxmodule.h b/core/fxcodec/fax/faxmodule.h
index ba37bfb..1c66f08 100644
--- a/core/fxcodec/fax/faxmodule.h
+++ b/core/fxcodec/fax/faxmodule.h
@@ -21,7 +21,7 @@
 class FaxModule {
  public:
   static std::unique_ptr<ScanlineDecoder> CreateDecoder(
-      pdfium::span<const uint8_t> src_buf,
+      pdfium::span<const uint8_t> src_span,
       int width,
       int height,
       int K,
diff --git a/core/fxcodec/flate/flatemodule.cpp b/core/fxcodec/flate/flatemodule.cpp
index 6f53540..6038fa7 100644
--- a/core/fxcodec/flate/flatemodule.cpp
+++ b/core/fxcodec/flate/flatemodule.cpp
@@ -560,7 +560,7 @@
 
 class FlateScanlineDecoder : public ScanlineDecoder {
  public:
-  FlateScanlineDecoder(pdfium::span<const uint8_t> src_buf,
+  FlateScanlineDecoder(pdfium::span<const uint8_t> src_span,
                        int width,
                        int height,
                        int nComps,
@@ -615,7 +615,7 @@
 
 class FlatePredictorScanlineDecoder final : public FlateScanlineDecoder {
  public:
-  FlatePredictorScanlineDecoder(pdfium::span<const uint8_t> src_buf,
+  FlatePredictorScanlineDecoder(pdfium::span<const uint8_t> src_span,
                                 int width,
                                 int height,
                                 int comps,
diff --git a/core/fxcodec/flate/flatemodule.h b/core/fxcodec/flate/flatemodule.h
index 5a34b6a..8011414 100644
--- a/core/fxcodec/flate/flatemodule.h
+++ b/core/fxcodec/flate/flatemodule.h
@@ -20,7 +20,7 @@
 class FlateModule {
  public:
   static std::unique_ptr<ScanlineDecoder> CreateDecoder(
-      pdfium::span<const uint8_t> src_buf,
+      pdfium::span<const uint8_t> src_span,
       int width,
       int height,
       int nComps,
@@ -32,7 +32,7 @@
 
   static uint32_t FlateOrLZWDecode(
       bool bLZW,
-      pdfium::span<const uint8_t> src_buf,
+      pdfium::span<const uint8_t> src_span,
       bool bEarlyChange,
       int predictor,
       int Colors,
diff --git a/core/fxcodec/jbig2/JBig2_BitStream.h b/core/fxcodec/jbig2/JBig2_BitStream.h
index 86550c2..50a80ed 100644
--- a/core/fxcodec/jbig2/JBig2_BitStream.h
+++ b/core/fxcodec/jbig2/JBig2_BitStream.h
@@ -16,8 +16,8 @@
   ~CJBig2_BitStream();
 
   // TODO(thestig): readFoo() should return bool.
-  int32_t readNBits(uint32_t nBits, uint32_t* dwResult);
-  int32_t readNBits(uint32_t nBits, int32_t* nResult);
+  int32_t readNBits(uint32_t dwBits, uint32_t* dwResult);
+  int32_t readNBits(uint32_t dwBits, int32_t* nResult);
   int32_t read1Bit(uint32_t* dwResult);
   int32_t read1Bit(bool* bResult);
   int32_t read1Byte(uint8_t* cResult);
diff --git a/core/fxcodec/jbig2/JBig2_Image.h b/core/fxcodec/jbig2/JBig2_Image.h
index 094971b..4db5d4e 100644
--- a/core/fxcodec/jbig2/JBig2_Image.h
+++ b/core/fxcodec/jbig2/JBig2_Image.h
@@ -27,7 +27,7 @@
  public:
   CJBig2_Image(int32_t w, int32_t h);
   CJBig2_Image(int32_t w, int32_t h, int32_t stride, uint8_t* pBuf);
-  CJBig2_Image(const CJBig2_Image& im);
+  CJBig2_Image(const CJBig2_Image& other);
   ~CJBig2_Image();
 
   static bool IsValidImageSize(int32_t w, int32_t h);
@@ -39,7 +39,7 @@
   uint8_t* data() const { return m_pData.Get(); }
 
   int GetPixel(int32_t x, int32_t y) const;
-  void SetPixel(int32_t x, int32_t y, int bVal);
+  void SetPixel(int32_t x, int32_t y, int v);
 
   uint8_t* GetLineUnsafe(int32_t y) const { return data() + y * m_nStride; }
   uint8_t* GetLine(int32_t y) const {
diff --git a/core/fxcodec/jpeg/jpegmodule.cpp b/core/fxcodec/jpeg/jpegmodule.cpp
index fe07cf5..5064bfe 100644
--- a/core/fxcodec/jpeg/jpegmodule.cpp
+++ b/core/fxcodec/jpeg/jpegmodule.cpp
@@ -223,7 +223,7 @@
   JpegDecoder();
   ~JpegDecoder() override;
 
-  bool Create(pdfium::span<const uint8_t> src_buf,
+  bool Create(pdfium::span<const uint8_t> src_span,
               int width,
               int height,
               int nComps,
diff --git a/core/fxcodec/jpeg/jpegmodule.h b/core/fxcodec/jpeg/jpegmodule.h
index 607e48d..353de7f 100644
--- a/core/fxcodec/jpeg/jpegmodule.h
+++ b/core/fxcodec/jpeg/jpegmodule.h
@@ -24,7 +24,7 @@
 class JpegModule final : public ModuleIface {
  public:
   std::unique_ptr<ScanlineDecoder> CreateDecoder(
-      pdfium::span<const uint8_t> src_buf,
+      pdfium::span<const uint8_t> src_span,
       int width,
       int height,
       int nComps,
diff --git a/core/fxge/cfx_face.h b/core/fxge/cfx_face.h
index fb8b8a4..2412043 100644
--- a/core/fxge/cfx_face.h
+++ b/core/fxge/cfx_face.h
@@ -14,7 +14,7 @@
  public:
   static RetainPtr<CFX_Face> New(FT_Library library,
                                  const RetainPtr<Retainable>& pDesc,
-                                 pdfium::span<const FT_Byte> file_span,
+                                 pdfium::span<const FT_Byte> data,
                                  FT_Long face_index);
 
   static RetainPtr<CFX_Face> Open(FT_Library library,
diff --git a/public/fpdf_doc.h b/public/fpdf_doc.h
index f5a270a..565314e 100644
--- a/public/fpdf_doc.h
+++ b/public/fpdf_doc.h
@@ -218,9 +218,9 @@
 // hasYVal or hasZoomVal flags are true.
 FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
 FPDFDest_GetLocationInPage(FPDF_DEST dest,
-                           FPDF_BOOL* hasXCoord,
-                           FPDF_BOOL* hasYCoord,
-                           FPDF_BOOL* hasZoom,
+                           FPDF_BOOL* hasXVal,
+                           FPDF_BOOL* hasYVal,
+                           FPDF_BOOL* hasZoomVal,
                            FS_FLOAT* x,
                            FS_FLOAT* y,
                            FS_FLOAT* zoom);
diff --git a/public/fpdf_edit.h b/public/fpdf_edit.h
index d7b02e6..b6df866 100644
--- a/public/fpdf_edit.h
+++ b/public/fpdf_edit.h
@@ -582,13 +582,14 @@
 // and used to scale, rotate, shear and translate the image.
 //
 // Returns TRUE on success.
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFImageObj_GetMatrix(FPDF_PAGEOBJECT path,
-                                                           double* a,
-                                                           double* b,
-                                                           double* c,
-                                                           double* d,
-                                                           double* e,
-                                                           double* f);
+FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
+FPDFImageObj_GetMatrix(FPDF_PAGEOBJECT image_object,
+                       double* a,
+                       double* b,
+                       double* c,
+                       double* d,
+                       double* e,
+                       double* f);
 
 // Set the transform matrix of |image_object|.
 //
diff --git a/third_party/agg23/agg_vertex_sequence.h b/third_party/agg23/agg_vertex_sequence.h
index 448e57b..80eabbb 100644
--- a/third_party/agg23/agg_vertex_sequence.h
+++ b/third_party/agg23/agg_vertex_sequence.h
@@ -31,7 +31,7 @@
     typedef pod_deque<T, S> base_type;
     void add(const T& val);
     void modify_last(const T& val);
-    void close(bool remove_flag);
+    void close(bool closed);
 };
 template<class T, unsigned S>
 void vertex_sequence<T, S>::add(const T& val)