summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--BUILD.gn31
-rw-r--r--DEPS2
-rw-r--r--build/standalone.gypi1
-rw-r--r--core/include/fpdfapi/fpdf_module.h2
-rw-r--r--core/include/fpdfapi/fpdf_parser.h2
-rw-r--r--core/include/fpdfapi/fpdf_render.h2
-rw-r--r--core/include/fpdfdoc/fpdf_doc.h2
-rw-r--r--core/include/fxcodec/fx_codec.h2
-rw-r--r--core/include/fxcodec/fx_codec_flate.h2
-rw-r--r--core/include/fxcrt/fx_safe_types.h2
-rw-r--r--core/include/fxcrt/fx_system.h2
-rw-r--r--core/include/fxge/fx_font.h2
-rw-r--r--core/src/fpdfapi/fpdf_font/ttgsubtable.cpp4
-rw-r--r--core/src/fpdfapi/fpdf_page/fpdf_page_func.cpp4
-rw-r--r--core/src/fpdfapi/fpdf_page/pageint.h2
-rw-r--r--core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp4
-rw-r--r--core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp2
-rw-r--r--core/src/fpdfapi/fpdf_render/render_int.h2
-rw-r--r--core/src/fpdfdoc/doc_annot.cpp4
-rw-r--r--core/src/fpdfdoc/doc_bookmark.cpp2
-rw-r--r--core/src/fpdftext/fpdf_text.cpp2
-rw-r--r--core/src/fpdftext/fpdf_text_int.cpp2
-rw-r--r--core/src/fxcodec/DEPS6
-rw-r--r--core/src/fxcodec/codec/codec_int.h4
-rw-r--r--core/src/fxcodec/codec/fx_codec.cpp2
-rw-r--r--core/src/fxcodec/codec/fx_codec_flate.cpp4
-rw-r--r--core/src/fxcodec/codec/fx_codec_icc.cpp2
-rw-r--r--core/src/fxcodec/codec/fx_codec_jpeg.cpp8
-rw-r--r--core/src/fxcodec/codec/fx_codec_jpx_opj.cpp4
-rw-r--r--core/src/fxcodec/jbig2/JBig2_Context.h2
-rw-r--r--core/src/fxcodec/jbig2/JBig2_GrdProc.cpp2
-rw-r--r--core/src/fxcodec/jbig2/JBig2_GrrdProc.cpp2
-rw-r--r--core/src/fxcodec/jbig2/JBig2_GsidProc.cpp2
-rw-r--r--core/src/fxcodec/jbig2/JBig2_HtrdProc.cpp2
-rw-r--r--core/src/fxcodec/jbig2/JBig2_PddProc.cpp2
-rw-r--r--core/src/fxcodec/jbig2/JBig2_SddProc.cpp4
-rw-r--r--core/src/fxcodec/jbig2/JBig2_SymbolDict.h2
-rw-r--r--core/src/fxcodec/jbig2/JBig2_TrdProc.cpp4
-rw-r--r--core/src/fxcrt/fx_basic_array.cpp2
-rw-r--r--core/src/fxcrt/fx_basic_bstring.cpp2
-rw-r--r--core/src/fxcrt/fx_basic_wstring.cpp2
-rw-r--r--core/src/fxge/agg/include/fx_agg_driver.h6
-rw-r--r--core/src/fxge/agg/src/fx_agg_driver.cpp19
-rw-r--r--core/src/fxge/freetype/fx_freetype.c2
-rw-r--r--core/src/fxge/ge/fx_ge_path.cpp2
-rw-r--r--fpdfsdk/include/fsdk_actionhandler.h2
-rw-r--r--fpdfsdk/include/fsdk_mgr.h12
-rw-r--r--fpdfsdk/src/fpdfformfill.cpp8
-rw-r--r--fpdfsdk/src/fpdfppo.cpp2
-rw-r--r--fpdfsdk/src/fpdfview.cpp4
-rw-r--r--fpdfsdk/src/fsdk_baseform.cpp11
-rw-r--r--fpdfsdk/src/fsdk_mgr.cpp2
-rw-r--r--fpdfsdk/src/javascript/Document.cpp2
-rw-r--r--fpdfsdk/src/javascript/JS_Object.h2
-rw-r--r--fpdfsdk/src/javascript/JS_Runtime_Stub.cpp2
-rw-r--r--fpdfsdk/src/javascript/app.cpp2
-rw-r--r--fpdfsdk/src/jsapi/fxjs_v8_embeddertest.cpp2
-rw-r--r--pdfium.gyp18
-rw-r--r--samples/image_diff.cc4
-rw-r--r--samples/image_diff_png.cc6
-rw-r--r--samples/pdfium_test.cc2
-rw-r--r--samples/samples.gyp1
-rw-r--r--testing/embedder_test.cpp2
-rw-r--r--testing/embedder_test.h2
-rw-r--r--testing/test_support.cpp4
-rw-r--r--testing/test_support.h3
-rw-r--r--third_party/BUILD.gn17
-rw-r--r--third_party/lpng_v163/pngstruct.h2
-rw-r--r--third_party/third_party.gyp7
-rw-r--r--xfa.gyp11
-rw-r--r--xfa/include/fxjse/fxjse.h22
71 files changed, 175 insertions, 144 deletions
diff --git a/BUILD.gn b/BUILD.gn
index 8c7e30cf03..57d9eaf69a 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -8,6 +8,7 @@ import("pdfium.gni")
config("pdfium_config") {
cflags = []
include_dirs = [
+ ".",
"third_party/freetype/include",
"third_party/freetype/include/freetype",
]
@@ -49,6 +50,7 @@ config("pdfium_config") {
"/wd4333",
"/wd4345",
"/wd4267",
+
# TODO(thestig): Fix all instances, remove this, pdfium:29
"/wd4245",
"/wd4310",
@@ -169,9 +171,7 @@ source_set("test_support") {
"//testing/gtest",
":pdfium",
]
- include_dirs = [
- "."
- ]
+ include_dirs = []
if (pdf_enable_v8) {
deps += [
"//v8",
@@ -365,11 +365,13 @@ static_library("fpdftext") {
static_library("fxcodec") {
deps = [
"third_party:fx_lcms2",
- "third_party:fx_libjpeg",
"third_party:fx_libopenjpeg",
"third_party:fx_lpng",
"third_party:fx_tiff",
"third_party:fx_zlib",
+
+ # This is a generic JPEG library dependency.
+ "//third_party:jpeg",
]
sources = [
"core/include/fxcodec/fx_codec.h",
@@ -433,6 +435,7 @@ static_library("fxcodec") {
"core/src/fxcodec/lgif/fx_gif.cpp",
"core/src/fxcodec/lgif/fx_gif.h",
]
+ include_dirs = []
if (is_posix) {
# core/src/fxcodec/fx_libopenjpeg/src/fx_mct.c does an pointer-to-int
@@ -532,7 +535,6 @@ static_library("fxge") {
"core/src/fxge/dib/fx_dib_engine.cpp",
"core/src/fxge/dib/fx_dib_main.cpp",
"core/src/fxge/dib/fx_dib_transform.cpp",
- "core/src/fxge/fontdata/chromefontdata/chromefontdata.h",
"core/src/fxge/fontdata/chromefontdata/FoxitDingbats.c",
"core/src/fxge/fontdata/chromefontdata/FoxitFixed.c",
"core/src/fxge/fontdata/chromefontdata/FoxitFixedBold.c",
@@ -549,6 +551,7 @@ static_library("fxge") {
"core/src/fxge/fontdata/chromefontdata/FoxitSerifItalic.c",
"core/src/fxge/fontdata/chromefontdata/FoxitSerifMM.c",
"core/src/fxge/fontdata/chromefontdata/FoxitSymbol.c",
+ "core/src/fxge/fontdata/chromefontdata/chromefontdata.h",
"core/src/fxge/freetype/fx_freetype.c",
"core/src/fxge/ge/fx_ge.cpp",
"core/src/fxge/ge/fx_ge_device.cpp",
@@ -581,7 +584,9 @@ static_library("fxge") {
"//third_party/skia/include/utils",
"//third_party/skia/src/core",
]
- deps = [ "//skia" ]
+ deps = [
+ "//skia",
+ ]
}
if (is_win) {
@@ -664,6 +669,7 @@ static_library("javascript") {
]
if (pdf_enable_v8) {
sources += [
+ "fpdfsdk/include/jsapi/fxjs_v8.h",
"fpdfsdk/src/javascript/Consts.cpp",
"fpdfsdk/src/javascript/Consts.h",
"fpdfsdk/src/javascript/Document.cpp",
@@ -703,7 +709,6 @@ static_library("javascript") {
"fpdfsdk/src/javascript/resource.h",
"fpdfsdk/src/javascript/util.cpp",
"fpdfsdk/src/javascript/util.h",
- "fpdfsdk/include/jsapi/fxjs_v8.h",
"fpdfsdk/src/jsapi/fxjs_v8.cpp",
]
include_dirs = [
@@ -1405,6 +1410,9 @@ static_library("xfa") {
"xfa/src/fxgraphics/src/fx_path_generator.h",
"xfa/src/fxgraphics/src/pre.h",
]
+ include_dirs = [
+ ".",
+ ]
if (pdf_enable_v8) {
sources += [
"xfa/src/fxjse/src/class.cpp",
@@ -1460,7 +1468,6 @@ test("pdfium_unittests") {
":pdfium",
":test_support",
]
- include_dirs = [ "." ]
configs += [ ":pdfium_config" ]
}
@@ -1489,13 +1496,9 @@ test("pdfium_embeddertests") {
":pdfium",
":test_support",
]
- include_dirs = [
- "."
- ]
+ include_dirs = []
if (pdf_enable_v8) {
- sources += [
- "fpdfsdk/src/jsapi/fxjs_v8_embeddertest.cpp"
- ]
+ sources += [ "fpdfsdk/src/jsapi/fxjs_v8_embeddertest.cpp" ]
deps += [
"//v8",
"//v8:v8_libplatform",
diff --git a/DEPS b/DEPS
index b6d7efae8b..22c940905a 100644
--- a/DEPS
+++ b/DEPS
@@ -5,7 +5,7 @@ deps = {
"https://chromium.googlesource.com/external/gyp",
"buildtools":
- "https://chromium.googlesource.com/chromium/buildtools.git@46ce8cb60364e9e0b21a81136c7debdddfd063a8",
+ "https://chromium.googlesource.com/chromium/buildtools.git@c2f259809d5ede3275df5ea0842f0431990c4f98",
"testing/corpus":
"https://pdfium.googlesource.com/pdfium_tests@45f88c6914fcac26ad930bb0ebbfa468c21db0a5",
diff --git a/build/standalone.gypi b/build/standalone.gypi
index 3d256693ca..402c726372 100644
--- a/build/standalone.gypi
+++ b/build/standalone.gypi
@@ -49,6 +49,7 @@
'v8_optimized_debug%': 0,
'v8_use_external_startup_data%': 0,
'icu_gyp_path': '../v8/third_party/icu/icu.gyp',
+ 'libjpeg_gyp_path': '../third_party/third_party.gyp',
'conditions': [
['OS == "win"', {
'os_posix%': 0,
diff --git a/core/include/fpdfapi/fpdf_module.h b/core/include/fpdfapi/fpdf_module.h
index 2f88644041..e9c38306b7 100644
--- a/core/include/fpdfapi/fpdf_module.h
+++ b/core/include/fpdfapi/fpdf_module.h
@@ -7,9 +7,9 @@
#ifndef CORE_INCLUDE_FPDFAPI_FPDF_MODULE_H_
#define CORE_INCLUDE_FPDFAPI_FPDF_MODULE_H_
-#include "../../../third_party/base/nonstd_unique_ptr.h"
#include "../fxcrt/fx_coordinates.h"
#include "../fxcrt/fx_system.h"
+#include "third_party/base/nonstd_unique_ptr.h"
class CCodec_ModuleMgr;
class CFX_AffineMatrix;
diff --git a/core/include/fpdfapi/fpdf_parser.h b/core/include/fpdfapi/fpdf_parser.h
index f20ba0e97c..2ea9e03685 100644
--- a/core/include/fpdfapi/fpdf_parser.h
+++ b/core/include/fpdfapi/fpdf_parser.h
@@ -7,9 +7,9 @@
#ifndef CORE_INCLUDE_FPDFAPI_FPDF_PARSER_H_
#define CORE_INCLUDE_FPDFAPI_FPDF_PARSER_H_
-#include "../../../third_party/base/nonstd_unique_ptr.h"
#include "../fxcrt/fx_system.h"
#include "fpdf_objects.h"
+#include "third_party/base/nonstd_unique_ptr.h"
class CPDF_Document;
class CPDF_Parser;
diff --git a/core/include/fpdfapi/fpdf_render.h b/core/include/fpdfapi/fpdf_render.h
index bda5d6d805..02aaba62b2 100644
--- a/core/include/fpdfapi/fpdf_render.h
+++ b/core/include/fpdfapi/fpdf_render.h
@@ -7,9 +7,9 @@
#ifndef CORE_INCLUDE_FPDFAPI_FPDF_RENDER_H_
#define CORE_INCLUDE_FPDFAPI_FPDF_RENDER_H_
-#include "../../../third_party/base/nonstd_unique_ptr.h"
#include "../fxge/fx_ge.h"
#include "fpdf_page.h"
+#include "third_party/base/nonstd_unique_ptr.h"
class CFX_GraphStateData;
class CFX_PathData;
diff --git a/core/include/fpdfdoc/fpdf_doc.h b/core/include/fpdfdoc/fpdf_doc.h
index cc5cf08005..e593471e53 100644
--- a/core/include/fpdfdoc/fpdf_doc.h
+++ b/core/include/fpdfdoc/fpdf_doc.h
@@ -10,9 +10,9 @@
#include <map>
#include <vector>
-#include "../../../third_party/base/nonstd_unique_ptr.h"
#include "../fpdfapi/fpdf_parser.h"
#include "../fpdfapi/fpdf_render.h"
+#include "third_party/base/nonstd_unique_ptr.h"
class CFieldTree;
class CPDF_AAction;
diff --git a/core/include/fxcodec/fx_codec.h b/core/include/fxcodec/fx_codec.h
index fe3d84d53e..b9ba0df694 100644
--- a/core/include/fxcodec/fx_codec.h
+++ b/core/include/fxcodec/fx_codec.h
@@ -10,9 +10,9 @@
#include <map>
#include <vector>
-#include "../../../third_party/base/nonstd_unique_ptr.h"
#include "../fxcrt/fx_basic.h"
#include "fx_codec_def.h"
+#include "third_party/base/nonstd_unique_ptr.h"
#include "../fxcrt/fx_coordinates.h" // For FX_RECT.
diff --git a/core/include/fxcodec/fx_codec_flate.h b/core/include/fxcodec/fx_codec_flate.h
index 7d0106139e..eaecef49ca 100644
--- a/core/include/fxcodec/fx_codec_flate.h
+++ b/core/include/fxcodec/fx_codec_flate.h
@@ -4,7 +4,7 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "../../../third_party/zlib_v128/zlib.h"
+#include "third_party/zlib_v128/zlib.h"
#ifdef __cplusplus
extern "C" {
diff --git a/core/include/fxcrt/fx_safe_types.h b/core/include/fxcrt/fx_safe_types.h
index ee50a53e34..d10bdbeb1a 100644
--- a/core/include/fxcrt/fx_safe_types.h
+++ b/core/include/fxcrt/fx_safe_types.h
@@ -7,9 +7,9 @@
#include <stdlib.h> // For size_t.
-#include "../../../third_party/base/numerics/safe_math.h"
#include "fx_stream.h" // for FX_FILESIZE.
#include "fx_system.h"
+#include "third_party/base/numerics/safe_math.h"
typedef pdfium::base::CheckedNumeric<FX_DWORD> FX_SAFE_DWORD;
typedef pdfium::base::CheckedNumeric<int32_t> FX_SAFE_INT32;
diff --git a/core/include/fxcrt/fx_system.h b/core/include/fxcrt/fx_system.h
index 53789581d7..5fe3453626 100644
--- a/core/include/fxcrt/fx_system.h
+++ b/core/include/fxcrt/fx_system.h
@@ -160,7 +160,7 @@ FXSYS_FILE* FXSYS_wfopen(const FX_WCHAR* filename, const FX_WCHAR* mode);
#ifdef __cplusplus
} // extern "C"
-#include "../../../third_party/base/numerics/safe_conversions.h"
+#include "third_party/base/numerics/safe_conversions.h"
#define FXSYS_strlen(ptr) pdfium::base::checked_cast<FX_STRSIZE>(strlen(ptr))
#define FXSYS_wcslen(ptr) pdfium::base::checked_cast<FX_STRSIZE>(wcslen(ptr))
extern "C" {
diff --git a/core/include/fxge/fx_font.h b/core/include/fxge/fx_font.h
index ccd9bf308a..b9dce1c435 100644
--- a/core/include/fxge/fx_font.h
+++ b/core/include/fxge/fx_font.h
@@ -9,9 +9,9 @@
#include <map>
-#include "../../../third_party/base/nonstd_unique_ptr.h"
#include "../fxcrt/fx_system.h"
#include "fx_dib.h"
+#include "third_party/base/nonstd_unique_ptr.h"
typedef struct FT_FaceRec_* FXFT_Face;
typedef void* FXFT_Library;
diff --git a/core/src/fpdfapi/fpdf_font/ttgsubtable.cpp b/core/src/fpdfapi/fpdf_font/ttgsubtable.cpp
index 6c1b4263b1..1ee25995c2 100644
--- a/core/src/fpdfapi/fpdf_font/ttgsubtable.cpp
+++ b/core/src/fpdfapi/fpdf_font/ttgsubtable.cpp
@@ -4,9 +4,9 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "../../../../third_party/base/nonstd_unique_ptr.h"
-#include "../../../include/fxge/fx_ge.h"
#include "../../../include/fxge/fx_freetype.h"
+#include "../../../include/fxge/fx_ge.h"
+#include "third_party/base/nonstd_unique_ptr.h"
#include "ttgsubtable.h"
CFX_GlyphMap::CFX_GlyphMap() {}
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_func.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_func.cpp
index e6268037b7..0b9f043eb2 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_func.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_func.cpp
@@ -7,12 +7,12 @@
#include <limits.h>
#include <vector>
-#include "../../../../third_party/base/nonstd_unique_ptr.h"
-#include "../../../../third_party/base/numerics/safe_conversions_impl.h"
#include "../../../include/fpdfapi/fpdf_module.h"
#include "../../../include/fpdfapi/fpdf_page.h"
#include "../../../include/fxcrt/fx_safe_types.h"
#include "pageint.h"
+#include "third_party/base/nonstd_unique_ptr.h"
+#include "third_party/base/numerics/safe_conversions_impl.h"
class CPDF_PSEngine;
typedef enum {
diff --git a/core/src/fpdfapi/fpdf_page/pageint.h b/core/src/fpdfapi/fpdf_page/pageint.h
index e787d6973a..3b2aef55af 100644
--- a/core/src/fpdfapi/fpdf_page/pageint.h
+++ b/core/src/fpdfapi/fpdf_page/pageint.h
@@ -9,9 +9,9 @@
#include <map>
-#include "../../../../third_party/base/nonstd_unique_ptr.h"
#include "../../../include/fpdfapi/fpdf_page.h"
#include "../../../include/fpdfapi/fpdf_pageobj.h"
+#include "third_party/base/nonstd_unique_ptr.h"
class CPDF_AllStates;
class CPDF_ParseOptions;
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
index f6a2158c53..cb63441d82 100644
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
@@ -8,13 +8,13 @@
#include <utility>
#include <vector>
-#include "../../../../third_party/base/nonstd_unique_ptr.h"
-#include "../../../../third_party/base/stl_util.h"
#include "../../../include/fpdfapi/fpdf_module.h"
#include "../../../include/fpdfapi/fpdf_page.h"
#include "../../../include/fpdfapi/fpdf_parser.h"
#include "../../../include/fxcrt/fx_safe_types.h"
#include "../fpdf_page/pageint.h"
+#include "third_party/base/nonstd_unique_ptr.h"
+#include "third_party/base/stl_util.h"
namespace {
diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
index 6af3ab4ce6..ea8ceee9d3 100644
--- a/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
+++ b/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
@@ -6,7 +6,6 @@
#include <vector>
-#include "../../../../third_party/base/nonstd_unique_ptr.h"
#include "../../../include/fpdfapi/fpdf_module.h"
#include "../../../include/fpdfapi/fpdf_pageobj.h"
#include "../../../include/fpdfapi/fpdf_render.h"
@@ -15,6 +14,7 @@
#include "../../../include/fxge/fx_ge.h"
#include "../fpdf_page/pageint.h"
#include "render_int.h"
+#include "third_party/base/nonstd_unique_ptr.h"
namespace {
diff --git a/core/src/fpdfapi/fpdf_render/render_int.h b/core/src/fpdfapi/fpdf_render/render_int.h
index c97cb7105d..a0eda2858e 100644
--- a/core/src/fpdfapi/fpdf_render/render_int.h
+++ b/core/src/fpdfapi/fpdf_render/render_int.h
@@ -9,8 +9,8 @@
#include <map>
-#include "../../../../third_party/base/nonstd_unique_ptr.h"
#include "../../../include/fpdfapi/fpdf_pageobj.h"
+#include "third_party/base/nonstd_unique_ptr.h"
class CFX_GlyphBitmap;
class CPDF_QuickStretcher;
diff --git a/core/src/fpdfdoc/doc_annot.cpp b/core/src/fpdfdoc/doc_annot.cpp
index ae253a086a..e69ea80a35 100644
--- a/core/src/fpdfdoc/doc_annot.cpp
+++ b/core/src/fpdfdoc/doc_annot.cpp
@@ -4,9 +4,9 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "../../../third_party/base/nonstd_unique_ptr.h"
-#include "../../include/fpdfdoc/fpdf_doc.h"
#include "../../include/fpdfapi/fpdf_pageobj.h"
+#include "../../include/fpdfdoc/fpdf_doc.h"
+#include "third_party/base/nonstd_unique_ptr.h"
CPDF_AnnotList::CPDF_AnnotList(CPDF_Page* pPage)
: m_pDocument(pPage->m_pDocument) {
diff --git a/core/src/fpdfdoc/doc_bookmark.cpp b/core/src/fpdfdoc/doc_bookmark.cpp
index 5ebd27e6e7..c5cbfd8d2e 100644
--- a/core/src/fpdfdoc/doc_bookmark.cpp
+++ b/core/src/fpdfdoc/doc_bookmark.cpp
@@ -6,8 +6,8 @@
#include <vector>
-#include "../../../third_party/base/nonstd_unique_ptr.h"
#include "../../include/fpdfdoc/fpdf_doc.h"
+#include "third_party/base/nonstd_unique_ptr.h"
CPDF_Bookmark CPDF_BookmarkTree::GetFirstChild(
const CPDF_Bookmark& parent) const {
diff --git a/core/src/fpdftext/fpdf_text.cpp b/core/src/fpdftext/fpdf_text.cpp
index 9ecbc21bda..d5ea24f25c 100644
--- a/core/src/fpdftext/fpdf_text.cpp
+++ b/core/src/fpdftext/fpdf_text.cpp
@@ -4,7 +4,6 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "../../../third_party/base/nonstd_unique_ptr.h"
#include "../../include/fpdfapi/fpdf_page.h"
#include "../../include/fpdfapi/fpdf_pageobj.h"
#include "../../include/fpdfapi/fpdf_resource.h"
@@ -12,6 +11,7 @@
#include "../../include/fxcrt/fx_bidi.h"
#include "../../include/fxcrt/fx_ucd.h"
#include "text_int.h"
+#include "third_party/base/nonstd_unique_ptr.h"
#include "txtproc.h"
CFX_ByteString CharFromUnicodeAlt(FX_WCHAR unicode,
diff --git a/core/src/fpdftext/fpdf_text_int.cpp b/core/src/fpdftext/fpdf_text_int.cpp
index 202fab45fa..8f46c19178 100644
--- a/core/src/fpdftext/fpdf_text_int.cpp
+++ b/core/src/fpdftext/fpdf_text_int.cpp
@@ -7,7 +7,6 @@
#include <ctype.h>
#include <algorithm>
-#include "../../../third_party/base/nonstd_unique_ptr.h"
#include "../../include/fpdfapi/fpdf_module.h"
#include "../../include/fpdfapi/fpdf_page.h"
#include "../../include/fpdfapi/fpdf_pageobj.h"
@@ -16,6 +15,7 @@
#include "../../include/fxcrt/fx_bidi.h"
#include "../../include/fxcrt/fx_ucd.h"
#include "text_int.h"
+#include "third_party/base/nonstd_unique_ptr.h"
namespace {
diff --git a/core/src/fxcodec/DEPS b/core/src/fxcodec/DEPS
index 48eaa048e0..a88b3294a9 100644
--- a/core/src/fxcodec/DEPS
+++ b/core/src/fxcodec/DEPS
@@ -1,6 +1,8 @@
include_rules = [
'+third_party/lcms2-2.6',
- '+third_party/libjpeg',
+ '+third_party/libjpeg/jpeglib.h',
+ # For non-standalone builds that may use libjpeg_turbo.
+ '+third_party/libjpeg_turbo/jpeglib.h',
'+third_party/libopenjpeg20',
'+third_party/zlib_v128',
-] \ No newline at end of file
+]
diff --git a/core/src/fxcodec/codec/codec_int.h b/core/src/fxcodec/codec/codec_int.h
index 93384caac9..e8e5b37107 100644
--- a/core/src/fxcodec/codec/codec_int.h
+++ b/core/src/fxcodec/codec/codec_int.h
@@ -11,10 +11,10 @@
#include <list>
#include <map>
-#include "../../../../third_party/base/nonstd_unique_ptr.h"
-#include "../../../../third_party/libopenjpeg20/openjpeg.h" // For OPJ_SIZE_T.
#include "../../../include/fxcodec/fx_codec.h"
#include "../jbig2/JBig2_Context.h"
+#include "third_party/base/nonstd_unique_ptr.h"
+#include "third_party/libopenjpeg20/openjpeg.h" // For OPJ_SIZE_T.
class CFX_IccProfileCache;
class CFX_IccTransformCache;
diff --git a/core/src/fxcodec/codec/fx_codec.cpp b/core/src/fxcodec/codec/fx_codec.cpp
index a443b75079..78424bdcad 100644
--- a/core/src/fxcodec/codec/fx_codec.cpp
+++ b/core/src/fxcodec/codec/fx_codec.cpp
@@ -8,9 +8,9 @@
#include <cmath>
-#include "../../../../third_party/base/logging.h"
#include "../../../include/fxcrt/fx_safe_types.h"
#include "codec_int.h"
+#include "third_party/base/logging.h"
CCodec_ModuleMgr::CCodec_ModuleMgr()
: m_pBasicModule(new CCodec_BasicModule),
diff --git a/core/src/fxcodec/codec/fx_codec_flate.cpp b/core/src/fxcodec/codec/fx_codec_flate.cpp
index 519ff00522..d4e56bf000 100644
--- a/core/src/fxcodec/codec/fx_codec_flate.cpp
+++ b/core/src/fxcodec/codec/fx_codec_flate.cpp
@@ -4,11 +4,11 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "../../../../third_party/base/nonstd_unique_ptr.h"
-#include "../../../../third_party/zlib_v128/zlib.h"
#include "../../../include/fxcodec/fx_codec.h"
#include "../../../include/fxcodec/fx_codec_flate.h"
#include "codec_int.h"
+#include "third_party/base/nonstd_unique_ptr.h"
+#include "third_party/zlib_v128/zlib.h"
extern "C" {
static void* my_alloc_func(void* opaque,
diff --git a/core/src/fxcodec/codec/fx_codec_icc.cpp b/core/src/fxcodec/codec/fx_codec_icc.cpp
index 2a8ccc364c..67e3d6422e 100644
--- a/core/src/fxcodec/codec/fx_codec_icc.cpp
+++ b/core/src/fxcodec/codec/fx_codec_icc.cpp
@@ -4,9 +4,9 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "../../../../third_party/lcms2-2.6/include/lcms2.h"
#include "../../../include/fxcodec/fx_codec.h"
#include "codec_int.h"
+#include "third_party/lcms2-2.6/include/lcms2.h"
const FX_DWORD N_COMPONENT_LAB = 3;
const FX_DWORD N_COMPONENT_GRAY = 1;
diff --git a/core/src/fxcodec/codec/fx_codec_jpeg.cpp b/core/src/fxcodec/codec/fx_codec_jpeg.cpp
index b3cd2c72e3..78ed013b0b 100644
--- a/core/src/fxcodec/codec/fx_codec_jpeg.cpp
+++ b/core/src/fxcodec/codec/fx_codec_jpeg.cpp
@@ -13,7 +13,13 @@
extern "C" {
#undef FAR
-#include "../../../../third_party/libjpeg/jpeglib.h"
+#if defined(USE_SYSTEM_LIBJPEG)
+#include <jpeglib.h>
+#elif defined(USE_LIBJPEG_TURBO)
+#include "third_party/libjpeg_turbo/jpeglib.h"
+#else
+#include "third_party/libjpeg/jpeglib.h"
+#endif
}
extern "C" {
diff --git a/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp b/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp
index 616af36b00..02efdb73b9 100644
--- a/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp
+++ b/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp
@@ -8,11 +8,11 @@
#include <limits>
#include <vector>
-#include "../../../../third_party/lcms2-2.6/include/lcms2.h"
-#include "../../../../third_party/libopenjpeg20/openjpeg.h"
#include "../../../include/fxcodec/fx_codec.h"
#include "../../../include/fxcrt/fx_safe_types.h"
#include "codec_int.h"
+#include "third_party/lcms2-2.6/include/lcms2.h"
+#include "third_party/libopenjpeg20/openjpeg.h"
static void fx_error_callback(const char* msg, void* client_data) {
(void)client_data;
diff --git a/core/src/fxcodec/jbig2/JBig2_Context.h b/core/src/fxcodec/jbig2/JBig2_Context.h
index 61379fe2ff..a98d7a98ca 100644
--- a/core/src/fxcodec/jbig2/JBig2_Context.h
+++ b/core/src/fxcodec/jbig2/JBig2_Context.h
@@ -10,12 +10,12 @@
#include <list>
#include <utility>
-#include "../../../../third_party/base/nonstd_unique_ptr.h"
#include "../../../include/fpdfapi/fpdf_objects.h"
#include "../../../include/fxcodec/fx_codec_def.h"
#include "JBig2_List.h"
#include "JBig2_Page.h"
#include "JBig2_Segment.h"
+#include "third_party/base/nonstd_unique_ptr.h"
class CJBig2_ArithDecoder;
class CJBig2_GRDProc;
diff --git a/core/src/fxcodec/jbig2/JBig2_GrdProc.cpp b/core/src/fxcodec/jbig2/JBig2_GrdProc.cpp
index eda76bbce9..083ac5e186 100644
--- a/core/src/fxcodec/jbig2/JBig2_GrdProc.cpp
+++ b/core/src/fxcodec/jbig2/JBig2_GrdProc.cpp
@@ -6,11 +6,11 @@
#include "JBig2_GrdProc.h"
-#include "../../../../third_party/base/nonstd_unique_ptr.h"
#include "../../../include/fxcodec/fx_codec.h"
#include "JBig2_ArithDecoder.h"
#include "JBig2_BitStream.h"
#include "JBig2_Image.h"
+#include "third_party/base/nonstd_unique_ptr.h"
CJBig2_GRDProc::CJBig2_GRDProc()
: m_loopIndex(0),
diff --git a/core/src/fxcodec/jbig2/JBig2_GrrdProc.cpp b/core/src/fxcodec/jbig2/JBig2_GrrdProc.cpp
index 916683c8aa..549669a72f 100644
--- a/core/src/fxcodec/jbig2/JBig2_GrrdProc.cpp
+++ b/core/src/fxcodec/jbig2/JBig2_GrrdProc.cpp
@@ -6,10 +6,10 @@
#include "JBig2_GrrdProc.h"
-#include "../../../../third_party/base/nonstd_unique_ptr.h"
#include "JBig2_ArithDecoder.h"
#include "JBig2_BitStream.h"
#include "JBig2_Image.h"
+#include "third_party/base/nonstd_unique_ptr.h"
CJBig2_Image* CJBig2_GRRDProc::decode(CJBig2_ArithDecoder* pArithDecoder,
JBig2ArithCtx* grContext) {
diff --git a/core/src/fxcodec/jbig2/JBig2_GsidProc.cpp b/core/src/fxcodec/jbig2/JBig2_GsidProc.cpp
index 5f423c4b04..ee43cdba5e 100644
--- a/core/src/fxcodec/jbig2/JBig2_GsidProc.cpp
+++ b/core/src/fxcodec/jbig2/JBig2_GsidProc.cpp
@@ -6,12 +6,12 @@
#include "JBig2_GsidProc.h"
-#include "../../../../third_party/base/nonstd_unique_ptr.h"
#include "../../../include/fxcrt/fx_basic.h"
#include "JBig2_BitStream.h"
#include "JBig2_GrdProc.h"
#include "JBig2_Image.h"
#include "JBig2_List.h"
+#include "third_party/base/nonstd_unique_ptr.h"
FX_DWORD* CJBig2_GSIDProc::decode_Arith(CJBig2_ArithDecoder* pArithDecoder,
JBig2ArithCtx* gbContext,
diff --git a/core/src/fxcodec/jbig2/JBig2_HtrdProc.cpp b/core/src/fxcodec/jbig2/JBig2_HtrdProc.cpp
index a5a8b7abfe..d9768345a0 100644
--- a/core/src/fxcodec/jbig2/JBig2_HtrdProc.cpp
+++ b/core/src/fxcodec/jbig2/JBig2_HtrdProc.cpp
@@ -6,9 +6,9 @@
#include "JBig2_HtrdProc.h"
-#include "../../../../third_party/base/nonstd_unique_ptr.h"
#include "../../../include/fxcrt/fx_basic.h"
#include "JBig2_GsidProc.h"
+#include "third_party/base/nonstd_unique_ptr.h"
CJBig2_Image* CJBig2_HTRDProc::decode_Arith(CJBig2_ArithDecoder* pArithDecoder,
JBig2ArithCtx* gbContext,
diff --git a/core/src/fxcodec/jbig2/JBig2_PddProc.cpp b/core/src/fxcodec/jbig2/JBig2_PddProc.cpp
index 56443a01d2..fbe9e4b17f 100644
--- a/core/src/fxcodec/jbig2/JBig2_PddProc.cpp
+++ b/core/src/fxcodec/jbig2/JBig2_PddProc.cpp
@@ -6,10 +6,10 @@
#include "JBig2_PddProc.h"
-#include "../../../../third_party/base/nonstd_unique_ptr.h"
#include "JBig2_GrdProc.h"
#include "JBig2_Image.h"
#include "JBig2_PatternDict.h"
+#include "third_party/base/nonstd_unique_ptr.h"
CJBig2_PatternDict* CJBig2_PDDProc::decode_Arith(
CJBig2_ArithDecoder* pArithDecoder,
diff --git a/core/src/fxcodec/jbig2/JBig2_SddProc.cpp b/core/src/fxcodec/jbig2/JBig2_SddProc.cpp
index ab3b34f583..fe39e71af9 100644
--- a/core/src/fxcodec/jbig2/JBig2_SddProc.cpp
+++ b/core/src/fxcodec/jbig2/JBig2_SddProc.cpp
@@ -6,8 +6,6 @@
#include "JBig2_SddProc.h"
-#include "../../../../third_party/base/nonstd_unique_ptr.h"
-#include "../../../../third_party/base/stl_util.h"
#include "../../../include/fxcrt/fx_basic.h"
#include "JBig2_ArithIntDecoder.h"
#include "JBig2_GrdProc.h"
@@ -16,6 +14,8 @@
#include "JBig2_HuffmanTable.h"
#include "JBig2_SymbolDict.h"
#include "JBig2_TrdProc.h"
+#include "third_party/base/nonstd_unique_ptr.h"
+#include "third_party/base/stl_util.h"
using pdfium::vector_as_array;
diff --git a/core/src/fxcodec/jbig2/JBig2_SymbolDict.h b/core/src/fxcodec/jbig2/JBig2_SymbolDict.h
index 6ff4c2efe2..107b282c9e 100644
--- a/core/src/fxcodec/jbig2/JBig2_SymbolDict.h
+++ b/core/src/fxcodec/jbig2/JBig2_SymbolDict.h
@@ -9,10 +9,10 @@
#include <vector>
-#include "../../../../third_party/base/nonstd_unique_ptr.h"
#include "../../../include/fxcrt/fx_basic.h"
#include "JBig2_ArithDecoder.h"
#include "JBig2_List.h"
+#include "third_party/base/nonstd_unique_ptr.h"
class CJBig2_Image;
diff --git a/core/src/fxcodec/jbig2/JBig2_TrdProc.cpp b/core/src/fxcodec/jbig2/JBig2_TrdProc.cpp
index 368ec9b11e..d76beea8e2 100644
--- a/core/src/fxcodec/jbig2/JBig2_TrdProc.cpp
+++ b/core/src/fxcodec/jbig2/JBig2_TrdProc.cpp
@@ -6,11 +6,11 @@
#include "JBig2_TrdProc.h"
-#include "../../../../third_party/base/nonstd_unique_ptr.h"
#include "JBig2_ArithDecoder.h"
#include "JBig2_ArithIntDecoder.h"
-#include "JBig2_HuffmanDecoder.h"
#include "JBig2_GrrdProc.h"
+#include "JBig2_HuffmanDecoder.h"
+#include "third_party/base/nonstd_unique_ptr.h"
CJBig2_Image* CJBig2_TRDProc::decode_Huffman(CJBig2_BitStream* pStream,
JBig2ArithCtx* grContext) {
diff --git a/core/src/fxcrt/fx_basic_array.cpp b/core/src/fxcrt/fx_basic_array.cpp
index eeaa74926a..a24b78a0af 100644
--- a/core/src/fxcrt/fx_basic_array.cpp
+++ b/core/src/fxcrt/fx_basic_array.cpp
@@ -5,7 +5,7 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
#include "../../include/fxcrt/fx_basic.h"
-#include "../../../third_party/base/numerics/safe_math.h"
+#include "third_party/base/numerics/safe_math.h"
CFX_BasicArray::CFX_BasicArray(int unit_size)
: m_pData(NULL), m_nSize(0), m_nMaxSize(0) {
diff --git a/core/src/fxcrt/fx_basic_bstring.cpp b/core/src/fxcrt/fx_basic_bstring.cpp
index c706912d9d..7793a0e19f 100644
--- a/core/src/fxcrt/fx_basic_bstring.cpp
+++ b/core/src/fxcrt/fx_basic_bstring.cpp
@@ -7,7 +7,7 @@
#include <stddef.h> // For offsetof().
#include "../../include/fxcrt/fx_basic.h"
-#include "../../../third_party/base/numerics/safe_math.h"
+#include "third_party/base/numerics/safe_math.h"
static int _Buffer_itoa(char* buf, int i, FX_DWORD flags) {
if (i == 0) {
diff --git a/core/src/fxcrt/fx_basic_wstring.cpp b/core/src/fxcrt/fx_basic_wstring.cpp
index c097e1fc09..0da9f5168d 100644
--- a/core/src/fxcrt/fx_basic_wstring.cpp
+++ b/core/src/fxcrt/fx_basic_wstring.cpp
@@ -7,7 +7,7 @@
#include <stddef.h> // For offsetof().
#include "../../include/fxcrt/fx_basic.h"
-#include "../../../third_party/base/numerics/safe_math.h"
+#include "third_party/base/numerics/safe_math.h"
// static
CFX_WideString::StringData* CFX_WideString::StringData::Create(int nLen) {
diff --git a/core/src/fxge/agg/include/fx_agg_driver.h b/core/src/fxge/agg/include/fx_agg_driver.h
index c3de76d369..c0b23dddb4 100644
--- a/core/src/fxge/agg/include/fx_agg_driver.h
+++ b/core/src/fxge/agg/include/fx_agg_driver.h
@@ -7,9 +7,9 @@
#ifndef FX_AGG_DRIVER_H_
#define FX_AGG_DRIVER_H_
-#include "../../../../../third_party/agg23/agg_clip_liang_barsky.h"
-#include "../../../../../third_party/agg23/agg_path_storage.h"
-#include "../../../../../third_party/agg23/agg_rasterizer_scanline_aa.h"
+#include "third_party/agg23/agg_clip_liang_barsky.h"
+#include "third_party/agg23/agg_path_storage.h"
+#include "third_party/agg23/agg_rasterizer_scanline_aa.h"
class CAgg_PathData {
public:
diff --git a/core/src/fxge/agg/src/fx_agg_driver.cpp b/core/src/fxge/agg/src/fx_agg_driver.cpp
index d9783d174b..57ece1e6a1 100644
--- a/core/src/fxge/agg/src/fx_agg_driver.cpp
+++ b/core/src/fxge/agg/src/fx_agg_driver.cpp
@@ -4,19 +4,20 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+#include "../../../../include/fxcodec/fx_codec.h"
#include "../../../../include/fxge/fx_ge.h"
#include "../../dib/dib_int.h"
#include "../../ge/text_int.h"
-#include "../../../../include/fxcodec/fx_codec.h"
-#include "../../../../../third_party/agg23/agg_pixfmt_gray.h"
-#include "../../../../../third_party/agg23/agg_path_storage.h"
-#include "../../../../../third_party/agg23/agg_scanline_u.h"
-#include "../../../../../third_party/agg23/agg_rasterizer_scanline_aa.h"
-#include "../../../../../third_party/agg23/agg_renderer_scanline.h"
-#include "../../../../../third_party/agg23/agg_curves.h"
-#include "../../../../../third_party/agg23/agg_conv_stroke.h"
-#include "../../../../../third_party/agg23/agg_conv_dash.h"
#include "../include/fx_agg_driver.h"
+#include "third_party/agg23/agg_conv_dash.h"
+#include "third_party/agg23/agg_conv_stroke.h"
+#include "third_party/agg23/agg_curves.h"
+#include "third_party/agg23/agg_path_storage.h"
+#include "third_party/agg23/agg_pixfmt_gray.h"
+#include "third_party/agg23/agg_rasterizer_scanline_aa.h"
+#include "third_party/agg23/agg_renderer_scanline.h"
+#include "third_party/agg23/agg_scanline_u.h"
+
void _HardClip(FX_FLOAT& x, FX_FLOAT& y) {
if (x > 50000) {
x = 50000;
diff --git a/core/src/fxge/freetype/fx_freetype.c b/core/src/fxge/freetype/fx_freetype.c
index 78dec9ad99..4804bc1d1b 100644
--- a/core/src/fxge/freetype/fx_freetype.c
+++ b/core/src/fxge/freetype/fx_freetype.c
@@ -5,7 +5,7 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
#include "../../../include/fxge/fx_freetype.h"
-#include "../../../../third_party/freetype/src/psnames/pstables.h"
+#include "third_party/freetype/src/psnames/pstables.h"
static int xyq_search_node(char* glyph_name, int name_offset, int table_offset, wchar_t unicode)
{
diff --git a/core/src/fxge/ge/fx_ge_path.cpp b/core/src/fxge/ge/fx_ge_path.cpp
index 9acbcabfbf..c8e4f61ad8 100644
--- a/core/src/fxge/ge/fx_ge_path.cpp
+++ b/core/src/fxge/ge/fx_ge_path.cpp
@@ -4,9 +4,9 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "../../../../third_party/base/numerics/safe_math.h"
#include "../../../include/fxcrt/fx_system.h"
#include "../../../include/fxge/fx_ge.h"
+#include "third_party/base/numerics/safe_math.h"
CFX_ClipRgn::CFX_ClipRgn(int width, int height) {
m_Type = RectI;
diff --git a/fpdfsdk/include/fsdk_actionhandler.h b/fpdfsdk/include/fsdk_actionhandler.h
index 09f13ac5b8..9324b85239 100644
--- a/fpdfsdk/include/fsdk_actionhandler.h
+++ b/fpdfsdk/include/fsdk_actionhandler.h
@@ -9,8 +9,8 @@
#include "../../core/include/fpdfdoc/fpdf_doc.h"
#include "../../core/include/fxcrt/fx_string.h"
-#include "../../third_party/base/nonstd_unique_ptr.h"
#include "fsdk_baseform.h"
+#include "third_party/base/nonstd_unique_ptr.h"
class CFX_PtrList;
class CPDFSDK_Annot;
diff --git a/fpdfsdk/include/fsdk_mgr.h b/fpdfsdk/include/fsdk_mgr.h
index 1c0a48ded5..8a67145291 100644
--- a/fpdfsdk/include/fsdk_mgr.h
+++ b/fpdfsdk/include/fsdk_mgr.h
@@ -12,17 +12,17 @@
#include "../../core/include/fpdftext/fpdf_text.h"
#include "../../public/fpdf_formfill.h"
#include "../../public/fpdf_fwlevent.h" // cross platform keycode and events define.
-#include "../../third_party/base/nonstd_unique_ptr.h"
-#include "fsdk_common.h"
-#include "fsdk_define.h"
-#include "fx_systemhandler.h"
#include "fpdfxfa/fpdfxfa_doc.h"
#include "fpdfxfa/fpdfxfa_page.h"
+#include "fsdk_actionhandler.h"
+#include "fsdk_annothandler.h"
#include "fsdk_baseannot.h"
#include "fsdk_baseform.h"
-#include "fsdk_annothandler.h"
-#include "fsdk_actionhandler.h"
+#include "fsdk_common.h"
+#include "fsdk_define.h"
+#include "fx_systemhandler.h"
#include "javascript/IJavaScript.h"
+#include "third_party/base/nonstd_unique_ptr.h"
class CFFL_IFormFiller;
class CPDFSDK_ActionHandler;
diff --git a/fpdfsdk/src/fpdfformfill.cpp b/fpdfsdk/src/fpdfformfill.cpp
index f6a4f0a488..d7fb2e4cef 100644
--- a/fpdfsdk/src/fpdfformfill.cpp
+++ b/fpdfsdk/src/fpdfformfill.cpp
@@ -6,12 +6,12 @@
#include "../../public/fpdf_formfill.h"
#include "../../public/fpdfview.h"
-#include "../../third_party/base/nonstd_unique_ptr.h"
-#include "../include/fsdk_define.h"
-#include "../include/fsdk_mgr.h"
+#include "../include/fpdfxfa/fpdfxfa_app.h"
#include "../include/fpdfxfa/fpdfxfa_doc.h"
#include "../include/fpdfxfa/fpdfxfa_page.h"
-#include "../include/fpdfxfa/fpdfxfa_app.h"
+#include "../include/fsdk_define.h"
+#include "../include/fsdk_mgr.h"
+#include "third_party/base/nonstd_unique_ptr.h"
namespace {
diff --git a/fpdfsdk/src/fpdfppo.cpp b/fpdfsdk/src/fpdfppo.cpp
index cc0799ef13..0623e7ee85 100644
--- a/fpdfsdk/src/fpdfppo.cpp
+++ b/fpdfsdk/src/fpdfppo.cpp
@@ -5,8 +5,8 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
#include "../../public/fpdf_ppo.h"
-#include "../include/fsdk_define.h"
#include "../include/fpdfxfa/fpdfxfa_doc.h"
+#include "../include/fsdk_define.h"
class CPDF_PageOrganizer {
public:
diff --git a/fpdfsdk/src/fpdfview.cpp b/fpdfsdk/src/fpdfview.cpp
index b3c8137d0c..04908658f0 100644
--- a/fpdfsdk/src/fpdfview.cpp
+++ b/fpdfsdk/src/fpdfview.cpp
@@ -11,8 +11,6 @@
#include "../../public/fpdf_formfill.h"
#include "../../public/fpdf_progressive.h"
#include "../../public/fpdfview.h"
-#include "../../third_party/base/nonstd_unique_ptr.h"
-#include "../../third_party/base/numerics/safe_conversions_impl.h"
#include "../include/fsdk_define.h"
#include "../include/fsdk_mgr.h"
#include "../include/fsdk_rendercontext.h"
@@ -21,6 +19,8 @@
#include "../include/fpdfxfa/fpdfxfa_page.h"
#include "../include/fpdfxfa/fpdfxfa_util.h"
#include "../include/javascript/IJavaScript.h"
+#include "third_party/base/nonstd_unique_ptr.h"
+#include "third_party/base/numerics/safe_conversions_impl.h"
CPDF_Document* CPDFDocumentFromFPDFDocument(FPDF_DOCUMENT doc) {
return doc ? static_cast<CPDFXFA_Document*>(doc)->GetPDFDoc() : nullptr;
diff --git a/fpdfsdk/src/fsdk_baseform.cpp b/fpdfsdk/src/fsdk_baseform.cpp
index ebc983794e..5c4269e354 100644
--- a/fpdfsdk/src/fsdk_baseform.cpp
+++ b/fpdfsdk/src/fsdk_baseform.cpp
@@ -4,17 +4,16 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "../../third_party/base/nonstd_unique_ptr.h"
-#include "../include/fsdk_define.h"
+#include "../include/formfiller/FFL_FormFiller.h"
#include "../include/fpdfxfa/fpdfxfa_doc.h"
#include "../include/fpdfxfa/fpdfxfa_util.h"
-#include "../include/fsdk_mgr.h"
+#include "../include/fsdk_actionhandler.h"
#include "../include/fsdk_baseannot.h"
#include "../include/fsdk_baseform.h"
-#include "../include/formfiller/FFL_FormFiller.h"
-#include "../include/fsdk_actionhandler.h"
-
+#include "../include/fsdk_define.h"
+#include "../include/fsdk_mgr.h"
#include "../include/javascript/IJavaScript.h"
+#include "third_party/base/nonstd_unique_ptr.h"
//------------------------------------------------------------------------------------
//* CPDFSDK_Widget
diff --git a/fpdfsdk/src/fsdk_mgr.cpp b/fpdfsdk/src/fsdk_mgr.cpp
index 1b09714dfa..9db5f913c5 100644
--- a/fpdfsdk/src/fsdk_mgr.cpp
+++ b/fpdfsdk/src/fsdk_mgr.cpp
@@ -7,11 +7,11 @@
#include <algorithm>
#include "../../public/fpdf_ext.h"
-#include "../../third_party/base/nonstd_unique_ptr.h"
#include "../include/formfiller/FFL_FormFiller.h"
#include "../include/fsdk_define.h"
#include "../include/fsdk_mgr.h"
#include "../include/javascript/IJavaScript.h"
+#include "third_party/base/nonstd_unique_ptr.h"
#include "../include/fpdfxfa/fpdfxfa_app.h"
#include "../include/fpdfxfa/fpdfxfa_doc.h"
diff --git a/fpdfsdk/src/javascript/Document.cpp b/fpdfsdk/src/javascript/Document.cpp
index a51a7a69db..e128860863 100644
--- a/fpdfsdk/src/javascript/Document.cpp
+++ b/fpdfsdk/src/javascript/Document.cpp
@@ -6,7 +6,6 @@
#include "Document.h"
-#include "../../../third_party/base/numerics/safe_math.h"
#include "../../include/fsdk_mgr.h" // For CPDFDoc_Environment.
#include "../../include/javascript/IJavaScript.h"
#include "Field.h"
@@ -19,6 +18,7 @@
#include "JS_Value.h"
#include "app.h"
#include "resource.h"
+#include "third_party/base/numerics/safe_math.h"
static v8::Isolate* GetIsolate(IJS_Context* cc) {
CJS_Context* pContext = (CJS_Context*)cc;
diff --git a/fpdfsdk/src/javascript/JS_Object.h b/fpdfsdk/src/javascript/JS_Object.h
index 50751523f5..8872a4eca4 100644
--- a/fpdfsdk/src/javascript/JS_Object.h
+++ b/fpdfsdk/src/javascript/JS_Object.h
@@ -9,10 +9,10 @@
#include <map>
-#include "../../../third_party/base/nonstd_unique_ptr.h"
#include "../../include/fsdk_define.h" // For FX_UINT
#include "../../include/jsapi/fxjs_v8.h"
#include "JS_Runtime.h"
+#include "third_party/base/nonstd_unique_ptr.h"
class CJS_Context;
class CJS_Object;
diff --git a/fpdfsdk/src/javascript/JS_Runtime_Stub.cpp b/fpdfsdk/src/javascript/JS_Runtime_Stub.cpp
index 7e3d78881a..ba9b4a0d4a 100644
--- a/fpdfsdk/src/javascript/JS_Runtime_Stub.cpp
+++ b/fpdfsdk/src/javascript/JS_Runtime_Stub.cpp
@@ -4,9 +4,9 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "../../../third_party/base/nonstd_unique_ptr.h"
#include "../../include/fsdk_mgr.h" // For CPDFDoc_Environment.
#include "../../include/javascript/IJavaScript.h"
+#include "third_party/base/nonstd_unique_ptr.h"
class CJS_ContextStub final : public IJS_Context {
public:
diff --git a/fpdfsdk/src/javascript/app.cpp b/fpdfsdk/src/javascript/app.cpp
index 379170f292..d6344d9132 100644
--- a/fpdfsdk/src/javascript/app.cpp
+++ b/fpdfsdk/src/javascript/app.cpp
@@ -6,7 +6,6 @@
#include "app.h"
-#include "../../../third_party/base/nonstd_unique_ptr.h"
#include "../../include/fsdk_mgr.h" // For CPDFDoc_Environment.
#include "../../include/javascript/IJavaScript.h"
#include "Document.h"
@@ -17,6 +16,7 @@
#include "JS_Runtime.h"
#include "JS_Value.h"
#include "resource.h"
+#include "third_party/base/nonstd_unique_ptr.h"
BEGIN_JS_STATIC_CONST(CJS_TimerObj)
END_JS_STATIC_CONST()
diff --git a/fpdfsdk/src/jsapi/fxjs_v8_embeddertest.cpp b/fpdfsdk/src/jsapi/fxjs_v8_embeddertest.cpp
index 1c10df7dbf..a81e038e1a 100644
--- a/fpdfsdk/src/jsapi/fxjs_v8_embeddertest.cpp
+++ b/fpdfsdk/src/jsapi/fxjs_v8_embeddertest.cpp
@@ -2,11 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "../../../third_party/base/nonstd_unique_ptr.h"
#include "../../../core/include/fpdfapi/fpdf_parser.h"
#include "../../../testing/embedder_test.h"
#include "../../include/jsapi/fxjs_v8.h"
#include "testing/gtest/include/gtest/gtest.h"
+#include "third_party/base/nonstd_unique_ptr.h"
namespace {
diff --git a/pdfium.gyp b/pdfium.gyp
index 23698d7846..df1b99c340 100644
--- a/pdfium.gyp
+++ b/pdfium.gyp
@@ -1,3 +1,7 @@
+# Copyright 2015 PDFium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
{
'variables': {
# TODO(thakis): Enable this, pdfium:29
@@ -24,6 +28,9 @@
'_CRT_SECURE_NO_WARNINGS',
],
'include_dirs': [
+ # This is implicit in GN.
+ '<(DEPTH)',
+ '.',
'third_party/freetype/include',
'third_party/freetype/include/freetype',
],
@@ -334,8 +341,8 @@
'target_name': 'fxcodec',
'type': 'static_library',
'dependencies': [
+ '<(libjpeg_gyp_path):libjpeg',
'third_party/third_party.gyp:fx_lcms2',
- 'third_party/third_party.gyp:fx_libjpeg',
'third_party/third_party.gyp:fx_libopenjpeg',
'third_party/third_party.gyp:fx_lpng',
'third_party/third_party.gyp:fx_tiff',
@@ -757,9 +764,6 @@
'pdfium',
'test_support',
],
- 'include_dirs': [
- '<(DEPTH)'
- ],
'sources': [
'core/src/fpdfapi/fpdf_font/fpdf_font_cid_unittest.cpp',
'core/src/fpdfapi/fpdf_font/fpdf_font_unittest.cpp',
@@ -794,9 +798,6 @@
'pdfium',
'test_support',
],
- 'include_dirs': [
- '<(DEPTH)',
- ],
'sources': [
'core/src/fpdfapi/fpdf_page/fpdf_page_func_embeddertest.cpp',
'core/src/fpdfapi/fpdf_parser/fpdf_parser_decode_embeddertest.cpp',
@@ -838,9 +839,6 @@
'<(DEPTH)/testing/gmock.gyp:gmock',
'<(DEPTH)/testing/gtest.gyp:gtest',
],
- 'include_dirs': [
- '<(DEPTH)',
- ],
'sources': [
'testing/fx_string_testhelpers.cpp',
'testing/fx_string_testhelpers.h',
diff --git a/samples/image_diff.cc b/samples/image_diff.cc
index f10bd31085..88a3956d09 100644
--- a/samples/image_diff.cc
+++ b/samples/image_diff.cc
@@ -19,9 +19,9 @@
#include <string>
#include <vector>
-#include "../third_party/base/logging.h"
-#include "../third_party/base/numerics/safe_conversions.h"
#include "image_diff_png.h"
+#include "third_party/base/logging.h"
+#include "third_party/base/numerics/safe_conversions.h"
#if defined(OS_WIN)
#include <windows.h>
diff --git a/samples/image_diff_png.cc b/samples/image_diff_png.cc
index a8ca925a3a..992617d5e5 100644
--- a/samples/image_diff_png.cc
+++ b/samples/image_diff_png.cc
@@ -16,9 +16,9 @@
#include <string>
-#include "../third_party/base/logging.h"
-#include "../third_party/lpng_v163/png.h"
-#include "../third_party/zlib_v128/zlib.h"
+#include "third_party/base/logging.h"
+#include "third_party/lpng_v163/png.h"
+#include "third_party/zlib_v128/zlib.h"
namespace image_diff_png {
diff --git a/samples/pdfium_test.cc b/samples/pdfium_test.cc
index 4ccf1a7721..190286a34e 100644
--- a/samples/pdfium_test.cc
+++ b/samples/pdfium_test.cc
@@ -25,7 +25,7 @@
#ifdef PDF_ENABLE_V8
#include "v8/include/libplatform/libplatform.h"
#include "v8/include/v8.h"
-#endif
+#endif // PDF_ENABLE_V8
#ifdef _WIN32
#define snprintf _snprintf
diff --git a/samples/samples.gyp b/samples/samples.gyp
index 97181ba208..ff7b05823c 100644
--- a/samples/samples.gyp
+++ b/samples/samples.gyp
@@ -15,6 +15,7 @@
'include_dirs': [
# This is implicit in GN.
'<(DEPTH)',
+ '..',
],
'conditions': [
['pdf_enable_v8==1', {
diff --git a/testing/embedder_test.cpp b/testing/embedder_test.cpp
index 99e294bc8e..8a102d1225 100644
--- a/testing/embedder_test.cpp
+++ b/testing/embedder_test.cpp
@@ -17,8 +17,8 @@
#include "testing/gmock/include/gmock/gmock.h"
#ifdef PDF_ENABLE_V8
-#include "v8/include/libplatform/libplatform.h"
#include "v8/include/v8.h"
+#include "v8/include/v8-platform.h"
#endif // PDF_ENABLE_V8
namespace {
diff --git a/testing/embedder_test.h b/testing/embedder_test.h
index fb3ea428f1..49f8bbac9c 100644
--- a/testing/embedder_test.h
+++ b/testing/embedder_test.h
@@ -12,8 +12,8 @@
#include "../public/fpdf_ext.h"
#include "../public/fpdf_formfill.h"
#include "../public/fpdfview.h"
-#include "../third_party/base/nonstd_unique_ptr.h"
#include "testing/gtest/include/gtest/gtest.h"
+#include "third_party/base/nonstd_unique_ptr.h"
#ifdef PDF_ENABLE_V8
#include "v8/include/v8.h"
diff --git a/testing/test_support.cpp b/testing/test_support.cpp
index 49232990bc..8ecda30bce 100644
--- a/testing/test_support.cpp
+++ b/testing/test_support.cpp
@@ -13,6 +13,10 @@
#define PATH_SEPARATOR '/'
#endif
+#ifdef PDF_ENABLE_V8
+#include "v8/include/libplatform/libplatform.h"
+#endif
+
namespace {
#ifdef PDF_ENABLE_V8
diff --git a/testing/test_support.h b/testing/test_support.h
index 4bb88db254..afa3bafc96 100644
--- a/testing/test_support.h
+++ b/testing/test_support.h
@@ -11,9 +11,8 @@
#include "../public/fpdfview.h"
#ifdef PDF_ENABLE_V8
-#include "v8/include/libplatform/libplatform.h"
#include "v8/include/v8.h"
-#endif
+#endif // PDF_ENABLE_V8
// Reads the entire contents of a file into a newly malloc'd buffer.
char* GetFileContents(const char* filename, size_t* retlen);
diff --git a/third_party/BUILD.gn b/third_party/BUILD.gn
index 7f27327ea5..16adbf70fd 100644
--- a/third_party/BUILD.gn
+++ b/third_party/BUILD.gn
@@ -44,6 +44,7 @@ source_set("fx_freetype") {
configs += [
"//build/config/compiler:no_chromium_code",
"//third_party/pdfium:pdfium_config",
+
# Must be after no_chromium_code for warning flags to be ordered correctly.
":fx_freetype_warnings",
]
@@ -94,6 +95,7 @@ source_set("fx_agg") {
configs += [
"//build/config/compiler:no_chromium_code",
"//third_party/pdfium:pdfium_config",
+
# Must be after no_chromium_code for warning flags to be ordered correctly.
":fx_agg_warnings",
]
@@ -118,9 +120,14 @@ source_set("fx_agg") {
config("fx_lcms2_warnings") {
if (is_clang) {
- # cmslut.cc is sloppy with aggregate initialization. Version 2.7 of this
- # library doesn't appear to have this problem.
- cflags = [ "-Wno-missing-braces" ]
+ cflags = [
+ # cmslut.cc is sloppy with aggregate initialization. Version 2.7 of this
+ # library doesn't appear to have this problem.
+ "-Wno-missing-braces",
+
+ # FindPrev() in cmsplugin.c is unused.
+ "-Wno-unused-function",
+ ]
}
}
@@ -129,6 +136,7 @@ source_set("fx_lcms2") {
configs += [
"//build/config/compiler:no_chromium_code",
"//third_party/pdfium:pdfium_config",
+
# Must be after no_chromium_code for warning flags to be ordered correctly.
":fx_lcms2_warnings",
]
@@ -163,7 +171,8 @@ source_set("fx_lcms2") {
]
}
-source_set("fx_libjpeg") {
+# This is only used for standalone builds.
+source_set("jpeg") {
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [
"//build/config/compiler:no_chromium_code",
diff --git a/third_party/lpng_v163/pngstruct.h b/third_party/lpng_v163/pngstruct.h
index 9fe77fdd34..87adaa1a6b 100644
--- a/third_party/lpng_v163/pngstruct.h
+++ b/third_party/lpng_v163/pngstruct.h
@@ -28,7 +28,7 @@
/* We must ensure that zlib uses 'const' in declarations. */
# define ZLIB_CONST
#endif
-#include "../zlib_v128/zlib.h"
+#include "third_party/zlib_v128/zlib.h"
#ifdef const
/* zlib.h sometimes #defines const to nothing, undo this. */
# undef const
diff --git a/third_party/third_party.gyp b/third_party/third_party.gyp
index 55a7e3392e..25e7050ee2 100644
--- a/third_party/third_party.gyp
+++ b/third_party/third_party.gyp
@@ -11,6 +11,11 @@
'PNG_USE_READ_MACROS',
'_CRT_SECURE_NO_WARNINGS',
],
+ 'include_dirs': [
+ # This is implicit in GN.
+ '<(DEPTH)',
+ '..',
+ ],
'msvs_disabled_warnings': [
4005, 4018, 4146, 4333, 4345, 4267
],
@@ -148,7 +153,7 @@
},
},
{
- 'target_name': 'fx_libjpeg',
+ 'target_name': 'libjpeg',
'type': 'static_library',
'sources': [
'libjpeg/cderror.h',
diff --git a/xfa.gyp b/xfa.gyp
index 8302e8d889..41497f72e6 100644
--- a/xfa.gyp
+++ b/xfa.gyp
@@ -11,15 +11,10 @@
{
"target_name":"xfa",
"type":"static_library",
- 'dependencies': [
- '<(DEPTH)/v8/tools/gyp/v8.gyp:v8',
- ],
- 'export_dependent_settings': [
- '<(DEPTH)/v8/tools/gyp/v8.gyp:v8',
- ],
'include_dirs': [
- '<(DEPTH)/v8',
- '<(DEPTH)/v8/include',
+ # This is implicit in GN.
+ '<(DEPTH)',
+ '.',
'third_party/freetype/include',
'third_party/freetype/include/freetype',
],
diff --git a/xfa/include/fxjse/fxjse.h b/xfa/include/fxjse/fxjse.h
index ed3e987b95..572d697394 100644
--- a/xfa/include/fxjse/fxjse.h
+++ b/xfa/include/fxjse/fxjse.h
@@ -4,8 +4,15 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#ifndef _FXJSE_H_
-#define _FXJSE_H_
+#ifndef XFA_INCLUDE_FXJSE_FXJSE_H_
+#define XFA_INCLUDE_FXJSE_FXJSE_H_
+
+#include "../../../core/include/fpdfapi/fpdf_parser.h"
+#include "../../../core/include/fxcrt/fx_string.h"
+#include "../../../core/include/fxcrt/fx_system.h"
+
+class CPDFDoc_Environment;
+class CPDF_Page;
typedef struct FXJSE_HRUNTIME_ { void* pData; } * FXJSE_HRUNTIME;
typedef struct FXJSE_HCONTEXT_ { void* pData; } * FXJSE_HCONTEXT;
@@ -20,8 +27,8 @@ FXJSE_HRUNTIME FXJSE_Runtime_Create();
void FXJSE_Runtime_Release(FXJSE_HRUNTIME hRuntime);
typedef struct _FXJSE_CLASS FXJSE_CLASS;
FXJSE_HCONTEXT FXJSE_Context_Create(FXJSE_HRUNTIME hRuntime,
- const FXJSE_CLASS* lpGlobalClass = NULL,
- void* lpGlobalObject = NULL);
+ const FXJSE_CLASS* lpGlobalClass = nullptr,
+ void* lpGlobalObject = nullptr);
void FXJSE_Context_Release(FXJSE_HCONTEXT hContext);
FXJSE_HVALUE FXJSE_Context_GetGlobalObject(FXJSE_HCONTEXT hContext);
FXJSE_HRUNTIME FXJSE_Context_GetRuntime(FXJSE_HCONTEXT hContext);
@@ -40,7 +47,7 @@ class CFXJSE_Arguments {
int32_t GetInt32(int32_t index) const;
FX_FLOAT GetFloat(int32_t index) const;
CFX_ByteString GetUTF8String(int32_t index) const;
- void* GetObject(int32_t index, FXJSE_HCLASS hClass = NULL) const;
+ void* GetObject(int32_t index, FXJSE_HCLASS hClass = nullptr) const;
FXJSE_HVALUE GetReturnValue();
};
typedef void (*FXJSE_FuncCallback)(FXJSE_HOBJECT hThis,
@@ -156,7 +163,7 @@ FX_BOOL FXJSE_Value_SetFunctionBind(FXJSE_HVALUE hValue,
FX_BOOL FXJSE_ExecuteScript(FXJSE_HCONTEXT hContext,
const FX_CHAR* szScript,
FXJSE_HVALUE hRetValue,
- FXJSE_HVALUE hNewThisObject = NULL);
+ FXJSE_HVALUE hNewThisObject = nullptr);
void FXJSE_ThrowMessage(const CFX_ByteStringC& utf8Name,
const CFX_ByteStringC& utf8Message);
FX_BOOL FXJSE_ReturnValue_GetMessage(FXJSE_HVALUE hRetValue,
@@ -165,4 +172,5 @@ FX_BOOL FXJSE_ReturnValue_GetMessage(FXJSE_HVALUE hRetValue,
FX_BOOL FXJSE_ReturnValue_GetLineInfo(FXJSE_HVALUE hRetValue,
int32_t& nLine,
int32_t& nCol);
-#endif
+
+#endif // XFA_INCLUDE_FXJSE_FXJSE_H_