Remove more unneeded STL #includes from headers.

Remove some variables named "string" to avoid false positives from the
linter.

Change-Id: I00a53e6970451fd0cea8ab2f8178183650ca00d2
Reviewed-on: https://pdfium-review.googlesource.com/42810
Reviewed-by: Tom Sepez <tsepez@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 d5156aa..0e2985f 100644
--- a/core/fpdfapi/font/cpdf_fontglobals.h
+++ b/core/fpdfapi/font/cpdf_fontglobals.h
@@ -9,7 +9,6 @@
 
 #include <map>
 #include <memory>
-#include <utility>
 
 #include "core/fpdfapi/cmaps/cmap_int.h"
 #include "core/fpdfapi/font/cfx_stockfontarray.h"
diff --git a/core/fpdfapi/parser/cpdf_simple_parser.h b/core/fpdfapi/parser/cpdf_simple_parser.h
index c8dae23..f9461b6 100644
--- a/core/fpdfapi/parser/cpdf_simple_parser.h
+++ b/core/fpdfapi/parser/cpdf_simple_parser.h
@@ -7,8 +7,6 @@
 #ifndef CORE_FPDFAPI_PARSER_CPDF_SIMPLE_PARSER_H_
 #define CORE_FPDFAPI_PARSER_CPDF_SIMPLE_PARSER_H_
 
-#include <utility>
-
 #include "core/fxcrt/fx_string.h"
 #include "core/fxcrt/fx_system.h"
 #include "third_party/base/span.h"
diff --git a/core/fpdfapi/parser/cpdf_syntax_parser.cpp b/core/fpdfapi/parser/cpdf_syntax_parser.cpp
index cc83fa0..45e0f17 100644
--- a/core/fpdfapi/parser/cpdf_syntax_parser.cpp
+++ b/core/fpdfapi/parser/cpdf_syntax_parser.cpp
@@ -403,6 +403,10 @@
   return GetNextWord(nullptr);
 }
 
+void CPDF_SyntaxParser::SetPos(FX_FILESIZE pos) {
+  m_Pos = std::min(pos, m_FileLen);
+}
+
 std::unique_ptr<CPDF_Object> CPDF_SyntaxParser::GetObjectBody(
     CPDF_IndirectObjectHolder* pObjList) {
   const CPDF_ReadValidator::Session read_session(GetValidator().Get());
diff --git a/core/fpdfapi/parser/cpdf_syntax_parser.h b/core/fpdfapi/parser/cpdf_syntax_parser.h
index 92f28d9..6e6b98c 100644
--- a/core/fpdfapi/parser/cpdf_syntax_parser.h
+++ b/core/fpdfapi/parser/cpdf_syntax_parser.h
@@ -7,7 +7,6 @@
 #ifndef CORE_FPDFAPI_PARSER_CPDF_SYNTAX_PARSER_H_
 #define CORE_FPDFAPI_PARSER_CPDF_SYNTAX_PARSER_H_
 
-#include <algorithm>
 #include <memory>
 #include <vector>
 
@@ -42,7 +41,7 @@
   }
 
   FX_FILESIZE GetPos() const { return m_Pos; }
-  void SetPos(FX_FILESIZE pos) { m_Pos = std::min(pos, m_FileLen); }
+  void SetPos(FX_FILESIZE pos);
 
   std::unique_ptr<CPDF_Object> GetObjectBody(
       CPDF_IndirectObjectHolder* pObjList);
diff --git a/core/fxcrt/cfx_seekablestreamproxy.h b/core/fxcrt/cfx_seekablestreamproxy.h
index b193b18..42123fd 100644
--- a/core/fxcrt/cfx_seekablestreamproxy.h
+++ b/core/fxcrt/cfx_seekablestreamproxy.h
@@ -7,8 +7,6 @@
 #ifndef CORE_FXCRT_CFX_SEEKABLESTREAMPROXY_H_
 #define CORE_FXCRT_CFX_SEEKABLESTREAMPROXY_H_
 
-#include <algorithm>
-
 #include "core/fxcrt/fx_stream.h"
 #include "core/fxcrt/fx_system.h"
 #include "core/fxcrt/retain_ptr.h"
diff --git a/core/fxcrt/css/cfx_cssdeclaration.h b/core/fxcrt/css/cfx_cssdeclaration.h
index 8d67bb7..5092da4 100644
--- a/core/fxcrt/css/cfx_cssdeclaration.h
+++ b/core/fxcrt/css/cfx_cssdeclaration.h
@@ -8,7 +8,6 @@
 #define CORE_FXCRT_CSS_CFX_CSSDECLARATION_H_
 
 #include <memory>
-#include <utility>
 #include <vector>
 
 #include "core/fxcrt/css/cfx_cssdata.h"
diff --git a/core/fxcrt/fileaccess_iface.h b/core/fxcrt/fileaccess_iface.h
index c438f9e..210080e 100644
--- a/core/fxcrt/fileaccess_iface.h
+++ b/core/fxcrt/fileaccess_iface.h
@@ -7,7 +7,6 @@
 #ifndef CORE_FXCRT_FILEACCESS_IFACE_H_
 #define CORE_FXCRT_FILEACCESS_IFACE_H_
 
-#include <algorithm>
 #include <memory>
 
 #include "core/fxcrt/fx_safe_types.h"
diff --git a/core/fxcrt/maybe_owned.h b/core/fxcrt/maybe_owned.h
index ac3a81d..511e632 100644
--- a/core/fxcrt/maybe_owned.h
+++ b/core/fxcrt/maybe_owned.h
@@ -5,7 +5,6 @@
 #ifndef CORE_FXCRT_MAYBE_OWNED_H_
 #define CORE_FXCRT_MAYBE_OWNED_H_
 
-#include <algorithm>
 #include <memory>
 #include <utility>
 
diff --git a/core/fxcrt/string_view_template.h b/core/fxcrt/string_view_template.h
index d774e3f..e459f2d 100644
--- a/core/fxcrt/string_view_template.h
+++ b/core/fxcrt/string_view_template.h
@@ -10,7 +10,6 @@
 #include <algorithm>
 #include <iterator>
 #include <type_traits>
-#include <utility>
 #include <vector>
 
 #include "core/fxcrt/fx_system.h"
diff --git a/core/fxcrt/xml/cfx_xmlparser.cpp b/core/fxcrt/xml/cfx_xmlparser.cpp
index d66d980..97ba90d 100644
--- a/core/fxcrt/xml/cfx_xmlparser.cpp
+++ b/core/fxcrt/xml/cfx_xmlparser.cpp
@@ -9,6 +9,7 @@
 #include <algorithm>
 #include <cwctype>
 #include <iterator>
+#include <stack>
 #include <utility>
 
 #include "core/fxcrt/cfx_seekablestreamproxy.h"
diff --git a/core/fxcrt/xml/cfx_xmlparser.h b/core/fxcrt/xml/cfx_xmlparser.h
index 4d9184d..4669680 100644
--- a/core/fxcrt/xml/cfx_xmlparser.h
+++ b/core/fxcrt/xml/cfx_xmlparser.h
@@ -8,7 +8,6 @@
 #define CORE_FXCRT_XML_CFX_XMLPARSER_H_
 
 #include <memory>
-#include <stack>
 #include <vector>
 
 #include "core/fxcrt/fx_string.h"
diff --git a/fpdfsdk/cpdfsdk_widget.h b/fpdfsdk/cpdfsdk_widget.h
index a1ff923..e7d5f6d 100644
--- a/fpdfsdk/cpdfsdk_widget.h
+++ b/fpdfsdk/cpdfsdk_widget.h
@@ -7,8 +7,6 @@
 #ifndef FPDFSDK_CPDFSDK_WIDGET_H_
 #define FPDFSDK_CPDFSDK_WIDGET_H_
 
-#include <set>
-
 #include "core/fpdfdoc/cpdf_aaction.h"
 #include "core/fpdfdoc/cpdf_action.h"
 #include "core/fpdfdoc/cpdf_annot.h"
diff --git a/fxjs/cjs_delaydata.h b/fxjs/cjs_delaydata.h
index deeb65d..f4c7820 100644
--- a/fxjs/cjs_delaydata.h
+++ b/fxjs/cjs_delaydata.h
@@ -7,7 +7,6 @@
 #ifndef FXJS_CJS_DELAYDATA_H_
 #define FXJS_CJS_DELAYDATA_H_
 
-#include <string>
 #include <vector>
 
 #include "core/fxcrt/fx_coordinates.h"
@@ -24,7 +23,7 @@
   WideString sFieldName;
   int32_t num;
   bool b;
-  ByteString string;
+  ByteString bytestring;
   WideString widestring;
   CFX_FloatRect rect;
   CFX_Color color;
diff --git a/fxjs/cjs_field.cpp b/fxjs/cjs_field.cpp
index 1f39051..45baf61 100644
--- a/fxjs/cjs_field.cpp
+++ b/fxjs/cjs_field.cpp
@@ -2608,10 +2608,10 @@
   m_pJSDoc->AddDelayData(std::move(pNewData));
 }
 
-void CJS_Field::AddDelay_String(FIELD_PROP prop, const ByteString& string) {
+void CJS_Field::AddDelay_String(FIELD_PROP prop, const ByteString& str) {
   auto pNewData =
       pdfium::MakeUnique<CJS_DelayData>(prop, m_nFormControlIndex, m_FieldName);
-  pNewData->string = string;
+  pNewData->bytestring = str;
   m_pJSDoc->AddDelayData(std::move(pNewData));
 }
 
@@ -2644,7 +2644,7 @@
   switch (pData->eProp) {
     case FP_BORDERSTYLE:
       SetBorderStyle(pFormFillEnv, pData->sFieldName, pData->nControlIndex,
-                     pData->string);
+                     pData->bytestring);
       break;
     case FP_CURRENTVALUEINDICES:
       SetCurrentValueIndices(pFormFillEnv, pData->sFieldName,
diff --git a/fxjs/cjs_field.h b/fxjs/cjs_field.h
index 4f21710..d4abb69 100644
--- a/fxjs/cjs_field.h
+++ b/fxjs/cjs_field.h
@@ -360,7 +360,7 @@
 
   void AddDelay_Int(FIELD_PROP prop, int32_t n);
   void AddDelay_Bool(FIELD_PROP prop, bool b);
-  void AddDelay_String(FIELD_PROP prop, const ByteString& string);
+  void AddDelay_String(FIELD_PROP prop, const ByteString& str);
   void AddDelay_Rect(FIELD_PROP prop, const CFX_FloatRect& rect);
   void AddDelay_WordArray(FIELD_PROP prop, const std::vector<uint32_t>& array);
   void AddDelay_WideStringArray(FIELD_PROP prop,
diff --git a/fxjs/cjs_publicmethods.h b/fxjs/cjs_publicmethods.h
index f83375c..049fa68 100644
--- a/fxjs/cjs_publicmethods.h
+++ b/fxjs/cjs_publicmethods.h
@@ -7,7 +7,6 @@
 #ifndef FXJS_CJS_PUBLICMETHODS_H_
 #define FXJS_CJS_PUBLICMETHODS_H_
 
-#include <string>
 #include <vector>
 
 #include "fxjs/js_define.h"
@@ -137,11 +136,11 @@
       const v8::FunctionCallbackInfo<v8::Value>& info);
 
   static const JSMethodSpec GlobalFunctionSpecs[];
-  static int ParseStringInteger(const WideString& string,
+  static int ParseStringInteger(const WideString& str,
                                 size_t nStart,
                                 size_t* pSkip,
                                 size_t nMaxStep);
-  static WideString ParseStringString(const WideString& string,
+  static WideString ParseStringString(const WideString& str,
                                       size_t nStart,
                                       size_t* pSkip);
   static double ParseNormalDate(const WideString& value, bool* bWrongFormat);
diff --git a/fxjs/js_define.h b/fxjs/js_define.h
index 0d8c43f..9187e60 100644
--- a/fxjs/js_define.h
+++ b/fxjs/js_define.h
@@ -7,7 +7,6 @@
 #ifndef FXJS_JS_DEFINE_H_
 #define FXJS_JS_DEFINE_H_
 
-#include <utility>
 #include <vector>
 
 #include "core/fxcrt/unowned_ptr.h"
diff --git a/xfa/fxfa/parser/cxfa_itemlayoutprocessor.h b/xfa/fxfa/parser/cxfa_itemlayoutprocessor.h
index 9c25fa8..d021ca3 100644
--- a/xfa/fxfa/parser/cxfa_itemlayoutprocessor.h
+++ b/xfa/fxfa/parser/cxfa_itemlayoutprocessor.h
@@ -11,7 +11,6 @@
 
 #include <list>
 #include <map>
-#include <tuple>
 #include <vector>
 
 #include "core/fxcrt/fx_coordinates.h"