Merge to XFA: Fix relative includes within core/

TBR=tsepez@chromium.org

Review URL: https://codereview.chromium.org/1427633010 .

(cherry picked from commit 9fb27cb9797937499c9678bc74cf7846cbf5d2b8)

Review URL: https://codereview.chromium.org/1438573002 .
diff --git a/core/src/fdrm/crypto/fx_crypt.cpp b/core/src/fdrm/crypto/fx_crypt.cpp
index 170cb57..c1016cd 100644
--- a/core/src/fdrm/crypto/fx_crypt.cpp
+++ b/core/src/fdrm/crypto/fx_crypt.cpp
@@ -4,7 +4,7 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../../include/fdrm/fx_crypt.h"
+#include "core/include/fdrm/fx_crypt.h"
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/core/src/fdrm/crypto/fx_crypt_aes.cpp b/core/src/fdrm/crypto/fx_crypt_aes.cpp
index 751e889..d27783f 100644
--- a/core/src/fdrm/crypto/fx_crypt_aes.cpp
+++ b/core/src/fdrm/crypto/fx_crypt_aes.cpp
@@ -4,7 +4,8 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../../include/fdrm/fx_crypt.h"
+#include "core/include/fdrm/fx_crypt.h"
+
 #ifdef __cplusplus
 extern "C" {
 #endif
diff --git a/core/src/fdrm/crypto/fx_crypt_sha.cpp b/core/src/fdrm/crypto/fx_crypt_sha.cpp
index 98e61d0..21046f1 100644
--- a/core/src/fdrm/crypto/fx_crypt_sha.cpp
+++ b/core/src/fdrm/crypto/fx_crypt_sha.cpp
@@ -4,7 +4,8 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../../include/fdrm/fx_crypt.h"
+#include "core/include/fdrm/fx_crypt.h"
+
 #ifdef __cplusplus
 extern "C" {
 #endif
diff --git a/core/src/fpdfapi/fpdf_basic_module.cpp b/core/src/fpdfapi/fpdf_basic_module.cpp
index 37ad62f..a2a7e09 100644
--- a/core/src/fpdfapi/fpdf_basic_module.cpp
+++ b/core/src/fpdfapi/fpdf_basic_module.cpp
@@ -4,8 +4,8 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../include/fxcodec/fx_codec.h"
-#include "../../include/fpdfapi/fpdf_module.h"
+#include "core/include/fxcodec/fx_codec.h"
+#include "core/include/fpdfapi/fpdf_module.h"
 
 namespace {
 
diff --git a/core/src/fpdfapi/fpdf_cmaps/CNS1/cmaps_cns1.cpp b/core/src/fpdfapi/fpdf_cmaps/CNS1/cmaps_cns1.cpp
index 94617a4..914e2bd 100644
--- a/core/src/fpdfapi/fpdf_cmaps/CNS1/cmaps_cns1.cpp
+++ b/core/src/fpdfapi/fpdf_cmaps/CNS1/cmaps_cns1.cpp
@@ -4,12 +4,13 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../../../include/fpdfapi/fpdf_resource.h"
-#include "../../../../include/fpdfapi/fpdf_module.h"
-#include "../../../../include/fxcrt/fx_basic.h"  // For FX_ArraySize().
+#include "cmaps_cns1.h"
+
 #include "../../fpdf_font/font_int.h"
 #include "../cmap_int.h"
-#include "cmaps_cns1.h"
+#include "core/include/fpdfapi/fpdf_module.h"
+#include "core/include/fpdfapi/fpdf_resource.h"
+#include "core/include/fxcrt/fx_basic.h"  // For FX_ArraySize().
 
 static const FXCMAP_CMap g_FXCMAP_CNS1_cmaps[] = {
     {"B5pc-H", FXCMAP_CMap::Range, g_FXCMAP_B5pc_H_0, 247, FXCMAP_CMap::None,
diff --git a/core/src/fpdfapi/fpdf_cmaps/CNS1/cmaps_cns1.h b/core/src/fpdfapi/fpdf_cmaps/CNS1/cmaps_cns1.h
index 93cfd2d..8edd85c 100644
--- a/core/src/fpdfapi/fpdf_cmaps/CNS1/cmaps_cns1.h
+++ b/core/src/fpdfapi/fpdf_cmaps/CNS1/cmaps_cns1.h
@@ -7,7 +7,7 @@
 #ifndef CORE_SRC_FPDFAPI_FPDF_CMAPS_CNS1_CMAPS_CNS1_H_
 #define CORE_SRC_FPDFAPI_FPDF_CMAPS_CNS1_CMAPS_CNS1_H_
 
-#include "../../../../include/fxcrt/fx_system.h"  // For FX_WORD.
+#include "core/include/fxcrt/fx_system.h"  // For FX_WORD.
 
 extern const FX_WORD g_FXCMAP_B5pc_H_0[];
 extern const FX_WORD g_FXCMAP_B5pc_V_0[];
diff --git a/core/src/fpdfapi/fpdf_cmaps/GB1/cmaps_gb1.cpp b/core/src/fpdfapi/fpdf_cmaps/GB1/cmaps_gb1.cpp
index bf79ced..4ddabbf 100644
--- a/core/src/fpdfapi/fpdf_cmaps/GB1/cmaps_gb1.cpp
+++ b/core/src/fpdfapi/fpdf_cmaps/GB1/cmaps_gb1.cpp
@@ -4,12 +4,13 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../../../include/fpdfapi/fpdf_resource.h"
-#include "../../../../include/fpdfapi/fpdf_module.h"
-#include "../../../../include/fxcrt/fx_basic.h"  // For FX_ArraySize().
+#include "cmaps_gb1.h"
+
 #include "../../fpdf_font/font_int.h"
 #include "../cmap_int.h"
-#include "cmaps_gb1.h"
+#include "core/include/fpdfapi/fpdf_module.h"
+#include "core/include/fpdfapi/fpdf_resource.h"
+#include "core/include/fxcrt/fx_basic.h"  // For FX_ArraySize().
 
 static const FXCMAP_CMap g_FXCMAP_GB1_cmaps[] = {
     {"GB-EUC-H", FXCMAP_CMap::Range, g_FXCMAP_GB_EUC_H_0, 90, FXCMAP_CMap::None,
diff --git a/core/src/fpdfapi/fpdf_cmaps/GB1/cmaps_gb1.h b/core/src/fpdfapi/fpdf_cmaps/GB1/cmaps_gb1.h
index c74ed71..beae68d 100644
--- a/core/src/fpdfapi/fpdf_cmaps/GB1/cmaps_gb1.h
+++ b/core/src/fpdfapi/fpdf_cmaps/GB1/cmaps_gb1.h
@@ -7,7 +7,7 @@
 #ifndef CORE_SRC_FPDFAPI_FPDF_CMAPS_GB1_CMAPS_GB1_H_
 #define CORE_SRC_FPDFAPI_FPDF_CMAPS_GB1_CMAPS_GB1_H_
 
-#include "../../../../include/fxcrt/fx_system.h"  // For FX_WORD.
+#include "core/include/fxcrt/fx_system.h"  // For FX_WORD.
 
 extern const FX_WORD g_FXCMAP_GB_EUC_H_0[];
 extern const FX_WORD g_FXCMAP_GB_EUC_V_0[];
diff --git a/core/src/fpdfapi/fpdf_cmaps/Japan1/cmaps_japan1.cpp b/core/src/fpdfapi/fpdf_cmaps/Japan1/cmaps_japan1.cpp
index 1c788dc..30c3b3d 100644
--- a/core/src/fpdfapi/fpdf_cmaps/Japan1/cmaps_japan1.cpp
+++ b/core/src/fpdfapi/fpdf_cmaps/Japan1/cmaps_japan1.cpp
@@ -4,12 +4,13 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../../../include/fpdfapi/fpdf_resource.h"
-#include "../../../../include/fpdfapi/fpdf_module.h"
-#include "../../../../include/fxcrt/fx_basic.h"  // For FX_ArraySize().
+#include "cmaps_japan1.h"
+
 #include "../../fpdf_font/font_int.h"
 #include "../cmap_int.h"
-#include "cmaps_japan1.h"
+#include "core/include/fpdfapi/fpdf_module.h"
+#include "core/include/fpdfapi/fpdf_resource.h"
+#include "core/include/fxcrt/fx_basic.h"  // For FX_ArraySize().
 
 static const FXCMAP_CMap g_FXCMAP_Japan1_cmaps[] = {
     {"83pv-RKSJ-H", FXCMAP_CMap::Range, g_FXCMAP_83pv_RKSJ_H_1, 222,
diff --git a/core/src/fpdfapi/fpdf_cmaps/Japan1/cmaps_japan1.h b/core/src/fpdfapi/fpdf_cmaps/Japan1/cmaps_japan1.h
index f45f104..471dd36 100644
--- a/core/src/fpdfapi/fpdf_cmaps/Japan1/cmaps_japan1.h
+++ b/core/src/fpdfapi/fpdf_cmaps/Japan1/cmaps_japan1.h
@@ -7,7 +7,7 @@
 #ifndef CORE_SRC_FPDFAPI_FPDF_CMAPS_JAPAN1_CMAPS_JAPAN1_H_
 #define CORE_SRC_FPDFAPI_FPDF_CMAPS_JAPAN1_CMAPS_JAPAN1_H_
 
-#include "../../../../include/fxcrt/fx_system.h"  // For FX_WORD.
+#include "core/include/fxcrt/fx_system.h"  // For FX_WORD.
 
 extern const FX_WORD g_FXCMAP_83pv_RKSJ_H_1[];
 extern const FX_WORD g_FXCMAP_90ms_RKSJ_H_2[];
diff --git a/core/src/fpdfapi/fpdf_cmaps/Korea1/cmaps_korea1.cpp b/core/src/fpdfapi/fpdf_cmaps/Korea1/cmaps_korea1.cpp
index 1743594..d7c5b1b 100644
--- a/core/src/fpdfapi/fpdf_cmaps/Korea1/cmaps_korea1.cpp
+++ b/core/src/fpdfapi/fpdf_cmaps/Korea1/cmaps_korea1.cpp
@@ -4,12 +4,13 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../../../include/fpdfapi/fpdf_resource.h"
-#include "../../../../include/fpdfapi/fpdf_module.h"
-#include "../../../../include/fxcrt/fx_basic.h"  // For FX_ArraySize().
+#include "cmaps_korea1.h"
+
 #include "../../fpdf_font/font_int.h"
 #include "../cmap_int.h"
-#include "cmaps_korea1.h"
+#include "core/include/fpdfapi/fpdf_module.h"
+#include "core/include/fpdfapi/fpdf_resource.h"
+#include "core/include/fxcrt/fx_basic.h"  // For FX_ArraySize().
 
 static const FXCMAP_CMap g_FXCMAP_Korea1_cmaps[] = {
     {"KSC-EUC-H", FXCMAP_CMap::Range, g_FXCMAP_KSC_EUC_H_0, 467,
diff --git a/core/src/fpdfapi/fpdf_cmaps/Korea1/cmaps_korea1.h b/core/src/fpdfapi/fpdf_cmaps/Korea1/cmaps_korea1.h
index 853e695..646a9b9 100644
--- a/core/src/fpdfapi/fpdf_cmaps/Korea1/cmaps_korea1.h
+++ b/core/src/fpdfapi/fpdf_cmaps/Korea1/cmaps_korea1.h
@@ -7,7 +7,7 @@
 #ifndef CORE_SRC_FPDFAPI_FPDF_CMAPS_KOREA1_CMAPS_KOREA1_H_
 #define CORE_SRC_FPDFAPI_FPDF_CMAPS_KOREA1_CMAPS_KOREA1_H_
 
-#include "../../../../include/fxcrt/fx_system.h"  // For FX_WORD.
+#include "core/include/fxcrt/fx_system.h"  // For FX_WORD.
 
 extern const FX_WORD g_FXCMAP_KSC_EUC_H_0[];
 extern const FX_WORD g_FXCMAP_KSC_EUC_V_0[];
diff --git a/core/src/fpdfapi/fpdf_cmaps/cmap_int.h b/core/src/fpdfapi/fpdf_cmaps/cmap_int.h
index 7d51cee..a486ac3 100644
--- a/core/src/fpdfapi/fpdf_cmaps/cmap_int.h
+++ b/core/src/fpdfapi/fpdf_cmaps/cmap_int.h
@@ -7,7 +7,7 @@
 #ifndef CORE_SRC_FPDFAPI_FPDF_CMAPS_CMAP_INT_H_
 #define CORE_SRC_FPDFAPI_FPDF_CMAPS_CMAP_INT_H_
 
-#include "../../../include/fxcrt/fx_system.h"  // For FX_WORD.
+#include "core/include/fxcrt/fx_system.h"  // For FX_WORD.
 
 struct FXCMAP_CMap {
   enum MapType { None, Single, Range, Reverse };
diff --git a/core/src/fpdfapi/fpdf_cmaps/fpdf_cmaps.cpp b/core/src/fpdfapi/fpdf_cmaps/fpdf_cmaps.cpp
index 252a4d6..cbae496 100644
--- a/core/src/fpdfapi/fpdf_cmaps/fpdf_cmaps.cpp
+++ b/core/src/fpdfapi/fpdf_cmaps/fpdf_cmaps.cpp
@@ -4,11 +4,12 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../../include/fpdfapi/fpdf_resource.h"
-#include "../../../include/fpdfapi/fpdf_module.h"
-#include "../fpdf_font/font_int.h"
 #include "cmap_int.h"
 
+#include "../fpdf_font/font_int.h"
+#include "core/include/fpdfapi/fpdf_module.h"
+#include "core/include/fpdfapi/fpdf_resource.h"
+
 void FPDFAPI_FindEmbeddedCMap(const char* name,
                               int charset,
                               int coding,
diff --git a/core/src/fpdfapi/fpdf_edit/editint.h b/core/src/fpdfapi/fpdf_edit/editint.h
index 445ea83..e80fdd3 100644
--- a/core/src/fpdfapi/fpdf_edit/editint.h
+++ b/core/src/fpdfapi/fpdf_edit/editint.h
@@ -7,6 +7,13 @@
 #ifndef CORE_SRC_FPDFAPI_FPDF_EDIT_EDITINT_H_
 #define CORE_SRC_FPDFAPI_FPDF_EDIT_EDITINT_H_
 
+#include "core/include/fxcrt/fx_basic.h"
+#include "core/include/fxcrt/fx_stream.h"
+#include "core/include/fxcrt/fx_system.h"
+
+class CPDF_Creator;
+class CPDF_Object;
+
 class CPDF_ObjectStream {
  public:
   CPDF_ObjectStream();
diff --git a/core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp b/core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp
index 383284e..452bf0e 100644
--- a/core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp
+++ b/core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp
@@ -4,10 +4,10 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../../include/fpdfapi/fpdf_page.h"
-#include "../../../include/fpdfapi/fpdf_serial.h"
-#include "../../../include/fpdfapi/fpdf_module.h"
 #include "../fpdf_page/pageint.h"
+#include "core/include/fpdfapi/fpdf_module.h"
+#include "core/include/fpdfapi/fpdf_page.h"
+#include "core/include/fpdfapi/fpdf_serial.h"
 
 CFX_ByteTextBuf& operator<<(CFX_ByteTextBuf& ar, CFX_AffineMatrix& matrix) {
   ar << matrix.a << " " << matrix.b << " " << matrix.c << " " << matrix.d << " "
diff --git a/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp b/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp
index fec4e4f..88cdf2c 100644
--- a/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp
+++ b/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp
@@ -4,11 +4,12 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../../include/fxcrt/fx_ext.h"
-#include "../../../include/fpdfapi/fpdf_serial.h"
-#include "../../../include/fpdfapi/fpdf_parser.h"
 #include "editint.h"
 
+#include "core/include/fxcrt/fx_ext.h"
+#include "core/include/fpdfapi/fpdf_serial.h"
+#include "core/include/fpdfapi/fpdf_parser.h"
+
 #define PDF_OBJECTSTREAM_MAXLENGTH (256 * 1024)
 #define PDF_XREFSTREAM_MAXSIZE 10000
 
diff --git a/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp b/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp
index 9c1c292..8944d4e 100644
--- a/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp
+++ b/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp
@@ -4,10 +4,12 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../../include/fpdfapi/fpdf_page.h"
-#include "../../../include/fpdfapi/fpdf_module.h"
-#include "../fpdf_page/pageint.h"
 #include <limits.h>
+
+#include "../fpdf_page/pageint.h"
+#include "core/include/fpdfapi/fpdf_module.h"
+#include "core/include/fpdfapi/fpdf_page.h"
+
 CPDF_Document::CPDF_Document() : CPDF_IndirectObjects(NULL) {
   m_pRootDict = NULL;
   m_pInfoDict = NULL;
diff --git a/core/src/fpdfapi/fpdf_edit/fpdf_edit_image.cpp b/core/src/fpdfapi/fpdf_edit/fpdf_edit_image.cpp
index 1dd0ae6..2ec5727 100644
--- a/core/src/fpdfapi/fpdf_edit/fpdf_edit_image.cpp
+++ b/core/src/fpdfapi/fpdf_edit/fpdf_edit_image.cpp
@@ -4,12 +4,13 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../../include/fpdfapi/fpdf_module.h"
-#include "../../../include/fpdfapi/fpdf_page.h"
-#include "../../../include/fxcodec/fx_codec.h"
-#include "../../../include/fpdfapi/fpdf_render.h"
 #include "../fpdf_page/pageint.h"
 #include "../fpdf_render/render_int.h"
+#include "core/include/fpdfapi/fpdf_module.h"
+#include "core/include/fpdfapi/fpdf_page.h"
+#include "core/include/fpdfapi/fpdf_render.h"
+#include "core/include/fxcodec/fx_codec.h"
+
 CPDF_Dictionary* CPDF_Image::InitJPEG(uint8_t* pData, FX_DWORD size) {
   int32_t width;
   int32_t height;
diff --git a/core/src/fpdfapi/fpdf_font/common.h b/core/src/fpdfapi/fpdf_font/common.h
index 38fe396..2888bc4 100644
--- a/core/src/fpdfapi/fpdf_font/common.h
+++ b/core/src/fpdfapi/fpdf_font/common.h
@@ -7,6 +7,8 @@
 #ifndef CORE_SRC_FPDFAPI_FPDF_FONT_COMMON_H_
 #define CORE_SRC_FPDFAPI_FPDF_FONT_COMMON_H_
 
+#include "core/include/fxcrt/fx_system.h"
+
 typedef signed char TT_int8_t;
 typedef unsigned char TT_uint8_t;
 typedef signed short TT_int16_t;
diff --git a/core/src/fpdfapi/fpdf_font/font_int.h b/core/src/fpdfapi/fpdf_font/font_int.h
index c7a00dc..5418ffd 100644
--- a/core/src/fpdfapi/fpdf_font/font_int.h
+++ b/core/src/fpdfapi/fpdf_font/font_int.h
@@ -9,8 +9,8 @@
 
 #include <map>
 
-#include "../../../include/fxcrt/fx_basic.h"
-#include "../../../include/fpdfapi/fpdf_resource.h"
+#include "core/include/fpdfapi/fpdf_resource.h"
+#include "core/include/fxcrt/fx_basic.h"
 
 class CPDF_CID2UnicodeMap;
 class CPDF_CMap;
diff --git a/core/src/fpdfapi/fpdf_font/fpdf_font.cpp b/core/src/fpdfapi/fpdf_font/fpdf_font.cpp
index 07f9dda..fb0f628 100644
--- a/core/src/fpdfapi/fpdf_font/fpdf_font.cpp
+++ b/core/src/fpdfapi/fpdf_font/fpdf_font.cpp
@@ -4,14 +4,15 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../../include/fpdfapi/fpdf_module.h"
-#include "../../../include/fpdfapi/fpdf_page.h"
-#include "../../../include/fpdfapi/fpdf_pageobj.h"
-#include "../../../include/fpdfapi/fpdf_resource.h"
-#include "../../../include/fxge/fx_freetype.h"
-#include "../fpdf_page/pageint.h"
 #include "font_int.h"
 
+#include "../fpdf_page/pageint.h"
+#include "core/include/fpdfapi/fpdf_module.h"
+#include "core/include/fpdfapi/fpdf_page.h"
+#include "core/include/fpdfapi/fpdf_pageobj.h"
+#include "core/include/fpdfapi/fpdf_resource.h"
+#include "core/include/fxge/fx_freetype.h"
+
 FX_BOOL FT_UseTTCharmap(FXFT_Face face, int platform_id, int encoding_id) {
   for (int i = 0; i < FXFT_Get_Face_CharmapCount(face); i++) {
     if (FXFT_Get_Charmap_PlatformID(FXFT_Get_Face_Charmaps(face)[i]) ==
diff --git a/core/src/fpdfapi/fpdf_font/fpdf_font_charset.cpp b/core/src/fpdfapi/fpdf_font/fpdf_font_charset.cpp
index 92d1719..f6d1e2a 100644
--- a/core/src/fpdfapi/fpdf_font/fpdf_font_charset.cpp
+++ b/core/src/fpdfapi/fpdf_font/fpdf_font_charset.cpp
@@ -4,10 +4,10 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../../include/fpdfapi/fpdf_page.h"
-#include "../../../include/fpdfapi/fpdf_parser.h"
-#include "../../../include/fpdfapi/fpdf_resource.h"
-#include "../../../include/fxge/fx_freetype.h"
+#include "core/include/fpdfapi/fpdf_page.h"
+#include "core/include/fpdfapi/fpdf_parser.h"
+#include "core/include/fpdfapi/fpdf_resource.h"
+#include "core/include/fxge/fx_freetype.h"
 
 static const struct _UnicodeAlt {
   FX_WORD m_Unicode;
diff --git a/core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp b/core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp
index 43125d7..bf67aab 100644
--- a/core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp
+++ b/core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp
@@ -4,14 +4,15 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../../include/fpdfapi/fpdf_module.h"
-#include "../../../include/fpdfapi/fpdf_page.h"
-#include "../../../include/fpdfapi/fpdf_resource.h"
-#include "../../../include/fxge/fx_freetype.h"
-#include "../../../include/fxge/fx_ge.h"
-#include "../fpdf_cmaps/cmap_int.h"
 #include "font_int.h"
 
+#include "../fpdf_cmaps/cmap_int.h"
+#include "core/include/fpdfapi/fpdf_module.h"
+#include "core/include/fpdfapi/fpdf_page.h"
+#include "core/include/fpdfapi/fpdf_resource.h"
+#include "core/include/fxge/fx_freetype.h"
+#include "core/include/fxge/fx_ge.h"
+
 namespace {
 
 const FX_CHAR* const g_CharsetNames[CIDSET_NUM_SETS] =
diff --git a/core/src/fpdfapi/fpdf_font/ttgsubtable.cpp b/core/src/fpdfapi/fpdf_font/ttgsubtable.cpp
index 1ee2599..0087bfa 100644
--- a/core/src/fpdfapi/fpdf_font/ttgsubtable.cpp
+++ b/core/src/fpdfapi/fpdf_font/ttgsubtable.cpp
@@ -4,11 +4,12 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../../include/fxge/fx_freetype.h"
-#include "../../../include/fxge/fx_ge.h"
-#include "third_party/base/nonstd_unique_ptr.h"
 #include "ttgsubtable.h"
 
+#include "core/include/fxge/fx_freetype.h"
+#include "core/include/fxge/fx_ge.h"
+#include "third_party/base/nonstd_unique_ptr.h"
+
 CFX_GlyphMap::CFX_GlyphMap() {}
 CFX_GlyphMap::~CFX_GlyphMap() {}
 extern "C" {
diff --git a/core/src/fpdfapi/fpdf_font/ttgsubtable.h b/core/src/fpdfapi/fpdf_font/ttgsubtable.h
index 5cf0e24..dee7a08 100644
--- a/core/src/fpdfapi/fpdf_font/ttgsubtable.h
+++ b/core/src/fpdfapi/fpdf_font/ttgsubtable.h
@@ -7,9 +7,12 @@
 #ifndef CORE_SRC_FPDFAPI_FPDF_FONT_TTGSUBTABLE_H_
 #define CORE_SRC_FPDFAPI_FPDF_FONT_TTGSUBTABLE_H_
 
-#include "../../../include/fxge/fx_freetype.h"
-#include "../../../include/fxcrt/fx_basic.h"
+#include <map>
+
 #include "common.h"
+#include "core/include/fxcrt/fx_basic.h"
+#include "core/include/fxge/fx_font.h"
+#include "core/include/fxge/fx_freetype.h"
 
 class CFX_GlyphMap {
  public:
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page.cpp
index 162acfa..eaa8ef1 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page.cpp
@@ -4,9 +4,11 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../../include/fpdfapi/fpdf_page.h"
-#include "../../../include/fpdfapi/fpdf_module.h"
 #include "pageint.h"
+
+#include "core/include/fpdfapi/fpdf_module.h"
+#include "core/include/fpdfapi/fpdf_page.h"
+
 CPDF_PageObject* CPDF_PageObject::Create(int type) {
   switch (type) {
     case PDFPAGE_TEXT:
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp
index e4bb1a3..934d102 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp
@@ -4,12 +4,14 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../../include/fpdfapi/fpdf_page.h"
-#include "../../../include/fpdfapi/fpdf_module.h"
-#include "../../../include/fxcodec/fx_codec.h"
 #include "pageint.h"
+
 #include <limits.h>
 
+#include "core/include/fpdfapi/fpdf_page.h"
+#include "core/include/fpdfapi/fpdf_module.h"
+#include "core/include/fxcodec/fx_codec.h"
+
 namespace {
 
 void sRGB_to_AdobeCMYK(FX_FLOAT R,
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_doc.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_doc.cpp
index 8656b72..1e82642 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_doc.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_doc.cpp
@@ -4,12 +4,13 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../../include/fpdfapi/fpdf_page.h"
-#include "../../../include/fpdfapi/fpdf_module.h"
-#include "../../../include/fdrm/fx_crypt.h"
-#include "../fpdf_font/font_int.h"
 #include "pageint.h"
 
+#include "../fpdf_font/font_int.h"
+#include "core/include/fdrm/fx_crypt.h"
+#include "core/include/fpdfapi/fpdf_module.h"
+#include "core/include/fpdfapi/fpdf_page.h"
+
 class CPDF_PageModule : public IPDF_PageModule {
  public:
   CPDF_PageModule()
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_func.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_func.cpp
index 0b9f043..81d31a7 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_func.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_func.cpp
@@ -4,13 +4,15 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
+#include "pageint.h"
+
 #include <limits.h>
+
 #include <vector>
 
-#include "../../../include/fpdfapi/fpdf_module.h"
-#include "../../../include/fpdfapi/fpdf_page.h"
-#include "../../../include/fxcrt/fx_safe_types.h"
-#include "pageint.h"
+#include "core/include/fpdfapi/fpdf_module.h"
+#include "core/include/fpdfapi/fpdf_page.h"
+#include "core/include/fxcrt/fx_safe_types.h"
 #include "third_party/base/nonstd_unique_ptr.h"
 #include "third_party/base/numerics/safe_conversions_impl.h"
 
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp
index 78d3d26..3094e48 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp
@@ -4,13 +4,14 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../../include/fpdfapi/fpdf_page.h"
-#include "../../../include/fpdfapi/fpdf_pageobj.h"
-#include "../../../include/fpdfapi/fpdf_module.h"
-#include "../../../include/fpdfapi/fpdf_render.h"
-#include "../fpdf_render/render_int.h"
 #include "pageint.h"
 
+#include "../fpdf_render/render_int.h"
+#include "core/include/fpdfapi/fpdf_module.h"
+#include "core/include/fpdfapi/fpdf_page.h"
+#include "core/include/fpdfapi/fpdf_pageobj.h"
+#include "core/include/fpdfapi/fpdf_render.h"
+
 void CPDF_GraphicStates::DefaultStates() {
   m_ColorState.New()->Default();
 }
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_image.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_image.cpp
index 06e2d2c..9c16173 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_image.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_image.cpp
@@ -4,9 +4,11 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../../include/fpdfapi/fpdf_page.h"
-#include "../../../include/fpdfapi/fpdf_pageobj.h"
 #include "pageint.h"
+
+#include "core/include/fpdfapi/fpdf_page.h"
+#include "core/include/fpdfapi/fpdf_pageobj.h"
+
 CPDF_ImageObject::CPDF_ImageObject() {
   m_pImage = NULL;
   m_Type = PDFPAGE_IMAGE;
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp
index e095414..163b6e9 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp
@@ -4,11 +4,12 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../../include/fpdfapi/fpdf_page.h"
-#include "../../../include/fpdfapi/fpdf_module.h"
-#include "../../../include/fpdfapi/fpdf_serial.h"
 #include "pageint.h"
 
+#include "core/include/fpdfapi/fpdf_module.h"
+#include "core/include/fpdfapi/fpdf_page.h"
+#include "core/include/fpdfapi/fpdf_serial.h"
+
 #define REQUIRE_PARAMS(count)  \
   if (m_ParamCount != count) { \
     return;                    \
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp
index 9adfdb2..0c48b5a 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp
@@ -4,12 +4,14 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../../include/fpdfapi/fpdf_page.h"
-#include "../../../include/fpdfapi/fpdf_module.h"
-#include "../../../include/fxcodec/fx_codec.h"
 #include "pageint.h"
+
 #include <limits.h>
 
+#include "core/include/fpdfapi/fpdf_module.h"
+#include "core/include/fpdfapi/fpdf_page.h"
+#include "core/include/fxcodec/fx_codec.h"
+
 namespace {
 
 const char kPathOperatorSubpath = 'm';
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_path.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_path.cpp
index 81b69bc..0880388 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_path.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_path.cpp
@@ -4,10 +4,12 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../../include/fpdfapi/fpdf_page.h"
-#include "../../../include/fpdfapi/fpdf_pageobj.h"
-#include "../../../include/fpdfapi/fpdf_module.h"
 #include "pageint.h"
+
+#include "core/include/fpdfapi/fpdf_module.h"
+#include "core/include/fpdfapi/fpdf_page.h"
+#include "core/include/fpdfapi/fpdf_pageobj.h"
+
 void CPDF_PathObject::CopyData(const CPDF_PageObject* pSrc) {
   const CPDF_PathObject* pSrcObj = (const CPDF_PathObject*)pSrc;
   m_Path = pSrcObj->m_Path;
diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp
index b669b3b..0c6b476 100644
--- a/core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp
+++ b/core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp
@@ -4,9 +4,10 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../../include/fpdfapi/fpdf_page.h"
 #include "pageint.h"
 
+#include "core/include/fpdfapi/fpdf_page.h"
+
 namespace {
 
 const int kSingleCoordinatePair = 1;
diff --git a/core/src/fpdfapi/fpdf_page/pageint.h b/core/src/fpdfapi/fpdf_page/pageint.h
index 3b2aef5..96c70c2 100644
--- a/core/src/fpdfapi/fpdf_page/pageint.h
+++ b/core/src/fpdfapi/fpdf_page/pageint.h
@@ -9,8 +9,8 @@
 
 #include <map>
 
-#include "../../../include/fpdfapi/fpdf_page.h"
-#include "../../../include/fpdfapi/fpdf_pageobj.h"
+#include "core/include/fpdfapi/fpdf_page.h"
+#include "core/include/fpdfapi/fpdf_pageobj.h"
 #include "third_party/base/nonstd_unique_ptr.h"
 
 class CPDF_AllStates;
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp
index e68fcb6..ff0519c 100644
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp
@@ -5,9 +5,10 @@
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
 #include <limits.h>
-#include "../../../include/fpdfapi/fpdf_parser.h"
-#include "../../../include/fpdfapi/fpdf_module.h"
-#include "../../../include/fxcodec/fx_codec.h"
+
+#include "core/include/fpdfapi/fpdf_module.h"
+#include "core/include/fpdfapi/fpdf_parser.h"
+#include "core/include/fxcodec/fx_codec.h"
 
 #define _STREAM_MAX_SIZE_ 20 * 1024 * 1024
 
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_decode_embeddertest.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_decode_embeddertest.cpp
index bcade63..279151a 100644
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_decode_embeddertest.cpp
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_decode_embeddertest.cpp
@@ -6,9 +6,9 @@
 #include <string>
 
 #include "../../../../testing/fx_string_testhelpers.h"
-#include "../../../include/fpdfapi/fpdf_parser.h"
-#include "../../../include/fxcrt/fx_basic.h"
 #include "../../../testing/embedder_test.h"
+#include "core/include/fpdfapi/fpdf_parser.h"
+#include "core/include/fxcrt/fx_basic.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
 class FPDFParserDecodeEmbeddertest : public EmbedderTest {};
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_decode_unittest.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_decode_unittest.cpp
index f01e212..95d7c84 100644
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_decode_unittest.cpp
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_decode_unittest.cpp
@@ -2,10 +2,9 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "core/include/fpdfapi/fpdf_parser.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
-#include "../../../include/fpdfapi/fpdf_parser.h"
-
 TEST(fpdf_parser_decode, HexDecode) {
   {
     // Empty src string.
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_document.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_document.cpp
index 3b77fb2..2e38837 100644
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_document.cpp
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_document.cpp
@@ -4,8 +4,8 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../../include/fpdfapi/fpdf_parser.h"
-#include "../../../include/fpdfapi/fpdf_module.h"
+#include "core/include/fpdfapi/fpdf_module.h"
+#include "core/include/fpdfapi/fpdf_parser.h"
 
 CPDF_Document::CPDF_Document(CPDF_Parser* pParser)
     : CPDF_IndirectObjects(pParser) {
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_encrypt.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_encrypt.cpp
index 125b7e0..363864e 100644
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_encrypt.cpp
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_encrypt.cpp
@@ -4,9 +4,12 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
+#include "core/include/fpdfapi/fpdf_parser.h"
+
 #include <time.h>
-#include "../../../include/fpdfapi/fpdf_parser.h"
-#include "../../../include/fdrm/fx_crypt.h"
+
+#include "core/include/fdrm/fx_crypt.h"
+
 const uint8_t defpasscode[32] = {
     0x28, 0xbf, 0x4e, 0x5e, 0x4e, 0x75, 0x8a, 0x41, 0x64, 0x00, 0x4e,
     0x56, 0xff, 0xfa, 0x01, 0x08, 0x2e, 0x2e, 0x00, 0xb6, 0xd0, 0x68,
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_fdf.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_fdf.cpp
index c766dd3..d22711c 100644
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_fdf.cpp
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_fdf.cpp
@@ -4,7 +4,8 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../../include/fpdfapi/fpdf_serial.h"
+#include "core/include/fpdfapi/fpdf_serial.h"
+
 CFDF_Document::CFDF_Document() : CPDF_IndirectObjects(NULL) {
   m_pRootDict = NULL;
   m_pFile = NULL;
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp
index cfd76ae..c36e146 100644
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp
@@ -4,8 +4,9 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../../include/fpdfapi/fpdf_parser.h"
-#include "../../../include/fxcrt/fx_string.h"
+#include "core/include/fpdfapi/fpdf_parser.h"
+
+#include "core/include/fxcrt/fx_string.h"
 
 // static
 int CPDF_Object::s_nCurRefDepth = 0;
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
index 58420ff..132b1d1 100644
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
@@ -4,16 +4,17 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
+#include "parser_int.h"
+
 #include <set>
 #include <utility>
 #include <vector>
 
-#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 "parser_int.h"
+#include "core/include/fpdfapi/fpdf_module.h"
+#include "core/include/fpdfapi/fpdf_page.h"
+#include "core/include/fpdfapi/fpdf_parser.h"
+#include "core/include/fxcrt/fx_safe_types.h"
 #include "third_party/base/nonstd_unique_ptr.h"
 #include "third_party/base/stl_util.h"
 
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser_unittest.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser_unittest.cpp
index b86c20e..8e953a6 100644
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser_unittest.cpp
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser_unittest.cpp
@@ -2,10 +2,9 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "core/include/fpdfapi/fpdf_parser.h"
+#include "core/include/fxcrt/fx_stream.h"
 #include "testing/gtest/include/gtest/gtest.h"
-
-#include "../../../include/fpdfapi/fpdf_parser.h"
-#include "../../../include/fxcrt/fx_stream.h"
 #include "testing/utils/path_service.h"
 
 class CPDF_TestParser : public CPDF_Parser {
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp
index 335101e..89a5deb 100644
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp
@@ -4,7 +4,7 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../../include/fpdfapi/fpdf_parser.h"
+#include "core/include/fpdfapi/fpdf_parser.h"
 
 // Indexed by 8-bit character code, contains either:
 //   'W' - for whitespace: NUL, TAB, CR, LF, FF, 0x80, 0xff
diff --git a/core/src/fpdfapi/fpdf_parser/parser_int.h b/core/src/fpdfapi/fpdf_parser/parser_int.h
index 5e4dffa..fba6663 100644
--- a/core/src/fpdfapi/fpdf_parser/parser_int.h
+++ b/core/src/fpdfapi/fpdf_parser/parser_int.h
@@ -7,7 +7,14 @@
 #ifndef CORE_SRC_FPDFAPI_FPDF_PARSER_PARSER_INT_H_
 #define CORE_SRC_FPDFAPI_FPDF_PARSER_PARSER_INT_H_
 
+#include "core/include/fxcrt/fx_basic.h"
+#include "core/include/fxcrt/fx_stream.h"
+
+class CFX_BitStream;
 class CPDF_DataAvail;
+class CPDF_Dictionary;
+class CPDF_Stream;
+class IFX_DownloadHints;
 
 class CPDF_HintTables {
  public:
@@ -17,6 +24,7 @@
         m_nFirstPageSharedObjs(0),
         m_szFirstPageObjOffset(0) {}
   ~CPDF_HintTables();
+
   FX_BOOL GetPagePos(int index,
                      FX_FILESIZE& szPageStartPos,
                      FX_FILESIZE& szPageLength,
@@ -44,4 +52,5 @@
   CFX_FileSizeArray m_szPageOffsetArray;
   CFX_FileSizeArray m_szSharedObjOffsetArray;
 };
+
 #endif  // CORE_SRC_FPDFAPI_FPDF_PARSER_PARSER_INT_H_
diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render.cpp
index 7b37b1b..e5b4b66 100644
--- a/core/src/fpdfapi/fpdf_render/fpdf_render.cpp
+++ b/core/src/fpdfapi/fpdf_render/fpdf_render.cpp
@@ -4,12 +4,13 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../../include/fpdfapi/fpdf_module.h"
-#include "../../../include/fpdfapi/fpdf_render.h"
-#include "../../../include/fxge/fx_ge.h"
-#include "../fpdf_page/pageint.h"
 #include "render_int.h"
 
+#include "../fpdf_page/pageint.h"
+#include "core/include/fpdfapi/fpdf_module.h"
+#include "core/include/fpdfapi/fpdf_render.h"
+#include "core/include/fxge/fx_ge.h"
+
 CPDF_DocRenderData::CPDF_DocRenderData(CPDF_Document* pPDFDoc)
     : m_pPDFDoc(pPDFDoc), m_pFontCache(new CFX_FontCache) {}
 
diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render_cache.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render_cache.cpp
index 8da176e..e82e45c 100644
--- a/core/src/fpdfapi/fpdf_render/fpdf_render_cache.cpp
+++ b/core/src/fpdfapi/fpdf_render/fpdf_render_cache.cpp
@@ -4,11 +4,13 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../../include/fpdfapi/fpdf_render.h"
-#include "../../../include/fpdfapi/fpdf_pageobj.h"
-#include "../../../include/fxge/fx_ge.h"
-#include "../fpdf_page/pageint.h"
 #include "render_int.h"
+
+#include "../fpdf_page/pageint.h"
+#include "core/include/fpdfapi/fpdf_pageobj.h"
+#include "core/include/fpdfapi/fpdf_render.h"
+#include "core/include/fxge/fx_ge.h"
+
 struct CACHEINFO {
   FX_DWORD time;
   CPDF_Stream* pStream;
diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp
index 0acaeba..b51520a 100644
--- a/core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp
+++ b/core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp
@@ -4,15 +4,16 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../../include/fpdfapi/fpdf_module.h"
-#include "../../../include/fpdfapi/fpdf_pageobj.h"
-#include "../../../include/fpdfapi/fpdf_render.h"
-#include "../../../include/fxcodec/fx_codec.h"
-#include "../../../include/fxcrt/fx_safe_types.h"
-#include "../../../include/fxge/fx_ge.h"
-#include "../fpdf_page/pageint.h"
 #include "render_int.h"
 
+#include "../fpdf_page/pageint.h"
+#include "core/include/fpdfapi/fpdf_module.h"
+#include "core/include/fpdfapi/fpdf_pageobj.h"
+#include "core/include/fpdfapi/fpdf_render.h"
+#include "core/include/fxcodec/fx_codec.h"
+#include "core/include/fxcrt/fx_safe_types.h"
+#include "core/include/fxge/fx_ge.h"
+
 FX_BOOL CPDF_RenderStatus::ProcessImage(CPDF_ImageObject* pImageObj,
                                         const CFX_AffineMatrix* pObj2Device) {
   CPDF_ImageRenderer render;
diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
index ea8ceee..1cce90a 100644
--- a/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
+++ b/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
@@ -4,16 +4,17 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
+#include "render_int.h"
+
 #include <vector>
 
-#include "../../../include/fpdfapi/fpdf_module.h"
-#include "../../../include/fpdfapi/fpdf_pageobj.h"
-#include "../../../include/fpdfapi/fpdf_render.h"
-#include "../../../include/fxcodec/fx_codec.h"
-#include "../../../include/fxcrt/fx_safe_types.h"
-#include "../../../include/fxge/fx_ge.h"
 #include "../fpdf_page/pageint.h"
-#include "render_int.h"
+#include "core/include/fpdfapi/fpdf_module.h"
+#include "core/include/fpdfapi/fpdf_pageobj.h"
+#include "core/include/fpdfapi/fpdf_render.h"
+#include "core/include/fxcodec/fx_codec.h"
+#include "core/include/fxcrt/fx_safe_types.h"
+#include "core/include/fxge/fx_ge.h"
 #include "third_party/base/nonstd_unique_ptr.h"
 
 namespace {
diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp
index 467ffc9..4043230 100644
--- a/core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp
+++ b/core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp
@@ -4,11 +4,13 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../../include/fpdfapi/fpdf_render.h"
-#include "../../../include/fpdfapi/fpdf_pageobj.h"
-#include "../../../include/fxge/fx_ge.h"
-#include "../fpdf_page/pageint.h"
 #include "render_int.h"
+
+#include "../fpdf_page/pageint.h"
+#include "core/include/fpdfapi/fpdf_pageobj.h"
+#include "core/include/fpdfapi/fpdf_render.h"
+#include "core/include/fxge/fx_ge.h"
+
 #define SHADING_STEPS 256
 static void DrawAxialShading(CFX_DIBitmap* pBitmap,
                              CFX_AffineMatrix* pObject2Bitmap,
diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp
index c8d86e0..4eac73f 100644
--- a/core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp
+++ b/core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp
@@ -4,12 +4,13 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../../include/fxge/fx_ge.h"
-#include "../../../include/fpdfapi/fpdf_render.h"
-#include "../../../include/fpdfapi/fpdf_pageobj.h"
-#include "../fpdf_page/pageint.h"
 #include "render_int.h"
 
+#include "../fpdf_page/pageint.h"
+#include "core/include/fpdfapi/fpdf_pageobj.h"
+#include "core/include/fpdfapi/fpdf_render.h"
+#include "core/include/fxge/fx_ge.h"
+
 CPDF_Type3Cache::~CPDF_Type3Cache() {
   for (const auto& pair : m_SizeMap) {
     delete pair.second;
diff --git a/core/src/fpdfapi/fpdf_render/render_int.h b/core/src/fpdfapi/fpdf_render/render_int.h
index a0eda28..ed44c26 100644
--- a/core/src/fpdfapi/fpdf_render/render_int.h
+++ b/core/src/fpdfapi/fpdf_render/render_int.h
@@ -9,10 +9,12 @@
 
 #include <map>
 
-#include "../../../include/fpdfapi/fpdf_pageobj.h"
+#include "core/include/fpdfapi/fpdf_pageobj.h"
+#include "core/include/fpdfapi/fpdf_render.h"
 #include "third_party/base/nonstd_unique_ptr.h"
 
 class CFX_GlyphBitmap;
+class CPDF_ImageCache;
 class CPDF_QuickStretcher;
 
 #define TYPE3_MAX_BLUES 16
diff --git a/core/src/fpdfdoc/doc_action.cpp b/core/src/fpdfdoc/doc_action.cpp
index 3d439ff..01fb064 100644
--- a/core/src/fpdfdoc/doc_action.cpp
+++ b/core/src/fpdfdoc/doc_action.cpp
@@ -4,7 +4,8 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../include/fpdfdoc/fpdf_doc.h"
+#include "core/include/fpdfdoc/fpdf_doc.h"
+
 CPDF_Dest CPDF_Action::GetDest(CPDF_Document* pDoc) const {
   if (!m_pDict) {
     return CPDF_Dest();
diff --git a/core/src/fpdfdoc/doc_annot.cpp b/core/src/fpdfdoc/doc_annot.cpp
index e69ea80..36494cc 100644
--- a/core/src/fpdfdoc/doc_annot.cpp
+++ b/core/src/fpdfdoc/doc_annot.cpp
@@ -4,8 +4,8 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../include/fpdfapi/fpdf_pageobj.h"
-#include "../../include/fpdfdoc/fpdf_doc.h"
+#include "core/include/fpdfapi/fpdf_pageobj.h"
+#include "core/include/fpdfdoc/fpdf_doc.h"
 #include "third_party/base/nonstd_unique_ptr.h"
 
 CPDF_AnnotList::CPDF_AnnotList(CPDF_Page* pPage)
diff --git a/core/src/fpdfdoc/doc_ap.cpp b/core/src/fpdfdoc/doc_ap.cpp
index 77a1f15..d6c25f3 100644
--- a/core/src/fpdfdoc/doc_ap.cpp
+++ b/core/src/fpdfdoc/doc_ap.cpp
@@ -4,9 +4,9 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../include/fpdfdoc/fpdf_ap.h"
-#include "../../include/fpdfdoc/fpdf_doc.h"
-#include "../../include/fpdfdoc/fpdf_vt.h"
+#include "core/include/fpdfdoc/fpdf_ap.h"
+#include "core/include/fpdfdoc/fpdf_doc.h"
+#include "core/include/fpdfdoc/fpdf_vt.h"
 #include "doc_utils.h"
 #include "pdf_vt.h"
 
diff --git a/core/src/fpdfdoc/doc_basic.cpp b/core/src/fpdfdoc/doc_basic.cpp
index 414f574..4da1828 100644
--- a/core/src/fpdfdoc/doc_basic.cpp
+++ b/core/src/fpdfdoc/doc_basic.cpp
@@ -4,7 +4,8 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../include/fpdfdoc/fpdf_doc.h"
+#include "core/include/fpdfdoc/fpdf_doc.h"
+
 const int nMaxRecursion = 32;
 int CPDF_Dest::GetPageIndex(CPDF_Document* pDoc) {
   CPDF_Array* pArray = ToArray(m_pObj);
diff --git a/core/src/fpdfdoc/doc_bookmark.cpp b/core/src/fpdfdoc/doc_bookmark.cpp
index c5cbfd8..84b5a8b 100644
--- a/core/src/fpdfdoc/doc_bookmark.cpp
+++ b/core/src/fpdfdoc/doc_bookmark.cpp
@@ -6,7 +6,7 @@
 
 #include <vector>
 
-#include "../../include/fpdfdoc/fpdf_doc.h"
+#include "core/include/fpdfdoc/fpdf_doc.h"
 #include "third_party/base/nonstd_unique_ptr.h"
 
 CPDF_Bookmark CPDF_BookmarkTree::GetFirstChild(
diff --git a/core/src/fpdfdoc/doc_form.cpp b/core/src/fpdfdoc/doc_form.cpp
index 8d8a836..776f19f 100644
--- a/core/src/fpdfdoc/doc_form.cpp
+++ b/core/src/fpdfdoc/doc_form.cpp
@@ -4,7 +4,7 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../include/fpdfdoc/fpdf_doc.h"
+#include "core/include/fpdfdoc/fpdf_doc.h"
 #include "doc_utils.h"
 
 const int nMaxRecursion = 32;
diff --git a/core/src/fpdfdoc/doc_formcontrol.cpp b/core/src/fpdfdoc/doc_formcontrol.cpp
index 35329f9..0796b6b 100644
--- a/core/src/fpdfdoc/doc_formcontrol.cpp
+++ b/core/src/fpdfdoc/doc_formcontrol.cpp
@@ -4,7 +4,8 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../include/fpdfdoc/fpdf_doc.h"
+#include "core/include/fpdfdoc/fpdf_doc.h"
+
 CPDF_FormControl::CPDF_FormControl(CPDF_FormField* pField,
                                    CPDF_Dictionary* pWidgetDict) {
   m_pField = pField;
diff --git a/core/src/fpdfdoc/doc_formfield.cpp b/core/src/fpdfdoc/doc_formfield.cpp
index efa2ea2..a4de7bb 100644
--- a/core/src/fpdfdoc/doc_formfield.cpp
+++ b/core/src/fpdfdoc/doc_formfield.cpp
@@ -4,7 +4,7 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../include/fpdfdoc/fpdf_doc.h"
+#include "core/include/fpdfdoc/fpdf_doc.h"
 #include "doc_utils.h"
 
 FX_BOOL PDF_FormField_IsUnison(CPDF_FormField* pField) {
diff --git a/core/src/fpdfdoc/doc_link.cpp b/core/src/fpdfdoc/doc_link.cpp
index 6d3f6c5..37e4fe3 100644
--- a/core/src/fpdfdoc/doc_link.cpp
+++ b/core/src/fpdfdoc/doc_link.cpp
@@ -4,7 +4,7 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../include/fpdfdoc/fpdf_doc.h"
+#include "core/include/fpdfdoc/fpdf_doc.h"
 
 CPDF_LinkList::CPDF_LinkList() {
 }
diff --git a/core/src/fpdfdoc/doc_metadata.cpp b/core/src/fpdfdoc/doc_metadata.cpp
index 3d0f12f..c9550a8 100644
--- a/core/src/fpdfdoc/doc_metadata.cpp
+++ b/core/src/fpdfdoc/doc_metadata.cpp
@@ -4,8 +4,8 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../include/fpdfdoc/fpdf_doc.h"
-#include "../../include/fxcrt/fx_xml.h"
+#include "core/include/fpdfdoc/fpdf_doc.h"
+#include "core/include/fxcrt/fx_xml.h"
 
 CPDF_Metadata::CPDF_Metadata(CPDF_Document* pDoc) {
   CPDF_Dictionary* pRoot = pDoc->GetRoot();
diff --git a/core/src/fpdfdoc/doc_ocg.cpp b/core/src/fpdfdoc/doc_ocg.cpp
index b252456..7f9c677 100644
--- a/core/src/fpdfdoc/doc_ocg.cpp
+++ b/core/src/fpdfdoc/doc_ocg.cpp
@@ -4,7 +4,8 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../include/fpdfdoc/fpdf_doc.h"
+#include "core/include/fpdfdoc/fpdf_doc.h"
+
 static int32_t FPDFDOC_OCG_FindGroup(const CPDF_Object* pObject,
                                      const CPDF_Dictionary* pGroupDict) {
   if (!pObject || !pGroupDict)
diff --git a/core/src/fpdfdoc/doc_tagged.cpp b/core/src/fpdfdoc/doc_tagged.cpp
index f1877c6..2a3cfb9 100644
--- a/core/src/fpdfdoc/doc_tagged.cpp
+++ b/core/src/fpdfdoc/doc_tagged.cpp
@@ -4,10 +4,11 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../include/fpdfapi/fpdf_parser.h"
-#include "../../include/fpdfapi/fpdf_page.h"
-#include "../../include/fpdfdoc/fpdf_tagged.h"
+#include "core/include/fpdfapi/fpdf_page.h"
+#include "core/include/fpdfapi/fpdf_parser.h"
+#include "core/include/fpdfdoc/fpdf_tagged.h"
 #include "tagged_int.h"
+
 const int nMaxRecursion = 32;
 static FX_BOOL IsTagged(const CPDF_Document* pDoc) {
   CPDF_Dictionary* pCatalog = pDoc->GetRoot();
diff --git a/core/src/fpdfdoc/doc_utils.cpp b/core/src/fpdfdoc/doc_utils.cpp
index 7d3fdf2..b0eafbf 100644
--- a/core/src/fpdfdoc/doc_utils.cpp
+++ b/core/src/fpdfdoc/doc_utils.cpp
@@ -4,7 +4,7 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../include/fpdfdoc/fpdf_doc.h"
+#include "core/include/fpdfdoc/fpdf_doc.h"
 #include "doc_utils.h"
 
 static const int FPDFDOC_UTILS_MAXRECURSION = 32;
diff --git a/core/src/fpdfdoc/doc_viewerPreferences.cpp b/core/src/fpdfdoc/doc_viewerPreferences.cpp
index 50962b7..a6975cc 100644
--- a/core/src/fpdfdoc/doc_viewerPreferences.cpp
+++ b/core/src/fpdfdoc/doc_viewerPreferences.cpp
@@ -4,7 +4,8 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../include/fpdfdoc/fpdf_doc.h"
+#include "core/include/fpdfdoc/fpdf_doc.h"
+
 CPDF_ViewerPreferences::CPDF_ViewerPreferences(CPDF_Document* pDoc)
     : m_pDoc(pDoc) {}
 CPDF_ViewerPreferences::~CPDF_ViewerPreferences() {}
diff --git a/core/src/fpdfdoc/doc_vt.cpp b/core/src/fpdfdoc/doc_vt.cpp
index fe5680f..07824e8 100644
--- a/core/src/fpdfdoc/doc_vt.cpp
+++ b/core/src/fpdfdoc/doc_vt.cpp
@@ -4,9 +4,10 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../include/fpdfdoc/fpdf_doc.h"
-#include "../../include/fpdfdoc/fpdf_vt.h"
+#include "core/include/fpdfdoc/fpdf_doc.h"
+#include "core/include/fpdfdoc/fpdf_vt.h"
 #include "pdf_vt.h"
+
 const uint8_t gFontSizeSteps[] = {4,  6,  8,   9,   10,  12,  14, 18, 20,
                                   25, 30, 35,  40,  45,  50,  55, 60, 70,
                                   80, 90, 100, 110, 120, 130, 144};
diff --git a/core/src/fpdfdoc/doc_vtmodule.cpp b/core/src/fpdfdoc/doc_vtmodule.cpp
index 834d459..c67b960 100644
--- a/core/src/fpdfdoc/doc_vtmodule.cpp
+++ b/core/src/fpdfdoc/doc_vtmodule.cpp
@@ -4,9 +4,10 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../include/fpdfdoc/fpdf_doc.h"
-#include "../../include/fpdfdoc/fpdf_vt.h"
+#include "core/include/fpdfdoc/fpdf_doc.h"
+#include "core/include/fpdfdoc/fpdf_vt.h"
 #include "pdf_vt.h"
+
 IPDF_VariableText* IPDF_VariableText::NewVariableText() {
   return new CPDF_VariableText();
 }
diff --git a/core/src/fpdfdoc/tagged_int.h b/core/src/fpdfdoc/tagged_int.h
index de6854e..b7f18bd 100644
--- a/core/src/fpdfdoc/tagged_int.h
+++ b/core/src/fpdfdoc/tagged_int.h
@@ -7,7 +7,7 @@
 #ifndef CORE_SRC_FPDFDOC_TAGGED_INT_H_
 #define CORE_SRC_FPDFDOC_TAGGED_INT_H_
 
-#include "../../include/fpdfdoc/fpdf_tagged.h"
+#include "core/include/fpdfdoc/fpdf_tagged.h"
 
 class CPDF_StructElementImpl;
 
diff --git a/core/src/fpdftext/fpdf_text.cpp b/core/src/fpdftext/fpdf_text.cpp
index d5ea24f..55ab483 100644
--- a/core/src/fpdftext/fpdf_text.cpp
+++ b/core/src/fpdftext/fpdf_text.cpp
@@ -4,12 +4,12 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../include/fpdfapi/fpdf_page.h"
-#include "../../include/fpdfapi/fpdf_pageobj.h"
-#include "../../include/fpdfapi/fpdf_resource.h"
-#include "../../include/fpdftext/fpdf_text.h"
-#include "../../include/fxcrt/fx_bidi.h"
-#include "../../include/fxcrt/fx_ucd.h"
+#include "core/include/fpdfapi/fpdf_page.h"
+#include "core/include/fpdfapi/fpdf_pageobj.h"
+#include "core/include/fpdfapi/fpdf_resource.h"
+#include "core/include/fpdftext/fpdf_text.h"
+#include "core/include/fxcrt/fx_bidi.h"
+#include "core/include/fxcrt/fx_ucd.h"
 #include "text_int.h"
 #include "third_party/base/nonstd_unique_ptr.h"
 #include "txtproc.h"
diff --git a/core/src/fpdftext/fpdf_text_int.cpp b/core/src/fpdftext/fpdf_text_int.cpp
index 8f46c19..f02ca41 100644
--- a/core/src/fpdftext/fpdf_text_int.cpp
+++ b/core/src/fpdftext/fpdf_text_int.cpp
@@ -7,13 +7,13 @@
 #include <ctype.h>
 #include <algorithm>
 
-#include "../../include/fpdfapi/fpdf_module.h"
-#include "../../include/fpdfapi/fpdf_page.h"
-#include "../../include/fpdfapi/fpdf_pageobj.h"
-#include "../../include/fpdfapi/fpdf_resource.h"
-#include "../../include/fpdftext/fpdf_text.h"
-#include "../../include/fxcrt/fx_bidi.h"
-#include "../../include/fxcrt/fx_ucd.h"
+#include "core/include/fpdfapi/fpdf_module.h"
+#include "core/include/fpdfapi/fpdf_page.h"
+#include "core/include/fpdfapi/fpdf_pageobj.h"
+#include "core/include/fpdfapi/fpdf_resource.h"
+#include "core/include/fpdftext/fpdf_text.h"
+#include "core/include/fxcrt/fx_bidi.h"
+#include "core/include/fxcrt/fx_ucd.h"
 #include "text_int.h"
 #include "third_party/base/nonstd_unique_ptr.h"
 
diff --git a/core/src/fpdftext/fpdf_text_search.cpp b/core/src/fpdftext/fpdf_text_search.cpp
index 6640018..0acea11 100644
--- a/core/src/fpdftext/fpdf_text_search.cpp
+++ b/core/src/fpdftext/fpdf_text_search.cpp
@@ -4,8 +4,8 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../include/fpdfapi/fpdf_pageobj.h"
-#include "../../include/fpdfapi/fpdf_page.h"
+#include "core/include/fpdfapi/fpdf_page.h"
+#include "core/include/fpdfapi/fpdf_pageobj.h"
 #include "text_int.h"
 
 class CPDF_TextStream {
diff --git a/core/src/fpdftext/text_int.h b/core/src/fpdftext/text_int.h
index d10c550..576ab7c 100644
--- a/core/src/fpdftext/text_int.h
+++ b/core/src/fpdftext/text_int.h
@@ -7,9 +7,9 @@
 #ifndef CORE_SRC_FPDFTEXT_TEXT_INT_H_
 #define CORE_SRC_FPDFTEXT_TEXT_INT_H_
 
-#include "../../include/fpdftext/fpdf_text.h"
-#include "../../include/fxcrt/fx_arb.h"
-#include "../../include/fxcrt/fx_basic.h"
+#include "core/include/fpdftext/fpdf_text.h"
+#include "core/include/fxcrt/fx_arb.h"
+#include "core/include/fxcrt/fx_basic.h"
 
 class CFX_BidiChar;
 class CPDF_DocProgressiveSearch;
diff --git a/core/src/fpdftext/unicodenormalization.cpp b/core/src/fpdftext/unicodenormalization.cpp
index a773296..b56fe00 100644
--- a/core/src/fpdftext/unicodenormalization.cpp
+++ b/core/src/fpdftext/unicodenormalization.cpp
@@ -4,7 +4,7 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../include/fxcrt/fx_string.h"
+#include "core/include/fxcrt/fx_string.h"
 #include "unicodenormalizationdata.h"
 
 const FX_WCHAR* const g_UnicodeData_Normalization_Maps[5] = {
diff --git a/core/src/fpdftext/unicodenormalizationdata.cpp b/core/src/fpdftext/unicodenormalizationdata.cpp
index 777d040..686fe91 100644
--- a/core/src/fpdftext/unicodenormalizationdata.cpp
+++ b/core/src/fpdftext/unicodenormalizationdata.cpp
@@ -4,7 +4,7 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../include/fxcrt/fx_system.h"
+#include "core/include/fxcrt/fx_system.h"
 #include "unicodenormalizationdata.h"
 
 const FX_WCHAR g_UnicodeData_Normalization[65536] = {
diff --git a/core/src/fpdftext/unicodenormalizationdata.h b/core/src/fpdftext/unicodenormalizationdata.h
index 1970f87..c0f07b3 100644
--- a/core/src/fpdftext/unicodenormalizationdata.h
+++ b/core/src/fpdftext/unicodenormalizationdata.h
@@ -7,7 +7,7 @@
 #ifndef CORE_SRC_FPDFTEXT_UNICODENORMALIZATIONDATA_H_
 #define CORE_SRC_FPDFTEXT_UNICODENORMALIZATIONDATA_H_
 
-#include "../../include/fxcrt/fx_system.h"
+#include "core/include/fxcrt/fx_system.h"
 
 extern const FX_WCHAR g_UnicodeData_Normalization[];
 extern const FX_WCHAR g_UnicodeData_Normalization_Map1[];
diff --git a/core/src/fxcodec/codec/codec_int.h b/core/src/fxcodec/codec/codec_int.h
index e8e5b37..43d9f4c 100644
--- a/core/src/fxcodec/codec/codec_int.h
+++ b/core/src/fxcodec/codec/codec_int.h
@@ -11,8 +11,8 @@
 #include <list>
 #include <map>
 
-#include "../../../include/fxcodec/fx_codec.h"
 #include "../jbig2/JBig2_Context.h"
+#include "core/include/fxcodec/fx_codec.h"
 #include "third_party/base/nonstd_unique_ptr.h"
 #include "third_party/libopenjpeg20/openjpeg.h"  // For OPJ_SIZE_T.
 
diff --git a/core/src/fxcodec/codec/fx_codec.cpp b/core/src/fxcodec/codec/fx_codec.cpp
index 78424bd..7b6aace 100644
--- a/core/src/fxcodec/codec/fx_codec.cpp
+++ b/core/src/fxcodec/codec/fx_codec.cpp
@@ -4,12 +4,12 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../../include/fxcodec/fx_codec.h"
+#include "core/include/fxcodec/fx_codec.h"
 
 #include <cmath>
 
-#include "../../../include/fxcrt/fx_safe_types.h"
 #include "codec_int.h"
+#include "core/include/fxcrt/fx_safe_types.h"
 #include "third_party/base/logging.h"
 
 CCodec_ModuleMgr::CCodec_ModuleMgr()
diff --git a/core/src/fxcodec/codec/fx_codec_fax.cpp b/core/src/fxcodec/codec/fx_codec_fax.cpp
index 5af1d9e..d376fe2 100644
--- a/core/src/fxcodec/codec/fx_codec_fax.cpp
+++ b/core/src/fxcodec/codec/fx_codec_fax.cpp
@@ -4,8 +4,8 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../../include/fxcodec/fx_codec.h"
 #include "codec_int.h"
+#include "core/include/fxcodec/fx_codec.h"
 
 namespace {
 
diff --git a/core/src/fxcodec/codec/fx_codec_flate.cpp b/core/src/fxcodec/codec/fx_codec_flate.cpp
index d4e56bf..8fba3af 100644
--- a/core/src/fxcodec/codec/fx_codec_flate.cpp
+++ b/core/src/fxcodec/codec/fx_codec_flate.cpp
@@ -4,9 +4,9 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../../include/fxcodec/fx_codec.h"
-#include "../../../include/fxcodec/fx_codec_flate.h"
 #include "codec_int.h"
+#include "core/include/fxcodec/fx_codec.h"
+#include "core/include/fxcodec/fx_codec_flate.h"
 #include "third_party/base/nonstd_unique_ptr.h"
 #include "third_party/zlib_v128/zlib.h"
 
diff --git a/core/src/fxcodec/codec/fx_codec_icc.cpp b/core/src/fxcodec/codec/fx_codec_icc.cpp
index 67e3d64..8628720 100644
--- a/core/src/fxcodec/codec/fx_codec_icc.cpp
+++ b/core/src/fxcodec/codec/fx_codec_icc.cpp
@@ -4,8 +4,8 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../../include/fxcodec/fx_codec.h"
 #include "codec_int.h"
+#include "core/include/fxcodec/fx_codec.h"
 #include "third_party/lcms2-2.6/include/lcms2.h"
 
 const FX_DWORD N_COMPONENT_LAB = 3;
diff --git a/core/src/fxcodec/codec/fx_codec_jbig.cpp b/core/src/fxcodec/codec/fx_codec_jbig.cpp
index 1524b68..aa9f181 100644
--- a/core/src/fxcodec/codec/fx_codec_jbig.cpp
+++ b/core/src/fxcodec/codec/fx_codec_jbig.cpp
@@ -4,8 +4,8 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../../include/fxcodec/fx_codec.h"
 #include "codec_int.h"
+#include "core/include/fxcodec/fx_codec.h"
 
 // Holds per-document JBig2 related data.
 class JBig2DocumentContext : public CFX_DestructObject {
diff --git a/core/src/fxcodec/codec/fx_codec_jpeg.cpp b/core/src/fxcodec/codec/fx_codec_jpeg.cpp
index 78ed013..e8016d2 100644
--- a/core/src/fxcodec/codec/fx_codec_jpeg.cpp
+++ b/core/src/fxcodec/codec/fx_codec_jpeg.cpp
@@ -6,10 +6,10 @@
 
 #include <setjmp.h>
 
-#include "../../../include/fxcodec/fx_codec.h"
-#include "../../../include/fxcrt/fx_safe_types.h"
-#include "../../../include/fxge/fx_dib.h"
 #include "codec_int.h"
+#include "core/include/fxcodec/fx_codec.h"
+#include "core/include/fxcrt/fx_safe_types.h"
+#include "core/include/fxge/fx_dib.h"
 
 extern "C" {
 #undef FAR
diff --git a/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp b/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp
index 02efdb7..3f71035 100644
--- a/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp
+++ b/core/src/fxcodec/codec/fx_codec_jpx_opj.cpp
@@ -8,9 +8,9 @@
 #include <limits>
 #include <vector>
 
-#include "../../../include/fxcodec/fx_codec.h"
-#include "../../../include/fxcrt/fx_safe_types.h"
 #include "codec_int.h"
+#include "core/include/fxcodec/fx_codec.h"
+#include "core/include/fxcrt/fx_safe_types.h"
 #include "third_party/lcms2-2.6/include/lcms2.h"
 #include "third_party/libopenjpeg20/openjpeg.h"
 
diff --git a/core/src/fxcodec/jbig2/JBig2_ArithDecoder.cpp b/core/src/fxcodec/jbig2/JBig2_ArithDecoder.cpp
index a1aa5bf..3a2f26d 100644
--- a/core/src/fxcodec/jbig2/JBig2_ArithDecoder.cpp
+++ b/core/src/fxcodec/jbig2/JBig2_ArithDecoder.cpp
@@ -6,8 +6,8 @@
 
 #include "JBig2_ArithDecoder.h"
 
-#include "../../../include/fxcrt/fx_basic.h"
 #include "JBig2_BitStream.h"
+#include "core/include/fxcrt/fx_basic.h"
 
 namespace {
 
diff --git a/core/src/fxcodec/jbig2/JBig2_ArithIntDecoder.cpp b/core/src/fxcodec/jbig2/JBig2_ArithIntDecoder.cpp
index 49be941..6ee255a 100644
--- a/core/src/fxcodec/jbig2/JBig2_ArithIntDecoder.cpp
+++ b/core/src/fxcodec/jbig2/JBig2_ArithIntDecoder.cpp
@@ -6,7 +6,7 @@
 
 #include "JBig2_ArithIntDecoder.h"
 
-#include "../../../include/fxcrt/fx_basic.h"
+#include "core/include/fxcrt/fx_basic.h"
 
 namespace {
 
diff --git a/core/src/fxcodec/jbig2/JBig2_ArithIntDecoder.h b/core/src/fxcodec/jbig2/JBig2_ArithIntDecoder.h
index 391004b..dc3cb11 100644
--- a/core/src/fxcodec/jbig2/JBig2_ArithIntDecoder.h
+++ b/core/src/fxcodec/jbig2/JBig2_ArithIntDecoder.h
@@ -9,8 +9,8 @@
 
 #include <vector>
 
-#include "../../../include/fxcrt/fx_system.h"
 #include "JBig2_ArithDecoder.h"
+#include "core/include/fxcrt/fx_system.h"
 
 class CJBig2_ArithIntDecoder {
  public:
diff --git a/core/src/fxcodec/jbig2/JBig2_BitStream.cpp b/core/src/fxcodec/jbig2/JBig2_BitStream.cpp
index f39a396..42b1e64 100644
--- a/core/src/fxcodec/jbig2/JBig2_BitStream.cpp
+++ b/core/src/fxcodec/jbig2/JBig2_BitStream.cpp
@@ -4,11 +4,12 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../../include/fpdfapi/fpdf_objects.h"
 #include "JBig2_BitStream.h"
 
 #include <algorithm>
 
+#include "core/include/fpdfapi/fpdf_objects.h"
+
 CJBig2_BitStream::CJBig2_BitStream(CPDF_StreamAcc* pSrcStream)
     : m_pBuf(pSrcStream->GetData()),
       m_dwLength(pSrcStream->GetSize()),
diff --git a/core/src/fxcodec/jbig2/JBig2_BitStream.h b/core/src/fxcodec/jbig2/JBig2_BitStream.h
index c7c50b8..fc9aa8a 100644
--- a/core/src/fxcodec/jbig2/JBig2_BitStream.h
+++ b/core/src/fxcodec/jbig2/JBig2_BitStream.h
@@ -7,7 +7,7 @@
 #ifndef CORE_SRC_FXCODEC_JBIG2_JBIG2_BITSTREAM_H_
 #define CORE_SRC_FXCODEC_JBIG2_JBIG2_BITSTREAM_H_
 
-#include "../../../include/fxcrt/fx_basic.h"
+#include "core/include/fxcrt/fx_basic.h"
 
 class CPDF_StreamAcc;
 
diff --git a/core/src/fxcodec/jbig2/JBig2_Context.h b/core/src/fxcodec/jbig2/JBig2_Context.h
index a98d7a9..1b8b391 100644
--- a/core/src/fxcodec/jbig2/JBig2_Context.h
+++ b/core/src/fxcodec/jbig2/JBig2_Context.h
@@ -10,11 +10,11 @@
 #include <list>
 #include <utility>
 
-#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 "core/include/fpdfapi/fpdf_objects.h"
+#include "core/include/fxcodec/fx_codec_def.h"
 #include "third_party/base/nonstd_unique_ptr.h"
 
 class CJBig2_ArithDecoder;
diff --git a/core/src/fxcodec/jbig2/JBig2_Define.h b/core/src/fxcodec/jbig2/JBig2_Define.h
index d1a19c5..ccc3099 100644
--- a/core/src/fxcodec/jbig2/JBig2_Define.h
+++ b/core/src/fxcodec/jbig2/JBig2_Define.h
@@ -7,7 +7,8 @@
 #ifndef _JBIG2_DEFINE_H_
 #define _JBIG2_DEFINE_H_
 
-#include "../../../include/fxcrt/fx_system.h"
+#include "core/include/fxcrt/fx_system.h"
+
 #define JBIG2_memset FXSYS_memset
 #define JBIG2_memcmp FXSYS_memcmp
 #define JBIG2_memcpy FXSYS_memcpy
diff --git a/core/src/fxcodec/jbig2/JBig2_GrdProc.cpp b/core/src/fxcodec/jbig2/JBig2_GrdProc.cpp
index 083ac5e..fc654c0 100644
--- a/core/src/fxcodec/jbig2/JBig2_GrdProc.cpp
+++ b/core/src/fxcodec/jbig2/JBig2_GrdProc.cpp
@@ -6,10 +6,10 @@
 
 #include "JBig2_GrdProc.h"
 
-#include "../../../include/fxcodec/fx_codec.h"
 #include "JBig2_ArithDecoder.h"
 #include "JBig2_BitStream.h"
 #include "JBig2_Image.h"
+#include "core/include/fxcodec/fx_codec.h"
 #include "third_party/base/nonstd_unique_ptr.h"
 
 CJBig2_GRDProc::CJBig2_GRDProc()
diff --git a/core/src/fxcodec/jbig2/JBig2_GrdProc.h b/core/src/fxcodec/jbig2/JBig2_GrdProc.h
index fc3cb5c..07f28cc 100644
--- a/core/src/fxcodec/jbig2/JBig2_GrdProc.h
+++ b/core/src/fxcodec/jbig2/JBig2_GrdProc.h
@@ -7,9 +7,9 @@
 #ifndef CORE_SRC_FXCODEC_JBIG2_JBIG2_GRDPROC_H_
 #define CORE_SRC_FXCODEC_JBIG2_JBIG2_GRDPROC_H_
 
-#include "../../../include/fxcrt/fx_system.h"
-#include "../../../include/fxcodec/fx_codec_def.h"
-#include "../../../include/fxcrt/fx_coordinates.h"
+#include "core/include/fxcodec/fx_codec_def.h"
+#include "core/include/fxcrt/fx_coordinates.h"
+#include "core/include/fxcrt/fx_system.h"
 
 class CJBig2_ArithDecoder;
 class CJBig2_BitStream;
diff --git a/core/src/fxcodec/jbig2/JBig2_GrrdProc.h b/core/src/fxcodec/jbig2/JBig2_GrrdProc.h
index 1a7935b..42b4eb6 100644
--- a/core/src/fxcodec/jbig2/JBig2_GrrdProc.h
+++ b/core/src/fxcodec/jbig2/JBig2_GrrdProc.h
@@ -7,7 +7,7 @@
 #ifndef CORE_SRC_FXCODEC_JBIG2_JBIG2_GRRDPROC_H_
 #define CORE_SRC_FXCODEC_JBIG2_JBIG2_GRRDPROC_H_
 
-#include "../../../include/fxcrt/fx_system.h"
+#include "core/include/fxcrt/fx_system.h"
 
 class CJBig2_ArithDecoder;
 class CJBig2_Image;
diff --git a/core/src/fxcodec/jbig2/JBig2_GsidProc.cpp b/core/src/fxcodec/jbig2/JBig2_GsidProc.cpp
index ee43cdb..53af1fd 100644
--- a/core/src/fxcodec/jbig2/JBig2_GsidProc.cpp
+++ b/core/src/fxcodec/jbig2/JBig2_GsidProc.cpp
@@ -6,11 +6,11 @@
 
 #include "JBig2_GsidProc.h"
 
-#include "../../../include/fxcrt/fx_basic.h"
 #include "JBig2_BitStream.h"
 #include "JBig2_GrdProc.h"
 #include "JBig2_Image.h"
 #include "JBig2_List.h"
+#include "core/include/fxcrt/fx_basic.h"
 #include "third_party/base/nonstd_unique_ptr.h"
 
 FX_DWORD* CJBig2_GSIDProc::decode_Arith(CJBig2_ArithDecoder* pArithDecoder,
diff --git a/core/src/fxcodec/jbig2/JBig2_GsidProc.h b/core/src/fxcodec/jbig2/JBig2_GsidProc.h
index 93a231f..dfd16b8 100644
--- a/core/src/fxcodec/jbig2/JBig2_GsidProc.h
+++ b/core/src/fxcodec/jbig2/JBig2_GsidProc.h
@@ -7,7 +7,7 @@
 #ifndef CORE_SRC_FXCODEC_JBIG2_JBIG2_GSIDPROC_H_
 #define CORE_SRC_FXCODEC_JBIG2_JBIG2_GSIDPROC_H_
 
-#include "../../../include/fxcrt/fx_system.h"
+#include "core/include/fxcrt/fx_system.h"
 
 class CJBig2_ArithDecoder;
 class CJBig2_BitStream;
diff --git a/core/src/fxcodec/jbig2/JBig2_HtrdProc.cpp b/core/src/fxcodec/jbig2/JBig2_HtrdProc.cpp
index d976834..127ef03 100644
--- a/core/src/fxcodec/jbig2/JBig2_HtrdProc.cpp
+++ b/core/src/fxcodec/jbig2/JBig2_HtrdProc.cpp
@@ -6,8 +6,8 @@
 
 #include "JBig2_HtrdProc.h"
 
-#include "../../../include/fxcrt/fx_basic.h"
 #include "JBig2_GsidProc.h"
+#include "core/include/fxcrt/fx_basic.h"
 #include "third_party/base/nonstd_unique_ptr.h"
 
 CJBig2_Image* CJBig2_HTRDProc::decode_Arith(CJBig2_ArithDecoder* pArithDecoder,
diff --git a/core/src/fxcodec/jbig2/JBig2_HtrdProc.h b/core/src/fxcodec/jbig2/JBig2_HtrdProc.h
index f7a5070..30e0380 100644
--- a/core/src/fxcodec/jbig2/JBig2_HtrdProc.h
+++ b/core/src/fxcodec/jbig2/JBig2_HtrdProc.h
@@ -7,7 +7,7 @@
 #ifndef CORE_SRC_FXCODEC_JBIG2_JBIG2_HTRDPROC_H_
 #define CORE_SRC_FXCODEC_JBIG2_JBIG2_HTRDPROC_H_
 
-#include "../../../include/fxcrt/fx_system.h"
+#include "core/include/fxcrt/fx_system.h"
 
 #include "JBig2_Image.h"
 
diff --git a/core/src/fxcodec/jbig2/JBig2_HuffmanTable.cpp b/core/src/fxcodec/jbig2/JBig2_HuffmanTable.cpp
index 9d7cd2a..6b6f161 100644
--- a/core/src/fxcodec/jbig2/JBig2_HuffmanTable.cpp
+++ b/core/src/fxcodec/jbig2/JBig2_HuffmanTable.cpp
@@ -10,9 +10,9 @@
 
 #include <vector>
 
-#include "../../../include/fxcrt/fx_memory.h"
 #include "JBig2_BitStream.h"
 #include "JBig2_Define.h"
+#include "core/include/fxcrt/fx_memory.h"
 
 CJBig2_HuffmanTable::CJBig2_HuffmanTable(const JBig2TableLine* pTable,
                                          int nLines,
diff --git a/core/src/fxcodec/jbig2/JBig2_Image.cpp b/core/src/fxcodec/jbig2/JBig2_Image.cpp
index 4cb4674..a2a0acf 100644
--- a/core/src/fxcodec/jbig2/JBig2_Image.cpp
+++ b/core/src/fxcodec/jbig2/JBig2_Image.cpp
@@ -6,9 +6,9 @@
 
 #include <limits.h>
 
-#include "../../../include/fxcrt/fx_coordinates.h"
-#include "../../../include/fxcrt/fx_safe_types.h"
 #include "JBig2_Image.h"
+#include "core/include/fxcrt/fx_coordinates.h"
+#include "core/include/fxcrt/fx_safe_types.h"
 
 CJBig2_Image::CJBig2_Image(int32_t w, int32_t h) {
   m_nWidth = w;
diff --git a/core/src/fxcodec/jbig2/JBig2_List.h b/core/src/fxcodec/jbig2/JBig2_List.h
index 6097294..6f61690 100644
--- a/core/src/fxcodec/jbig2/JBig2_List.h
+++ b/core/src/fxcodec/jbig2/JBig2_List.h
@@ -7,6 +7,8 @@
 #ifndef CORE_SRC_FXCODEC_JBIG2_JBIG2_LIST_H_
 #define CORE_SRC_FXCODEC_JBIG2_JBIG2_LIST_H_
 
+#include <stdlib.h>
+
 #include <vector>
 
 // A poor man's ScopedVector for pointers of TYPE.
diff --git a/core/src/fxcodec/jbig2/JBig2_Page.h b/core/src/fxcodec/jbig2/JBig2_Page.h
index ba4b288..6d5e55a 100644
--- a/core/src/fxcodec/jbig2/JBig2_Page.h
+++ b/core/src/fxcodec/jbig2/JBig2_Page.h
@@ -7,7 +7,7 @@
 #ifndef _JBIG2_PAGE_H_
 #define _JBIG2_PAGE_H_
 
-#include "../../../include/fxcrt/fx_system.h"
+#include "core/include/fxcrt/fx_system.h"
 
 struct JBig2PageInfo {
   FX_DWORD m_dwWidth;
diff --git a/core/src/fxcodec/jbig2/JBig2_PatternDict.cpp b/core/src/fxcodec/jbig2/JBig2_PatternDict.cpp
index 21f6d64..b32daa0 100644
--- a/core/src/fxcodec/jbig2/JBig2_PatternDict.cpp
+++ b/core/src/fxcodec/jbig2/JBig2_PatternDict.cpp
@@ -6,7 +6,7 @@
 
 #include "JBig2_PatternDict.h"
 
-#include "../../../include/fxcrt/fx_memory.h"
+#include "core/include/fxcrt/fx_memory.h"
 
 CJBig2_PatternDict::CJBig2_PatternDict() {
   NUMPATS = 0;
diff --git a/core/src/fxcodec/jbig2/JBig2_PddProc.h b/core/src/fxcodec/jbig2/JBig2_PddProc.h
index 5b4e609..2f875f5 100644
--- a/core/src/fxcodec/jbig2/JBig2_PddProc.h
+++ b/core/src/fxcodec/jbig2/JBig2_PddProc.h
@@ -7,7 +7,7 @@
 #ifndef CORE_SRC_FXCODEC_JBIG2_JBIG2_PDDPROC_H_
 #define CORE_SRC_FXCODEC_JBIG2_JBIG2_PDDPROC_H_
 
-#include "../../../include/fxcrt/fx_system.h"
+#include "core/include/fxcrt/fx_system.h"
 
 class CJBig2_ArithDecoder;
 class CJBig2_BitStream;
diff --git a/core/src/fxcodec/jbig2/JBig2_SddProc.cpp b/core/src/fxcodec/jbig2/JBig2_SddProc.cpp
index fe39e71..52aef2b 100644
--- a/core/src/fxcodec/jbig2/JBig2_SddProc.cpp
+++ b/core/src/fxcodec/jbig2/JBig2_SddProc.cpp
@@ -6,7 +6,6 @@
 
 #include "JBig2_SddProc.h"
 
-#include "../../../include/fxcrt/fx_basic.h"
 #include "JBig2_ArithIntDecoder.h"
 #include "JBig2_GrdProc.h"
 #include "JBig2_GrrdProc.h"
@@ -14,6 +13,7 @@
 #include "JBig2_HuffmanTable.h"
 #include "JBig2_SymbolDict.h"
 #include "JBig2_TrdProc.h"
+#include "core/include/fxcrt/fx_basic.h"
 #include "third_party/base/nonstd_unique_ptr.h"
 #include "third_party/base/stl_util.h"
 
diff --git a/core/src/fxcodec/jbig2/JBig2_SddProc.h b/core/src/fxcodec/jbig2/JBig2_SddProc.h
index 01f8014..77ac049 100644
--- a/core/src/fxcodec/jbig2/JBig2_SddProc.h
+++ b/core/src/fxcodec/jbig2/JBig2_SddProc.h
@@ -9,8 +9,8 @@
 
 #include <vector>
 
-#include "../../../include/fxcrt/fx_system.h"
 #include "JBig2_ArithDecoder.h"
+#include "core/include/fxcrt/fx_system.h"
 
 class CJBig2_BitStream;
 class CJBig2_HuffmanTable;
diff --git a/core/src/fxcodec/jbig2/JBig2_Segment.cpp b/core/src/fxcodec/jbig2/JBig2_Segment.cpp
index 1b0d4e9..41eeafe 100644
--- a/core/src/fxcodec/jbig2/JBig2_Segment.cpp
+++ b/core/src/fxcodec/jbig2/JBig2_Segment.cpp
@@ -6,7 +6,7 @@
 
 #include "JBig2_Segment.h"
 
-#include "../../../include/fxcrt/fx_memory.h"
+#include "core/include/fxcrt/fx_memory.h"
 
 CJBig2_Segment::CJBig2_Segment() {
   m_dwNumber = 0;
diff --git a/core/src/fxcodec/jbig2/JBig2_SymbolDict.cpp b/core/src/fxcodec/jbig2/JBig2_SymbolDict.cpp
index 351a838..b1e56c0 100644
--- a/core/src/fxcodec/jbig2/JBig2_SymbolDict.cpp
+++ b/core/src/fxcodec/jbig2/JBig2_SymbolDict.cpp
@@ -6,8 +6,8 @@
 
 #include "JBig2_SymbolDict.h"
 
-#include "../../../include/fxcrt/fx_memory.h"
 #include "JBig2_Image.h"
+#include "core/include/fxcrt/fx_memory.h"
 
 CJBig2_SymbolDict::CJBig2_SymbolDict() {
 }
diff --git a/core/src/fxcodec/jbig2/JBig2_SymbolDict.h b/core/src/fxcodec/jbig2/JBig2_SymbolDict.h
index 107b282..5c7fe3c 100644
--- a/core/src/fxcodec/jbig2/JBig2_SymbolDict.h
+++ b/core/src/fxcodec/jbig2/JBig2_SymbolDict.h
@@ -9,9 +9,9 @@
 
 #include <vector>
 
-#include "../../../include/fxcrt/fx_basic.h"
 #include "JBig2_ArithDecoder.h"
 #include "JBig2_List.h"
+#include "core/include/fxcrt/fx_basic.h"
 #include "third_party/base/nonstd_unique_ptr.h"
 
 class CJBig2_Image;
diff --git a/core/src/fxcodec/jbig2/JBig2_TrdProc.h b/core/src/fxcodec/jbig2/JBig2_TrdProc.h
index a235805..9e0802c 100644
--- a/core/src/fxcodec/jbig2/JBig2_TrdProc.h
+++ b/core/src/fxcodec/jbig2/JBig2_TrdProc.h
@@ -7,9 +7,8 @@
 #ifndef CORE_SRC_FXCODEC_JBIG2_JBIG2_TRDPROC_H_
 #define CORE_SRC_FXCODEC_JBIG2_JBIG2_TRDPROC_H_
 
-#include "../../../include/fxcrt/fx_system.h"
-
 #include "JBig2_Image.h"
+#include "core/include/fxcrt/fx_system.h"
 
 class CJBig2_ArithDecoder;
 class CJBig2_ArithIaidDecoder;
diff --git a/core/src/fxcrt/extension.h b/core/src/fxcrt/extension.h
index 9960c03..038fa30 100644
--- a/core/src/fxcrt/extension.h
+++ b/core/src/fxcrt/extension.h
@@ -7,8 +7,8 @@
 #ifndef CORE_SRC_FXCRT_EXTENSION_H_
 #define CORE_SRC_FXCRT_EXTENSION_H_
 
-#include "../../include/fxcrt/fx_basic.h"
-#include "../../include/fxcrt/fx_safe_types.h"
+#include "core/include/fxcrt/fx_basic.h"
+#include "core/include/fxcrt/fx_safe_types.h"
 
 class IFXCRT_FileAccess {
  public:
diff --git a/core/src/fxcrt/fx_basic_array.cpp b/core/src/fxcrt/fx_basic_array.cpp
index a24b78a..ccb80eb 100644
--- a/core/src/fxcrt/fx_basic_array.cpp
+++ b/core/src/fxcrt/fx_basic_array.cpp
@@ -4,7 +4,7 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../include/fxcrt/fx_basic.h"
+#include "core/include/fxcrt/fx_basic.h"
 #include "third_party/base/numerics/safe_math.h"
 
 CFX_BasicArray::CFX_BasicArray(int unit_size)
diff --git a/core/src/fxcrt/fx_basic_bstring.cpp b/core/src/fxcrt/fx_basic_bstring.cpp
index 7793a0e..9d64fbe 100644
--- a/core/src/fxcrt/fx_basic_bstring.cpp
+++ b/core/src/fxcrt/fx_basic_bstring.cpp
@@ -6,7 +6,7 @@
 
 #include <stddef.h>  // For offsetof().
 
-#include "../../include/fxcrt/fx_basic.h"
+#include "core/include/fxcrt/fx_basic.h"
 #include "third_party/base/numerics/safe_math.h"
 
 static int _Buffer_itoa(char* buf, int i, FX_DWORD flags) {
diff --git a/core/src/fxcrt/fx_basic_bstring_unittest.cpp b/core/src/fxcrt/fx_basic_bstring_unittest.cpp
index d8d880f..f56e89f 100644
--- a/core/src/fxcrt/fx_basic_bstring_unittest.cpp
+++ b/core/src/fxcrt/fx_basic_bstring_unittest.cpp
@@ -3,7 +3,7 @@
 // found in the LICENSE file.
 
 #include "../../../testing/fx_string_testhelpers.h"
-#include "../../include/fxcrt/fx_string.h"
+#include "core/include/fxcrt/fx_string.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
 TEST(fxcrt, ByteStringOperatorSubscript) {
diff --git a/core/src/fxcrt/fx_basic_buffer.cpp b/core/src/fxcrt/fx_basic_buffer.cpp
index 19ebfdf..f606f1d 100644
--- a/core/src/fxcrt/fx_basic_buffer.cpp
+++ b/core/src/fxcrt/fx_basic_buffer.cpp
@@ -4,7 +4,8 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../include/fxcrt/fx_basic.h"
+#include "core/include/fxcrt/fx_basic.h"
+
 FX_STRSIZE FX_ftoa(FX_FLOAT f, FX_CHAR* buf);
 CFX_BinaryBuf::CFX_BinaryBuf()
     : m_AllocStep(0), m_pBuffer(NULL), m_DataSize(0), m_AllocSize(0) {}
diff --git a/core/src/fxcrt/fx_basic_coords.cpp b/core/src/fxcrt/fx_basic_coords.cpp
index 4b570c6..814fa36 100644
--- a/core/src/fxcrt/fx_basic_coords.cpp
+++ b/core/src/fxcrt/fx_basic_coords.cpp
@@ -6,8 +6,8 @@
 
 #include <limits.h>
 
-#include "../../include/fxcrt/fx_coordinates.h"
-#include "../../include/fxcrt/fx_ext.h"
+#include "core/include/fxcrt/fx_coordinates.h"
+#include "core/include/fxcrt/fx_ext.h"
 
 void FX_RECT::Normalize() {
   if (left > right) {
diff --git a/core/src/fxcrt/fx_basic_gcc.cpp b/core/src/fxcrt/fx_basic_gcc.cpp
index 6f17482..f8b0c7a 100644
--- a/core/src/fxcrt/fx_basic_gcc.cpp
+++ b/core/src/fxcrt/fx_basic_gcc.cpp
@@ -6,8 +6,8 @@
 
 #include <limits>
 
-#include "../../include/fxcrt/fx_ext.h"
-#include "../../include/fxcrt/fx_string.h"
+#include "core/include/fxcrt/fx_ext.h"
+#include "core/include/fxcrt/fx_string.h"
 
 template <class T, class STR_T>
 T FXSYS_StrToInt(STR_T str) {
diff --git a/core/src/fxcrt/fx_basic_list.cpp b/core/src/fxcrt/fx_basic_list.cpp
index 068aef2..de5d9f3 100644
--- a/core/src/fxcrt/fx_basic_list.cpp
+++ b/core/src/fxcrt/fx_basic_list.cpp
@@ -4,8 +4,9 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../include/fxcrt/fx_basic.h"
+#include "core/include/fxcrt/fx_basic.h"
 #include "plex.h"
+
 CFX_PtrList::CFX_PtrList(int nBlockSize)
     : m_pNodeHead(NULL),
       m_pNodeTail(NULL),
diff --git a/core/src/fxcrt/fx_basic_maps.cpp b/core/src/fxcrt/fx_basic_maps.cpp
index 380beb6..aadeb15 100644
--- a/core/src/fxcrt/fx_basic_maps.cpp
+++ b/core/src/fxcrt/fx_basic_maps.cpp
@@ -4,7 +4,7 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../include/fxcrt/fx_basic.h"
+#include "core/include/fxcrt/fx_basic.h"
 #include "plex.h"
 
 CFX_MapPtrToPtr::CFX_MapPtrToPtr(int nBlockSize)
diff --git a/core/src/fxcrt/fx_basic_memmgr.cpp b/core/src/fxcrt/fx_basic_memmgr.cpp
index ebc2585..6665df6 100644
--- a/core/src/fxcrt/fx_basic_memmgr.cpp
+++ b/core/src/fxcrt/fx_basic_memmgr.cpp
@@ -5,7 +5,8 @@
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
 #include <stdlib.h>  // For abort().
-#include "../../include/fxcrt/fx_memory.h"
+
+#include "core/include/fxcrt/fx_memory.h"
 
 void* FXMEM_DefaultAlloc(size_t byte_size, int flags) {
   return (void*)malloc(byte_size);
diff --git a/core/src/fxcrt/fx_basic_memmgr_unittest.cpp b/core/src/fxcrt/fx_basic_memmgr_unittest.cpp
index 819cbb4..9821ca9 100644
--- a/core/src/fxcrt/fx_basic_memmgr_unittest.cpp
+++ b/core/src/fxcrt/fx_basic_memmgr_unittest.cpp
@@ -4,8 +4,8 @@
 
 #include <limits>
 
+#include "core/include/fxcrt/fx_memory.h"
 #include "testing/gtest/include/gtest/gtest.h"
-#include "../../include/fxcrt/fx_memory.h"
 
 namespace {
 
diff --git a/core/src/fxcrt/fx_basic_plex.cpp b/core/src/fxcrt/fx_basic_plex.cpp
index b01ad8a..b6383ec 100644
--- a/core/src/fxcrt/fx_basic_plex.cpp
+++ b/core/src/fxcrt/fx_basic_plex.cpp
@@ -4,7 +4,7 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../include/fxcrt/fx_memory.h"
+#include "core/include/fxcrt/fx_memory.h"
 #include "plex.h"
 
 CFX_Plex* CFX_Plex::Create(CFX_Plex*& pHead,
diff --git a/core/src/fxcrt/fx_basic_utf.cpp b/core/src/fxcrt/fx_basic_utf.cpp
index a9ad82f..749e122 100644
--- a/core/src/fxcrt/fx_basic_utf.cpp
+++ b/core/src/fxcrt/fx_basic_utf.cpp
@@ -4,7 +4,8 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../include/fxcrt/fx_basic.h"
+#include "core/include/fxcrt/fx_basic.h"
+
 void CFX_UTF8Decoder::Clear() {
   m_Buffer.Clear();
   m_PendingBytes = 0;
diff --git a/core/src/fxcrt/fx_basic_util.cpp b/core/src/fxcrt/fx_basic_util.cpp
index 46a0dec..3e9d616 100644
--- a/core/src/fxcrt/fx_basic_util.cpp
+++ b/core/src/fxcrt/fx_basic_util.cpp
@@ -4,13 +4,15 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../include/fxcrt/fx_basic.h"
+#include "core/include/fxcrt/fx_basic.h"
+
 #if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_
 #include <sys/types.h>
 #include <dirent.h>
 #else
 #include <direct.h>
 #endif
+
 CFX_PrivateData::~CFX_PrivateData() {
   ClearAll();
 }
diff --git a/core/src/fxcrt/fx_basic_wstring.cpp b/core/src/fxcrt/fx_basic_wstring.cpp
index 0da9f51..131672d 100644
--- a/core/src/fxcrt/fx_basic_wstring.cpp
+++ b/core/src/fxcrt/fx_basic_wstring.cpp
@@ -6,7 +6,7 @@
 
 #include <stddef.h>  // For offsetof().
 
-#include "../../include/fxcrt/fx_basic.h"
+#include "core/include/fxcrt/fx_basic.h"
 #include "third_party/base/numerics/safe_math.h"
 
 // static
diff --git a/core/src/fxcrt/fx_basic_wstring_unittest.cpp b/core/src/fxcrt/fx_basic_wstring_unittest.cpp
index 5141cdd..511d8f2 100644
--- a/core/src/fxcrt/fx_basic_wstring_unittest.cpp
+++ b/core/src/fxcrt/fx_basic_wstring_unittest.cpp
@@ -2,9 +2,9 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "testing/gtest/include/gtest/gtest.h"
 #include "../../../testing/fx_string_testhelpers.h"
-#include "../../include/fxcrt/fx_basic.h"
+#include "core/include/fxcrt/fx_basic.h"
+#include "testing/gtest/include/gtest/gtest.h"
 
 TEST(fxcrt, WideStringOperatorSubscript) {
   // CFX_WideString includes the NUL terminator for non-empty strings.
diff --git a/core/src/fxcrt/fx_bidi.cpp b/core/src/fxcrt/fx_bidi.cpp
index 0310fa0..d5d87a3 100644
--- a/core/src/fxcrt/fx_bidi.cpp
+++ b/core/src/fxcrt/fx_bidi.cpp
@@ -4,8 +4,8 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../include/fxcrt/fx_bidi.h"
-#include "../../include/fxcrt/fx_ucd.h"
+#include "core/include/fxcrt/fx_bidi.h"
+#include "core/include/fxcrt/fx_ucd.h"
 
 CFX_BidiChar::CFX_BidiChar()
     : m_iCurStart(0),
diff --git a/core/src/fxcrt/fx_bidi_unittest.cpp b/core/src/fxcrt/fx_bidi_unittest.cpp
index c629cbb..8b5b6df 100644
--- a/core/src/fxcrt/fx_bidi_unittest.cpp
+++ b/core/src/fxcrt/fx_bidi_unittest.cpp
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "core/include/fxcrt/fx_bidi.h"
 #include "testing/gtest/include/gtest/gtest.h"
-#include "../../include/fxcrt/fx_bidi.h"
 
 namespace {
 
diff --git a/core/src/fxcrt/fx_extension.cpp b/core/src/fxcrt/fx_extension.cpp
index 402f86c..dd80b22 100644
--- a/core/src/fxcrt/fx_extension.cpp
+++ b/core/src/fxcrt/fx_extension.cpp
@@ -4,9 +4,10 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../include/fxcrt/fx_basic.h"
-#include "../../include/fxcrt/fx_ext.h"
+#include "core/include/fxcrt/fx_basic.h"
+#include "core/include/fxcrt/fx_ext.h"
 #include "extension.h"
+
 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
 #include <wincrypt.h>
 #else
diff --git a/core/src/fxcrt/fx_system_unittest.cpp b/core/src/fxcrt/fx_system_unittest.cpp
index 824ed53..aba20e0 100644
--- a/core/src/fxcrt/fx_system_unittest.cpp
+++ b/core/src/fxcrt/fx_system_unittest.cpp
@@ -4,9 +4,9 @@
 
 #include <string>
 
-#include "testing/gtest/include/gtest/gtest.h"
 #include "../../../testing/fx_string_testhelpers.h"
-#include "../../include/fxcrt/fx_system.h"
+#include "core/include/fxcrt/fx_system.h"
+#include "testing/gtest/include/gtest/gtest.h"
 
 // Unit test covering cases where PDFium replaces well-known library
 // functionality on any given platformn.
diff --git a/core/src/fxcrt/fx_ucddata.cpp b/core/src/fxcrt/fx_ucddata.cpp
index 13c5da1..c373d6e 100644
--- a/core/src/fxcrt/fx_ucddata.cpp
+++ b/core/src/fxcrt/fx_ucddata.cpp
@@ -4,8 +4,8 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../include/fxcrt/fx_basic.h"
-#include "../../include/fxcrt/fx_ucd.h"
+#include "core/include/fxcrt/fx_basic.h"
+#include "core/include/fxcrt/fx_ucd.h"
 
 const FX_DWORD kTextLayoutCodeProperties[] = {
     0xfffe9a93, 0xfffe9a93, 0xfffe9a93, 0xfffe9a93, 0xfffe9a93, 0xfffe9a93,
diff --git a/core/src/fxcrt/fx_unicode.cpp b/core/src/fxcrt/fx_unicode.cpp
index 105301e..2e86aec 100644
--- a/core/src/fxcrt/fx_unicode.cpp
+++ b/core/src/fxcrt/fx_unicode.cpp
@@ -4,7 +4,7 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../include/fxcrt/fx_ucd.h"
+#include "core/include/fxcrt/fx_ucd.h"
 
 FX_DWORD FX_GetUnicodeProperties(FX_WCHAR wch) {
   size_t idx = static_cast<size_t>(wch);
diff --git a/core/src/fxcrt/fx_xml_composer.cpp b/core/src/fxcrt/fx_xml_composer.cpp
index ed233ff..5e0b304 100644
--- a/core/src/fxcrt/fx_xml_composer.cpp
+++ b/core/src/fxcrt/fx_xml_composer.cpp
@@ -4,8 +4,10 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../include/fxcrt/fx_xml.h"
 #include "xml_int.h"
+
+#include "core/include/fxcrt/fx_xml.h"
+
 void FX_XML_SplitQualifiedName(const CFX_ByteStringC& bsFullName,
                                CFX_ByteStringC& bsSpace,
                                CFX_ByteStringC& bsName) {
diff --git a/core/src/fxcrt/fx_xml_parser.cpp b/core/src/fxcrt/fx_xml_parser.cpp
index dc59ded..429bc38 100644
--- a/core/src/fxcrt/fx_xml_parser.cpp
+++ b/core/src/fxcrt/fx_xml_parser.cpp
@@ -4,8 +4,10 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../include/fxcrt/fx_xml.h"
 #include "xml_int.h"
+
+#include "core/include/fxcrt/fx_xml.h"
+
 CXML_Parser::~CXML_Parser() {
   if (m_bOwnedStream) {
     m_pDataAcc->Release();
diff --git a/core/src/fxcrt/fxcrt_platforms.cpp b/core/src/fxcrt/fxcrt_platforms.cpp
index a9f22d0..849e3a8 100644
--- a/core/src/fxcrt/fxcrt_platforms.cpp
+++ b/core/src/fxcrt/fxcrt_platforms.cpp
@@ -4,9 +4,10 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../include/fxcrt/fx_basic.h"
 #include "fxcrt_platforms.h"
 
+#include "core/include/fxcrt/fx_basic.h"
+
 #if (_FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_ && \
      _FXM_PLATFORM_ != _FXM_PLATFORM_LINUX_ &&   \
      _FXM_PLATFORM_ != _FXM_PLATFORM_APPLE_ &&   \
diff --git a/core/src/fxcrt/fxcrt_posix.cpp b/core/src/fxcrt/fxcrt_posix.cpp
index 88e3d8a..d7df15e 100644
--- a/core/src/fxcrt/fxcrt_posix.cpp
+++ b/core/src/fxcrt/fxcrt_posix.cpp
@@ -4,9 +4,10 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../include/fxcrt/fx_basic.h"
 #include "fxcrt_posix.h"
 
+#include "core/include/fxcrt/fx_basic.h"
+
 #if _FXM_PLATFORM_ == _FXM_PLATFORM_LINUX_ || \
     _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ || \
     _FXM_PLATFORM_ == _FXM_PLATFORM_ANDROID_
diff --git a/core/src/fxcrt/fxcrt_windows.cpp b/core/src/fxcrt/fxcrt_windows.cpp
index 8607701..aff6a58 100644
--- a/core/src/fxcrt/fxcrt_windows.cpp
+++ b/core/src/fxcrt/fxcrt_windows.cpp
@@ -4,9 +4,10 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../include/fxcrt/fx_string.h"
 #include "fxcrt_windows.h"
 
+#include "core/include/fxcrt/fx_string.h"
+
 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_
 FX_BOOL FX_File_Exist(const CFX_ByteStringC& fileName) {
   FX_DWORD dwAttri = ::GetFileAttributesA(fileName.GetCStr());
diff --git a/core/src/fxcrt/plex.h b/core/src/fxcrt/plex.h
index d560406..12b7bd4 100644
--- a/core/src/fxcrt/plex.h
+++ b/core/src/fxcrt/plex.h
@@ -3,10 +3,11 @@
 // found in the LICENSE file.
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
 #ifndef CORE_SRC_FXCRT_PLEX_H_
 #define CORE_SRC_FXCRT_PLEX_H_
 
-#include "../../include/fxcrt/fx_system.h"
+#include "core/include/fxcrt/fx_system.h"
 
 struct CFX_Plex {
   CFX_Plex* pNext;
diff --git a/core/src/fxcrt/xml_int.h b/core/src/fxcrt/xml_int.h
index ccd5bfd..39c288a 100644
--- a/core/src/fxcrt/xml_int.h
+++ b/core/src/fxcrt/xml_int.h
@@ -7,7 +7,10 @@
 #ifndef CORE_SRC_FXCRT_XML_INT_H_
 #define CORE_SRC_FXCRT_XML_INT_H_
 
-#include "../../include/fxcrt/fx_stream.h"
+#include "core/include/fxcrt/fx_stream.h"
+
+class CFX_UTF8Decoder;
+class CXML_Element;
 
 class CXML_DataBufAcc : public IFX_BufferRead {
  public:
diff --git a/core/src/fxge/agg/include/fx_agg_driver.h b/core/src/fxge/agg/include/fx_agg_driver.h
index c0b23dd..77d2f2a 100644
--- a/core/src/fxge/agg/include/fx_agg_driver.h
+++ b/core/src/fxge/agg/include/fx_agg_driver.h
@@ -4,13 +4,17 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#ifndef FX_AGG_DRIVER_H_
-#define FX_AGG_DRIVER_H_
+#ifndef CORE_SRC_FXGE_AGG_INCLUDE_FX_AGG_DRIVER_H_
+#define CORE_SRC_FXGE_AGG_INCLUDE_FX_AGG_DRIVER_H_
 
+#include "core/include/fxge/fx_ge.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 CFX_AffineMatrix;
+class CFX_PathData;
+
 class CAgg_PathData {
  public:
   CAgg_PathData() {}
@@ -144,4 +148,4 @@
   FX_BOOL m_bGroupKnockout;
 };
 
-#endif  // FX_AGG_DRIVER_H_
+#endif  // CORE_SRC_FXGE_AGG_INCLUDE_FX_AGG_DRIVER_H_
diff --git a/core/src/fxge/agg/src/fx_agg_driver.cpp b/core/src/fxge/agg/src/fx_agg_driver.cpp
index 57ece1e..5b5100b 100644
--- a/core/src/fxge/agg/src/fx_agg_driver.cpp
+++ b/core/src/fxge/agg/src/fx_agg_driver.cpp
@@ -4,11 +4,12 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../../../include/fxcodec/fx_codec.h"
-#include "../../../../include/fxge/fx_ge.h"
+#include "core/src/fxge/agg/include/fx_agg_driver.h"
+
 #include "../../dib/dib_int.h"
 #include "../../ge/text_int.h"
-#include "../include/fx_agg_driver.h"
+#include "core/include/fxcodec/fx_codec.h"
+#include "core/include/fxge/fx_ge.h"
 #include "third_party/agg23/agg_conv_dash.h"
 #include "third_party/agg23/agg_conv_stroke.h"
 #include "third_party/agg23/agg_curves.h"
diff --git a/core/src/fxge/android/fpf_skiafont.h b/core/src/fxge/android/fpf_skiafont.h
index 6ee2f25..c88f240 100644
--- a/core/src/fxge/android/fpf_skiafont.h
+++ b/core/src/fxge/android/fpf_skiafont.h
@@ -9,7 +9,7 @@
 
 #if _FX_OS_ == _FX_ANDROID_
 
-#include "../../../include/fxge/fpf.h"
+#include "core/include/fxge/fpf.h"
 
 class CFPF_SkiaFontDescriptor;
 class CFPF_SkiaFontMgr;
diff --git a/core/src/fxge/android/fpf_skiafontmgr.cpp b/core/src/fxge/android/fpf_skiafontmgr.cpp
index 7e7aee3..a263416 100644
--- a/core/src/fxge/android/fpf_skiafontmgr.cpp
+++ b/core/src/fxge/android/fpf_skiafontmgr.cpp
@@ -4,8 +4,9 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../../include/fxcrt/fx_ext.h"
+#include "core/include/fxcrt/fx_ext.h"
 #include "fx_fpf.h"
+
 #if _FX_OS_ == _FX_ANDROID_
 #define FPF_SKIAMATCHWEIGHT_NAME1 62
 #define FPF_SKIAMATCHWEIGHT_NAME2 60
diff --git a/core/src/fxge/android/fpf_skiafontmgr.h b/core/src/fxge/android/fpf_skiafontmgr.h
index 0b33627..cd503f5 100644
--- a/core/src/fxge/android/fpf_skiafontmgr.h
+++ b/core/src/fxge/android/fpf_skiafontmgr.h
@@ -9,7 +9,7 @@
 
 #if _FX_OS_ == _FX_ANDROID_
 
-#include "../../../include/fxge/fpf.h"
+#include "core/include/fxge/fpf.h"
 
 #define FPF_SKIAFONTTYPE_Unknown 0
 #define FPF_SKIAFONTTYPE_Path 1
diff --git a/core/src/fxge/android/fpf_skiamodule.h b/core/src/fxge/android/fpf_skiamodule.h
index 5d1da7b..ff99eda 100644
--- a/core/src/fxge/android/fpf_skiamodule.h
+++ b/core/src/fxge/android/fpf_skiamodule.h
@@ -9,7 +9,7 @@
 
 #if _FX_OS_ == _FX_ANDROID_
 
-#include "../../../include/fxge/fpf.h"
+#include "core/include/fxge/fpf.h"
 
 class CFPF_SkiaFontMgr;
 
diff --git a/core/src/fxge/android/fx_fpf.h b/core/src/fxge/android/fx_fpf.h
index a484c1e..6096884 100644
--- a/core/src/fxge/android/fx_fpf.h
+++ b/core/src/fxge/android/fx_fpf.h
@@ -7,9 +7,9 @@
 #ifndef CORE_SRC_FXGE_ANDROID_FX_FPF_H_
 #define CORE_SRC_FXGE_ANDROID_FX_FPF_H_
 
-#include "../../../include/fxge/fpf.h"
-#include "../../../include/fxge/fx_freetype.h"
-#include "../../../include/fxge/fx_ge.h"
+#include "core/include/fxge/fpf.h"
+#include "core/include/fxge/fx_freetype.h"
+#include "core/include/fxge/fx_ge.h"
 #include "fx_android_font.h"
 
 #endif  // CORE_SRC_FXGE_ANDROID_FX_FPF_H_
diff --git a/core/src/fxge/apple/apple_int.h b/core/src/fxge/apple/apple_int.h
index 9bff4eb..504e144 100644
--- a/core/src/fxge/apple/apple_int.h
+++ b/core/src/fxge/apple/apple_int.h
@@ -9,7 +9,7 @@
 
 #if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
 
-#include "../../../include/fxge/fx_ge.h"
+#include "core/include/fxge/fx_ge.h"
 
 #if _FX_OS_ == _FX_MACOSX_
 #include <Carbon/Carbon.h>
diff --git a/core/src/fxge/apple/fx_apple_platform.cpp b/core/src/fxge/apple/fx_apple_platform.cpp
index 03b5629..c289b93 100644
--- a/core/src/fxge/apple/fx_apple_platform.cpp
+++ b/core/src/fxge/apple/fx_apple_platform.cpp
@@ -4,17 +4,17 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../../include/fxcrt/fx_system.h"
-#include "../../../include/fxge/fx_ge.h"
+#include "core/include/fxcrt/fx_system.h"
+#include "core/include/fxge/fx_ge.h"
 
 #if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
 
-#include "../../../include/fxge/fx_freetype.h"
-#include "../../../include/fxge/fx_ge_apple.h"
-#include "../agg/include/fx_agg_driver.h"
 #include "../dib/dib_int.h"
 #include "../ge/text_int.h"
 #include "apple_int.h"
+#include "core/include/fxge/fx_freetype.h"
+#include "core/include/fxge/fx_ge_apple.h"
+#include "core/src/fxge/agg/include/fx_agg_driver.h"
 
 void CFX_AggDeviceDriver::InitPlatform() {
   CQuartz2D& quartz2d =
diff --git a/core/src/fxge/apple/fx_mac_imp.cpp b/core/src/fxge/apple/fx_mac_imp.cpp
index 41333f8..166d3b4 100644
--- a/core/src/fxge/apple/fx_mac_imp.cpp
+++ b/core/src/fxge/apple/fx_mac_imp.cpp
@@ -4,8 +4,9 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../../include/fxge/fx_ge.h"
+#include "core/include/fxge/fx_ge.h"
 #include "apple_int.h"
+
 #if _FX_OS_ == _FX_MACOSX_
 static const struct {
   const FX_CHAR* m_pName;
diff --git a/core/src/fxge/apple/fx_quartz_device.cpp b/core/src/fxge/apple/fx_quartz_device.cpp
index eba27c0..67b438f 100644
--- a/core/src/fxge/apple/fx_quartz_device.cpp
+++ b/core/src/fxge/apple/fx_quartz_device.cpp
@@ -4,19 +4,20 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../../include/fxcrt/fx_ext.h"
-#include "../../../include/fxge/fx_freetype.h"
-#include "../../../include/fxge/fx_ge.h"
-#include "../agg/include/fx_agg_driver.h"
 #include "../dib/dib_int.h"
 #include "../ge/text_int.h"
+#include "core/include/fxcrt/fx_ext.h"
+#include "core/include/fxge/fx_freetype.h"
+#include "core/include/fxge/fx_ge.h"
+#include "core/src/fxge/agg/include/fx_agg_driver.h"
 
 #if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
 #include "apple_int.h"
-#include "../../../include/fxge/fx_ge_apple.h"
+#include "core/include/fxge/fx_ge_apple.h"
 #ifndef CGFLOAT_IS_DOUBLE
 #error Expected CGFLOAT_IS_DOUBLE to be defined by CoreGraphics headers
 #endif
+
 void* CQuartz2D::createGraphics(CFX_DIBitmap* pBitmap) {
   if (!pBitmap) {
     return NULL;
diff --git a/core/src/fxge/dib/dib_int.h b/core/src/fxge/dib/dib_int.h
index 69f2823..c90e3b1 100644
--- a/core/src/fxge/dib/dib_int.h
+++ b/core/src/fxge/dib/dib_int.h
@@ -7,6 +7,11 @@
 #ifndef CORE_SRC_FXGE_DIB_DIB_INT_H_
 #define CORE_SRC_FXGE_DIB_DIB_INT_H_
 
+#include "core/include/fxcrt/fx_coordinates.h"
+#include "core/include/fxge/fx_dib.h"
+
+class IFX_ScanlineComposer;
+
 extern const int SDP_Table[513];
 
 class CPDF_FixedMatrix {
diff --git a/core/src/fxge/dib/fx_dib_composite.cpp b/core/src/fxge/dib/fx_dib_composite.cpp
index 85741fd..e89fdce 100644
--- a/core/src/fxge/dib/fx_dib_composite.cpp
+++ b/core/src/fxge/dib/fx_dib_composite.cpp
@@ -4,9 +4,10 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../../include/fxge/fx_ge.h"
-#include "../../../include/fxcodec/fx_codec.h"
+#include "core/include/fxge/fx_ge.h"
+#include "core/include/fxcodec/fx_codec.h"
 #include "dib_int.h"
+
 const uint8_t _color_sqrt[256] = {
     0x00, 0x03, 0x07, 0x0B, 0x0F, 0x12, 0x16, 0x19, 0x1D, 0x20, 0x23, 0x26,
     0x29, 0x2C, 0x2F, 0x32, 0x35, 0x37, 0x3A, 0x3C, 0x3F, 0x41, 0x43, 0x46,
diff --git a/core/src/fxge/dib/fx_dib_convert.cpp b/core/src/fxge/dib/fx_dib_convert.cpp
index d29f009..6a01c1f 100644
--- a/core/src/fxge/dib/fx_dib_convert.cpp
+++ b/core/src/fxge/dib/fx_dib_convert.cpp
@@ -4,9 +4,10 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../../include/fxge/fx_dib.h"
-#include "../../../include/fxge/fx_ge.h"
-#include "../../../include/fxcodec/fx_codec.h"
+#include "core/include/fxcodec/fx_codec.h"
+#include "core/include/fxge/fx_dib.h"
+#include "core/include/fxge/fx_ge.h"
+
 const FX_DWORD g_dwWinPalette[256] = {
     0xff000000, 0xff800000, 0xff008000, 0xff808000, 0xff000080, 0xff800080,
     0xff008080, 0xff808080, 0xffC0DCC0, 0xffA6CAF0, 0xff2A3FAA, 0xff2A3FFF,
diff --git a/core/src/fxge/dib/fx_dib_engine.cpp b/core/src/fxge/dib/fx_dib_engine.cpp
index 56bb5ab..314b600 100644
--- a/core/src/fxge/dib/fx_dib_engine.cpp
+++ b/core/src/fxge/dib/fx_dib_engine.cpp
@@ -6,8 +6,8 @@
 
 #include <limits.h>
 
-#include "../../../include/fxge/fx_dib.h"
-#include "../../../include/fxge/fx_ge.h"
+#include "core/include/fxge/fx_dib.h"
+#include "core/include/fxge/fx_ge.h"
 #include "dib_int.h"
 
 void CWeightTable::Calc(int dest_len,
diff --git a/core/src/fxge/dib/fx_dib_main.cpp b/core/src/fxge/dib/fx_dib_main.cpp
index 8c7e831..d8335f9 100644
--- a/core/src/fxge/dib/fx_dib_main.cpp
+++ b/core/src/fxge/dib/fx_dib_main.cpp
@@ -4,11 +4,14 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../../include/fxge/fx_dib.h"
-#include "../../../include/fxge/fx_ge.h"
-#include "../../../include/fxcodec/fx_codec.h"
-#include "dib_int.h"
+#include "core/include/fxge/fx_dib.h"
+
 #include <limits.h>
+
+#include "core/include/fxge/fx_ge.h"
+#include "core/include/fxcodec/fx_codec.h"
+#include "dib_int.h"
+
 FX_BOOL ConvertBuffer(FXDIB_Format dest_format,
                       uint8_t* dest_buf,
                       int dest_pitch,
diff --git a/core/src/fxge/dib/fx_dib_transform.cpp b/core/src/fxge/dib/fx_dib_transform.cpp
index d368a95..99c38af 100644
--- a/core/src/fxge/dib/fx_dib_transform.cpp
+++ b/core/src/fxge/dib/fx_dib_transform.cpp
@@ -4,9 +4,10 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../../include/fxge/fx_dib.h"
 #include "dib_int.h"
 
+#include "core/include/fxge/fx_dib.h"
+
 const int SDP_Table[513] = {
     256, 256, 256, 256, 256, 256, 256, 256, 256, 255, 255, 255, 255, 255, 255,
     254, 254, 254, 254, 253, 253, 253, 252, 252, 252, 251, 251, 251, 250, 250,
diff --git a/core/src/fxge/freetype/fx_freetype.c b/core/src/fxge/freetype/fx_freetype.c
index 4804bc1..1ff2cc6 100644
--- a/core/src/fxge/freetype/fx_freetype.c
+++ b/core/src/fxge/freetype/fx_freetype.c
@@ -1,10 +1,11 @@
 // Copyright 2014 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.
- 
+
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../../include/fxge/fx_freetype.h"
+#include "core/include/fxge/fx_freetype.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.cpp b/core/src/fxge/ge/fx_ge.cpp
index 6dfed88..138f818 100644
--- a/core/src/fxge/ge/fx_ge.cpp
+++ b/core/src/fxge/ge/fx_ge.cpp
@@ -4,8 +4,10 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../../include/fxge/fx_ge.h"
+#include "core/include/fxge/fx_ge.h"
+
 #include "text_int.h"
+
 static CFX_GEModule* g_pGEModule = NULL;
 CFX_GEModule::CFX_GEModule(const char** pUserFontPaths) {
   m_pFontCache = NULL;
diff --git a/core/src/fxge/ge/fx_ge_device.cpp b/core/src/fxge/ge/fx_ge_device.cpp
index 7ab399a..a1790bd 100644
--- a/core/src/fxge/ge/fx_ge_device.cpp
+++ b/core/src/fxge/ge/fx_ge_device.cpp
@@ -4,7 +4,8 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../../include/fxge/fx_ge.h"
+#include "core/include/fxge/fx_ge.h"
+
 CFX_RenderDevice::CFX_RenderDevice() {
   m_pDeviceDriver = NULL;
   m_pBitmap = NULL;
diff --git a/core/src/fxge/ge/fx_ge_font.cpp b/core/src/fxge/ge/fx_ge_font.cpp
index aa0b2bf..e02d46f 100644
--- a/core/src/fxge/ge/fx_ge_font.cpp
+++ b/core/src/fxge/ge/fx_ge_font.cpp
@@ -4,8 +4,8 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../../include/fxge/fx_ge.h"
-#include "../../../include/fxge/fx_freetype.h"
+#include "core/include/fxge/fx_freetype.h"
+#include "core/include/fxge/fx_ge.h"
 #include "text_int.h"
 
 #define EM_ADJUST(em, a) (em == 0 ? (a) : (a)*1000 / em)
diff --git a/core/src/fxge/ge/fx_ge_fontmap.cpp b/core/src/fxge/ge/fx_ge_fontmap.cpp
index 7bc4a53..5bf0137 100644
--- a/core/src/fxge/ge/fx_ge_fontmap.cpp
+++ b/core/src/fxge/ge/fx_ge_fontmap.cpp
@@ -6,9 +6,9 @@
 
 #include <limits>
 
-#include "../../../include/fxge/fx_ge.h"
-#include "../../../include/fxge/fx_freetype.h"
 #include "../fontdata/chromefontdata/chromefontdata.h"
+#include "core/include/fxge/fx_freetype.h"
+#include "core/include/fxge/fx_ge.h"
 #include "text_int.h"
 
 #define GET_TT_SHORT(w) (FX_WORD)(((w)[0] << 8) | (w)[1])
diff --git a/core/src/fxge/ge/fx_ge_linux.cpp b/core/src/fxge/ge/fx_ge_linux.cpp
index 72971f7..d581627 100644
--- a/core/src/fxge/ge/fx_ge_linux.cpp
+++ b/core/src/fxge/ge/fx_ge_linux.cpp
@@ -4,8 +4,8 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../../include/fxge/fx_ge.h"
-#include "../agg/include/fx_agg_driver.h"
+#include "core/include/fxge/fx_ge.h"
+#include "core/src/fxge/agg/include/fx_agg_driver.h"
 #include "text_int.h"
 
 #if _FXM_PLATFORM_ == _FXM_PLATFORM_LINUX_
diff --git a/core/src/fxge/ge/fx_ge_path.cpp b/core/src/fxge/ge/fx_ge_path.cpp
index c8e4f61..4f6c54c 100644
--- a/core/src/fxge/ge/fx_ge_path.cpp
+++ b/core/src/fxge/ge/fx_ge_path.cpp
@@ -4,8 +4,8 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../../include/fxcrt/fx_system.h"
-#include "../../../include/fxge/fx_ge.h"
+#include "core/include/fxcrt/fx_system.h"
+#include "core/include/fxge/fx_ge.h"
 #include "third_party/base/numerics/safe_math.h"
 
 CFX_ClipRgn::CFX_ClipRgn(int width, int height) {
diff --git a/core/src/fxge/ge/fx_ge_ps.cpp b/core/src/fxge/ge/fx_ge_ps.cpp
index dacec04..018a600 100644
--- a/core/src/fxge/ge/fx_ge_ps.cpp
+++ b/core/src/fxge/ge/fx_ge_ps.cpp
@@ -4,9 +4,10 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../../include/fxge/fx_ge.h"
-#include "../../../include/fxcodec/fx_codec.h"
+#include "core/include/fxge/fx_ge.h"
+#include "core/include/fxcodec/fx_codec.h"
 #include "text_int.h"
+
 struct PSGlyph {
   CFX_Font* m_pFont;
   FX_DWORD m_GlyphIndex;
diff --git a/core/src/fxge/ge/fx_ge_text.cpp b/core/src/fxge/ge/fx_ge_text.cpp
index 2b8128d..a8e7bb8 100644
--- a/core/src/fxge/ge/fx_ge_text.cpp
+++ b/core/src/fxge/ge/fx_ge_text.cpp
@@ -4,10 +4,11 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../../include/fxge/fx_ge.h"
-#include "../../../include/fxge/fx_freetype.h"
-#include "../../../include/fxcodec/fx_codec.h"
+#include "core/include/fxge/fx_ge.h"
+#include "core/include/fxge/fx_freetype.h"
+#include "core/include/fxcodec/fx_codec.h"
 #include "text_int.h"
+
 #undef FX_GAMMA
 #undef FX_GAMMA_INVERSE
 #define FX_GAMMA(value) (value)
diff --git a/core/src/fxge/ge/text_int.h b/core/src/fxge/ge/text_int.h
index e3bfb5b..f17cf7f 100644
--- a/core/src/fxge/ge/text_int.h
+++ b/core/src/fxge/ge/text_int.h
@@ -7,7 +7,8 @@
 #ifndef CORE_SRC_FXGE_GE_TEXT_INT_H_
 #define CORE_SRC_FXGE_GE_TEXT_INT_H_
 
-#include "../../../include/fxge/fx_freetype.h"
+#include "core/include/fxge/fx_font.h"
+#include "core/include/fxge/fx_freetype.h"
 
 struct _CFX_UniqueKeyGen {
   void Generate(int count, ...);
diff --git a/core/src/fxge/skia/fx_skia_blitter_new.cpp b/core/src/fxge/skia/fx_skia_blitter_new.cpp
index a3ed75b..ed7b1c7 100644
--- a/core/src/fxge/skia/fx_skia_blitter_new.cpp
+++ b/core/src/fxge/skia/fx_skia_blitter_new.cpp
@@ -2,12 +2,14 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "../../../include/fxge/fx_ge.h"
+#include "core/include/fxge/fx_ge.h"
+
 //#define _SKIA_SUPPORT_
 #if defined(_SKIA_SUPPORT_)
-#include "../../../include/fxcodec/fx_codec.h"
 #include "SkBlitter.h"
+#include "core/include/fxcodec/fx_codec.h"
 #include "fx_skia_blitter_new.h"
+
 // We use our own renderer here to make it simple
 void CFX_SkiaRenderer::blitAntiH(int x,
                                  int y,
diff --git a/core/src/fxge/skia/fx_skia_device.cpp b/core/src/fxge/skia/fx_skia_device.cpp
index fcd8e98..7cce7b3 100644
--- a/core/src/fxge/skia/fx_skia_device.cpp
+++ b/core/src/fxge/skia/fx_skia_device.cpp
@@ -2,13 +2,20 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "../../../include/fxge/fx_ge.h"
-//#define _SKIA_SUPPORT_
-#if defined(_SKIA_SUPPORT_)
-#include "../../../include/fxcodec/fx_codec.h"
+#include "core/include/fxge/fx_ge.h"
 
-//#define _FOXIT_DEBUG_
-//#define _FOXIT_BENCHMARK_
+#if defined(_SKIA_SUPPORT_)
+#include "core/include/fxcodec/fx_codec.h"
+
+#include "SkDashPathEffect.h"
+#include "SkTLazy.h"
+#include "SkScan.h"
+#include "SkRasterClip.h"
+#include "SkStroke.h"
+
+#include "core/src/fxge/agg/include/fx_agg_driver.h"
+#include "fx_skia_blitter_new.h"
+#include "fx_skia_device.h"
 
 extern "C" {
 extern void FX_OUTPUT_LOG_FUNC(const char*, ...);
@@ -31,15 +38,6 @@
 #define FOXIT_DEBUG5(msg, para1, para2, para3, param4)
 #endif
 
-#include "SkDashPathEffect.h"
-#include "SkTLazy.h"
-#include "SkScan.h"
-#include "SkRasterClip.h"
-#include "SkStroke.h"
-
-#include "fx_skia_blitter_new.h"
-#include "../agg/fx_agg_driver.h"
-#include "fx_skia_device.h"
 /// Run-length-encoded supersampling antialiased blitter.
 class SuperBlitter_skia {
  public:
diff --git a/core/src/fxge/win32/fx_win32_device.cpp b/core/src/fxge/win32/fx_win32_device.cpp
index a32f9ad..696e5f0 100644
--- a/core/src/fxge/win32/fx_win32_device.cpp
+++ b/core/src/fxge/win32/fx_win32_device.cpp
@@ -4,17 +4,17 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../../include/fxge/fx_ge.h"
+#include "core/include/fxge/fx_ge.h"
 
 #if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_DESKTOP_
 #include <crtdbg.h>
 
-#include "../../../include/fxcodec/fx_codec.h"
-#include "../../../include/fxge/fx_freetype.h"
-#include "../../../include/fxge/fx_ge_win32.h"
-#include "../agg/include/fx_agg_driver.h"
 #include "../dib/dib_int.h"
 #include "../ge/text_int.h"
+#include "core/include/fxcodec/fx_codec.h"
+#include "core/include/fxge/fx_freetype.h"
+#include "core/include/fxge/fx_ge_win32.h"
+#include "core/src/fxge/agg/include/fx_agg_driver.h"
 #include "dwrite_int.h"
 #include "win32_int.h"
 
diff --git a/core/src/fxge/win32/fx_win32_dib.cpp b/core/src/fxge/win32/fx_win32_dib.cpp
index b1ffe80..1aa60f0 100644
--- a/core/src/fxge/win32/fx_win32_dib.cpp
+++ b/core/src/fxge/win32/fx_win32_dib.cpp
@@ -4,11 +4,14 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../../include/fxge/fx_ge.h"
+#include "core/include/fxge/fx_ge.h"
+
 #if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_DESKTOP_
 #include <windows.h>
-#include "../../../include/fxge/fx_ge_win32.h"
+
+#include "core/include/fxge/fx_ge_win32.h"
 #include "win32_int.h"
+
 CFX_ByteString CFX_WindowsDIB::GetBitmapInfo(const CFX_DIBitmap* pBitmap) {
   CFX_ByteString result;
   int len = sizeof(BITMAPINFOHEADER);
diff --git a/core/src/fxge/win32/fx_win32_dwrite.cpp b/core/src/fxge/win32/fx_win32_dwrite.cpp
index 0a78dbf..0d53343 100644
--- a/core/src/fxge/win32/fx_win32_dwrite.cpp
+++ b/core/src/fxge/win32/fx_win32_dwrite.cpp
@@ -4,11 +4,14 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../../include/fxge/fx_ge.h"
+#include "core/include/fxge/fx_ge.h"
+
 #if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_DESKTOP_
-#include "../../../include/fxge/fx_ge_win32.h"
-#include "dwrite_int.h"
 #include <dwrite.h>
+
+#include "core/include/fxge/fx_ge_win32.h"
+#include "dwrite_int.h"
+
 typedef HRESULT(__stdcall* FuncType_DWriteCreateFactory)(
     __in DWRITE_FACTORY_TYPE,
     __in REFIID,
diff --git a/core/src/fxge/win32/fx_win32_gdipext.cpp b/core/src/fxge/win32/fx_win32_gdipext.cpp
index 42f8a4a..368b15f 100644
--- a/core/src/fxge/win32/fx_win32_gdipext.cpp
+++ b/core/src/fxge/win32/fx_win32_gdipext.cpp
@@ -4,7 +4,7 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../../include/fxge/fx_ge.h"
+#include "core/include/fxge/fx_ge.h"
 
 #if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_DESKTOP_
 #include <windows.h>
@@ -16,7 +16,7 @@
 }  // namespace Gdiplus
 
 #include <gdiplus.h>
-#include "../../../include/fxge/fx_ge_win32.h"
+#include "core/include/fxge/fx_ge_win32.h"
 #include "win32_int.h"
 
 using namespace Gdiplus;
diff --git a/core/src/fxge/win32/fx_win32_print.cpp b/core/src/fxge/win32/fx_win32_print.cpp
index 0f75d49..4f17274 100644
--- a/core/src/fxge/win32/fx_win32_print.cpp
+++ b/core/src/fxge/win32/fx_win32_print.cpp
@@ -4,14 +4,18 @@
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
 
-#include "../../../include/fxge/fx_ge.h"
+#include "core/include/fxge/fx_ge.h"
+
 #if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_DESKTOP_
+
 #include <windows.h>
-#include "../../../include/fxge/fx_ge_win32.h"
-#include "win32_int.h"
-#include "../../../include/fxge/fx_freetype.h"
-#include "../ge/text_int.h"
+
 #include "../dib/dib_int.h"
+#include "../ge/text_int.h"
+#include "core/include/fxge/fx_freetype.h"
+#include "core/include/fxge/fx_ge_win32.h"
+#include "win32_int.h"
+
 #define SIZETHRESHOLD 1000
 #define OUTPUTPSLEN 4096
 CGdiPrinterDriver::CGdiPrinterDriver(HDC hDC)
diff --git a/core/src/fxge/win32/win32_int.h b/core/src/fxge/win32/win32_int.h
index 7f73fdb..95d31d1 100644
--- a/core/src/fxge/win32/win32_int.h
+++ b/core/src/fxge/win32/win32_int.h
@@ -3,10 +3,11 @@
 // found in the LICENSE file.
 
 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
 #ifndef CORE_SRC_FXGE_WIN32_WIN32_INT_H_
 #define CORE_SRC_FXGE_WIN32_WIN32_INT_H_
 
-#include "../../../include/fxge/fx_ge.h"
+#include "core/include/fxge/fx_ge.h"
 
 struct WINDIB_Open_Args_;
 class CGdiplusExt {