Remove unnecessary includes of fx_system.h, part 4

-- remove one fx_coordinates.h include while at it.
-- add fx_system.h in one place for consistent windows pollution.

Change-Id: I11314d8aac1075196c03120fec1e104013573159
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/83490
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
diff --git a/core/fxcodec/bmp/bmp_decoder.h b/core/fxcodec/bmp/bmp_decoder.h
index eda32c5..29193a2 100644
--- a/core/fxcodec/bmp/bmp_decoder.h
+++ b/core/fxcodec/bmp/bmp_decoder.h
@@ -11,6 +11,7 @@
 #include <vector>
 
 #include "core/fxcodec/progressive_decoder_iface.h"
+#include "core/fxcrt/fx_system.h"
 #include "core/fxcrt/retain_ptr.h"
 #include "third_party/base/span.h"
 
diff --git a/core/fxcodec/flate/flatemodule.h b/core/fxcodec/flate/flatemodule.h
index 8ce5aa5..8d33f22 100644
--- a/core/fxcodec/flate/flatemodule.h
+++ b/core/fxcodec/flate/flatemodule.h
@@ -7,10 +7,11 @@
 #ifndef CORE_FXCODEC_FLATE_FLATEMODULE_H_
 #define CORE_FXCODEC_FLATE_FLATEMODULE_H_
 
+#include <stdint.h>
+
 #include <memory>
 
 #include "core/fxcrt/fx_memory_wrappers.h"
-#include "core/fxcrt/fx_system.h"
 #include "third_party/base/span.h"
 
 namespace fxcodec {
diff --git a/core/fxcodec/gif/cfx_gifcontext.cpp b/core/fxcodec/gif/cfx_gifcontext.cpp
index cde9bec..5279f3f 100644
--- a/core/fxcodec/gif/cfx_gifcontext.cpp
+++ b/core/fxcodec/gif/cfx_gifcontext.cpp
@@ -10,6 +10,7 @@
 #include <utility>
 
 #include "core/fxcodec/cfx_codec_memory.h"
+#include "core/fxcrt/fx_system.h"
 #include "core/fxcrt/stl_util.h"
 #include "third_party/base/cxx17_backports.h"
 
diff --git a/core/fxcodec/icc/iccmodule.h b/core/fxcodec/icc/iccmodule.h
index f1fd28b..6a7f872 100644
--- a/core/fxcodec/icc/iccmodule.h
+++ b/core/fxcodec/icc/iccmodule.h
@@ -7,10 +7,11 @@
 #ifndef CORE_FXCODEC_ICC_ICCMODULE_H_
 #define CORE_FXCODEC_ICC_ICCMODULE_H_
 
+#include <stdint.h>
+
 #include <memory>
 
 #include "core/fxcodec/fx_codec_def.h"
-#include "core/fxcrt/fx_system.h"
 #include "third_party/base/span.h"
 
 #if defined(USE_SYSTEM_LCMS2)
diff --git a/core/fxcodec/jbig2/JBig2_ArithIntDecoder.h b/core/fxcodec/jbig2/JBig2_ArithIntDecoder.h
index 2221767..ed228cd 100644
--- a/core/fxcodec/jbig2/JBig2_ArithIntDecoder.h
+++ b/core/fxcodec/jbig2/JBig2_ArithIntDecoder.h
@@ -7,10 +7,11 @@
 #ifndef CORE_FXCODEC_JBIG2_JBIG2_ARITHINTDECODER_H_
 #define CORE_FXCODEC_JBIG2_JBIG2_ARITHINTDECODER_H_
 
+#include <stdint.h>
+
 #include <vector>
 
 #include "core/fxcodec/jbig2/JBig2_ArithDecoder.h"
-#include "core/fxcrt/fx_system.h"
 
 class CJBig2_ArithIntDecoder {
  public:
diff --git a/core/fxcodec/jbig2/JBig2_GrdProc.h b/core/fxcodec/jbig2/JBig2_GrdProc.h
index af6f223..4dd462e 100644
--- a/core/fxcodec/jbig2/JBig2_GrdProc.h
+++ b/core/fxcodec/jbig2/JBig2_GrdProc.h
@@ -7,11 +7,12 @@
 #ifndef CORE_FXCODEC_JBIG2_JBIG2_GRDPROC_H_
 #define CORE_FXCODEC_JBIG2_JBIG2_GRDPROC_H_
 
+#include <stdint.h>
+
 #include <memory>
 
 #include "core/fxcodec/fx_codec_def.h"
 #include "core/fxcrt/fx_coordinates.h"
-#include "core/fxcrt/fx_system.h"
 #include "core/fxcrt/unowned_ptr.h"
 
 class CJBig2_ArithDecoder;
diff --git a/core/fxcodec/jbig2/JBig2_GrrdProc.h b/core/fxcodec/jbig2/JBig2_GrrdProc.h
index c7e3bf9..70dd6dd 100644
--- a/core/fxcodec/jbig2/JBig2_GrrdProc.h
+++ b/core/fxcodec/jbig2/JBig2_GrrdProc.h
@@ -7,9 +7,10 @@
 #ifndef CORE_FXCODEC_JBIG2_JBIG2_GRRDPROC_H_
 #define CORE_FXCODEC_JBIG2_JBIG2_GRRDPROC_H_
 
+#include <stdint.h>
+
 #include <memory>
 
-#include "core/fxcrt/fx_system.h"
 #include "core/fxcrt/unowned_ptr.h"
 
 class CJBig2_ArithDecoder;
diff --git a/core/fxcodec/jbig2/JBig2_HtrdProc.h b/core/fxcodec/jbig2/JBig2_HtrdProc.h
index cd90aae..370a362 100644
--- a/core/fxcodec/jbig2/JBig2_HtrdProc.h
+++ b/core/fxcodec/jbig2/JBig2_HtrdProc.h
@@ -7,11 +7,12 @@
 #ifndef CORE_FXCODEC_JBIG2_JBIG2_HTRDPROC_H_
 #define CORE_FXCODEC_JBIG2_JBIG2_HTRDPROC_H_
 
+#include <stdint.h>
+
 #include <memory>
 #include <vector>
 
 #include "core/fxcodec/jbig2/JBig2_Image.h"
-#include "core/fxcrt/fx_system.h"
 
 class CJBig2_ArithDecoder;
 class CJBig2_BitStream;
diff --git a/core/fxcodec/jbig2/JBig2_HuffmanTable.h b/core/fxcodec/jbig2/JBig2_HuffmanTable.h
index 351eb9d..e4709e9 100644
--- a/core/fxcodec/jbig2/JBig2_HuffmanTable.h
+++ b/core/fxcodec/jbig2/JBig2_HuffmanTable.h
@@ -7,10 +7,12 @@
 #ifndef CORE_FXCODEC_JBIG2_JBIG2_HUFFMANTABLE_H_
 #define CORE_FXCODEC_JBIG2_JBIG2_HUFFMANTABLE_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <vector>
 
 #include "core/fxcodec/jbig2/JBig2_Define.h"
-#include "core/fxcrt/fx_system.h"
 
 class CJBig2_BitStream;
 
diff --git a/core/fxcodec/jbig2/JBig2_Page.h b/core/fxcodec/jbig2/JBig2_Page.h
index 064b9b3..3089e48 100644
--- a/core/fxcodec/jbig2/JBig2_Page.h
+++ b/core/fxcodec/jbig2/JBig2_Page.h
@@ -7,7 +7,7 @@
 #ifndef CORE_FXCODEC_JBIG2_JBIG2_PAGE_H_
 #define CORE_FXCODEC_JBIG2_JBIG2_PAGE_H_
 
-#include "core/fxcrt/fx_system.h"
+#include <stdint.h>
 
 struct JBig2PageInfo {
   uint32_t m_dwWidth;
diff --git a/core/fxcodec/jbig2/JBig2_PddProc.h b/core/fxcodec/jbig2/JBig2_PddProc.h
index be5fadf..c2c4d48 100644
--- a/core/fxcodec/jbig2/JBig2_PddProc.h
+++ b/core/fxcodec/jbig2/JBig2_PddProc.h
@@ -7,9 +7,9 @@
 #ifndef CORE_FXCODEC_JBIG2_JBIG2_PDDPROC_H_
 #define CORE_FXCODEC_JBIG2_JBIG2_PDDPROC_H_
 
-#include <memory>
+#include <stdint.h>
 
-#include "core/fxcrt/fx_system.h"
+#include <memory>
 
 class CJBig2_ArithDecoder;
 class CJBig2_BitStream;
diff --git a/core/fxcodec/jbig2/JBig2_SddProc.h b/core/fxcodec/jbig2/JBig2_SddProc.h
index abef010..f7312d2 100644
--- a/core/fxcodec/jbig2/JBig2_SddProc.h
+++ b/core/fxcodec/jbig2/JBig2_SddProc.h
@@ -7,11 +7,12 @@
 #ifndef CORE_FXCODEC_JBIG2_JBIG2_SDDPROC_H_
 #define CORE_FXCODEC_JBIG2_JBIG2_SDDPROC_H_
 
+#include <stdint.h>
+
 #include <memory>
 #include <vector>
 
 #include "core/fxcodec/jbig2/JBig2_ArithDecoder.h"
-#include "core/fxcrt/fx_system.h"
 #include "core/fxcrt/unowned_ptr.h"
 
 class CJBig2_BitStream;
diff --git a/core/fxcodec/jbig2/JBig2_TrdProc.h b/core/fxcodec/jbig2/JBig2_TrdProc.h
index 8f4e42d..fa5b6ae 100644
--- a/core/fxcodec/jbig2/JBig2_TrdProc.h
+++ b/core/fxcodec/jbig2/JBig2_TrdProc.h
@@ -7,11 +7,12 @@
 #ifndef CORE_FXCODEC_JBIG2_JBIG2_TRDPROC_H_
 #define CORE_FXCODEC_JBIG2_JBIG2_TRDPROC_H_
 
+#include <stdint.h>
+
 #include <memory>
 #include <vector>
 
 #include "core/fxcodec/jbig2/JBig2_Image.h"
-#include "core/fxcrt/fx_system.h"
 #include "core/fxcrt/unowned_ptr.h"
 
 class CJBig2_ArithDecoder;
diff --git a/core/fxcodec/progressive_decoder.cpp b/core/fxcodec/progressive_decoder.cpp
index b7928f6..dc95c53 100644
--- a/core/fxcodec/progressive_decoder.cpp
+++ b/core/fxcodec/progressive_decoder.cpp
@@ -16,6 +16,7 @@
 #include "core/fxcodec/jpeg/jpeg_progressive_decoder.h"
 #include "core/fxcrt/fx_safe_types.h"
 #include "core/fxcrt/fx_stream.h"
+#include "core/fxcrt/fx_system.h"
 #include "core/fxcrt/span_util.h"
 #include "core/fxge/dib/cfx_cmyk_to_srgb.h"
 #include "core/fxge/dib/cfx_dibitmap.h"
diff --git a/core/fxcodec/progressive_decoder.h b/core/fxcodec/progressive_decoder.h
index 7d4e1ec..c0de047 100644
--- a/core/fxcodec/progressive_decoder.h
+++ b/core/fxcodec/progressive_decoder.h
@@ -7,6 +7,9 @@
 #ifndef CORE_FXCODEC_PROGRESSIVE_DECODER_H_
 #define CORE_FXCODEC_PROGRESSIVE_DECODER_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <memory>
 #include <utility>
 #include <vector>
@@ -15,7 +18,6 @@
 #include "core/fxcodec/jpeg/jpegmodule.h"
 #include "core/fxcodec/progressive_decoder_iface.h"
 #include "core/fxcrt/fx_memory_wrappers.h"
-#include "core/fxcrt/fx_system.h"
 #include "core/fxcrt/retain_ptr.h"
 #include "core/fxge/dib/cstretchengine.h"
 #include "core/fxge/dib/fx_dib.h"
diff --git a/core/fxcodec/progressive_decoder_iface.h b/core/fxcodec/progressive_decoder_iface.h
index 2ab902b..44b0ccd 100644
--- a/core/fxcodec/progressive_decoder_iface.h
+++ b/core/fxcodec/progressive_decoder_iface.h
@@ -7,7 +7,7 @@
 #ifndef CORE_FXCODEC_PROGRESSIVE_DECODER_IFACE_H_
 #define CORE_FXCODEC_PROGRESSIVE_DECODER_IFACE_H_
 
-#include "core/fxcrt/fx_system.h"
+#include "core/fxcrt/fx_types.h"
 #include "core/fxcrt/retain_ptr.h"
 
 #ifndef PDF_ENABLE_XFA
diff --git a/core/fxcrt/cfx_binarybuf.h b/core/fxcrt/cfx_binarybuf.h
index 44a07f9..4ddb347 100644
--- a/core/fxcrt/cfx_binarybuf.h
+++ b/core/fxcrt/cfx_binarybuf.h
@@ -7,11 +7,13 @@
 #ifndef CORE_FXCRT_CFX_BINARYBUF_H_
 #define CORE_FXCRT_CFX_BINARYBUF_H_
 
+#include <stddef.h>
+#include <stdint.h>
+
 #include <memory>
 
 #include "core/fxcrt/fx_memory_wrappers.h"
 #include "core/fxcrt/fx_string.h"
-#include "core/fxcrt/fx_system.h"
 #include "third_party/base/span.h"
 
 class CFX_BinaryBuf {
diff --git a/core/fxcrt/cfx_datetime.h b/core/fxcrt/cfx_datetime.h
index 9fd6763..2b4f8d5 100644
--- a/core/fxcrt/cfx_datetime.h
+++ b/core/fxcrt/cfx_datetime.h
@@ -7,7 +7,7 @@
 #ifndef CORE_FXCRT_CFX_DATETIME_H_
 #define CORE_FXCRT_CFX_DATETIME_H_
 
-#include "core/fxcrt/fx_system.h"
+#include <stdint.h>
 
 bool FX_IsLeapYear(int32_t iYear);
 uint8_t FX_DaysInMonth(int32_t iYear, uint8_t iMonth);
diff --git a/xfa/fxfa/cxfa_fwladapterwidgetmgr.cpp b/xfa/fxfa/cxfa_fwladapterwidgetmgr.cpp
index 829799a..8a7acca5 100644
--- a/xfa/fxfa/cxfa_fwladapterwidgetmgr.cpp
+++ b/xfa/fxfa/cxfa_fwladapterwidgetmgr.cpp
@@ -6,6 +6,7 @@
 
 #include "xfa/fxfa/cxfa_fwladapterwidgetmgr.h"
 
+#include "core/fxcrt/fx_coordinates.h"
 #include "xfa/fxfa/cxfa_ffdoc.h"
 #include "xfa/fxfa/cxfa_fffield.h"
 
diff --git a/xfa/fxfa/cxfa_fwladapterwidgetmgr.h b/xfa/fxfa/cxfa_fwladapterwidgetmgr.h
index f271a76..c3f97dd 100644
--- a/xfa/fxfa/cxfa_fwladapterwidgetmgr.h
+++ b/xfa/fxfa/cxfa_fwladapterwidgetmgr.h
@@ -7,13 +7,12 @@
 #ifndef XFA_FXFA_CXFA_FWLADAPTERWIDGETMGR_H_
 #define XFA_FXFA_CXFA_FWLADAPTERWIDGETMGR_H_
 
-#include "core/fxcrt/fx_coordinates.h"
-#include "core/fxcrt/fx_system.h"
 #include "fxjs/gc/heap.h"
 #include "v8/include/cppgc/garbage-collected.h"
 #include "xfa/fwl/cfwl_widgetmgr.h"
 
 class CFWL_Widget;
+class CFX_RectF;
 
 class CXFA_FWLAdapterWidgetMgr
     : public cppgc::GarbageCollected<CXFA_FWLAdapterWidgetMgr>,
diff --git a/xfa/fxfa/cxfa_textparser.h b/xfa/fxfa/cxfa_textparser.h
index 81e8e38..f6d633d 100644
--- a/xfa/fxfa/cxfa_textparser.h
+++ b/xfa/fxfa/cxfa_textparser.h
@@ -7,6 +7,8 @@
 #ifndef XFA_FXFA_CXFA_TEXTPARSER_H_
 #define XFA_FXFA_CXFA_TEXTPARSER_H_
 
+#include <stdint.h>
+
 #include <map>
 #include <memory>
 #include <vector>
@@ -14,7 +16,6 @@
 #include "core/fxcrt/css/cfx_css.h"
 #include "core/fxcrt/css/cfx_cssdeclaration.h"
 #include "core/fxcrt/fx_string.h"
-#include "core/fxcrt/fx_system.h"
 #include "core/fxcrt/retain_ptr.h"
 #include "core/fxge/dib/fx_dib.h"
 #include "fxjs/gc/heap.h"