From 35d4587eceb07cad6b38675b0ebb4b73eca3a62b Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Fri, 12 Oct 2018 19:07:03 +0000 Subject: Remove more unnecessary includes and do IWYU as needed. Also move some implementations out of headers. Change-Id: I321fc26970c440d874b135bd28e8bc8156b9afee Reviewed-on: https://pdfium-review.googlesource.com/c/43890 Commit-Queue: Lei Zhang Reviewed-by: Tom Sepez --- core/fpdfapi/edit/cpdf_creator.cpp | 2 +- core/fpdfapi/font/cpdf_cmapmanager.cpp | 1 - core/fpdfapi/font/cpdf_type3font.cpp | 1 - core/fpdfapi/page/cpdf_expintfunc.cpp | 1 + core/fpdfapi/page/cpdf_function.cpp | 1 + core/fpdfapi/page/cpdf_pageobjectholder.cpp | 1 + core/fpdfapi/page/cpdf_sampledfunc.cpp | 1 + core/fpdfapi/page/cpdf_streamparser_unittest.cpp | 1 - core/fpdfapi/page/cpdf_textobject.cpp | 1 - core/fpdfapi/parser/cpdf_cross_ref_table.cpp | 1 + core/fpdfapi/parser/cpdf_object.cpp | 1 - core/fpdfapi/render/cpdf_dibbase.cpp | 1 + core/fpdfapi/render/cpdf_renderstatus.cpp | 1 + core/fpdfdoc/cpdf_formfield.cpp | 4 ++++ core/fpdfdoc/cpdf_formfield.h | 5 +---- core/fxcodec/bmp/cfx_bmpcontext.h | 1 + core/fxcodec/bmp/cfx_bmpdecompressor.h | 1 - core/fxcodec/codec/ccodec_iccmodule.cpp | 1 + core/fxcodec/codec/ccodec_jpxmodule.cpp | 1 + core/fxcodec/gif/cfx_gifcontext.h | 1 - core/fxcodec/gif/cfx_lzwdecompressor.cpp | 1 - core/fxcodec/jbig2/JBig2_Image.cpp | 1 - core/fxcrt/css/cfx_csscomputedstyle.cpp | 1 - core/fxcrt/fx_arabic.cpp | 1 - core/fxcrt/fx_bidi.cpp | 1 + core/fxcrt/fx_extension.h | 1 - core/fxcrt/pdfium_span_unittest.cpp | 1 - core/fxcrt/widestring_unittest.cpp | 2 ++ core/fxcrt/xml/cfx_xmlelement.cpp | 1 - core/fxcrt/xml/cfx_xmlinstruction.cpp | 1 - core/fxcrt/xml/cfx_xmlnode.cpp | 1 - core/fxge/dib/cfx_bitmapstorer.h | 1 - core/fxge/dib/cfx_dibitmap.h | 1 - core/fxge/dib/cfx_imagerenderer.h | 1 - core/fxge/dib/cfx_imagestretcher.cpp | 1 + core/fxge/dib/cfx_imagetransformer.cpp | 1 + core/fxge/dib/cstretchengine.cpp | 1 + core/fxge/win32/fx_win32_device.cpp | 1 - fpdfsdk/cpdfsdk_annot.cpp | 1 - fpdfsdk/cpdfsdk_interactiveform.cpp | 1 - fpdfsdk/cpdfsdk_pageview.cpp | 1 + fpdfsdk/fpdf_annot.cpp | 1 + fpdfsdk/fpdf_editpath.cpp | 1 + fpdfsdk/fpdf_flatten.cpp | 1 - fpdfsdk/fpdf_formfill.cpp | 1 - fpdfsdk/fpdf_ppo.cpp | 1 - fpdfsdk/pwl/cpwl_edit.cpp | 1 - fpdfsdk/pwl/cpwl_edit_impl.cpp | 1 - fxjs/cfxjs_engine.cpp | 5 +++++ fxjs/cfxjs_engine.h | 5 +---- fxjs/cjs_app.cpp | 1 + fxjs/cjs_runtime.cpp | 1 - fxjs/xfa/cjx_layoutpseudomodel.cpp | 1 + fxjs/xfa/cjx_object.cpp | 1 + testing/fuzzers/pdf_bidi_fuzzer.cc | 1 - testing/fx_string_testhelpers.h | 1 - xfa/fgas/layout/cfx_txtbreak.cpp | 1 + xfa/fgas/layout/cfx_txtbreak.h | 1 - xfa/fxfa/cxfa_ffapp.cpp | 1 - xfa/fxfa/cxfa_fflistbox.cpp | 1 + xfa/fxfa/cxfa_textparsecontext.h | 1 - xfa/fxfa/cxfa_textprovider.cpp | 1 - xfa/fxfa/parser/cxfa_arraynodelist.cpp | 2 -- xfa/fxfa/parser/cxfa_dataexporter.cpp | 1 - xfa/fxfa/parser/cxfa_document.cpp | 1 + xfa/fxfa/parser/xfa_utils.cpp | 1 + 66 files changed, 38 insertions(+), 46 deletions(-) diff --git a/core/fpdfapi/edit/cpdf_creator.cpp b/core/fpdfapi/edit/cpdf_creator.cpp index be63960199..c4bc698acc 100644 --- a/core/fpdfapi/edit/cpdf_creator.cpp +++ b/core/fpdfapi/edit/cpdf_creator.cpp @@ -23,7 +23,7 @@ #include "core/fxcrt/fx_extension.h" #include "core/fxcrt/fx_random.h" #include "third_party/base/ptr_util.h" -#include "third_party/base/span.h" +#include "third_party/base/stl_util.h" namespace { diff --git a/core/fpdfapi/font/cpdf_cmapmanager.cpp b/core/fpdfapi/font/cpdf_cmapmanager.cpp index 8eebd89b30..bbf77f59b1 100644 --- a/core/fpdfapi/font/cpdf_cmapmanager.cpp +++ b/core/fpdfapi/font/cpdf_cmapmanager.cpp @@ -11,7 +11,6 @@ #include "core/fpdfapi/font/cpdf_cid2unicodemap.h" #include "core/fpdfapi/font/cpdf_cmap.h" #include "third_party/base/ptr_util.h" -#include "third_party/base/stl_util.h" CPDF_CMapManager::CPDF_CMapManager() {} diff --git a/core/fpdfapi/font/cpdf_type3font.cpp b/core/fpdfapi/font/cpdf_type3font.cpp index 1d70c8bb48..df56e5f192 100644 --- a/core/fpdfapi/font/cpdf_type3font.cpp +++ b/core/fpdfapi/font/cpdf_type3font.cpp @@ -16,7 +16,6 @@ #include "core/fpdfapi/parser/cpdf_stream.h" #include "core/fxcrt/fx_system.h" #include "third_party/base/ptr_util.h" -#include "third_party/base/stl_util.h" namespace { diff --git a/core/fpdfapi/page/cpdf_expintfunc.cpp b/core/fpdfapi/page/cpdf_expintfunc.cpp index e04ce1282c..68eeea87fb 100644 --- a/core/fpdfapi/page/cpdf_expintfunc.cpp +++ b/core/fpdfapi/page/cpdf_expintfunc.cpp @@ -10,6 +10,7 @@ #include "core/fpdfapi/parser/cpdf_dictionary.h" #include "core/fpdfapi/parser/cpdf_number.h" #include "core/fxcrt/fx_memory.h" +#include "third_party/base/stl_util.h" CPDF_ExpIntFunc::CPDF_ExpIntFunc() : CPDF_Function(Type::kType2ExpotentialInterpolation) {} diff --git a/core/fpdfapi/page/cpdf_function.cpp b/core/fpdfapi/page/cpdf_function.cpp index fc8eb46d73..066af65440 100644 --- a/core/fpdfapi/page/cpdf_function.cpp +++ b/core/fpdfapi/page/cpdf_function.cpp @@ -16,6 +16,7 @@ #include "core/fpdfapi/parser/cpdf_dictionary.h" #include "core/fpdfapi/parser/cpdf_stream.h" #include "third_party/base/ptr_util.h" +#include "third_party/base/stl_util.h" // static std::unique_ptr CPDF_Function::Load( diff --git a/core/fpdfapi/page/cpdf_pageobjectholder.cpp b/core/fpdfapi/page/cpdf_pageobjectholder.cpp index c6f310f77b..c51ab172f7 100644 --- a/core/fpdfapi/page/cpdf_pageobjectholder.cpp +++ b/core/fpdfapi/page/cpdf_pageobjectholder.cpp @@ -16,6 +16,7 @@ #include "core/fpdfapi/parser/cpdf_dictionary.h" #include "core/fpdfapi/parser/cpdf_document.h" #include "core/fxcrt/fx_extension.h" +#include "third_party/base/stl_util.h" bool GraphicsData::operator<(const GraphicsData& other) const { if (!FXSYS_SafeEQ(fillAlpha, other.fillAlpha)) diff --git a/core/fpdfapi/page/cpdf_sampledfunc.cpp b/core/fpdfapi/page/cpdf_sampledfunc.cpp index d898daadc5..7c1fea150f 100644 --- a/core/fpdfapi/page/cpdf_sampledfunc.cpp +++ b/core/fpdfapi/page/cpdf_sampledfunc.cpp @@ -11,6 +11,7 @@ #include "core/fxcrt/cfx_bitstream.h" #include "core/fxcrt/cfx_fixedbufgrow.h" #include "core/fxcrt/fx_safe_types.h" +#include "third_party/base/stl_util.h" namespace { diff --git a/core/fpdfapi/page/cpdf_streamparser_unittest.cpp b/core/fpdfapi/page/cpdf_streamparser_unittest.cpp index d83fedcb7d..64bb57c78f 100644 --- a/core/fpdfapi/page/cpdf_streamparser_unittest.cpp +++ b/core/fpdfapi/page/cpdf_streamparser_unittest.cpp @@ -4,7 +4,6 @@ #include "core/fpdfapi/page/cpdf_streamparser.h" #include "testing/gtest/include/gtest/gtest.h" -#include "third_party/base/span.h" TEST(cpdf_streamparser, ReadHexString) { { diff --git a/core/fpdfapi/page/cpdf_textobject.cpp b/core/fpdfapi/page/cpdf_textobject.cpp index 2b866baa25..13e727963e 100644 --- a/core/fpdfapi/page/cpdf_textobject.cpp +++ b/core/fpdfapi/page/cpdf_textobject.cpp @@ -12,7 +12,6 @@ #include "core/fpdfapi/font/cpdf_cidfont.h" #include "core/fpdfapi/font/cpdf_font.h" #include "third_party/base/ptr_util.h" -#include "third_party/base/stl_util.h" CPDF_TextObjectItem::CPDF_TextObjectItem() : m_CharCode(0) {} diff --git a/core/fpdfapi/parser/cpdf_cross_ref_table.cpp b/core/fpdfapi/parser/cpdf_cross_ref_table.cpp index 77c0e8136c..4f7c482c9f 100644 --- a/core/fpdfapi/parser/cpdf_cross_ref_table.cpp +++ b/core/fpdfapi/parser/cpdf_cross_ref_table.cpp @@ -8,6 +8,7 @@ #include "core/fpdfapi/parser/cpdf_dictionary.h" #include "core/fpdfapi/parser/cpdf_parser.h" +#include "third_party/base/stl_util.h" // static std::unique_ptr CPDF_CrossRefTable::MergeUp( diff --git a/core/fpdfapi/parser/cpdf_object.cpp b/core/fpdfapi/parser/cpdf_object.cpp index a32a5c2eed..3fdb2351bf 100644 --- a/core/fpdfapi/parser/cpdf_object.cpp +++ b/core/fpdfapi/parser/cpdf_object.cpp @@ -16,7 +16,6 @@ #include "core/fxcrt/fx_string.h" #include "third_party/base/logging.h" #include "third_party/base/ptr_util.h" -#include "third_party/base/stl_util.h" CPDF_Object::~CPDF_Object() {} diff --git a/core/fpdfapi/render/cpdf_dibbase.cpp b/core/fpdfapi/render/cpdf_dibbase.cpp index b95c14b59f..5e48c68bd5 100644 --- a/core/fpdfapi/render/cpdf_dibbase.cpp +++ b/core/fpdfapi/render/cpdf_dibbase.cpp @@ -32,6 +32,7 @@ #include "core/fxcrt/fx_safe_types.h" #include "core/fxge/dib/cfx_dibitmap.h" #include "third_party/base/ptr_util.h" +#include "third_party/base/stl_util.h" namespace { diff --git a/core/fpdfapi/render/cpdf_renderstatus.cpp b/core/fpdfapi/render/cpdf_renderstatus.cpp index 842272bc02..982f69acf9 100644 --- a/core/fpdfapi/render/cpdf_renderstatus.cpp +++ b/core/fpdfapi/render/cpdf_renderstatus.cpp @@ -61,6 +61,7 @@ #include "third_party/base/logging.h" #include "third_party/base/numerics/safe_math.h" #include "third_party/base/ptr_util.h" +#include "third_party/base/stl_util.h" #ifdef _SKIA_SUPPORT_ #include "core/fxge/skia/fx_skia_device.h" diff --git a/core/fpdfdoc/cpdf_formfield.cpp b/core/fpdfdoc/cpdf_formfield.cpp index a076b150a8..4cb9496af9 100644 --- a/core/fpdfdoc/cpdf_formfield.cpp +++ b/core/fpdfdoc/cpdf_formfield.cpp @@ -250,6 +250,10 @@ bool CPDF_FormField::ResetField(NotificationOption notify) { return true; } +int CPDF_FormField::CountControls() const { + return pdfium::CollectionSize(m_ControlList); +} + int CPDF_FormField::GetControlIndex(const CPDF_FormControl* pControl) const { if (!pControl) return -1; diff --git a/core/fpdfdoc/cpdf_formfield.h b/core/fpdfdoc/cpdf_formfield.h index a718cec29c..ce12169a71 100644 --- a/core/fpdfdoc/cpdf_formfield.h +++ b/core/fpdfdoc/cpdf_formfield.h @@ -15,7 +15,6 @@ #include "core/fxcrt/fx_string.h" #include "core/fxcrt/fx_system.h" #include "core/fxcrt/unowned_ptr.h" -#include "third_party/base/stl_util.h" class CPDF_Dictionary; class CPDF_Font; @@ -110,9 +109,7 @@ class CPDF_FormField { bool ResetField(NotificationOption notify); - int CountControls() const { - return pdfium::CollectionSize(m_ControlList); - } + int CountControls() const; CPDF_FormControl* GetControl(int index) const { return m_ControlList[index].Get(); diff --git a/core/fxcodec/bmp/cfx_bmpcontext.h b/core/fxcodec/bmp/cfx_bmpcontext.h index ddb179b0b3..66e3f54b28 100644 --- a/core/fxcodec/bmp/cfx_bmpcontext.h +++ b/core/fxcodec/bmp/cfx_bmpcontext.h @@ -9,6 +9,7 @@ #include "core/fxcodec/bmp/cfx_bmpdecompressor.h" #include "core/fxcodec/bmp/fx_bmp.h" +#include "core/fxcrt/unowned_ptr.h" class CFX_BmpContext final : public CodecModuleIface::Context { public: diff --git a/core/fxcodec/bmp/cfx_bmpdecompressor.h b/core/fxcodec/bmp/cfx_bmpdecompressor.h index ebab9ea223..0af4da4b08 100644 --- a/core/fxcodec/bmp/cfx_bmpdecompressor.h +++ b/core/fxcodec/bmp/cfx_bmpdecompressor.h @@ -12,7 +12,6 @@ #include #include "core/fxcodec/bmp/fx_bmp.h" -#include "third_party/base/span.h" class CFX_BmpContext; class CFX_CodecMemory; diff --git a/core/fxcodec/codec/ccodec_iccmodule.cpp b/core/fxcodec/codec/ccodec_iccmodule.cpp index a15e72d5fd..ae88dec708 100644 --- a/core/fxcodec/codec/ccodec_iccmodule.cpp +++ b/core/fxcodec/codec/ccodec_iccmodule.cpp @@ -12,6 +12,7 @@ #include "core/fxcodec/codec/codec_int.h" #include "third_party/base/ptr_util.h" +#include "third_party/base/stl_util.h" namespace { diff --git a/core/fxcodec/codec/ccodec_jpxmodule.cpp b/core/fxcodec/codec/ccodec_jpxmodule.cpp index 28221be340..aaaaf81d24 100644 --- a/core/fxcodec/codec/ccodec_jpxmodule.cpp +++ b/core/fxcodec/codec/ccodec_jpxmodule.cpp @@ -17,6 +17,7 @@ #include "core/fxcrt/fx_memory.h" #include "core/fxcrt/fx_safe_types.h" #include "third_party/base/ptr_util.h" +#include "third_party/base/stl_util.h" #include "third_party/libopenjpeg20/openjpeg.h" #include "third_party/libopenjpeg20/opj_malloc.h" diff --git a/core/fxcodec/gif/cfx_gifcontext.h b/core/fxcodec/gif/cfx_gifcontext.h index 5febb5940b..2bb2adcf6a 100644 --- a/core/fxcodec/gif/cfx_gifcontext.h +++ b/core/fxcodec/gif/cfx_gifcontext.h @@ -15,7 +15,6 @@ #include "core/fxcodec/gif/cfx_lzwdecompressor.h" #include "core/fxcrt/fx_string.h" #include "core/fxcrt/unowned_ptr.h" -#include "third_party/base/span.h" class CFX_CodecMemory; diff --git a/core/fxcodec/gif/cfx_lzwdecompressor.cpp b/core/fxcodec/gif/cfx_lzwdecompressor.cpp index 5708d11cbf..14e34f595d 100644 --- a/core/fxcodec/gif/cfx_lzwdecompressor.cpp +++ b/core/fxcodec/gif/cfx_lzwdecompressor.cpp @@ -12,7 +12,6 @@ #include #include "third_party/base/numerics/safe_math.h" -#include "third_party/base/stl_util.h" std::unique_ptr CFX_LZWDecompressor::Create( uint8_t color_exp, diff --git a/core/fxcodec/jbig2/JBig2_Image.cpp b/core/fxcodec/jbig2/JBig2_Image.cpp index a2d9f486e1..5054ab5867 100644 --- a/core/fxcodec/jbig2/JBig2_Image.cpp +++ b/core/fxcodec/jbig2/JBig2_Image.cpp @@ -16,7 +16,6 @@ #include "core/fxcrt/fx_memory.h" #include "core/fxcrt/fx_safe_types.h" #include "third_party/base/ptr_util.h" -#include "third_party/base/stl_util.h" #define JBIG2_GETDWORD(buf) \ ((static_cast((buf)[0]) << 24) | \ diff --git a/core/fxcrt/css/cfx_csscomputedstyle.cpp b/core/fxcrt/css/cfx_csscomputedstyle.cpp index f06092c7f9..eff708122b 100644 --- a/core/fxcrt/css/cfx_csscomputedstyle.cpp +++ b/core/fxcrt/css/cfx_csscomputedstyle.cpp @@ -8,7 +8,6 @@ #include "core/fxcrt/css/cfx_cssstringvalue.h" #include "core/fxcrt/css/cfx_cssvaluelist.h" -#include "third_party/base/stl_util.h" CFX_CSSComputedStyle::CFX_CSSComputedStyle() {} diff --git a/core/fxcrt/fx_arabic.cpp b/core/fxcrt/fx_arabic.cpp index 0d6f0395a6..6d049bd427 100644 --- a/core/fxcrt/fx_arabic.cpp +++ b/core/fxcrt/fx_arabic.cpp @@ -11,7 +11,6 @@ #include "core/fxcrt/fx_memory.h" #include "core/fxcrt/fx_unicode.h" -#include "third_party/base/stl_util.h" namespace { diff --git a/core/fxcrt/fx_bidi.cpp b/core/fxcrt/fx_bidi.cpp index 672e2d9dae..29eb6ead55 100644 --- a/core/fxcrt/fx_bidi.cpp +++ b/core/fxcrt/fx_bidi.cpp @@ -9,6 +9,7 @@ #include #include "core/fxcrt/fx_unicode.h" +#include "third_party/base/stl_util.h" #ifdef PDF_ENABLE_XFA #include "core/fxcrt/fx_extension.h" diff --git a/core/fxcrt/fx_extension.h b/core/fxcrt/fx_extension.h index d1ea795fa8..c1cd188c81 100644 --- a/core/fxcrt/fx_extension.h +++ b/core/fxcrt/fx_extension.h @@ -13,7 +13,6 @@ #include #include "core/fxcrt/fx_string.h" -#include "third_party/base/span.h" #if defined(USE_SYSTEM_ICUUC) #include diff --git a/core/fxcrt/pdfium_span_unittest.cpp b/core/fxcrt/pdfium_span_unittest.cpp index 177bc4097e..6778bbb145 100644 --- a/core/fxcrt/pdfium_span_unittest.cpp +++ b/core/fxcrt/pdfium_span_unittest.cpp @@ -4,7 +4,6 @@ #include "testing/gtest/include/gtest/gtest.h" #include "third_party/base/span.h" -#include "third_party/base/stl_util.h" // Tests PDFium-modifications to base::span. The name of this file is // chosen to avoid collisions with base's span_unittest.cc diff --git a/core/fxcrt/widestring_unittest.cpp b/core/fxcrt/widestring_unittest.cpp index 160dc929db..0d20d71200 100644 --- a/core/fxcrt/widestring_unittest.cpp +++ b/core/fxcrt/widestring_unittest.cpp @@ -10,6 +10,8 @@ #include "core/fxcrt/fx_string.h" #include "testing/gtest/include/gtest/gtest.h" +#include "third_party/base/span.h" +#include "third_party/base/stl_util.h" namespace fxcrt { diff --git a/core/fxcrt/xml/cfx_xmlelement.cpp b/core/fxcrt/xml/cfx_xmlelement.cpp index f5031624e8..434b474df7 100644 --- a/core/fxcrt/xml/cfx_xmlelement.cpp +++ b/core/fxcrt/xml/cfx_xmlelement.cpp @@ -13,7 +13,6 @@ #include "core/fxcrt/xml/cfx_xmlchardata.h" #include "core/fxcrt/xml/cfx_xmldocument.h" #include "core/fxcrt/xml/cfx_xmltext.h" -#include "third_party/base/stl_util.h" CFX_XMLElement::CFX_XMLElement(const WideString& wsTag) : CFX_XMLNode(), name_(wsTag) { diff --git a/core/fxcrt/xml/cfx_xmlinstruction.cpp b/core/fxcrt/xml/cfx_xmlinstruction.cpp index 9c00e38528..e0af2d1c95 100644 --- a/core/fxcrt/xml/cfx_xmlinstruction.cpp +++ b/core/fxcrt/xml/cfx_xmlinstruction.cpp @@ -11,7 +11,6 @@ #include "core/fxcrt/fx_codepage.h" #include "core/fxcrt/fx_extension.h" #include "core/fxcrt/xml/cfx_xmldocument.h" -#include "third_party/base/stl_util.h" CFX_XMLInstruction::CFX_XMLInstruction(const WideString& wsTarget) : CFX_XMLNode(), name_(wsTarget) {} diff --git a/core/fxcrt/xml/cfx_xmlnode.cpp b/core/fxcrt/xml/cfx_xmlnode.cpp index c8fea23bda..59eb3f77ce 100644 --- a/core/fxcrt/xml/cfx_xmlnode.cpp +++ b/core/fxcrt/xml/cfx_xmlnode.cpp @@ -13,7 +13,6 @@ #include "core/fxcrt/xml/cfx_xmlelement.h" #include "core/fxcrt/xml/cfx_xmlinstruction.h" #include "core/fxcrt/xml/cfx_xmltext.h" -#include "third_party/base/stl_util.h" CFX_XMLNode::CFX_XMLNode() = default; diff --git a/core/fxge/dib/cfx_bitmapstorer.h b/core/fxge/dib/cfx_bitmapstorer.h index 12b0537157..86f7f8719f 100644 --- a/core/fxge/dib/cfx_bitmapstorer.h +++ b/core/fxge/dib/cfx_bitmapstorer.h @@ -11,7 +11,6 @@ #include "core/fxcrt/retain_ptr.h" #include "core/fxge/dib/cfx_dibitmap.h" #include "core/fxge/dib/scanlinecomposer_iface.h" -#include "third_party/base/stl_util.h" class CFX_BitmapStorer final : public ScanlineComposerIface { public: diff --git a/core/fxge/dib/cfx_dibitmap.h b/core/fxge/dib/cfx_dibitmap.h index dc6720ed96..63aed7ffc6 100644 --- a/core/fxge/dib/cfx_dibitmap.h +++ b/core/fxge/dib/cfx_dibitmap.h @@ -11,7 +11,6 @@ #include "core/fxcrt/maybe_owned.h" #include "core/fxcrt/retain_ptr.h" #include "core/fxge/dib/cfx_dibbase.h" -#include "third_party/base/stl_util.h" class CFX_DIBitmap : public CFX_DIBBase { public: diff --git a/core/fxge/dib/cfx_imagerenderer.h b/core/fxge/dib/cfx_imagerenderer.h index 5232933f49..10dca178bf 100644 --- a/core/fxge/dib/cfx_imagerenderer.h +++ b/core/fxge/dib/cfx_imagerenderer.h @@ -16,7 +16,6 @@ #include "core/fxge/dib/cfx_dibbase.h" #include "core/fxge/dib/cfx_dibitmap.h" #include "core/fxge/fx_dib.h" -#include "third_party/base/stl_util.h" class CFX_ImageTransformer; class CFX_ImageStretcher; diff --git a/core/fxge/dib/cfx_imagestretcher.cpp b/core/fxge/dib/cfx_imagestretcher.cpp index ea4dcaea49..53c47c996e 100644 --- a/core/fxge/dib/cfx_imagestretcher.cpp +++ b/core/fxge/dib/cfx_imagestretcher.cpp @@ -14,6 +14,7 @@ #include "core/fxge/dib/cstretchengine.h" #include "core/fxge/fx_dib.h" #include "third_party/base/ptr_util.h" +#include "third_party/base/stl_util.h" namespace { diff --git a/core/fxge/dib/cfx_imagetransformer.cpp b/core/fxge/dib/cfx_imagetransformer.cpp index 66446ce52c..9edcc5d1fa 100644 --- a/core/fxge/dib/cfx_imagetransformer.cpp +++ b/core/fxge/dib/cfx_imagetransformer.cpp @@ -15,6 +15,7 @@ #include "third_party/base/compiler_specific.h" #include "third_party/base/numerics/safe_conversions.h" #include "third_party/base/ptr_util.h" +#include "third_party/base/stl_util.h" namespace { diff --git a/core/fxge/dib/cstretchengine.cpp b/core/fxge/dib/cstretchengine.cpp index 41a843de66..969ab03667 100644 --- a/core/fxge/dib/cstretchengine.cpp +++ b/core/fxge/dib/cstretchengine.cpp @@ -14,6 +14,7 @@ #include "core/fxge/dib/cfx_dibitmap.h" #include "core/fxge/dib/scanlinecomposer_iface.h" #include "core/fxge/fx_dib.h" +#include "third_party/base/stl_util.h" namespace { diff --git a/core/fxge/win32/fx_win32_device.cpp b/core/fxge/win32/fx_win32_device.cpp index 526eea58f3..fec656ef93 100644 --- a/core/fxge/win32/fx_win32_device.cpp +++ b/core/fxge/win32/fx_win32_device.cpp @@ -27,7 +27,6 @@ #include "core/fxge/win32/cfx_windowsdib.h" #include "core/fxge/win32/win32_int.h" #include "third_party/base/ptr_util.h" -#include "third_party/base/stl_util.h" #ifndef _SKIA_SUPPORT_ #include "core/fxge/agg/fx_agg_driver.h" diff --git a/fpdfsdk/cpdfsdk_annot.cpp b/fpdfsdk/cpdfsdk_annot.cpp index 4657368798..6d9029aa06 100644 --- a/fpdfsdk/cpdfsdk_annot.cpp +++ b/fpdfsdk/cpdfsdk_annot.cpp @@ -9,7 +9,6 @@ #include #include "fpdfsdk/cpdfsdk_pageview.h" -#include "third_party/base/stl_util.h" #ifdef PDF_ENABLE_XFA #include "fpdfsdk/fpdfxfa/cpdfxfa_context.h" diff --git a/fpdfsdk/cpdfsdk_interactiveform.cpp b/fpdfsdk/cpdfsdk_interactiveform.cpp index 31be320acf..76df3c93e0 100644 --- a/fpdfsdk/cpdfsdk_interactiveform.cpp +++ b/fpdfsdk/cpdfsdk_interactiveform.cpp @@ -36,7 +36,6 @@ #include "fxjs/ijs_event_context.h" #include "fxjs/ijs_runtime.h" #include "third_party/base/ptr_util.h" -#include "third_party/base/stl_util.h" #ifdef PDF_ENABLE_XFA #include "fpdfsdk/cpdfsdk_xfawidget.h" diff --git a/fpdfsdk/cpdfsdk_pageview.cpp b/fpdfsdk/cpdfsdk_pageview.cpp index 51056f4cc5..4d9a905fd6 100644 --- a/fpdfsdk/cpdfsdk_pageview.cpp +++ b/fpdfsdk/cpdfsdk_pageview.cpp @@ -20,6 +20,7 @@ #include "fpdfsdk/cpdfsdk_formfillenvironment.h" #include "fpdfsdk/cpdfsdk_interactiveform.h" #include "third_party/base/ptr_util.h" +#include "third_party/base/stl_util.h" #ifdef PDF_ENABLE_XFA #include "fpdfsdk/fpdfxfa/cpdfxfa_context.h" diff --git a/fpdfsdk/fpdf_annot.cpp b/fpdfsdk/fpdf_annot.cpp index c4623bb726..e4bfab0b70 100644 --- a/fpdfsdk/fpdf_annot.cpp +++ b/fpdfsdk/fpdf_annot.cpp @@ -25,6 +25,7 @@ #include "fpdfsdk/cpdf_annotcontext.h" #include "fpdfsdk/cpdfsdk_helpers.h" #include "third_party/base/ptr_util.h" +#include "third_party/base/stl_util.h" namespace { diff --git a/fpdfsdk/fpdf_editpath.cpp b/fpdfsdk/fpdf_editpath.cpp index 70a558d2f1..a42aaa9c95 100644 --- a/fpdfsdk/fpdf_editpath.cpp +++ b/fpdfsdk/fpdf_editpath.cpp @@ -11,6 +11,7 @@ #include "core/fxcrt/fx_system.h" #include "fpdfsdk/cpdfsdk_helpers.h" #include "third_party/base/ptr_util.h" +#include "third_party/base/stl_util.h" // These checks are here because core/ and public/ cannot depend on each other. static_assert(CFX_GraphStateData::LineCapButt == FPDF_LINECAP_BUTT, diff --git a/fpdfsdk/fpdf_flatten.cpp b/fpdfsdk/fpdf_flatten.cpp index 93490ad859..ea701d9e1e 100644 --- a/fpdfsdk/fpdf_flatten.cpp +++ b/fpdfsdk/fpdf_flatten.cpp @@ -25,7 +25,6 @@ #include "core/fpdfdoc/cpdf_annot.h" #include "fpdfsdk/cpdfsdk_helpers.h" #include "third_party/base/ptr_util.h" -#include "third_party/base/stl_util.h" enum FPDF_TYPE { MAX, MIN }; enum FPDF_VALUE { TOP, LEFT, RIGHT, BOTTOM }; diff --git a/fpdfsdk/fpdf_formfill.cpp b/fpdfsdk/fpdf_formfill.cpp index 5cecb6feef..7b8215d9e2 100644 --- a/fpdfsdk/fpdf_formfill.cpp +++ b/fpdfsdk/fpdf_formfill.cpp @@ -25,7 +25,6 @@ #include "fpdfsdk/cpdfsdk_pageview.h" #include "public/fpdfview.h" #include "third_party/base/ptr_util.h" -#include "third_party/base/stl_util.h" #ifdef PDF_ENABLE_XFA #include "fpdfsdk/fpdfxfa/cpdfxfa_context.h" diff --git a/fpdfsdk/fpdf_ppo.cpp b/fpdfsdk/fpdf_ppo.cpp index b3d4ff53cb..8f0b0c3d79 100644 --- a/fpdfsdk/fpdf_ppo.cpp +++ b/fpdfsdk/fpdf_ppo.cpp @@ -30,7 +30,6 @@ #include "fpdfsdk/cpdfsdk_helpers.h" #include "public/cpp/fpdf_scopers.h" #include "third_party/base/ptr_util.h" -#include "third_party/base/stl_util.h" namespace { diff --git a/fpdfsdk/pwl/cpwl_edit.cpp b/fpdfsdk/pwl/cpwl_edit.cpp index 6126bfd8b0..c3a5797304 100644 --- a/fpdfsdk/pwl/cpwl_edit.cpp +++ b/fpdfsdk/pwl/cpwl_edit.cpp @@ -25,7 +25,6 @@ #include "fpdfsdk/pwl/cpwl_scroll_bar.h" #include "fpdfsdk/pwl/cpwl_wnd.h" #include "public/fpdf_fwlevent.h" -#include "third_party/base/stl_util.h" CPWL_Edit::CPWL_Edit() : m_bFocus(false) {} diff --git a/fpdfsdk/pwl/cpwl_edit_impl.cpp b/fpdfsdk/pwl/cpwl_edit_impl.cpp index c0eccfec8e..b5df28ffd9 100644 --- a/fpdfsdk/pwl/cpwl_edit_impl.cpp +++ b/fpdfsdk/pwl/cpwl_edit_impl.cpp @@ -31,7 +31,6 @@ #include "fpdfsdk/pwl/cpwl_scroll_bar.h" #include "third_party/base/compiler_specific.h" #include "third_party/base/ptr_util.h" -#include "third_party/base/stl_util.h" namespace { diff --git a/fxjs/cfxjs_engine.cpp b/fxjs/cfxjs_engine.cpp index e127bbed7a..f1dd45016e 100644 --- a/fxjs/cfxjs_engine.cpp +++ b/fxjs/cfxjs_engine.cpp @@ -14,6 +14,7 @@ #include "fxjs/cfxjse_runtimedata.h" #include "fxjs/cjs_object.h" #include "third_party/base/ptr_util.h" +#include "third_party/base/stl_util.h" class CFXJS_PerObjectData; @@ -299,6 +300,10 @@ FXJS_PerIsolateData* FXJS_PerIsolateData::Get(v8::Isolate* pIsolate) { pIsolate->GetData(g_embedderDataSlot)); } +int FXJS_PerIsolateData::MaxObjDefinitionID() const { + return pdfium::CollectionSize(m_ObjectDefnArray); +} + FXJS_PerIsolateData::FXJS_PerIsolateData(v8::Isolate* pIsolate) : m_pDynamicObjsMap(new V8TemplateMap(pIsolate)) {} diff --git a/fxjs/cfxjs_engine.h b/fxjs/cfxjs_engine.h index 63c6732791..0ee4fe5bf4 100644 --- a/fxjs/cfxjs_engine.h +++ b/fxjs/cfxjs_engine.h @@ -22,7 +22,6 @@ #include "core/fxcrt/fx_string.h" #include "fxjs/cfx_v8.h" #include "fxjs/ijs_runtime.h" -#include "third_party/base/stl_util.h" #include "v8/include/v8-util.h" #include "v8/include/v8.h" @@ -52,9 +51,7 @@ class FXJS_PerIsolateData { static void SetUp(v8::Isolate* pIsolate); static FXJS_PerIsolateData* Get(v8::Isolate* pIsolate); - int MaxObjDefinitionID() const { - return pdfium::CollectionSize(m_ObjectDefnArray); - } + int MaxObjDefinitionID() const; CFXJS_ObjDefinition* ObjDefinitionForID(int id) const; int AssignIDForObjDefinition(std::unique_ptr pDefn); diff --git a/fxjs/cjs_app.cpp b/fxjs/cjs_app.cpp index 97ff37872a..e217753062 100644 --- a/fxjs/cjs_app.cpp +++ b/fxjs/cjs_app.cpp @@ -15,6 +15,7 @@ #include "fxjs/ijs_event_context.h" #include "fxjs/js_resources.h" #include "third_party/base/ptr_util.h" +#include "third_party/base/stl_util.h" #ifdef PDF_ENABLE_XFA #include "fpdfsdk/fpdfxfa/cpdfxfa_context.h" diff --git a/fxjs/cjs_runtime.cpp b/fxjs/cjs_runtime.cpp index 2f4fe01474..7d3808a61d 100644 --- a/fxjs/cjs_runtime.cpp +++ b/fxjs/cjs_runtime.cpp @@ -41,7 +41,6 @@ #include "fxjs/js_define.h" #include "public/fpdf_formfill.h" #include "third_party/base/ptr_util.h" -#include "third_party/base/stl_util.h" #ifdef PDF_ENABLE_XFA #include "fxjs/cfxjse_value.h" diff --git a/fxjs/xfa/cjx_layoutpseudomodel.cpp b/fxjs/xfa/cjx_layoutpseudomodel.cpp index 62087e8684..1f3fe1274d 100644 --- a/fxjs/xfa/cjx_layoutpseudomodel.cpp +++ b/fxjs/xfa/cjx_layoutpseudomodel.cpp @@ -14,6 +14,7 @@ #include "fxjs/cfxjse_value.h" #include "fxjs/js_resources.h" #include "third_party/base/ptr_util.h" +#include "third_party/base/stl_util.h" #include "xfa/fxfa/cxfa_ffnotify.h" #include "xfa/fxfa/parser/cscript_layoutpseudomodel.h" #include "xfa/fxfa/parser/cxfa_arraynodelist.h" diff --git a/fxjs/xfa/cjx_object.cpp b/fxjs/xfa/cjx_object.cpp index 27d1f1524f..afbcee9b01 100644 --- a/fxjs/xfa/cjx_object.cpp +++ b/fxjs/xfa/cjx_object.cpp @@ -20,6 +20,7 @@ #include "fxjs/xfa/cjx_instancemanager.h" #include "third_party/base/compiler_specific.h" #include "third_party/base/ptr_util.h" +#include "third_party/base/stl_util.h" #include "xfa/fxfa/cxfa_ffnotify.h" #include "xfa/fxfa/cxfa_ffwidget.h" #include "xfa/fxfa/parser/cxfa_border.h" diff --git a/testing/fuzzers/pdf_bidi_fuzzer.cc b/testing/fuzzers/pdf_bidi_fuzzer.cc index 9a0e720812..fb3209c46d 100644 --- a/testing/fuzzers/pdf_bidi_fuzzer.cc +++ b/testing/fuzzers/pdf_bidi_fuzzer.cc @@ -8,7 +8,6 @@ #include "core/fxcrt/widestring.h" #include "core/fxge/cfx_font.h" #include "third_party/base/ptr_util.h" -#include "third_party/base/span.h" #include "xfa/fgas/font/cfgas_fontmgr.h" #include "xfa/fgas/font/cfgas_gefont.h" #include "xfa/fgas/layout/cfx_rtfbreak.h" diff --git a/testing/fx_string_testhelpers.h b/testing/fx_string_testhelpers.h index e4ed78d3a4..603d1ded8f 100644 --- a/testing/fx_string_testhelpers.h +++ b/testing/fx_string_testhelpers.h @@ -9,7 +9,6 @@ #include "core/fxcrt/cfx_datetime.h" #include "core/fxcrt/fx_stream.h" -#include "third_party/base/span.h" // Output stream operator so GTEST macros work with CFX_DateTime objects. std::ostream& operator<<(std::ostream& os, const CFX_DateTime& dt); diff --git a/xfa/fgas/layout/cfx_txtbreak.cpp b/xfa/fgas/layout/cfx_txtbreak.cpp index 86146a1d58..2a03b9c1b5 100644 --- a/xfa/fgas/layout/cfx_txtbreak.cpp +++ b/xfa/fgas/layout/cfx_txtbreak.cpp @@ -11,6 +11,7 @@ #include "core/fxcrt/fx_arabic.h" #include "core/fxcrt/fx_bidi.h" #include "core/fxcrt/fx_memory.h" +#include "third_party/base/stl_util.h" #include "xfa/fde/cfde_texteditengine.h" #include "xfa/fgas/font/cfgas_gefont.h" #include "xfa/fgas/layout/cfx_linebreak.h" diff --git a/xfa/fgas/layout/cfx_txtbreak.h b/xfa/fgas/layout/cfx_txtbreak.h index 66fef7acef..63a6d93e87 100644 --- a/xfa/fgas/layout/cfx_txtbreak.h +++ b/xfa/fgas/layout/cfx_txtbreak.h @@ -12,7 +12,6 @@ #include "core/fxcrt/cfx_char.h" #include "core/fxge/cfx_renderdevice.h" -#include "third_party/base/stl_util.h" #include "xfa/fgas/layout/cfx_break.h" class CFDE_TextEditEngine; diff --git a/xfa/fxfa/cxfa_ffapp.cpp b/xfa/fxfa/cxfa_ffapp.cpp index 21b2eddbb4..7b849f3104 100644 --- a/xfa/fxfa/cxfa_ffapp.cpp +++ b/xfa/fxfa/cxfa_ffapp.cpp @@ -12,7 +12,6 @@ #include #include "third_party/base/ptr_util.h" -#include "third_party/base/stl_util.h" #include "xfa/fgas/font/cfgas_fontmgr.h" #include "xfa/fwl/cfwl_notedriver.h" #include "xfa/fwl/cfwl_widgetmgr.h" diff --git a/xfa/fxfa/cxfa_fflistbox.cpp b/xfa/fxfa/cxfa_fflistbox.cpp index 440e6d213b..00779b22a4 100644 --- a/xfa/fxfa/cxfa_fflistbox.cpp +++ b/xfa/fxfa/cxfa_fflistbox.cpp @@ -11,6 +11,7 @@ #include #include "third_party/base/ptr_util.h" +#include "third_party/base/stl_util.h" #include "xfa/fwl/cfwl_listbox.h" #include "xfa/fwl/cfwl_notedriver.h" #include "xfa/fwl/cfwl_widget.h" diff --git a/xfa/fxfa/cxfa_textparsecontext.h b/xfa/fxfa/cxfa_textparsecontext.h index 20d914bc59..a146d40ca5 100644 --- a/xfa/fxfa/cxfa_textparsecontext.h +++ b/xfa/fxfa/cxfa_textparsecontext.h @@ -12,7 +12,6 @@ #include "core/fxcrt/css/cfx_css.h" #include "core/fxcrt/css/cfx_cssdeclaration.h" -#include "third_party/base/stl_util.h" class CFX_CSSComputedStyle; diff --git a/xfa/fxfa/cxfa_textprovider.cpp b/xfa/fxfa/cxfa_textprovider.cpp index fd0e2d596f..add251c229 100644 --- a/xfa/fxfa/cxfa_textprovider.cpp +++ b/xfa/fxfa/cxfa_textprovider.cpp @@ -15,7 +15,6 @@ #include "fxjs/cfxjse_engine.h" #include "fxjs/cfxjse_value.h" #include "fxjs/xfa/cjx_object.h" -#include "third_party/base/stl_util.h" #include "xfa/fde/cfde_textout.h" #include "xfa/fxfa/cxfa_eventparam.h" #include "xfa/fxfa/cxfa_ffapp.h" diff --git a/xfa/fxfa/parser/cxfa_arraynodelist.cpp b/xfa/fxfa/parser/cxfa_arraynodelist.cpp index 8bb200e1b2..3c3ba293a7 100644 --- a/xfa/fxfa/parser/cxfa_arraynodelist.cpp +++ b/xfa/fxfa/parser/cxfa_arraynodelist.cpp @@ -8,8 +8,6 @@ #include -#include "third_party/base/stl_util.h" - CXFA_ArrayNodeList::CXFA_ArrayNodeList(CXFA_Document* pDocument) : CXFA_TreeList(pDocument) {} diff --git a/xfa/fxfa/parser/cxfa_dataexporter.cpp b/xfa/fxfa/parser/cxfa_dataexporter.cpp index 820d3546f7..50106abfd6 100644 --- a/xfa/fxfa/parser/cxfa_dataexporter.cpp +++ b/xfa/fxfa/parser/cxfa_dataexporter.cpp @@ -9,7 +9,6 @@ #include "core/fxcrt/fx_codepage.h" #include "core/fxcrt/xml/cfx_xmlelement.h" #include "core/fxcrt/xml/cfx_xmlnode.h" -#include "third_party/base/stl_util.h" #include "xfa/fxfa/parser/cxfa_document.h" #include "xfa/fxfa/parser/cxfa_node.h" #include "xfa/fxfa/parser/xfa_utils.h" diff --git a/xfa/fxfa/parser/cxfa_document.cpp b/xfa/fxfa/parser/cxfa_document.cpp index 19e9ede20f..f870497df6 100644 --- a/xfa/fxfa/parser/cxfa_document.cpp +++ b/xfa/fxfa/parser/cxfa_document.cpp @@ -15,6 +15,7 @@ #include "fxjs/xfa/cjx_object.h" #include "third_party/base/compiler_specific.h" #include "third_party/base/ptr_util.h" +#include "third_party/base/stl_util.h" #include "xfa/fxfa/cxfa_ffdoc.h" #include "xfa/fxfa/cxfa_ffnotify.h" #include "xfa/fxfa/parser/cscript_datawindow.h" diff --git a/xfa/fxfa/parser/xfa_utils.cpp b/xfa/fxfa/parser/xfa_utils.cpp index ba3d857522..613ddfb684 100644 --- a/xfa/fxfa/parser/xfa_utils.cpp +++ b/xfa/fxfa/parser/xfa_utils.cpp @@ -18,6 +18,7 @@ #include "core/fxcrt/xml/cfx_xmlnode.h" #include "core/fxcrt/xml/cfx_xmltext.h" #include "fxjs/xfa/cjx_object.h" +#include "third_party/base/stl_util.h" #include "xfa/fxfa/parser/cxfa_document.h" #include "xfa/fxfa/parser/cxfa_localemgr.h" #include "xfa/fxfa/parser/cxfa_localevalue.h" -- cgit v1.2.3