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 --- 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 + 6 files changed, 9 insertions(+), 5 deletions(-) (limited to 'fxjs') 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" -- cgit v1.2.3