summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2017-02-08 11:19:39 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2017-02-08 12:33:11 +0000
commitb6f9eeb9b5c0e29ca655185dc299ebd4a2c092d7 (patch)
tree0d4fcaca0bd4b613eb841a22cc0ce4168d7e5fae
parentaf35c02a8036f789c05a60734fcf2b83b92d1bbb (diff)
external: bundle pdfium
Initial use case is to avoid creating a whole Draw document + a poppler process for each and every PDF image we load in a document. The MSVC patch is only to support MSVC 2013, as upstream already moved to MSVC 2015. Change-Id: I3c9dbac3e3de9f2e874ca4cfec0a9dd8a388b87c Reviewed-on: https://gerrit.libreoffice.org/34022 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
-rw-r--r--Makefile.fetch1
-rw-r--r--RepositoryExternal.mk11
-rw-r--r--download.lst1
-rw-r--r--external/Module_external.mk1
-rw-r--r--external/pdfium/Library_pdfium.mk633
-rw-r--r--external/pdfium/Makefile7
-rw-r--r--external/pdfium/Module_pdfium.mk17
-rw-r--r--external/pdfium/README12
-rw-r--r--external/pdfium/UnpackedTarball_pdfium.mk29
-rw-r--r--external/pdfium/msvc.patch.11344
-rw-r--r--external/pdfium/visibility.patch.130
11 files changed, 2086 insertions, 0 deletions
diff --git a/Makefile.fetch b/Makefile.fetch
index edb1fd25bf17..2544e9b88166 100644
--- a/Makefile.fetch
+++ b/Makefile.fetch
@@ -195,6 +195,7 @@ $(WORKDIR)/download: $(BUILDDIR)/config_host.mk $(SRCDIR)/download.lst $(SRCDIR)
$(call fetch_Optional,ORCUS,ORCUS_TARBALL) \
$(call fetch_Optional,OWNCLOUD_ANDROID_LIB,OWNCLOUD_ANDROID_LIB_TARBALL) \
$(call fetch_Optional,PAGEMAKER,PAGEMAKER_TARBALL) \
+ PDFIUM_TARBALL \
$(call fetch_Optional,POPPLER,POPPLER_TARBALL) \
$(call fetch_Optional,POSTGRESQL,POSTGRESQL_TARBALL) \
$(call fetch_Optional,PYTHON,PYTHON_TARBALL) \
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 78ff701df709..24f3975aa2d5 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -4058,4 +4058,15 @@ $(call gb_LinkTarget_set_include,$(1), \
$(call gb_LinkTarget_use_libraries,$(1),clew)
endef
+define gb_LinkTarget__use_pdfium
+$(call gb_LinkTarget_set_include,$(1),\
+ -I$(call gb_UnpackedTarball_get_dir,pdfium)/public \
+ $$(INCLUDE) \
+)
+$(call gb_LinkTarget_use_libraries,$(1),pdfium)
+endef
+$(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo,\
+ pdfium \
+))
+
# vim: set noet sw=4 ts=4:
diff --git a/download.lst b/download.lst
index 8d2efcf40e97..f95f05ca1d55 100644
--- a/download.lst
+++ b/download.lst
@@ -138,6 +138,7 @@ export OWNCLOUD_ANDROID_LIB_MD5SUM := 593f0aa47bf2efc0efda2d28fae063b2
export OWNCLOUD_ANDROID_LIB_TARBALL := owncloud-android-library-0.9.4-no-binary-deps.tar.gz
export PAGEMAKER_MD5SUM := 5c4985a68be0b79d3f809da5e12b143c
export PAGEMAKER_TARBALL := libpagemaker-0.0.3.tar.bz2
+export PDFIUM_TARBALL := 9ac66c71463f9440e3ccc996c5e66556-pdfium-3004.tar.bz2
export PIXMAN_TARBALL := e80ebae4da01e77f68744319f01d52a3-pixman-0.34.0.tar.gz
export PNG_MD5SUM := 897ccec1ebfb0922e83c2bfaa1be8748
export PNG_TARBALL := libpng-1.6.28.tar.gz
diff --git a/external/Module_external.mk b/external/Module_external.mk
index 610b65f07fda..44b24d75d3a3 100644
--- a/external/Module_external.mk
+++ b/external/Module_external.mk
@@ -88,6 +88,7 @@ $(eval $(call gb_Module_add_moduledirs,external,\
$(call gb_Helper_optional,ORCUS,liborcus) \
$(call gb_Helper_optional,OWNCLOUD_ANDROID_LIB,owncloud-android-lib) \
$(call gb_Helper_optional,PAGEMAKER,libpagemaker) \
+ pdfium \
$(call gb_Helper_optional,POPPLER,poppler) \
$(call gb_Helper_optional,POSTGRESQL,postgresql) \
$(call gb_Helper_optional,PYTHON,$(if $(filter $(PYTHON_VERSION_MINOR),3),python33,python3)) \
diff --git a/external/pdfium/Library_pdfium.mk b/external/pdfium/Library_pdfium.mk
new file mode 100644
index 000000000000..8c46acb87ac1
--- /dev/null
+++ b/external/pdfium/Library_pdfium.mk
@@ -0,0 +1,633 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_Library_Library,pdfium))
+
+$(eval $(call gb_Library_use_unpacked,pdfium,pdfium))
+
+$(eval $(call gb_Library_set_warnings_not_errors,pdfium))
+
+$(eval $(call gb_Library_set_include,pdfium,\
+ -I$(WORKDIR)/UnpackedTarball/pdfium \
+ $$(INCLUDE) \
+))
+
+$(eval $(call gb_Library_add_defs,pdfium,\
+ -DPDFIUM_DLLIMPLEMENTATION \
+))
+
+# Don't show warnings upstream doesn't care about.
+$(eval $(call gb_Library_add_cxxflags,pdfium,\
+ -w \
+))
+$(eval $(call gb_Library_add_cflags,pdfium,\
+ -w \
+))
+
+$(eval $(call gb_Library_set_generated_cxx_suffix,pdfium,cpp))
+
+# pdfium
+$(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
+ UnpackedTarball/pdfium/fpdfsdk/cba_annotiterator \
+ UnpackedTarball/pdfium/fpdfsdk/cfx_systemhandler \
+ UnpackedTarball/pdfium/fpdfsdk/cpdfsdk_annot \
+ UnpackedTarball/pdfium/fpdfsdk/cpdfsdk_annothandlermgr \
+ UnpackedTarball/pdfium/fpdfsdk/cpdfsdk_annotiteration \
+ UnpackedTarball/pdfium/fpdfsdk/cpdfsdk_baannot \
+ UnpackedTarball/pdfium/fpdfsdk/cpdfsdk_baannothandler \
+ UnpackedTarball/pdfium/fpdfsdk/cpdfsdk_datetime \
+ UnpackedTarball/pdfium/fpdfsdk/cpdfsdk_formfillenvironment \
+ UnpackedTarball/pdfium/fpdfsdk/cpdfsdk_interform \
+ UnpackedTarball/pdfium/fpdfsdk/cpdfsdk_pageview \
+ UnpackedTarball/pdfium/fpdfsdk/cpdfsdk_widget \
+ UnpackedTarball/pdfium/fpdfsdk/cpdfsdk_widgethandler \
+ UnpackedTarball/pdfium/fpdfsdk/fpdf_dataavail \
+ UnpackedTarball/pdfium/fpdfsdk/fpdf_ext \
+ UnpackedTarball/pdfium/fpdfsdk/fpdf_flatten \
+ UnpackedTarball/pdfium/fpdfsdk/fpdf_progressive \
+ UnpackedTarball/pdfium/fpdfsdk/fpdf_searchex \
+ UnpackedTarball/pdfium/fpdfsdk/fpdf_structtree \
+ UnpackedTarball/pdfium/fpdfsdk/fpdf_sysfontinfo \
+ UnpackedTarball/pdfium/fpdfsdk/fpdf_transformpage \
+ UnpackedTarball/pdfium/fpdfsdk/fpdfdoc \
+ UnpackedTarball/pdfium/fpdfsdk/fpdfeditimg \
+ UnpackedTarball/pdfium/fpdfsdk/fpdfeditpage \
+ UnpackedTarball/pdfium/fpdfsdk/fpdfformfill \
+ UnpackedTarball/pdfium/fpdfsdk/fpdfppo \
+ UnpackedTarball/pdfium/fpdfsdk/fpdfsave \
+ UnpackedTarball/pdfium/fpdfsdk/fpdftext \
+ UnpackedTarball/pdfium/fpdfsdk/fpdfview \
+ UnpackedTarball/pdfium/fpdfsdk/fsdk_actionhandler \
+ UnpackedTarball/pdfium/fpdfsdk/fsdk_pauseadapter \
+ UnpackedTarball/pdfium/fpdfsdk/pdfsdk_fieldaction \
+))
+
+# fdrm
+$(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
+ UnpackedTarball/pdfium/core/fdrm/crypto/fx_crypt \
+ UnpackedTarball/pdfium/core/fdrm/crypto/fx_crypt_aes \
+ UnpackedTarball/pdfium/core/fdrm/crypto/fx_crypt_sha \
+))
+
+# formfiller
+$(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
+ UnpackedTarball/pdfium/fpdfsdk/formfiller/cba_fontmap \
+ UnpackedTarball/pdfium/fpdfsdk/formfiller/cffl_checkbox \
+ UnpackedTarball/pdfium/fpdfsdk/formfiller/cffl_combobox \
+ UnpackedTarball/pdfium/fpdfsdk/formfiller/cffl_formfiller \
+ UnpackedTarball/pdfium/fpdfsdk/formfiller/cffl_interactiveformfiller \
+ UnpackedTarball/pdfium/fpdfsdk/formfiller/cffl_listbox \
+ UnpackedTarball/pdfium/fpdfsdk/formfiller/cffl_pushbutton \
+ UnpackedTarball/pdfium/fpdfsdk/formfiller/cffl_radiobutton \
+ UnpackedTarball/pdfium/fpdfsdk/formfiller/cffl_textfield \
+))
+
+# fpdfapi
+$(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
+ UnpackedTarball/pdfium/core/fpdfapi/cmaps/CNS1/Adobe-CNS1-UCS2_5 \
+ UnpackedTarball/pdfium/core/fpdfapi/cmaps/CNS1/B5pc-H_0 \
+ UnpackedTarball/pdfium/core/fpdfapi/cmaps/CNS1/B5pc-V_0 \
+ UnpackedTarball/pdfium/core/fpdfapi/cmaps/CNS1/CNS-EUC-H_0 \
+ UnpackedTarball/pdfium/core/fpdfapi/cmaps/CNS1/CNS-EUC-V_0 \
+ UnpackedTarball/pdfium/core/fpdfapi/cmaps/CNS1/ETen-B5-H_0 \
+ UnpackedTarball/pdfium/core/fpdfapi/cmaps/CNS1/ETen-B5-V_0 \
+ UnpackedTarball/pdfium/core/fpdfapi/cmaps/CNS1/ETenms-B5-H_0 \
+ UnpackedTarball/pdfium/core/fpdfapi/cmaps/CNS1/ETenms-B5-V_0 \
+ UnpackedTarball/pdfium/core/fpdfapi/cmaps/CNS1/HKscs-B5-H_5 \
+ UnpackedTarball/pdfium/core/fpdfapi/cmaps/CNS1/HKscs-B5-V_5 \
+ UnpackedTarball/pdfium/core/fpdfapi/cmaps/CNS1/UniCNS-UCS2-H_3 \
+ UnpackedTarball/pdfium/core/fpdfapi/cmaps/CNS1/UniCNS-UCS2-V_3 \
+ UnpackedTarball/pdfium/core/fpdfapi/cmaps/CNS1/UniCNS-UTF16-H_0 \
+ UnpackedTarball/pdfium/core/fpdfapi/cmaps/CNS1/cmaps_cns1 \
+ UnpackedTarball/pdfium/core/fpdfapi/cmaps/GB1/Adobe-GB1-UCS2_5 \
+ UnpackedTarball/pdfium/core/fpdfapi/cmaps/GB1/GB-EUC-H_0 \
+ UnpackedTarball/pdfium/core/fpdfapi/cmaps/GB1/GB-EUC-V_0 \
+ UnpackedTarball/pdfium/core/fpdfapi/cmaps/GB1/GBK-EUC-H_2 \
+ UnpackedTarball/pdfium/core/fpdfapi/cmaps/GB1/GBK-EUC-V_2 \
+ UnpackedTarball/pdfium/core/fpdfapi/cmaps/GB1/GBK2K-H_5 \
+ UnpackedTarball/pdfium/core/fpdfapi/cmaps/GB1/GBK2K-V_5 \
+ UnpackedTarball/pdfium/core/fpdfapi/cmaps/GB1/GBKp-EUC-H_2 \
+ UnpackedTarball/pdfium/core/fpdfapi/cmaps/GB1/GBKp-EUC-V_2 \
+ UnpackedTarball/pdfium/core/fpdfapi/cmaps/GB1/GBpc-EUC-H_0 \
+ UnpackedTarball/pdfium/core/fpdfapi/cmaps/GB1/GBpc-EUC-V_0 \
+ UnpackedTarball/pdfium/core/fpdfapi/cmaps/GB1/UniGB-UCS2-H_4 \
+ UnpackedTarball/pdfium/core/fpdfapi/cmaps/GB1/UniGB-UCS2-V_4 \
+ UnpackedTarball/pdfium/core/fpdfapi/cmaps/GB1/cmaps_gb1 \
+ UnpackedTarball/pdfium/core/fpdfapi/cmaps/Japan1/83pv-RKSJ-H_1 \
+ UnpackedTarball/pdfium/core/fpdfapi/cmaps/Japan1/90ms-RKSJ-H_2 \
+ UnpackedTarball/pdfium/core/fpdfapi/cmaps/Japan1/90ms-RKSJ-V_2 \
+ UnpackedTarball/pdfium/core/fpdfapi/cmaps/Japan1/90msp-RKSJ-H_2 \
+ UnpackedTarball/pdfium/core/fpdfapi/cmaps/Japan1/90msp-RKSJ-V_2 \
+ UnpackedTarball/pdfium/core/fpdfapi/cmaps/Japan1/90pv-RKSJ-H_1 \
+ UnpackedTarball/pdfium/core/fpdfapi/cmaps/Japan1/Add-RKSJ-H_1 \
+ UnpackedTarball/pdfium/core/fpdfapi/cmaps/Japan1/Add-RKSJ-V_1 \
+ UnpackedTarball/pdfium/core/fpdfapi/cmaps/Japan1/Adobe-Japan1-UCS2_4 \
+ UnpackedTarball/pdfium/core/fpdfapi/cmaps/Japan1/EUC-H_1 \
+ UnpackedTarball/pdfium/core/fpdfapi/cmaps/Japan1/EUC-V_1 \
+ UnpackedTarball/pdfium/core/fpdfapi/cmaps/Japan1/Ext-RKSJ-H_2 \
+ UnpackedTarball/pdfium/core/fpdfapi/cmaps/Japan1/Ext-RKSJ-V_2 \
+ UnpackedTarball/pdfium/core/fpdfapi/cmaps/Japan1/H_1 \
+ UnpackedTarball/pdfium/core/fpdfapi/cmaps/Japan1/UniJIS-UCS2-HW-H_4 \
+ UnpackedTarball/pdfium/core/fpdfapi/cmaps/Japan1/UniJIS-UCS2-HW-V_4 \
+ UnpackedTarball/pdfium/core/fpdfapi/cmaps/Japan1/UniJIS-UCS2-H_4 \
+ UnpackedTarball/pdfium/core/fpdfapi/cmaps/Japan1/UniJIS-UCS2-V_4 \
+ UnpackedTarball/pdfium/core/fpdfapi/cmaps/Japan1/V_1 \
+ UnpackedTarball/pdfium/core/fpdfapi/cmaps/Japan1/cmaps_japan1 \
+ UnpackedTarball/pdfium/core/fpdfapi/cmaps/Korea1/Adobe-Korea1-UCS2_2 \
+ UnpackedTarball/pdfium/core/fpdfapi/cmaps/Korea1/KSC-EUC-H_0 \
+ UnpackedTarball/pdfium/core/fpdfapi/cmaps/Korea1/KSC-EUC-V_0 \
+ UnpackedTarball/pdfium/core/fpdfapi/cmaps/Korea1/KSCms-UHC-HW-H_1 \
+ UnpackedTarball/pdfium/core/fpdfapi/cmaps/Korea1/KSCms-UHC-HW-V_1 \
+ UnpackedTarball/pdfium/core/fpdfapi/cmaps/Korea1/KSCms-UHC-H_1 \
+ UnpackedTarball/pdfium/core/fpdfapi/cmaps/Korea1/KSCms-UHC-V_1 \
+ UnpackedTarball/pdfium/core/fpdfapi/cmaps/Korea1/KSCpc-EUC-H_0 \
+ UnpackedTarball/pdfium/core/fpdfapi/cmaps/Korea1/UniKS-UCS2-H_1 \
+ UnpackedTarball/pdfium/core/fpdfapi/cmaps/Korea1/UniKS-UCS2-V_1 \
+ UnpackedTarball/pdfium/core/fpdfapi/cmaps/Korea1/UniKS-UTF16-H_0 \
+ UnpackedTarball/pdfium/core/fpdfapi/cmaps/Korea1/cmaps_korea1 \
+ UnpackedTarball/pdfium/core/fpdfapi/cmaps/fpdf_cmaps \
+ UnpackedTarball/pdfium/core/fpdfapi/cpdf_modulemgr \
+ UnpackedTarball/pdfium/core/fpdfapi/cpdf_pagerendercontext \
+ UnpackedTarball/pdfium/core/fpdfapi/edit/cpdf_pagecontentgenerator \
+ UnpackedTarball/pdfium/core/fpdfapi/edit/fpdf_edit_create \
+ UnpackedTarball/pdfium/core/fpdfapi/font/cpdf_cidfont \
+ UnpackedTarball/pdfium/core/fpdfapi/font/cpdf_font \
+ UnpackedTarball/pdfium/core/fpdfapi/font/cpdf_fontencoding \
+ UnpackedTarball/pdfium/core/fpdfapi/font/cpdf_simplefont \
+ UnpackedTarball/pdfium/core/fpdfapi/font/cpdf_truetypefont \
+ UnpackedTarball/pdfium/core/fpdfapi/font/cpdf_type1font \
+ UnpackedTarball/pdfium/core/fpdfapi/font/cpdf_type3char \
+ UnpackedTarball/pdfium/core/fpdfapi/font/cpdf_type3font \
+ UnpackedTarball/pdfium/core/fpdfapi/font/fpdf_font \
+ UnpackedTarball/pdfium/core/fpdfapi/font/fpdf_font_cid \
+ UnpackedTarball/pdfium/core/fpdfapi/font/ttgsubtable \
+ UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_allstates \
+ UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_clippath \
+ UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_color \
+ UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_colorspace \
+ UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_colorstate \
+ UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_contentmark \
+ UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_contentmarkitem \
+ UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_contentparser \
+ UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_docpagedata \
+ UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_form \
+ UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_formobject \
+ UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_generalstate \
+ UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_graphicstates \
+ UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_image \
+ UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_imageobject \
+ UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_meshstream \
+ UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_page \
+ UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_pagemodule \
+ UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_pageobject \
+ UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_pageobjectholder \
+ UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_pageobjectlist \
+ UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_path \
+ UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_pathobject \
+ UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_pattern \
+ UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_shadingobject \
+ UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_shadingpattern \
+ UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_streamcontentparser \
+ UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_streamparser \
+ UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_textobject \
+ UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_textstate \
+ UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_tilingpattern \
+ UnpackedTarball/pdfium/core/fpdfapi/page/fpdf_page_colors \
+ UnpackedTarball/pdfium/core/fpdfapi/page/fpdf_page_func \
+ UnpackedTarball/pdfium/core/fpdfapi/parser/cfdf_document \
+ UnpackedTarball/pdfium/core/fpdfapi/parser/cpdf_array \
+ UnpackedTarball/pdfium/core/fpdfapi/parser/cpdf_boolean \
+ UnpackedTarball/pdfium/core/fpdfapi/parser/cpdf_crypto_handler \
+ UnpackedTarball/pdfium/core/fpdfapi/parser/cpdf_data_avail \
+ UnpackedTarball/pdfium/core/fpdfapi/parser/cpdf_dictionary \
+ UnpackedTarball/pdfium/core/fpdfapi/parser/cpdf_document \
+ UnpackedTarball/pdfium/core/fpdfapi/parser/cpdf_hint_tables \
+ UnpackedTarball/pdfium/core/fpdfapi/parser/cpdf_indirect_object_holder \
+ UnpackedTarball/pdfium/core/fpdfapi/parser/cpdf_linearized_header \
+ UnpackedTarball/pdfium/core/fpdfapi/parser/cpdf_name \
+ UnpackedTarball/pdfium/core/fpdfapi/parser/cpdf_null \
+ UnpackedTarball/pdfium/core/fpdfapi/parser/cpdf_number \
+ UnpackedTarball/pdfium/core/fpdfapi/parser/cpdf_object \
+ UnpackedTarball/pdfium/core/fpdfapi/parser/cpdf_parser \
+ UnpackedTarball/pdfium/core/fpdfapi/parser/cpdf_reference \
+ UnpackedTarball/pdfium/core/fpdfapi/parser/cpdf_security_handler \
+ UnpackedTarball/pdfium/core/fpdfapi/parser/cpdf_simple_parser \
+ UnpackedTarball/pdfium/core/fpdfapi/parser/cpdf_stream \
+ UnpackedTarball/pdfium/core/fpdfapi/parser/cpdf_stream_acc \
+ UnpackedTarball/pdfium/core/fpdfapi/parser/cpdf_string \
+ UnpackedTarball/pdfium/core/fpdfapi/parser/cpdf_syntax_parser \
+ UnpackedTarball/pdfium/core/fpdfapi/parser/fpdf_parser_decode \
+ UnpackedTarball/pdfium/core/fpdfapi/parser/fpdf_parser_utility \
+ UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_charposlist \
+ UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_devicebuffer \
+ UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_dibsource \
+ UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_dibtransferfunc \
+ UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_docrenderdata \
+ UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_imagecacheentry \
+ UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_imageloader \
+ UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_imagerenderer \
+ UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_pagerendercache \
+ UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_progressiverenderer \
+ UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_rendercontext \
+ UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_renderoptions \
+ UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_renderstatus \
+ UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_scaledrenderbuffer \
+ UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_textrenderer \
+ UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_transferfunc \
+ UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_type3cache \
+ UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_type3glyphs \
+))
+
+# fpdfdoc
+$(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
+ UnpackedTarball/pdfium/core/fpdfdoc/cline \
+ UnpackedTarball/pdfium/core/fpdfdoc/clines \
+ UnpackedTarball/pdfium/core/fpdfdoc/cpdf_aaction \
+ UnpackedTarball/pdfium/core/fpdfdoc/cpdf_action \
+ UnpackedTarball/pdfium/core/fpdfdoc/cpdf_actionfields \
+ UnpackedTarball/pdfium/core/fpdfdoc/cpdf_annot \
+ UnpackedTarball/pdfium/core/fpdfdoc/cpdf_annotlist \
+ UnpackedTarball/pdfium/core/fpdfdoc/cpdf_apsettings \
+ UnpackedTarball/pdfium/core/fpdfdoc/cpdf_bookmark \
+ UnpackedTarball/pdfium/core/fpdfdoc/cpdf_bookmarktree \
+ UnpackedTarball/pdfium/core/fpdfdoc/cpdf_defaultappearance \
+ UnpackedTarball/pdfium/core/fpdfdoc/cpdf_dest \
+ UnpackedTarball/pdfium/core/fpdfdoc/cpdf_docjsactions \
+ UnpackedTarball/pdfium/core/fpdfdoc/cpdf_filespec \
+ UnpackedTarball/pdfium/core/fpdfdoc/cpdf_formcontrol \
+ UnpackedTarball/pdfium/core/fpdfdoc/cpdf_formfield \
+ UnpackedTarball/pdfium/core/fpdfdoc/cpdf_iconfit \
+ UnpackedTarball/pdfium/core/fpdfdoc/cpdf_interform \
+ UnpackedTarball/pdfium/core/fpdfdoc/cpdf_link \
+ UnpackedTarball/pdfium/core/fpdfdoc/cpdf_linklist \
+ UnpackedTarball/pdfium/core/fpdfdoc/cpdf_metadata \
+ UnpackedTarball/pdfium/core/fpdfdoc/cpdf_nametree \
+ UnpackedTarball/pdfium/core/fpdfdoc/cpdf_numbertree \
+ UnpackedTarball/pdfium/core/fpdfdoc/cpdf_occontext \
+ UnpackedTarball/pdfium/core/fpdfdoc/cpdf_pagelabel \
+ UnpackedTarball/pdfium/core/fpdfdoc/cpdf_variabletext \
+ UnpackedTarball/pdfium/core/fpdfdoc/cpdf_viewerpreferences \
+ UnpackedTarball/pdfium/core/fpdfdoc/cpvt_color \
+ UnpackedTarball/pdfium/core/fpdfdoc/cpvt_fontmap \
+ UnpackedTarball/pdfium/core/fpdfdoc/cpvt_generateap \
+ UnpackedTarball/pdfium/core/fpdfdoc/cpvt_sectioninfo \
+ UnpackedTarball/pdfium/core/fpdfdoc/cpvt_wordinfo \
+ UnpackedTarball/pdfium/core/fpdfdoc/csection \
+ UnpackedTarball/pdfium/core/fpdfdoc/ctypeset \
+ UnpackedTarball/pdfium/core/fpdfdoc/doc_tagged \
+))
+
+# fpdftext
+$(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
+ UnpackedTarball/pdfium/core/fpdftext/cpdf_linkextract \
+ UnpackedTarball/pdfium/core/fpdftext/cpdf_textpage \
+ UnpackedTarball/pdfium/core/fpdftext/cpdf_textpagefind \
+ UnpackedTarball/pdfium/core/fpdftext/unicodenormalizationdata \
+))
+
+# fxcodec
+$(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
+ UnpackedTarball/pdfium/core/fxcodec/codec/fx_codec \
+ UnpackedTarball/pdfium/core/fxcodec/codec/fx_codec_fax \
+ UnpackedTarball/pdfium/core/fxcodec/codec/fx_codec_flate \
+ UnpackedTarball/pdfium/core/fxcodec/codec/fx_codec_icc \
+ UnpackedTarball/pdfium/core/fxcodec/codec/fx_codec_jbig \
+ UnpackedTarball/pdfium/core/fxcodec/codec/fx_codec_jpeg \
+ UnpackedTarball/pdfium/core/fxcodec/codec/fx_codec_jpx_opj \
+ UnpackedTarball/pdfium/core/fxcodec/jbig2/JBig2_ArithDecoder \
+ UnpackedTarball/pdfium/core/fxcodec/jbig2/JBig2_ArithIntDecoder \
+ UnpackedTarball/pdfium/core/fxcodec/jbig2/JBig2_BitStream \
+ UnpackedTarball/pdfium/core/fxcodec/jbig2/JBig2_Context \
+ UnpackedTarball/pdfium/core/fxcodec/jbig2/JBig2_GrdProc \
+ UnpackedTarball/pdfium/core/fxcodec/jbig2/JBig2_GrrdProc \
+ UnpackedTarball/pdfium/core/fxcodec/jbig2/JBig2_GsidProc \
+ UnpackedTarball/pdfium/core/fxcodec/jbig2/JBig2_HtrdProc \
+ UnpackedTarball/pdfium/core/fxcodec/jbig2/JBig2_HuffmanDecoder \
+ UnpackedTarball/pdfium/core/fxcodec/jbig2/JBig2_HuffmanTable \
+ UnpackedTarball/pdfium/core/fxcodec/jbig2/JBig2_HuffmanTable_Standard \
+ UnpackedTarball/pdfium/core/fxcodec/jbig2/JBig2_Image \
+ UnpackedTarball/pdfium/core/fxcodec/jbig2/JBig2_PatternDict \
+ UnpackedTarball/pdfium/core/fxcodec/jbig2/JBig2_PddProc \
+ UnpackedTarball/pdfium/core/fxcodec/jbig2/JBig2_SddProc \
+ UnpackedTarball/pdfium/core/fxcodec/jbig2/JBig2_Segment \
+ UnpackedTarball/pdfium/core/fxcodec/jbig2/JBig2_SymbolDict \
+ UnpackedTarball/pdfium/core/fxcodec/jbig2/JBig2_TrdProc \
+))
+
+# fxcrt
+$(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
+ UnpackedTarball/pdfium/core/fxcrt/fx_basic_array \
+ UnpackedTarball/pdfium/core/fxcrt/fx_basic_bstring \
+ UnpackedTarball/pdfium/core/fxcrt/fx_basic_buffer \
+ UnpackedTarball/pdfium/core/fxcrt/fx_basic_coords \
+ UnpackedTarball/pdfium/core/fxcrt/fx_basic_gcc \
+ UnpackedTarball/pdfium/core/fxcrt/fx_basic_memmgr \
+ UnpackedTarball/pdfium/core/fxcrt/fx_basic_utf \
+ UnpackedTarball/pdfium/core/fxcrt/fx_basic_util \
+ UnpackedTarball/pdfium/core/fxcrt/fx_basic_wstring \
+ UnpackedTarball/pdfium/core/fxcrt/fx_bidi \
+ UnpackedTarball/pdfium/core/fxcrt/fx_extension \
+ UnpackedTarball/pdfium/core/fxcrt/fx_ucddata \
+ UnpackedTarball/pdfium/core/fxcrt/fx_unicode \
+ UnpackedTarball/pdfium/core/fxcrt/fx_xml_composer \
+ UnpackedTarball/pdfium/core/fxcrt/fx_xml_parser \
+ UnpackedTarball/pdfium/core/fxcrt/fxcrt_posix \
+ UnpackedTarball/pdfium/core/fxcrt/fxcrt_stream \
+ UnpackedTarball/pdfium/core/fxcrt/fxcrt_windows \
+))
+
+# fxedit
+$(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
+ UnpackedTarball/pdfium/fpdfsdk/fxedit/fxet_ap \
+ UnpackedTarball/pdfium/fpdfsdk/fxedit/fxet_edit \
+ UnpackedTarball/pdfium/fpdfsdk/fxedit/fxet_list \
+))
+
+# fxge
+$(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
+ UnpackedTarball/pdfium/core/fxge/dib/fx_dib_composite \
+ UnpackedTarball/pdfium/core/fxge/dib/fx_dib_convert \
+ UnpackedTarball/pdfium/core/fxge/dib/fx_dib_engine \
+ UnpackedTarball/pdfium/core/fxge/dib/fx_dib_main \
+ UnpackedTarball/pdfium/core/fxge/dib/fx_dib_transform \
+ UnpackedTarball/pdfium/core/fxge/fontdata/chromefontdata/FoxitDingbats \
+ UnpackedTarball/pdfium/core/fxge/fontdata/chromefontdata/FoxitFixed \
+ UnpackedTarball/pdfium/core/fxge/fontdata/chromefontdata/FoxitFixedBold \
+ UnpackedTarball/pdfium/core/fxge/fontdata/chromefontdata/FoxitFixedBoldItalic \
+ UnpackedTarball/pdfium/core/fxge/fontdata/chromefontdata/FoxitFixedItalic \
+ UnpackedTarball/pdfium/core/fxge/fontdata/chromefontdata/FoxitSans \
+ UnpackedTarball/pdfium/core/fxge/fontdata/chromefontdata/FoxitSansBold \
+ UnpackedTarball/pdfium/core/fxge/fontdata/chromefontdata/FoxitSansBoldItalic \
+ UnpackedTarball/pdfium/core/fxge/fontdata/chromefontdata/FoxitSansItalic \
+ UnpackedTarball/pdfium/core/fxge/fontdata/chromefontdata/FoxitSansMM \
+ UnpackedTarball/pdfium/core/fxge/fontdata/chromefontdata/FoxitSerif \
+ UnpackedTarball/pdfium/core/fxge/fontdata/chromefontdata/FoxitSerifBold \
+ UnpackedTarball/pdfium/core/fxge/fontdata/chromefontdata/FoxitSerifBoldItalic \
+ UnpackedTarball/pdfium/core/fxge/fontdata/chromefontdata/FoxitSerifItalic \
+ UnpackedTarball/pdfium/core/fxge/fontdata/chromefontdata/FoxitSerifMM \
+ UnpackedTarball/pdfium/core/fxge/fontdata/chromefontdata/FoxitSymbol \
+ UnpackedTarball/pdfium/core/fxge/freetype/fx_freetype \
+ UnpackedTarball/pdfium/core/fxge/ge/cfx_cliprgn \
+ UnpackedTarball/pdfium/core/fxge/ge/cfx_facecache \
+ UnpackedTarball/pdfium/core/fxge/ge/cfx_folderfontinfo \
+ UnpackedTarball/pdfium/core/fxge/ge/cfx_font \
+ UnpackedTarball/pdfium/core/fxge/ge/cfx_fontcache \
+ UnpackedTarball/pdfium/core/fxge/ge/cfx_fontmapper \
+ UnpackedTarball/pdfium/core/fxge/ge/cfx_fontmgr \
+ UnpackedTarball/pdfium/core/fxge/ge/cfx_gemodule \
+ UnpackedTarball/pdfium/core/fxge/ge/cfx_graphstate \
+ UnpackedTarball/pdfium/core/fxge/ge/cfx_graphstatedata \
+ UnpackedTarball/pdfium/core/fxge/ge/cfx_pathdata \
+ UnpackedTarball/pdfium/core/fxge/ge/cfx_renderdevice \
+ UnpackedTarball/pdfium/core/fxge/ge/cfx_substfont \
+ UnpackedTarball/pdfium/core/fxge/ge/cfx_unicodeencoding \
+ UnpackedTarball/pdfium/core/fxge/ge/cttfontdesc \
+ UnpackedTarball/pdfium/core/fxge/ge/fx_ge_fontmap \
+ UnpackedTarball/pdfium/core/fxge/ge/fx_ge_linux \
+ UnpackedTarball/pdfium/core/fxge/ge/fx_ge_text \
+ UnpackedTarball/pdfium/core/fxge/ifx_renderdevicedriver \
+ UnpackedTarball/pdfium/core/fxge/agg/fx_agg_driver \
+))
+
+# javascript, build with pdf_enable_v8 disabled.
+$(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
+ UnpackedTarball/pdfium/fpdfsdk/javascript/JS_Runtime_Stub \
+))
+
+# pdfwindow
+$(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
+ UnpackedTarball/pdfium/fpdfsdk/pdfwindow/PWL_Button \
+ UnpackedTarball/pdfium/fpdfsdk/pdfwindow/PWL_Caret \
+ UnpackedTarball/pdfium/fpdfsdk/pdfwindow/PWL_ComboBox \
+ UnpackedTarball/pdfium/fpdfsdk/pdfwindow/PWL_Edit \
+ UnpackedTarball/pdfium/fpdfsdk/pdfwindow/PWL_EditCtrl \
+ UnpackedTarball/pdfium/fpdfsdk/pdfwindow/PWL_FontMap \
+ UnpackedTarball/pdfium/fpdfsdk/pdfwindow/PWL_Icon \
+ UnpackedTarball/pdfium/fpdfsdk/pdfwindow/PWL_ListBox \
+ UnpackedTarball/pdfium/fpdfsdk/pdfwindow/PWL_ScrollBar \
+ UnpackedTarball/pdfium/fpdfsdk/pdfwindow/PWL_SpecialButton \
+ UnpackedTarball/pdfium/fpdfsdk/pdfwindow/PWL_Utils \
+ UnpackedTarball/pdfium/fpdfsdk/pdfwindow/PWL_Wnd \
+))
+
+# third_party/bigint
+$(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
+ UnpackedTarball/pdfium/third_party/bigint/BigInteger \
+ UnpackedTarball/pdfium/third_party/bigint/BigIntegerUtils \
+ UnpackedTarball/pdfium/third_party/bigint/BigUnsigned \
+ UnpackedTarball/pdfium/third_party/bigint/BigUnsignedInABase \
+))
+
+# third_party/fx_agg
+$(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
+ UnpackedTarball/pdfium/third_party/agg23/agg_curves \
+ UnpackedTarball/pdfium/third_party/agg23/agg_path_storage \
+ UnpackedTarball/pdfium/third_party/agg23/agg_rasterizer_scanline_aa \
+ UnpackedTarball/pdfium/third_party/agg23/agg_vcgen_dash \
+ UnpackedTarball/pdfium/third_party/agg23/agg_vcgen_stroke \
+))
+
+# third_party/fx_lcms2
+$(eval $(call gb_Library_add_generated_cobjects,pdfium,\
+ UnpackedTarball/pdfium/third_party/lcms2-2.6/src/cmscam02 \
+ UnpackedTarball/pdfium/third_party/lcms2-2.6/src/cmscgats \
+ UnpackedTarball/pdfium/third_party/lcms2-2.6/src/cmscnvrt \
+ UnpackedTarball/pdfium/third_party/lcms2-2.6/src/cmserr \
+ UnpackedTarball/pdfium/third_party/lcms2-2.6/src/cmsgamma \
+ UnpackedTarball/pdfium/third_party/lcms2-2.6/src/cmsgmt \
+ UnpackedTarball/pdfium/third_party/lcms2-2.6/src/cmshalf \
+ UnpackedTarball/pdfium/third_party/lcms2-2.6/src/cmsintrp \
+ UnpackedTarball/pdfium/third_party/lcms2-2.6/src/cmsio0 \
+ UnpackedTarball/pdfium/third_party/lcms2-2.6/src/cmsio1 \
+ UnpackedTarball/pdfium/third_party/lcms2-2.6/src/cmslut \
+ UnpackedTarball/pdfium/third_party/lcms2-2.6/src/cmsmd5 \
+ UnpackedTarball/pdfium/third_party/lcms2-2.6/src/cmsmtrx \
+ UnpackedTarball/pdfium/third_party/lcms2-2.6/src/cmsnamed \
+ UnpackedTarball/pdfium/third_party/lcms2-2.6/src/cmsopt \
+ UnpackedTarball/pdfium/third_party/lcms2-2.6/src/cmspack \
+ UnpackedTarball/pdfium/third_party/lcms2-2.6/src/cmspcs \
+ UnpackedTarball/pdfium/third_party/lcms2-2.6/src/cmsplugin \
+ UnpackedTarball/pdfium/third_party/lcms2-2.6/src/cmsps2 \
+ UnpackedTarball/pdfium/third_party/lcms2-2.6/src/cmssamp \
+ UnpackedTarball/pdfium/third_party/lcms2-2.6/src/cmssm \
+ UnpackedTarball/pdfium/third_party/lcms2-2.6/src/cmstypes \
+ UnpackedTarball/pdfium/third_party/lcms2-2.6/src/cmsvirt \
+ UnpackedTarball/pdfium/third_party/lcms2-2.6/src/cmswtpnt \
+ UnpackedTarball/pdfium/third_party/lcms2-2.6/src/cmsxform \
+))
+
+# third_party/fx_libopenjpeg
+$(eval $(call gb_Library_add_generated_cobjects,pdfium,\
+ UnpackedTarball/pdfium/third_party/libopenjpeg20/bio \
+ UnpackedTarball/pdfium/third_party/libopenjpeg20/cio \
+ UnpackedTarball/pdfium/third_party/libopenjpeg20/dwt \
+ UnpackedTarball/pdfium/third_party/libopenjpeg20/event \
+ UnpackedTarball/pdfium/third_party/libopenjpeg20/function_list \
+ UnpackedTarball/pdfium/third_party/libopenjpeg20/image \
+ UnpackedTarball/pdfium/third_party/libopenjpeg20/invert \
+ UnpackedTarball/pdfium/third_party/libopenjpeg20/j2k \
+ UnpackedTarball/pdfium/third_party/libopenjpeg20/jp2 \
+ UnpackedTarball/pdfium/third_party/libopenjpeg20/mct \
+ UnpackedTarball/pdfium/third_party/libopenjpeg20/mqc \
+ UnpackedTarball/pdfium/third_party/libopenjpeg20/openjpeg \
+ UnpackedTarball/pdfium/third_party/libopenjpeg20/opj_clock \
+ UnpackedTarball/pdfium/third_party/libopenjpeg20/pi \
+ UnpackedTarball/pdfium/third_party/libopenjpeg20/raw \
+ UnpackedTarball/pdfium/third_party/libopenjpeg20/t1 \
+ UnpackedTarball/pdfium/third_party/libopenjpeg20/t2 \
+ UnpackedTarball/pdfium/third_party/libopenjpeg20/tcd \
+ UnpackedTarball/pdfium/third_party/libopenjpeg20/tgt \
+))
+
+# third_party/fx_zlib
+$(eval $(call gb_Library_add_generated_cobjects,pdfium,\
+ UnpackedTarball/pdfium/third_party/zlib_v128/adler32 \
+ UnpackedTarball/pdfium/third_party/zlib_v128/compress \
+ UnpackedTarball/pdfium/third_party/zlib_v128/crc32 \
+ UnpackedTarball/pdfium/third_party/zlib_v128/deflate \
+ UnpackedTarball/pdfium/third_party/zlib_v128/gzclose \
+ UnpackedTarball/pdfium/third_party/zlib_v128/gzlib \
+ UnpackedTarball/pdfium/third_party/zlib_v128/gzread \
+ UnpackedTarball/pdfium/third_party/zlib_v128/gzwrite \
+ UnpackedTarball/pdfium/third_party/zlib_v128/infback \
+ UnpackedTarball/pdfium/third_party/zlib_v128/inffast \
+ UnpackedTarball/pdfium/third_party/zlib_v128/inflate \
+ UnpackedTarball/pdfium/third_party/zlib_v128/inftrees \
+ UnpackedTarball/pdfium/third_party/zlib_v128/trees \
+ UnpackedTarball/pdfium/third_party/zlib_v128/uncompr \
+ UnpackedTarball/pdfium/third_party/zlib_v128/zutil \
+))
+
+# third_party/jpeg
+$(eval $(call gb_Library_add_generated_cobjects,pdfium,\
+ UnpackedTarball/pdfium/third_party/libjpeg/fpdfapi_jcapimin \
+ UnpackedTarball/pdfium/third_party/libjpeg/fpdfapi_jcapistd \
+ UnpackedTarball/pdfium/third_party/libjpeg/fpdfapi_jccoefct \
+ UnpackedTarball/pdfium/third_party/libjpeg/fpdfapi_jccolor \
+ UnpackedTarball/pdfium/third_party/libjpeg/fpdfapi_jcdctmgr \
+ UnpackedTarball/pdfium/third_party/libjpeg/fpdfapi_jchuff \
+ UnpackedTarball/pdfium/third_party/libjpeg/fpdfapi_jcinit \
+ UnpackedTarball/pdfium/third_party/libjpeg/fpdfapi_jcmainct \
+ UnpackedTarball/pdfium/third_party/libjpeg/fpdfapi_jcmarker \
+ UnpackedTarball/pdfium/third_party/libjpeg/fpdfapi_jcmaster \
+ UnpackedTarball/pdfium/third_party/libjpeg/fpdfapi_jcomapi \
+ UnpackedTarball/pdfium/third_party/libjpeg/fpdfapi_jcparam \
+ UnpackedTarball/pdfium/third_party/libjpeg/fpdfapi_jcphuff \
+ UnpackedTarball/pdfium/third_party/libjpeg/fpdfapi_jcprepct \
+ UnpackedTarball/pdfium/third_party/libjpeg/fpdfapi_jcsample \
+ UnpackedTarball/pdfium/third_party/libjpeg/fpdfapi_jctrans \
+ UnpackedTarball/pdfium/third_party/libjpeg/fpdfapi_jdapimin \
+ UnpackedTarball/pdfium/third_party/libjpeg/fpdfapi_jdapistd \
+ UnpackedTarball/pdfium/third_party/libjpeg/fpdfapi_jdcoefct \
+ UnpackedTarball/pdfium/third_party/libjpeg/fpdfapi_jdcolor \
+ UnpackedTarball/pdfium/third_party/libjpeg/fpdfapi_jddctmgr \
+ UnpackedTarball/pdfium/third_party/libjpeg/fpdfapi_jdhuff \
+ UnpackedTarball/pdfium/third_party/libjpeg/fpdfapi_jdinput \
+ UnpackedTarball/pdfium/third_party/libjpeg/fpdfapi_jdmainct \
+ UnpackedTarball/pdfium/third_party/libjpeg/fpdfapi_jdmarker \
+ UnpackedTarball/pdfium/third_party/libjpeg/fpdfapi_jdmaster \
+ UnpackedTarball/pdfium/third_party/libjpeg/fpdfapi_jdmerge \
+ UnpackedTarball/pdfium/third_party/libjpeg/fpdfapi_jdphuff \
+ UnpackedTarball/pdfium/third_party/libjpeg/fpdfapi_jdpostct \
+ UnpackedTarball/pdfium/third_party/libjpeg/fpdfapi_jdsample \
+ UnpackedTarball/pdfium/third_party/libjpeg/fpdfapi_jdtrans \
+ UnpackedTarball/pdfium/third_party/libjpeg/fpdfapi_jerror \
+ UnpackedTarball/pdfium/third_party/libjpeg/fpdfapi_jfdctfst \
+ UnpackedTarball/pdfium/third_party/libjpeg/fpdfapi_jfdctint \
+ UnpackedTarball/pdfium/third_party/libjpeg/fpdfapi_jidctfst \
+ UnpackedTarball/pdfium/third_party/libjpeg/fpdfapi_jidctint \
+ UnpackedTarball/pdfium/third_party/libjpeg/fpdfapi_jidctred \
+ UnpackedTarball/pdfium/third_party/libjpeg/fpdfapi_jmemmgr \
+ UnpackedTarball/pdfium/third_party/libjpeg/fpdfapi_jmemnobs \
+ UnpackedTarball/pdfium/third_party/libjpeg/fpdfapi_jutils \
+))
+
+ifeq ($(OS),LINUX)
+$(eval $(call gb_Library_add_libs,pdfium,\
+ -ldl \
+ -lrt \
+ -lpthread \
+))
+
+$(eval $(call gb_Library_use_external,pdfium,freetype))
+else
+$(eval $(call gb_Library_set_include,pdfium,\
+ -I$(WORKDIR)/UnpackedTarball/pdfium/third_party/freetype/include/ \
+ $$(INCLUDE) \
+))
+
+$(eval $(call gb_Library_add_defs,pdfium,\
+ -DFT2_BUILD_LIBRARY \
+))
+
+# third_party/freetype
+$(eval $(call gb_Library_add_generated_cobjects,pdfium,\
+ UnpackedTarball/pdfium/third_party/freetype/src/base/ftbase \
+ UnpackedTarball/pdfium/third_party/freetype/src/base/ftbitmap \
+ UnpackedTarball/pdfium/third_party/freetype/src/base/ftglyph \
+ UnpackedTarball/pdfium/third_party/freetype/src/base/ftinit \
+ UnpackedTarball/pdfium/third_party/freetype/src/base/ftlcdfil \
+ UnpackedTarball/pdfium/third_party/freetype/src/base/ftmm \
+ UnpackedTarball/pdfium/third_party/freetype/src/base/ftsystem \
+ UnpackedTarball/pdfium/third_party/freetype/src/cff/cff \
+ UnpackedTarball/pdfium/third_party/freetype/src/cid/type1cid \
+ UnpackedTarball/pdfium/third_party/freetype/src/psaux/psaux \
+ UnpackedTarball/pdfium/third_party/freetype/src/pshinter/pshinter \
+ UnpackedTarball/pdfium/third_party/freetype/src/psnames/psmodule \
+ UnpackedTarball/pdfium/third_party/freetype/src/raster/raster \
+ UnpackedTarball/pdfium/third_party/freetype/src/sfnt/sfnt \
+ UnpackedTarball/pdfium/third_party/freetype/src/smooth/smooth \
+ UnpackedTarball/pdfium/third_party/freetype/src/truetype/truetype \
+ UnpackedTarball/pdfium/third_party/freetype/src/type1/type1 \
+))
+endif
+
+ifeq ($(OS),WNT)
+# fxge
+$(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
+ UnpackedTarball/pdfium/core/fxge/win32/cfx_psrenderer \
+ UnpackedTarball/pdfium/core/fxge/win32/cpsoutput \
+ UnpackedTarball/pdfium/core/fxge/win32/fx_win32_device \
+ UnpackedTarball/pdfium/core/fxge/win32/fx_win32_dib \
+ UnpackedTarball/pdfium/core/fxge/win32/fx_win32_dwrite \
+ UnpackedTarball/pdfium/core/fxge/win32/fx_win32_gdipext \
+ UnpackedTarball/pdfium/core/fxge/win32/fx_win32_print \
+))
+
+$(eval $(call gb_Library_use_system_win32_libs,pdfium,\
+ gdi32 \
+))
+endif
+
+ifeq ($(OS),MACOSX)
+# fxge
+$(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
+ UnpackedTarball/pdfium/core/fxge/apple/fx_apple_platform \
+ UnpackedTarball/pdfium/core/fxge/apple/fx_mac_imp \
+ UnpackedTarball/pdfium/core/fxge/apple/fx_quartz_device \
+))
+
+$(eval $(call gb_Library_use_system_darwin_frameworks,pdfium,\
+ AppKit \
+ CoreFoundation \
+))
+endif
+
+ifeq ($(OS),ANDROID)
+# fxge
+$(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
+ UnpackedTarball/pdfium/core/fxge/android/cfpf_skiadevicemodule \
+ UnpackedTarball/pdfium/core/fxge/android/cfpf_skiafont \
+ UnpackedTarball/pdfium/core/fxge/android/cfpf_skiafontmgr \
+ UnpackedTarball/pdfium/core/fxge/android/cfx_androidfontinfo \
+ UnpackedTarball/pdfium/core/fxge/android/fx_android_imp \
+))
+endif
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/pdfium/Makefile b/external/pdfium/Makefile
new file mode 100644
index 000000000000..e4968cf85fb6
--- /dev/null
+++ b/external/pdfium/Makefile
@@ -0,0 +1,7 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+
+module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))
+
+include $(module_directory)/../../solenv/gbuild/partial_build.mk
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/pdfium/Module_pdfium.mk b/external/pdfium/Module_pdfium.mk
new file mode 100644
index 000000000000..3a52d5bd0bb6
--- /dev/null
+++ b/external/pdfium/Module_pdfium.mk
@@ -0,0 +1,17 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_Module_Module,pdfium))
+
+$(eval $(call gb_Module_add_targets,pdfium,\
+ Library_pdfium \
+ UnpackedTarball_pdfium \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/pdfium/README b/external/pdfium/README
new file mode 100644
index 000000000000..928f70c3e136
--- /dev/null
+++ b/external/pdfium/README
@@ -0,0 +1,12 @@
+External package containing pdfium.
+
+"Insert -> Picture -> From File..." uses this library when a PDF file is
+selected.
+
+How to update the tarball:
+
+version=$(git for-each-ref|grep chromium/|tail -n 1|sed 's|.*/||')
+git archive --prefix=pdfium/ --format=tar origin/chromium/${version} > pdfium-${version}.tar
+bzip2 pdfium-${version}.tar
+checksum=$(md5sum pdfium-${version}.tar.bz2|sed 's| .*||')
+mv pdfium-${version}.tar.bz2 ${checksum}-pdfium-${version}.tar.bz2
diff --git a/external/pdfium/UnpackedTarball_pdfium.mk b/external/pdfium/UnpackedTarball_pdfium.mk
new file mode 100644
index 000000000000..2d507295a7a0
--- /dev/null
+++ b/external/pdfium/UnpackedTarball_pdfium.mk
@@ -0,0 +1,29 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+pdfium_patches :=
+pdfium_patches += visibility.patch.1
+pdfium_patches += msvc.patch.1
+
+$(eval $(call gb_UnpackedTarball_UnpackedTarball,pdfium))
+
+$(eval $(call gb_UnpackedTarball_set_tarball,pdfium,$(PDFIUM_TARBALL)))
+
+$(eval $(call gb_UnpackedTarball_add_patches,pdfium,\
+ $(foreach patch,$(pdfium_patches),external/pdfium/$(patch)) \
+))
+
+$(eval $(call gb_UnpackedTarball_set_post_action,pdfium,\
+ mv third_party/bigint/BigInteger.cc third_party/bigint/BigInteger.cpp && \
+ mv third_party/bigint/BigIntegerUtils.cc third_party/bigint/BigIntegerUtils.cpp && \
+ mv third_party/bigint/BigUnsigned.cc third_party/bigint/BigUnsigned.cpp && \
+ mv third_party/bigint/BigUnsignedInABase.cc third_party/bigint/BigUnsignedInABase.cpp \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/pdfium/msvc.patch.1 b/external/pdfium/msvc.patch.1
new file mode 100644
index 000000000000..890e94ff985b
--- /dev/null
+++ b/external/pdfium/msvc.patch.1
@@ -0,0 +1,1344 @@
+diff --git a/core/fpdfapi/font/ttgsubtable.cpp b/core/fpdfapi/font/ttgsubtable.cpp
+index 51e8e9c..4f4f696 100644
+--- a/core/fpdfapi/font/ttgsubtable.cpp
++++ b/core/fpdfapi/font/ttgsubtable.cpp
+@@ -94,29 +94,33 @@ bool CFX_CTTGSUBTable::GetVerticalGlyph(uint32_t glyphnum,
+ (uint8_t)'t',
+ };
+ if (!m_bFeautureMapLoad) {
+- for (const auto& script : ScriptList.ScriptRecords) {
+- for (const auto& record : script.Script.LangSysRecords) {
+- for (const auto& index : record.LangSys.FeatureIndices) {
+- if (FeatureList.FeatureRecords[index].FeatureTag == tag[0] ||
+- FeatureList.FeatureRecords[index].FeatureTag == tag[1]) {
+- m_featureSet.insert(index);
++ for (int i = 0; i < ScriptList.ScriptCount; i++) {
++ for (int j = 0; j < ScriptList.ScriptRecord[i].Script.LangSysCount; ++j) {
++ const auto& record = ScriptList.ScriptRecord[i].Script.LangSysRecord[j];
++ for (int k = 0; k < record.LangSys.FeatureCount; ++k) {
++ uint32_t index = record.LangSys.FeatureIndex[k];
++ if (FeatureList.FeatureRecord[index].FeatureTag == tag[0] ||
++ FeatureList.FeatureRecord[index].FeatureTag == tag[1]) {
++ if (!pdfium::ContainsKey(m_featureMap, index)) {
++ m_featureMap[index] = index;
++ }
+ }
+ }
+ }
+ }
+- if (m_featureSet.empty()) {
+- int i = 0;
+- for (const auto& feature : FeatureList.FeatureRecords) {
+- if (feature.FeatureTag == tag[0] || feature.FeatureTag == tag[1])
+- m_featureSet.insert(i);
+- ++i;
++ if (m_featureMap.empty()) {
++ for (int i = 0; i < FeatureList.FeatureCount; i++) {
++ if (FeatureList.FeatureRecord[i].FeatureTag == tag[0] ||
++ FeatureList.FeatureRecord[i].FeatureTag == tag[1]) {
++ m_featureMap[i] = i;
++ }
+ }
+ }
+ m_bFeautureMapLoad = true;
+ }
+- for (const auto& item : m_featureSet) {
++ for (const auto& pair : m_featureMap) {
+ if (GetVerticalGlyphSub(glyphnum, vglyphnum,
+- &FeatureList.FeatureRecords[item].Feature)) {
++ &FeatureList.FeatureRecord[pair.second].Feature)) {
+ return true;
+ }
+ }
+@@ -126,13 +130,16 @@ bool CFX_CTTGSUBTable::GetVerticalGlyph(uint32_t glyphnum,
+ bool CFX_CTTGSUBTable::GetVerticalGlyphSub(uint32_t glyphnum,
+ uint32_t* vglyphnum,
+ TFeature* Feature) {
+- for (int index : Feature->LookupListIndices) {
+- if (index < 0 || index >= pdfium::CollectionSize<int>(LookupList.Lookups))
++ for (int i = 0; i < Feature->LookupCount; i++) {
++ int index = Feature->LookupListIndex[i];
++ if (index < 0 || LookupList.LookupCount < index) {
+ continue;
+-
+- if (LookupList.Lookups[index].LookupType == 1 &&
+- GetVerticalGlyphSub2(glyphnum, vglyphnum, &LookupList.Lookups[index])) {
+- return true;
++ }
++ if (LookupList.Lookup[index].LookupType == 1) {
++ if (GetVerticalGlyphSub2(glyphnum, vglyphnum,
++ &LookupList.Lookup[index])) {
++ return true;
++ }
+ }
+ }
+ return false;
+@@ -141,10 +148,10 @@ bool CFX_CTTGSUBTable::GetVerticalGlyphSub(uint32_t glyphnum,
+ bool CFX_CTTGSUBTable::GetVerticalGlyphSub2(uint32_t glyphnum,
+ uint32_t* vglyphnum,
+ TLookup* Lookup) {
+- for (const auto& subTable : Lookup->SubTables) {
+- switch (subTable->SubstFormat) {
++ for (int i = 0; i < Lookup->SubTableCount; i++) {
++ switch (Lookup->SubTable[i]->SubstFormat) {
+ case 1: {
+- auto tbl1 = static_cast<TSingleSubstFormat1*>(subTable.get());
++ TSingleSubstFormat1* tbl1 = (TSingleSubstFormat1*)Lookup->SubTable[i];
+ if (GetCoverageIndex(tbl1->Coverage.get(), glyphnum) >= 0) {
+ *vglyphnum = glyphnum + tbl1->DeltaGlyphID;
+ return true;
+@@ -152,11 +159,11 @@ bool CFX_CTTGSUBTable::GetVerticalGlyphSub2(uint32_t glyphnum,
+ break;
+ }
+ case 2: {
+- auto tbl2 = static_cast<TSingleSubstFormat2*>(subTable.get());
+- int index = GetCoverageIndex(tbl2->Coverage.get(), glyphnum);
+- if (index >= 0 &&
+- index < pdfium::CollectionSize<int>(tbl2->Substitutes)) {
+- *vglyphnum = tbl2->Substitutes[index];
++ TSingleSubstFormat2* tbl2 = (TSingleSubstFormat2*)Lookup->SubTable[i];
++ int index = -1;
++ index = GetCoverageIndex(tbl2->Coverage.get(), glyphnum);
++ if (0 <= index && index < tbl2->GlyphCount) {
++ *vglyphnum = tbl2->Substitute[index];
+ return true;
+ }
+ break;
+@@ -168,28 +175,29 @@ bool CFX_CTTGSUBTable::GetVerticalGlyphSub2(uint32_t glyphnum,
+
+ int CFX_CTTGSUBTable::GetCoverageIndex(TCoverageFormatBase* Coverage,
+ uint32_t g) const {
+- if (!Coverage)
++ int i = 0;
++ if (!Coverage) {
+ return -1;
+-
++ }
+ switch (Coverage->CoverageFormat) {
+ case 1: {
+- int i = 0;
+ TCoverageFormat1* c1 = (TCoverageFormat1*)Coverage;
+- for (const auto& glyph : c1->GlyphArray) {
+- if (static_cast<uint32_t>(glyph) == g)
++ for (i = 0; i < c1->GlyphCount; i++) {
++ if ((uint32_t)c1->GlyphArray[i] == g) {
+ return i;
+- ++i;
++ }
+ }
+ return -1;
+ }
+ case 2: {
+ TCoverageFormat2* c2 = (TCoverageFormat2*)Coverage;
+- for (const auto& rangeRec : c2->RangeRecords) {
+- uint32_t s = rangeRec.Start;
+- uint32_t e = rangeRec.End;
+- uint32_t si = rangeRec.StartCoverageIndex;
+- if (s <= g && g <= e)
++ for (i = 0; i < c2->RangeCount; i++) {
++ uint32_t s = c2->RangeRecord[i].Start;
++ uint32_t e = c2->RangeRecord[i].End;
++ uint32_t si = c2->RangeRecord[i].StartCoverageIndex;
++ if (s <= g && g <= e) {
+ return si + g - s;
++ }
+ }
+ return -1;
+ }
+@@ -237,21 +245,33 @@ bool CFX_CTTGSUBTable::Parse(FT_Bytes scriptlist,
+ }
+
+ void CFX_CTTGSUBTable::ParseScriptList(FT_Bytes raw, TScriptList* rec) {
++ int i;
+ FT_Bytes sp = raw;
+- rec->ScriptRecords = std::vector<TScriptRecord>(GetUInt16(sp));
+- for (auto& scriptRec : rec->ScriptRecords) {
+- scriptRec.ScriptTag = GetUInt32(sp);
+- ParseScript(&raw[GetUInt16(sp)], &scriptRec.Script);
++ rec->ScriptCount = GetUInt16(sp);
++ if (rec->ScriptCount <= 0) {
++ return;
++ }
++ rec->ScriptRecord.reset(new TScriptRecord[rec->ScriptCount]);
++ for (i = 0; i < rec->ScriptCount; i++) {
++ rec->ScriptRecord[i].ScriptTag = GetUInt32(sp);
++ uint16_t offset = GetUInt16(sp);
++ ParseScript(&raw[offset], &rec->ScriptRecord[i].Script);
+ }
+ }
+
+ void CFX_CTTGSUBTable::ParseScript(FT_Bytes raw, TScript* rec) {
++ int i;
+ FT_Bytes sp = raw;
+ rec->DefaultLangSys = GetUInt16(sp);
+- rec->LangSysRecords = std::vector<TLangSysRecord>(GetUInt16(sp));
+- for (auto& sysRecord : rec->LangSysRecords) {
+- sysRecord.LangSysTag = GetUInt32(sp);
+- ParseLangSys(&raw[GetUInt16(sp)], &sysRecord.LangSys);
++ rec->LangSysCount = GetUInt16(sp);
++ if (rec->LangSysCount <= 0) {
++ return;
++ }
++ rec->LangSysRecord.reset(new TLangSysRecord[rec->LangSysCount]);
++ for (i = 0; i < rec->LangSysCount; i++) {
++ rec->LangSysRecord[i].LangSysTag = GetUInt32(sp);
++ uint16_t offset = GetUInt16(sp);
++ ParseLangSys(&raw[offset], &rec->LangSysRecord[i].LangSys);
+ }
+ }
+
+@@ -259,45 +279,81 @@ void CFX_CTTGSUBTable::ParseLangSys(FT_Bytes raw, TLangSys* rec) {
+ FT_Bytes sp = raw;
+ rec->LookupOrder = GetUInt16(sp);
+ rec->ReqFeatureIndex = GetUInt16(sp);
+- rec->FeatureIndices = std::vector<uint16_t>(GetUInt16(sp));
+- for (auto& element : rec->FeatureIndices)
+- element = GetUInt16(sp);
++ rec->FeatureCount = GetUInt16(sp);
++ if (rec->FeatureCount <= 0) {
++ return;
++ }
++ rec->FeatureIndex.reset(new uint16_t[rec->FeatureCount]);
++ FXSYS_memset(rec->FeatureIndex.get(), 0,
++ sizeof(uint16_t) * rec->FeatureCount);
++ for (int i = 0; i < rec->FeatureCount; ++i) {
++ rec->FeatureIndex[i] = GetUInt16(sp);
++ }
+ }
+
+ void CFX_CTTGSUBTable::ParseFeatureList(FT_Bytes raw, TFeatureList* rec) {
++ int i;
+ FT_Bytes sp = raw;
+- rec->FeatureRecords = std::vector<TFeatureRecord>(GetUInt16(sp));
+- for (auto& featureRec : rec->FeatureRecords) {
+- featureRec.FeatureTag = GetUInt32(sp);
+- ParseFeature(&raw[GetUInt16(sp)], &featureRec.Feature);
++ rec->FeatureCount = GetUInt16(sp);
++ if (rec->FeatureCount <= 0) {
++ return;
++ }
++ rec->FeatureRecord.reset(new TFeatureRecord[rec->FeatureCount]);
++ for (i = 0; i < rec->FeatureCount; i++) {
++ rec->FeatureRecord[i].FeatureTag = GetUInt32(sp);
++ uint16_t offset = GetUInt16(sp);
++ ParseFeature(&raw[offset], &rec->FeatureRecord[i].Feature);
+ }
+ }
+
+ void CFX_CTTGSUBTable::ParseFeature(FT_Bytes raw, TFeature* rec) {
++ int i;
+ FT_Bytes sp = raw;
+ rec->FeatureParams = GetUInt16(sp);
+- rec->LookupListIndices = std::vector<uint16_t>(GetUInt16(sp));
+- for (auto& listIndex : rec->LookupListIndices)
+- listIndex = GetUInt16(sp);
++ rec->LookupCount = GetUInt16(sp);
++ if (rec->LookupCount <= 0) {
++ return;
++ }
++ rec->LookupListIndex.reset(new uint16_t[rec->LookupCount]);
++ for (i = 0; i < rec->LookupCount; i++) {
++ rec->LookupListIndex[i] = GetUInt16(sp);
++ }
+ }
+
+ void CFX_CTTGSUBTable::ParseLookupList(FT_Bytes raw, TLookupList* rec) {
++ int i;
+ FT_Bytes sp = raw;
+- rec->Lookups = std::vector<TLookup>(GetUInt16(sp));
+- for (auto& lookup : rec->Lookups)
+- ParseLookup(&raw[GetUInt16(sp)], &lookup);
++ rec->LookupCount = GetUInt16(sp);
++ if (rec->LookupCount <= 0) {
++ return;
++ }
++ rec->Lookup.reset(new TLookup[rec->LookupCount]);
++ for (i = 0; i < rec->LookupCount; i++) {
++ uint16_t offset = GetUInt16(sp);
++ ParseLookup(&raw[offset], &rec->Lookup[i]);
++ }
+ }
+
+ void CFX_CTTGSUBTable::ParseLookup(FT_Bytes raw, TLookup* rec) {
++ int i;
+ FT_Bytes sp = raw;
+ rec->LookupType = GetUInt16(sp);
+ rec->LookupFlag = GetUInt16(sp);
+- rec->SubTables = std::vector<std::unique_ptr<TSubTableBase>>(GetUInt16(sp));
+- if (rec->LookupType != 1)
++ rec->SubTableCount = GetUInt16(sp);
++ if (rec->SubTableCount <= 0) {
+ return;
+-
+- for (auto& subTable : rec->SubTables)
+- ParseSingleSubst(&raw[GetUInt16(sp)], &subTable);
++ }
++ rec->SubTable.reset(new TSubTableBase*[rec->SubTableCount]);
++ for (i = 0; i < rec->SubTableCount; i++) {
++ rec->SubTable[i] = nullptr;
++ }
++ if (rec->LookupType != 1) {
++ return;
++ }
++ for (i = 0; i < rec->SubTableCount; i++) {
++ uint16_t offset = GetUInt16(sp);
++ ParseSingleSubst(&raw[offset], &rec->SubTable[i]);
++ }
+ }
+
+ CFX_CTTGSUBTable::TCoverageFormatBase* CFX_CTTGSUBTable::ParseCoverage(
+@@ -317,39 +373,47 @@ CFX_CTTGSUBTable::TCoverageFormatBase* CFX_CTTGSUBTable::ParseCoverage(
+
+ void CFX_CTTGSUBTable::ParseCoverageFormat1(FT_Bytes raw,
+ TCoverageFormat1* rec) {
++ int i;
+ FT_Bytes sp = raw;
+- (void)GetUInt16(sp);
+- rec->GlyphArray = std::vector<uint16_t>(GetUInt16(sp));
+- for (auto& glyph : rec->GlyphArray)
+- glyph = GetUInt16(sp);
++ GetUInt16(sp);
++ rec->GlyphCount = GetUInt16(sp);
++ if (rec->GlyphCount <= 0) {
++ return;
++ }
++ rec->GlyphArray.reset(new uint16_t[rec->GlyphCount]);
++ for (i = 0; i < rec->GlyphCount; i++) {
++ rec->GlyphArray[i] = GetUInt16(sp);
++ }
+ }
+
+ void CFX_CTTGSUBTable::ParseCoverageFormat2(FT_Bytes raw,
+ TCoverageFormat2* rec) {
++ int i;
+ FT_Bytes sp = raw;
+- (void)GetUInt16(sp);
+- rec->RangeRecords = std::vector<TRangeRecord>(GetUInt16(sp));
+- for (auto& rangeRec : rec->RangeRecords) {
+- rangeRec.Start = GetUInt16(sp);
+- rangeRec.End = GetUInt16(sp);
+- rangeRec.StartCoverageIndex = GetUInt16(sp);
++ GetUInt16(sp);
++ rec->RangeCount = GetUInt16(sp);
++ if (rec->RangeCount <= 0) {
++ return;
++ }
++ rec->RangeRecord.reset(new TRangeRecord[rec->RangeCount]);
++ for (i = 0; i < rec->RangeCount; i++) {
++ rec->RangeRecord[i].Start = GetUInt16(sp);
++ rec->RangeRecord[i].End = GetUInt16(sp);
++ rec->RangeRecord[i].StartCoverageIndex = GetUInt16(sp);
+ }
+ }
+
+-void CFX_CTTGSUBTable::ParseSingleSubst(FT_Bytes raw,
+- std::unique_ptr<TSubTableBase>* rec) {
++void CFX_CTTGSUBTable::ParseSingleSubst(FT_Bytes raw, TSubTableBase** rec) {
+ FT_Bytes sp = raw;
+ uint16_t Format = GetUInt16(sp);
+ switch (Format) {
+ case 1:
+- *rec = pdfium::MakeUnique<TSingleSubstFormat1>();
+- ParseSingleSubstFormat1(raw,
+- static_cast<TSingleSubstFormat1*>(rec->get()));
++ *rec = new TSingleSubstFormat1();
++ ParseSingleSubstFormat1(raw, (TSingleSubstFormat1*)*rec);
+ break;
+ case 2:
+- *rec = pdfium::MakeUnique<TSingleSubstFormat2>();
+- ParseSingleSubstFormat2(raw,
+- static_cast<TSingleSubstFormat2*>(rec->get()));
++ *rec = new TSingleSubstFormat2();
++ ParseSingleSubstFormat2(raw, (TSingleSubstFormat2*)*rec);
+ break;
+ }
+ }
+@@ -365,17 +429,23 @@ void CFX_CTTGSUBTable::ParseSingleSubstFormat1(FT_Bytes raw,
+
+ void CFX_CTTGSUBTable::ParseSingleSubstFormat2(FT_Bytes raw,
+ TSingleSubstFormat2* rec) {
++ int i;
+ FT_Bytes sp = raw;
+- (void)GetUInt16(sp);
++ GetUInt16(sp);
+ uint16_t offset = GetUInt16(sp);
+ rec->Coverage.reset(ParseCoverage(&raw[offset]));
+- rec->Substitutes = std::vector<uint16_t>(GetUInt16(sp));
+- for (auto& substitute : rec->Substitutes)
+- substitute = GetUInt16(sp);
++ rec->GlyphCount = GetUInt16(sp);
++ if (rec->GlyphCount <= 0) {
++ return;
++ }
++ rec->Substitute.reset(new uint16_t[rec->GlyphCount]);
++ for (i = 0; i < rec->GlyphCount; i++) {
++ rec->Substitute[i] = GetUInt16(sp);
++ }
+ }
+
+ CFX_CTTGSUBTable::TCoverageFormat1::TCoverageFormat1()
+- : TCoverageFormatBase(1) {}
++ : TCoverageFormatBase(1), GlyphCount(0) {}
+
+ CFX_CTTGSUBTable::TCoverageFormat1::~TCoverageFormat1() {}
+
+@@ -383,7 +453,7 @@ CFX_CTTGSUBTable::TRangeRecord::TRangeRecord()
+ : Start(0), End(0), StartCoverageIndex(0) {}
+
+ CFX_CTTGSUBTable::TCoverageFormat2::TCoverageFormat2()
+- : TCoverageFormatBase(2) {}
++ : TCoverageFormatBase(2), RangeCount(0) {}
+
+ CFX_CTTGSUBTable::TCoverageFormat2::~TCoverageFormat2() {}
+
+@@ -393,34 +463,41 @@ CFX_CTTGSUBTable::TSingleSubstFormat1::TSingleSubstFormat1()
+ CFX_CTTGSUBTable::TSingleSubstFormat1::~TSingleSubstFormat1() {}
+
+ CFX_CTTGSUBTable::TSingleSubstFormat2::TSingleSubstFormat2()
+- : TSubTableBase(2) {}
++ : TSubTableBase(2), GlyphCount(0) {}
+
+ CFX_CTTGSUBTable::TSingleSubstFormat2::~TSingleSubstFormat2() {}
+
+-CFX_CTTGSUBTable::TLookup::TLookup() : LookupType(0), LookupFlag(0) {}
++CFX_CTTGSUBTable::TLookup::TLookup()
++ : LookupType(0), LookupFlag(0), SubTableCount(0) {}
+
+-CFX_CTTGSUBTable::TLookup::~TLookup() {}
++CFX_CTTGSUBTable::TLookup::~TLookup() {
++ if (SubTable) {
++ for (int i = 0; i < SubTableCount; ++i)
++ delete SubTable[i];
++ }
++}
+
+-CFX_CTTGSUBTable::TScript::TScript() : DefaultLangSys(0) {}
++CFX_CTTGSUBTable::TScript::TScript() : DefaultLangSys(0), LangSysCount(0) {}
+
+ CFX_CTTGSUBTable::TScript::~TScript() {}
+
+-CFX_CTTGSUBTable::TScriptList::TScriptList() {}
++CFX_CTTGSUBTable::TScriptList::TScriptList() : ScriptCount(0) {}
+
+ CFX_CTTGSUBTable::TScriptList::~TScriptList() {}
+
+-CFX_CTTGSUBTable::TFeature::TFeature() : FeatureParams(0) {}
++CFX_CTTGSUBTable::TFeature::TFeature() : FeatureParams(0), LookupCount(0) {}
+
+ CFX_CTTGSUBTable::TFeature::~TFeature() {}
+
+-CFX_CTTGSUBTable::TFeatureList::TFeatureList() {}
++CFX_CTTGSUBTable::TFeatureList::TFeatureList() : FeatureCount(0) {}
+
+ CFX_CTTGSUBTable::TFeatureList::~TFeatureList() {}
+
+-CFX_CTTGSUBTable::TLookupList::TLookupList() {}
++CFX_CTTGSUBTable::TLookupList::TLookupList() : LookupCount(0) {}
+
+ CFX_CTTGSUBTable::TLookupList::~TLookupList() {}
+
+-CFX_CTTGSUBTable::TLangSys::TLangSys() : LookupOrder(0), ReqFeatureIndex(0) {}
++CFX_CTTGSUBTable::TLangSys::TLangSys()
++ : LookupOrder(0), ReqFeatureIndex(0), FeatureCount(0) {}
+
+ CFX_CTTGSUBTable::TLangSys::~TLangSys() {}
+diff --git a/core/fpdfapi/font/ttgsubtable.h b/core/fpdfapi/font/ttgsubtable.h
+index f927269..59ee4ca 100644
+--- a/core/fpdfapi/font/ttgsubtable.h
++++ b/core/fpdfapi/font/ttgsubtable.h
+@@ -9,9 +9,8 @@
+
+ #include <stdint.h>
+
++#include <map>
+ #include <memory>
+-#include <set>
+-#include <vector>
+
+ #include "core/fxcrt/fx_basic.h"
+ #include "core/fxge/fx_font.h"
+@@ -53,7 +52,8 @@ class CFX_CTTGSUBTable {
+
+ uint16_t LookupOrder;
+ uint16_t ReqFeatureIndex;
+- std::vector<uint16_t> FeatureIndices;
++ uint16_t FeatureCount;
++ std::unique_ptr<uint16_t[]> FeatureIndex;
+
+ private:
+ TLangSys(const TLangSys&) = delete;
+@@ -76,7 +76,8 @@ class CFX_CTTGSUBTable {
+ ~TScript();
+
+ uint16_t DefaultLangSys;
+- std::vector<TLangSysRecord> LangSysRecords;
++ uint16_t LangSysCount;
++ std::unique_ptr<TLangSysRecord[]> LangSysRecord;
+
+ private:
+ TScript(const TScript&) = delete;
+@@ -98,7 +99,8 @@ class CFX_CTTGSUBTable {
+ TScriptList();
+ ~TScriptList();
+
+- std::vector<TScriptRecord> ScriptRecords;
++ uint16_t ScriptCount;
++ std::unique_ptr<TScriptRecord[]> ScriptRecord;
+
+ private:
+ TScriptList(const TScriptList&) = delete;
+@@ -110,13 +112,13 @@ class CFX_CTTGSUBTable {
+ ~TFeature();
+
+ uint16_t FeatureParams;
+- std::vector<uint16_t> LookupListIndices;
++ int LookupCount;
++ std::unique_ptr<uint16_t[]> LookupListIndex;
+
+ private:
+ TFeature(const TFeature&) = delete;
+ TFeature& operator=(const TFeature&) = delete;
+ };
+-
+ struct TFeatureRecord {
+ TFeatureRecord() : FeatureTag(0) {}
+
+@@ -132,7 +134,8 @@ class CFX_CTTGSUBTable {
+ TFeatureList();
+ ~TFeatureList();
+
+- std::vector<TFeatureRecord> FeatureRecords;
++ int FeatureCount;
++ std::unique_ptr<TFeatureRecord[]> FeatureRecord;
+
+ private:
+ TFeatureList(const TFeatureList&) = delete;
+@@ -165,7 +168,8 @@ class CFX_CTTGSUBTable {
+ TCoverageFormat1();
+ ~TCoverageFormat1() override;
+
+- std::vector<uint16_t> GlyphArray;
++ uint16_t GlyphCount;
++ std::unique_ptr<uint16_t[]> GlyphArray;
+
+ private:
+ TCoverageFormat1(const TCoverageFormat1&) = delete;
+@@ -191,7 +195,8 @@ class CFX_CTTGSUBTable {
+ TCoverageFormat2();
+ ~TCoverageFormat2() override;
+
+- std::vector<TRangeRecord> RangeRecords;
++ uint16_t RangeCount;
++ std::unique_ptr<TRangeRecord[]> RangeRecord;
+
+ private:
+ TCoverageFormat2(const TCoverageFormat2&) = delete;
+@@ -239,7 +244,8 @@ class CFX_CTTGSUBTable {
+ ~TSingleSubstFormat2() override;
+
+ std::unique_ptr<TCoverageFormatBase> Coverage;
+- std::vector<uint16_t> Substitutes;
++ uint16_t GlyphCount;
++ std::unique_ptr<uint16_t[]> Substitute;
+
+ private:
+ TSingleSubstFormat2(const TSingleSubstFormat2&) = delete;
+@@ -252,7 +258,8 @@ class CFX_CTTGSUBTable {
+
+ uint16_t LookupType;
+ uint16_t LookupFlag;
+- std::vector<std::unique_ptr<TSubTableBase>> SubTables;
++ uint16_t SubTableCount;
++ std::unique_ptr<TSubTableBase* []> SubTable;
+
+ private:
+ TLookup(const TLookup&) = delete;
+@@ -263,7 +270,8 @@ class CFX_CTTGSUBTable {
+ TLookupList();
+ ~TLookupList();
+
+- std::vector<TLookup> Lookups;
++ int LookupCount;
++ std::unique_ptr<TLookup[]> Lookup;
+
+ private:
+ TLookupList(const TLookupList&) = delete;
+@@ -281,7 +289,7 @@ class CFX_CTTGSUBTable {
+ TCoverageFormatBase* ParseCoverage(FT_Bytes raw);
+ void ParseCoverageFormat1(FT_Bytes raw, TCoverageFormat1* rec);
+ void ParseCoverageFormat2(FT_Bytes raw, TCoverageFormat2* rec);
+- void ParseSingleSubst(FT_Bytes raw, std::unique_ptr<TSubTableBase>* rec);
++ void ParseSingleSubst(FT_Bytes raw, TSubTableBase** rec);
+ void ParseSingleSubstFormat1(FT_Bytes raw, TSingleSubstFormat1* rec);
+ void ParseSingleSubstFormat2(FT_Bytes raw, TSingleSubstFormat2* rec);
+
+@@ -299,7 +307,7 @@ class CFX_CTTGSUBTable {
+ int32_t GetInt32(FT_Bytes& p) const;
+ uint32_t GetUInt32(FT_Bytes& p) const;
+
+- std::set<uint32_t> m_featureSet;
++ std::map<uint32_t, uint32_t> m_featureMap;
+ bool m_bFeautureMapLoad;
+ bool loaded;
+ tt_gsub_header header;
+diff --git a/core/fpdfapi/page/cpdf_contentmarkitem.h b/core/fpdfapi/page/cpdf_contentmarkitem.h
+index ed27371..2d08a8e 100644
+--- a/core/fpdfapi/page/cpdf_contentmarkitem.h
++++ b/core/fpdfapi/page/cpdf_contentmarkitem.h
+@@ -23,8 +23,6 @@ class CPDF_ContentMarkItem {
+ CPDF_ContentMarkItem(const CPDF_ContentMarkItem& that);
+ ~CPDF_ContentMarkItem();
+
+- CPDF_ContentMarkItem& operator=(CPDF_ContentMarkItem&& other) = default;
+-
+ CFX_ByteString GetName() const { return m_MarkName; }
+ ParamType GetParamType() const { return m_ParamType; }
+ CPDF_Dictionary* GetParam() const;
+diff --git a/core/fpdfapi/page/cpdf_psengine.h b/core/fpdfapi/page/cpdf_psengine.h
+index 659ca82..0c94959 100644
+--- a/core/fpdfapi/page/cpdf_psengine.h
++++ b/core/fpdfapi/page/cpdf_psengine.h
+@@ -63,7 +63,7 @@ enum PDF_PSOP {
+ PSOP_CONST
+ };
+
+-constexpr uint32_t PSENGINE_STACKSIZE = 100;
++const uint32_t PSENGINE_STACKSIZE = 100;
+
+ class CPDF_PSProc {
+ public:
+diff --git a/core/fxge/ge/cfx_facecache.cpp b/core/fxge/ge/cfx_facecache.cpp
+index cbaa07e..95338c2 100644
+--- a/core/fxge/ge/cfx_facecache.cpp
++++ b/core/fxge/ge/cfx_facecache.cpp
+@@ -25,7 +25,7 @@
+
+ namespace {
+
+-constexpr uint32_t kInvalidGlyphIndex = static_cast<uint32_t>(-1);
++const uint32_t kInvalidGlyphIndex = static_cast<uint32_t>(-1);
+
+ void GammaAdjust(uint8_t* pData,
+ int nHeight,
+diff --git a/third_party/base/numerics/safe_conversions.h b/third_party/base/numerics/safe_conversions.h
+index dc61d9c..ae25d70 100644
+--- a/third_party/base/numerics/safe_conversions.h
++++ b/third_party/base/numerics/safe_conversions.h
+@@ -51,7 +51,7 @@ namespace base {
+ // Convenience function that returns true if the supplied value is in range
+ // for the destination type.
+ template <typename Dst, typename Src>
+-constexpr bool IsValueInRangeForNumericType(Src value) {
++bool IsValueInRangeForNumericType(Src value) {
+ return internal::DstRangeRelationToSrcRange<Dst>(value).IsValid();
+ }
+
+@@ -72,7 +72,7 @@ struct CheckOnFailure {
+ // except that it CHECKs that the specified numeric conversion will not
+ // overflow or underflow. NaN source will always trigger a CHECK.
+ template <typename Dst, class CheckHandler = CheckOnFailure, typename Src>
+-constexpr Dst checked_cast(Src value) {
++Dst checked_cast(Src value) {
+ // This throws a compile-time error on evaluating the constexpr if it can be
+ // determined at compile-time as failing, otherwise it will CHECK at runtime.
+ using SrcType = typename internal::UnderlyingType<Src>::type;
+@@ -84,19 +84,19 @@ constexpr Dst checked_cast(Src value) {
+ // Default boundaries for integral/float: max/infinity, lowest/-infinity, 0/NaN.
+ template <typename T>
+ struct SaturationDefaultHandler {
+- static constexpr T NaN() {
++ static T NaN() {
+ return std::numeric_limits<T>::has_quiet_NaN
+ ? std::numeric_limits<T>::quiet_NaN()
+ : T();
+ }
+- static constexpr T max() { return std::numeric_limits<T>::max(); }
+- static constexpr T Overflow() {
++ static T max() { return std::numeric_limits<T>::max(); }
++ static T Overflow() {
+ return std::numeric_limits<T>::has_infinity
+ ? std::numeric_limits<T>::infinity()
+ : std::numeric_limits<T>::max();
+ }
+- static constexpr T lowest() { return std::numeric_limits<T>::lowest(); }
+- static constexpr T Underflow() {
++ static T lowest() { return std::numeric_limits<T>::lowest(); }
++ static T Underflow() {
+ return std::numeric_limits<T>::has_infinity
+ ? std::numeric_limits<T>::infinity() * -1
+ : std::numeric_limits<T>::lowest();
+@@ -106,7 +106,7 @@ struct SaturationDefaultHandler {
+ namespace internal {
+
+ template <typename Dst, template <typename> class S, typename Src>
+-constexpr Dst saturated_cast_impl(Src value, RangeCheck constraint) {
++Dst saturated_cast_impl(Src value, RangeCheck constraint) {
+ // For some reason clang generates much better code when the branch is
+ // structured exactly this way, rather than a sequence of checks.
+ return !constraint.IsOverflowFlagSet()
+@@ -126,7 +126,7 @@ template <typename Dst,
+ template <typename>
+ class SaturationHandler = SaturationDefaultHandler,
+ typename Src>
+-constexpr Dst saturated_cast(Src value) {
++Dst saturated_cast(Src value) {
+ using SrcType = typename UnderlyingType<Src>::type;
+ return saturated_cast_impl<Dst, SaturationHandler, SrcType>(
+ value,
+@@ -137,7 +137,7 @@ constexpr Dst saturated_cast(Src value) {
+ // it will cause a compile failure if the destination type is not large enough
+ // to contain any value in the source type. It performs no runtime checking.
+ template <typename Dst, typename Src>
+-constexpr Dst strict_cast(Src value) {
++Dst strict_cast(Src value) {
+ using SrcType = typename UnderlyingType<Src>::type;
+ static_assert(UnderlyingType<Src>::is_numeric, "Argument must be numeric.");
+ static_assert(std::is_arithmetic<Dst>::value, "Result must be numeric.");
+@@ -187,17 +187,17 @@ class StrictNumeric {
+ public:
+ using type = T;
+
+- constexpr StrictNumeric() : value_(0) {}
++ StrictNumeric() : value_(0) {}
+
+ // Copy constructor.
+ template <typename Src>
+- constexpr StrictNumeric(const StrictNumeric<Src>& rhs)
++ StrictNumeric(const StrictNumeric<Src>& rhs)
+ : value_(strict_cast<T>(rhs.value_)) {}
+
+ // This is not an explicit constructor because we implicitly upgrade regular
+ // numerics to StrictNumerics to make them easier to use.
+ template <typename Src>
+- constexpr StrictNumeric(Src value) // NOLINT(runtime/explicit)
++ StrictNumeric(Src value) // NOLINT(runtime/explicit)
+ : value_(strict_cast<T>(value)) {}
+
+ // If you got here from a compiler error, it's because you tried to assign
+@@ -215,7 +215,7 @@ class StrictNumeric {
+ template <typename Dst,
+ typename std::enable_if<
+ IsNumericRangeContained<Dst, T>::value>::type* = nullptr>
+- constexpr operator Dst() const {
++ operator Dst() const {
+ return static_cast<typename ArithmeticOrUnderlyingEnum<Dst>::type>(value_);
+ }
+
+@@ -225,7 +225,7 @@ class StrictNumeric {
+
+ // Convience wrapper returns a StrictNumeric from the provided arithmetic type.
+ template <typename T>
+-constexpr StrictNumeric<typename UnderlyingType<T>::type> MakeStrictNum(
++StrictNumeric<typename UnderlyingType<T>::type> MakeStrictNum(
+ const T value) {
+ return value;
+ }
+@@ -241,7 +241,7 @@ std::ostream& operator<<(std::ostream& os, const StrictNumeric<T>& value) {
+ template <typename L, typename R, \
+ typename std::enable_if< \
+ internal::IsStrictOp<L, R>::value>::type* = nullptr> \
+- constexpr bool operator OP(const L lhs, const R rhs) { \
++ bool operator OP(const L lhs, const R rhs) { \
+ return SafeCompare<NAME, typename UnderlyingType<L>::type, \
+ typename UnderlyingType<R>::type>(lhs, rhs); \
+ }
+diff --git a/third_party/base/numerics/safe_conversions_impl.h b/third_party/base/numerics/safe_conversions_impl.h
+index 2a7ce14..4a1b386 100644
+--- a/third_party/base/numerics/safe_conversions_impl.h
++++ b/third_party/base/numerics/safe_conversions_impl.h
+@@ -42,14 +42,14 @@ struct PositionOfSignBit {
+ // warnings on: unsigned(value) < 0.
+ template <typename T,
+ typename std::enable_if<std::is_signed<T>::value>::type* = nullptr>
+-constexpr bool IsValueNegative(T value) {
++bool IsValueNegative(T value) {
+ static_assert(std::is_arithmetic<T>::value, "Argument must be numeric.");
+ return value < 0;
+ }
+
+ template <typename T,
+ typename std::enable_if<!std::is_signed<T>::value>::type* = nullptr>
+-constexpr bool IsValueNegative(T) {
++bool IsValueNegative(T) {
+ static_assert(std::is_arithmetic<T>::value, "Argument must be numeric.");
+ return false;
+ }
+@@ -58,7 +58,7 @@ constexpr bool IsValueNegative(T) {
+ // arguments, but probably doesn't do what you want for any unsigned value
+ // larger than max / 2 + 1 (i.e. signed min cast to unsigned).
+ template <typename T>
+-constexpr typename std::make_signed<T>::type ConditionalNegate(
++typename std::make_signed<T>::type ConditionalNegate(
+ T x,
+ bool is_negative) {
+ static_assert(std::is_integral<T>::value, "Type must be integral");
+@@ -70,7 +70,7 @@ constexpr typename std::make_signed<T>::type ConditionalNegate(
+
+ // This performs a safe, absolute value via unsigned overflow.
+ template <typename T>
+-constexpr typename std::make_unsigned<T>::type SafeUnsignedAbs(T value) {
++typename std::make_unsigned<T>::type SafeUnsignedAbs(T value) {
+ static_assert(std::is_integral<T>::value, "Type must be integral");
+ using UnsignedT = typename std::make_unsigned<T>::type;
+ return IsValueNegative(value) ? 0 - static_cast<UnsignedT>(value)
+@@ -141,20 +141,20 @@ struct StaticDstRangeRelationToSrcRange<Dst,
+ // can identify constants and eliminate unused code paths.
+ class RangeCheck {
+ public:
+- constexpr RangeCheck(bool is_in_lower_bound, bool is_in_upper_bound)
++ RangeCheck(bool is_in_lower_bound, bool is_in_upper_bound)
+ : is_underflow_(!is_in_lower_bound), is_overflow_(!is_in_upper_bound) {}
+- constexpr RangeCheck() : is_underflow_(0), is_overflow_(0) {}
+- constexpr bool IsValid() const { return !is_overflow_ && !is_underflow_; }
+- constexpr bool IsInvalid() const { return is_overflow_ && is_underflow_; }
+- constexpr bool IsOverflow() const { return is_overflow_ && !is_underflow_; }
+- constexpr bool IsUnderflow() const { return !is_overflow_ && is_underflow_; }
+- constexpr bool IsOverflowFlagSet() const { return is_overflow_; }
+- constexpr bool IsUnderflowFlagSet() const { return is_underflow_; }
+- constexpr bool operator==(const RangeCheck rhs) const {
++ RangeCheck() : is_underflow_(0), is_overflow_(0) {}
++ bool IsValid() const { return !is_overflow_ && !is_underflow_; }
++ bool IsInvalid() const { return is_overflow_ && is_underflow_; }
++ bool IsOverflow() const { return is_overflow_ && !is_underflow_; }
++ bool IsUnderflow() const { return !is_overflow_ && is_underflow_; }
++ bool IsOverflowFlagSet() const { return is_overflow_; }
++ bool IsUnderflowFlagSet() const { return is_underflow_; }
++ bool operator==(const RangeCheck rhs) const {
+ return is_underflow_ == rhs.is_underflow_ &&
+ is_overflow_ == rhs.is_overflow_;
+ }
+- constexpr bool operator!=(const RangeCheck rhs) const {
++ bool operator!=(const RangeCheck rhs) const {
+ return !(*this == rhs);
+ }
+
+@@ -203,7 +203,7 @@ struct NarrowingRange {
+
+ // Masks out the integer bits that are beyond the precision of the
+ // intermediate type used for comparison.
+- static constexpr T Adjust(T value) {
++ static T Adjust(T value) {
+ static_assert(std::is_same<T, Dst>::value, "");
+ static_assert(kShift < DstLimits::digits, "");
+ return static_cast<T>(
+@@ -214,14 +214,14 @@ struct NarrowingRange {
+ template <typename T,
+ typename std::enable_if<std::is_floating_point<T>::value>::type* =
+ nullptr>
+- static constexpr T Adjust(T value) {
++ static T Adjust(T value) {
+ static_assert(std::is_same<T, Dst>::value, "");
+ static_assert(kShift == 0, "");
+ return value;
+ }
+
+- static constexpr Dst max() { return Adjust(Bounds<Dst>::max()); }
+- static constexpr Dst lowest() { return Adjust(Bounds<Dst>::lowest()); }
++ static Dst max() { return Adjust(Bounds<Dst>::max()); }
++ static Dst lowest() { return Adjust(Bounds<Dst>::lowest()); }
+ };
+
+ template <typename Dst,
+@@ -253,7 +253,7 @@ struct DstRangeRelationToSrcRangeImpl<Dst,
+ DstSign,
+ SrcSign,
+ NUMERIC_RANGE_CONTAINED> {
+- static constexpr RangeCheck Check(Src value) {
++ static RangeCheck Check(Src value) {
+ using SrcLimits = std::numeric_limits<Src>;
+ using DstLimits = NarrowingRange<Dst, Src, Bounds>;
+ return RangeCheck(
+@@ -273,7 +273,7 @@ struct DstRangeRelationToSrcRangeImpl<Dst,
+ INTEGER_REPRESENTATION_SIGNED,
+ INTEGER_REPRESENTATION_SIGNED,
+ NUMERIC_RANGE_NOT_CONTAINED> {
+- static constexpr RangeCheck Check(Src value) {
++ static RangeCheck Check(Src value) {
+ using DstLimits = NarrowingRange<Dst, Src, Bounds>;
+ return RangeCheck(value >= DstLimits::lowest(), value <= DstLimits::max());
+ }
+@@ -288,7 +288,7 @@ struct DstRangeRelationToSrcRangeImpl<Dst,
+ INTEGER_REPRESENTATION_UNSIGNED,
+ INTEGER_REPRESENTATION_UNSIGNED,
+ NUMERIC_RANGE_NOT_CONTAINED> {
+- static constexpr RangeCheck Check(Src value) {
++ static RangeCheck Check(Src value) {
+ using DstLimits = NarrowingRange<Dst, Src, Bounds>;
+ return RangeCheck(
+ DstLimits::lowest() == Dst(0) || value >= DstLimits::lowest(),
+@@ -304,7 +304,7 @@ struct DstRangeRelationToSrcRangeImpl<Dst,
+ INTEGER_REPRESENTATION_SIGNED,
+ INTEGER_REPRESENTATION_UNSIGNED,
+ NUMERIC_RANGE_NOT_CONTAINED> {
+- static constexpr RangeCheck Check(Src value) {
++ static RangeCheck Check(Src value) {
+ using DstLimits = NarrowingRange<Dst, Src, Bounds>;
+ using Promotion = decltype(Src() + Dst());
+ return RangeCheck(DstLimits::lowest() <= Dst(0) ||
+@@ -324,7 +324,7 @@ struct DstRangeRelationToSrcRangeImpl<Dst,
+ INTEGER_REPRESENTATION_UNSIGNED,
+ INTEGER_REPRESENTATION_SIGNED,
+ NUMERIC_RANGE_NOT_CONTAINED> {
+- static constexpr RangeCheck Check(Src value) {
++ static RangeCheck Check(Src value) {
+ using SrcLimits = std::numeric_limits<Src>;
+ using DstLimits = NarrowingRange<Dst, Src, Bounds>;
+ using Promotion = decltype(Src() + Dst());
+@@ -341,10 +341,9 @@ struct DstRangeRelationToSrcRangeImpl<Dst,
+ template <typename Dst,
+ template <typename> class Bounds = std::numeric_limits,
+ typename Src>
+-constexpr RangeCheck DstRangeRelationToSrcRange(Src value) {
++RangeCheck DstRangeRelationToSrcRange(Src value) {
+ static_assert(std::is_arithmetic<Src>::value, "Argument must be numeric.");
+ static_assert(std::is_arithmetic<Dst>::value, "Result must be numeric.");
+- static_assert(Bounds<Dst>::lowest() < Bounds<Dst>::max(), "");
+ return DstRangeRelationToSrcRangeImpl<Dst, Src, Bounds>::Check(value);
+ }
+
+@@ -603,7 +602,7 @@ struct IsStrictOp {
+ };
+
+ template <typename L, typename R>
+-constexpr bool IsLessImpl(const L lhs,
++bool IsLessImpl(const L lhs,
+ const R rhs,
+ const RangeCheck l_range,
+ const RangeCheck r_range) {
+@@ -617,14 +616,14 @@ template <typename L, typename R>
+ struct IsLess {
+ static_assert(std::is_arithmetic<L>::value && std::is_arithmetic<R>::value,
+ "Types must be numeric.");
+- static constexpr bool Test(const L lhs, const R rhs) {
++ static bool Test(const L lhs, const R rhs) {
+ return IsLessImpl(lhs, rhs, DstRangeRelationToSrcRange<R>(lhs),
+ DstRangeRelationToSrcRange<L>(rhs));
+ }
+ };
+
+ template <typename L, typename R>
+-constexpr bool IsLessOrEqualImpl(const L lhs,
++bool IsLessOrEqualImpl(const L lhs,
+ const R rhs,
+ const RangeCheck l_range,
+ const RangeCheck r_range) {
+@@ -638,14 +637,14 @@ template <typename L, typename R>
+ struct IsLessOrEqual {
+ static_assert(std::is_arithmetic<L>::value && std::is_arithmetic<R>::value,
+ "Types must be numeric.");
+- static constexpr bool Test(const L lhs, const R rhs) {
++ static bool Test(const L lhs, const R rhs) {
+ return IsLessOrEqualImpl(lhs, rhs, DstRangeRelationToSrcRange<R>(lhs),
+ DstRangeRelationToSrcRange<L>(rhs));
+ }
+ };
+
+ template <typename L, typename R>
+-constexpr bool IsGreaterImpl(const L lhs,
++bool IsGreaterImpl(const L lhs,
+ const R rhs,
+ const RangeCheck l_range,
+ const RangeCheck r_range) {
+@@ -659,14 +658,14 @@ template <typename L, typename R>
+ struct IsGreater {
+ static_assert(std::is_arithmetic<L>::value && std::is_arithmetic<R>::value,
+ "Types must be numeric.");
+- static constexpr bool Test(const L lhs, const R rhs) {
++ static bool Test(const L lhs, const R rhs) {
+ return IsGreaterImpl(lhs, rhs, DstRangeRelationToSrcRange<R>(lhs),
+ DstRangeRelationToSrcRange<L>(rhs));
+ }
+ };
+
+ template <typename L, typename R>
+-constexpr bool IsGreaterOrEqualImpl(const L lhs,
++bool IsGreaterOrEqualImpl(const L lhs,
+ const R rhs,
+ const RangeCheck l_range,
+ const RangeCheck r_range) {
+@@ -680,7 +679,7 @@ template <typename L, typename R>
+ struct IsGreaterOrEqual {
+ static_assert(std::is_arithmetic<L>::value && std::is_arithmetic<R>::value,
+ "Types must be numeric.");
+- static constexpr bool Test(const L lhs, const R rhs) {
++ static bool Test(const L lhs, const R rhs) {
+ return IsGreaterOrEqualImpl(lhs, rhs, DstRangeRelationToSrcRange<R>(lhs),
+ DstRangeRelationToSrcRange<L>(rhs));
+ }
+@@ -690,7 +689,7 @@ template <typename L, typename R>
+ struct IsEqual {
+ static_assert(std::is_arithmetic<L>::value && std::is_arithmetic<R>::value,
+ "Types must be numeric.");
+- static constexpr bool Test(const L lhs, const R rhs) {
++ static bool Test(const L lhs, const R rhs) {
+ return DstRangeRelationToSrcRange<R>(lhs) ==
+ DstRangeRelationToSrcRange<L>(rhs) &&
+ static_cast<decltype(lhs + rhs)>(lhs) ==
+@@ -702,7 +701,7 @@ template <typename L, typename R>
+ struct IsNotEqual {
+ static_assert(std::is_arithmetic<L>::value && std::is_arithmetic<R>::value,
+ "Types must be numeric.");
+- static constexpr bool Test(const L lhs, const R rhs) {
++ static bool Test(const L lhs, const R rhs) {
+ return DstRangeRelationToSrcRange<R>(lhs) !=
+ DstRangeRelationToSrcRange<L>(rhs) ||
+ static_cast<decltype(lhs + rhs)>(lhs) !=
+@@ -713,7 +712,7 @@ struct IsNotEqual {
+ // These perform the actual math operations on the CheckedNumerics.
+ // Binary arithmetic operations.
+ template <template <typename, typename> class C, typename L, typename R>
+-constexpr bool SafeCompare(const L lhs, const R rhs) {
++bool SafeCompare(const L lhs, const R rhs) {
+ static_assert(std::is_arithmetic<L>::value && std::is_arithmetic<R>::value,
+ "Types must be numeric.");
+ using Promotion = BigEnoughPromotion<L, R>;
+diff --git a/third_party/base/numerics/safe_math.h b/third_party/base/numerics/safe_math.h
+index a0c41a4..590a5d8 100644
+--- a/third_party/base/numerics/safe_math.h
++++ b/third_party/base/numerics/safe_math.h
+@@ -100,11 +100,11 @@ class CheckedNumeric {
+ public:
+ using type = T;
+
+- constexpr CheckedNumeric() {}
++ CheckedNumeric() {}
+
+ // Copy constructor.
+ template <typename Src>
+- constexpr CheckedNumeric(const CheckedNumeric<Src>& rhs)
++ CheckedNumeric(const CheckedNumeric<Src>& rhs)
+ : state_(rhs.state_.value(), rhs.IsValid()) {}
+
+ template <typename Src>
+@@ -113,7 +113,7 @@ class CheckedNumeric {
+ // This is not an explicit constructor because we implicitly upgrade regular
+ // numerics to CheckedNumerics to make them easier to use.
+ template <typename Src>
+- constexpr CheckedNumeric(Src value) // NOLINT(runtime/explicit)
++ CheckedNumeric(Src value) // NOLINT(runtime/explicit)
+ : state_(value) {
+ static_assert(std::is_arithmetic<Src>::value, "Argument must be numeric.");
+ }
+@@ -121,7 +121,7 @@ class CheckedNumeric {
+ // This is not an explicit constructor because we want a seamless conversion
+ // from StrictNumeric types.
+ template <typename Src>
+- constexpr CheckedNumeric(
++ CheckedNumeric(
+ StrictNumeric<Src> value) // NOLINT(runtime/explicit)
+ : state_(static_cast<Src>(value)) {}
+
+@@ -129,7 +129,7 @@ class CheckedNumeric {
+ // A range checked destination type can be supplied using the Dst template
+ // parameter.
+ template <typename Dst = T>
+- constexpr bool IsValid() const {
++ bool IsValid() const {
+ return state_.is_valid() &&
+ IsValueInRangeForNumericType<Dst>(state_.value());
+ }
+@@ -138,7 +138,7 @@ class CheckedNumeric {
+ // and is within the range supported by the destination type. Returns true if
+ // successful and false otherwise.
+ template <typename Dst>
+- constexpr bool AssignIfValid(Dst* result) const {
++ bool AssignIfValid(Dst* result) const {
+ return IsValid<Dst>() ? ((*result = static_cast<Dst>(state_.value())), true)
+ : false;
+ }
+@@ -152,7 +152,7 @@ class CheckedNumeric {
+ // template parameter, for test code, etc. However, the handler cannot access
+ // the underlying value, and it is not available through other means.
+ template <typename Dst = T, class CheckHandler = CheckOnFailure>
+- constexpr StrictNumeric<Dst> ValueOrDie() const {
++ StrictNumeric<Dst> ValueOrDie() const {
+ return IsValid<Dst>() ? static_cast<Dst>(state_.value())
+ : CheckHandler::template HandleFailure<Dst>();
+ }
+@@ -164,7 +164,7 @@ class CheckedNumeric {
+ // parameter. WARNING: This function may fail to compile or CHECK at runtime
+ // if the supplied default_value is not within range of the destination type.
+ template <typename Dst = T, typename Src>
+- constexpr StrictNumeric<Dst> ValueOrDefault(const Src default_value) const {
++ StrictNumeric<Dst> ValueOrDefault(const Src default_value) const {
+ return IsValid<Dst>() ? static_cast<Dst>(state_.value())
+ : checked_cast<Dst>(default_value);
+ }
+@@ -173,7 +173,7 @@ class CheckedNumeric {
+ // CheckedNumeric. If the current state is invalid or the destination cannot
+ // represent the result then the returned CheckedNumeric will be invalid.
+ template <typename Dst>
+- constexpr CheckedNumeric<typename UnderlyingType<Dst>::type> Cast() const {
++ CheckedNumeric<typename UnderlyingType<Dst>::type> Cast() const {
+ return *this;
+ }
+
+@@ -205,7 +205,7 @@ class CheckedNumeric {
+ template <typename Src>
+ CheckedNumeric& operator^=(const Src rhs);
+
+- constexpr CheckedNumeric operator-() const {
++ CheckedNumeric operator-() const {
+ return CheckedNumeric<T>(
+ NegateWrapper(state_.value()),
+ IsValid() &&
+@@ -214,12 +214,12 @@ class CheckedNumeric {
+ std::numeric_limits<T>::lowest()));
+ }
+
+- constexpr CheckedNumeric operator~() const {
++ CheckedNumeric operator~() const {
+ return CheckedNumeric<decltype(InvertWrapper(T()))>(
+ InvertWrapper(state_.value()), IsValid());
+ }
+
+- constexpr CheckedNumeric Abs() const {
++ CheckedNumeric Abs() const {
+ return CheckedNumeric<T>(
+ AbsWrapper(state_.value()),
+ IsValid() &&
+@@ -228,7 +228,7 @@ class CheckedNumeric {
+ }
+
+ template <typename U>
+- constexpr CheckedNumeric<typename MathWrapper<CheckedMaxOp, T, U>::type> Max(
++ CheckedNumeric<typename MathWrapper<CheckedMaxOp, T, U>::type> Max(
+ const U rhs) const {
+ using R = typename UnderlyingType<U>::type;
+ using result_type = typename MathWrapper<CheckedMaxOp, T, U>::type;
+@@ -243,7 +243,7 @@ class CheckedNumeric {
+ }
+
+ template <typename U>
+- constexpr CheckedNumeric<typename MathWrapper<CheckedMinOp, T, U>::type> Min(
++ CheckedNumeric<typename MathWrapper<CheckedMinOp, T, U>::type> Min(
+ const U rhs) const {
+ using R = typename UnderlyingType<U>::type;
+ using result_type = typename MathWrapper<CheckedMinOp, T, U>::type;
+@@ -260,7 +260,7 @@ class CheckedNumeric {
+ // This function is available only for integral types. It returns an unsigned
+ // integer of the same width as the source type, containing the absolute value
+ // of the source, and properly handling signed min.
+- constexpr CheckedNumeric<typename UnsignedOrFloatForSize<T>::type>
++ CheckedNumeric<typename UnsignedOrFloatForSize<T>::type>
+ UnsignedAbs() const {
+ return CheckedNumeric<typename UnsignedOrFloatForSize<T>::type>(
+ SafeUnsignedAbs(state_.value()), state_.is_valid());
+@@ -317,31 +317,31 @@ class CheckedNumeric {
+ CheckedNumericState<T> state_;
+
+ template <typename Src>
+- constexpr CheckedNumeric(Src value, bool is_valid)
++ CheckedNumeric(Src value, bool is_valid)
+ : state_(value, is_valid) {}
+
+ // These wrappers allow us to handle state the same way for both
+ // CheckedNumeric and POD arithmetic types.
+ template <typename Src>
+ struct Wrapper {
+- static constexpr bool is_valid(Src) { return true; }
+- static constexpr Src value(Src value) { return value; }
++ static bool is_valid(Src) { return true; }
++ static Src value(Src value) { return value; }
+ };
+
+ template <typename Src>
+ struct Wrapper<CheckedNumeric<Src>> {
+- static constexpr bool is_valid(const CheckedNumeric<Src> v) {
++ static bool is_valid(const CheckedNumeric<Src> v) {
+ return v.IsValid();
+ }
+- static constexpr Src value(const CheckedNumeric<Src> v) {
++ static Src value(const CheckedNumeric<Src> v) {
+ return v.state_.value();
+ }
+ };
+
+ template <typename Src>
+ struct Wrapper<StrictNumeric<Src>> {
+- static constexpr bool is_valid(const StrictNumeric<Src>) { return true; }
+- static constexpr Src value(const StrictNumeric<Src> v) {
++ static bool is_valid(const StrictNumeric<Src>) { return true; }
++ static Src value(const StrictNumeric<Src> v) {
+ return static_cast<Src>(v);
+ }
+ };
+@@ -349,18 +349,18 @@ class CheckedNumeric {
+
+ // Convenience functions to avoid the ugly template disambiguator syntax.
+ template <typename Dst, typename Src>
+-constexpr bool IsValidForType(const CheckedNumeric<Src> value) {
++bool IsValidForType(const CheckedNumeric<Src> value) {
+ return value.template IsValid<Dst>();
+ }
+
+ template <typename Dst, typename Src>
+-constexpr StrictNumeric<Dst> ValueOrDieForType(
++StrictNumeric<Dst> ValueOrDieForType(
+ const CheckedNumeric<Src> value) {
+ return value.template ValueOrDie<Dst>();
+ }
+
+ template <typename Dst, typename Src, typename Default>
+-constexpr StrictNumeric<Dst> ValueOrDefaultForType(
++StrictNumeric<Dst> ValueOrDefaultForType(
+ const CheckedNumeric<Src> value,
+ const Default default_value) {
+ return value.template ValueOrDefault<Dst>(default_value);
+@@ -393,7 +393,7 @@ struct ResultType {
+ // Convience wrapper to return a new CheckedNumeric from the provided arithmetic
+ // or CheckedNumericType.
+ template <typename T>
+-constexpr CheckedNumeric<typename UnderlyingType<T>::type> MakeCheckedNum(
++CheckedNumeric<typename UnderlyingType<T>::type> MakeCheckedNum(
+ const T value) {
+ return value;
+ }
+diff --git a/third_party/base/numerics/safe_math_impl.h b/third_party/base/numerics/safe_math_impl.h
+index 5ad79ce..76d6b0d 100644
+--- a/third_party/base/numerics/safe_math_impl.h
++++ b/third_party/base/numerics/safe_math_impl.h
+@@ -474,7 +474,7 @@ BASE_FLOAT_ARITHMETIC_OPS(Div, /)
+
+ template <typename T,
+ typename std::enable_if<std::is_integral<T>::value>::type* = nullptr>
+-constexpr T NegateWrapper(T value) {
++T NegateWrapper(T value) {
+ using UnsignedT = typename std::make_unsigned<T>::type;
+ // This will compile to a NEG on Intel, and is normal negation on ARM.
+ return static_cast<T>(UnsignedT(0) - static_cast<UnsignedT>(value));
+@@ -483,26 +483,26 @@ constexpr T NegateWrapper(T value) {
+ template <
+ typename T,
+ typename std::enable_if<std::is_floating_point<T>::value>::type* = nullptr>
+-constexpr T NegateWrapper(T value) {
++T NegateWrapper(T value) {
+ return -value;
+ }
+
+ template <typename T,
+ typename std::enable_if<std::is_integral<T>::value>::type* = nullptr>
+-constexpr typename std::make_unsigned<T>::type InvertWrapper(T value) {
++typename std::make_unsigned<T>::type InvertWrapper(T value) {
+ return ~value;
+ }
+
+ template <typename T,
+ typename std::enable_if<std::is_integral<T>::value>::type* = nullptr>
+-constexpr T AbsWrapper(T value) {
++T AbsWrapper(T value) {
+ return static_cast<T>(SafeUnsignedAbs(value));
+ }
+
+ template <
+ typename T,
+ typename std::enable_if<std::is_floating_point<T>::value>::type* = nullptr>
+-constexpr T AbsWrapper(T value) {
++T AbsWrapper(T value) {
+ return value < 0 ? -value : value;
+ }
+
+@@ -540,7 +540,7 @@ class CheckedNumericState<T, NUMERIC_INTEGER> {
+
+ // Ensures that a type conversion does not trigger undefined behavior.
+ template <typename Src>
+- static constexpr T WellDefinedConversionOrZero(const Src value,
++ static T WellDefinedConversionOrZero(const Src value,
+ const bool is_valid) {
+ using SrcType = typename internal::UnderlyingType<Src>::type;
+ return (std::is_integral<SrcType>::value || is_valid)
+@@ -552,10 +552,10 @@ class CheckedNumericState<T, NUMERIC_INTEGER> {
+ template <typename Src, NumericRepresentation type>
+ friend class CheckedNumericState;
+
+- constexpr CheckedNumericState() : is_valid_(true), value_(0) {}
++ CheckedNumericState() : is_valid_(true), value_(0) {}
+
+ template <typename Src>
+- constexpr CheckedNumericState(Src value, bool is_valid)
++ CheckedNumericState(Src value, bool is_valid)
+ : is_valid_(is_valid && IsValueInRangeForNumericType<T>(value)),
+ value_(WellDefinedConversionOrZero(value, is_valid_)) {
+ static_assert(std::is_arithmetic<Src>::value, "Argument must be numeric.");
+@@ -563,17 +563,17 @@ class CheckedNumericState<T, NUMERIC_INTEGER> {
+
+ // Copy constructor.
+ template <typename Src>
+- constexpr CheckedNumericState(const CheckedNumericState<Src>& rhs)
++ CheckedNumericState(const CheckedNumericState<Src>& rhs)
+ : is_valid_(rhs.IsValid()),
+ value_(WellDefinedConversionOrZero(rhs.value(), is_valid_)) {}
+
+ template <typename Src>
+- constexpr explicit CheckedNumericState(Src value)
++ explicit CheckedNumericState(Src value)
+ : is_valid_(IsValueInRangeForNumericType<T>(value)),
+ value_(WellDefinedConversionOrZero(value, is_valid_)) {}
+
+- constexpr bool is_valid() const { return is_valid_; }
+- constexpr T value() const { return value_; }
++ bool is_valid() const { return is_valid_; }
++ T value() const { return value_; }
+ };
+
+ // Floating points maintain their own validity, but need translation wrappers.
+@@ -584,7 +584,7 @@ class CheckedNumericState<T, NUMERIC_FLOATING> {
+
+ // Ensures that a type conversion does not trigger undefined behavior.
+ template <typename Src>
+- static constexpr T WellDefinedConversionOrNaN(const Src value,
++ static T WellDefinedConversionOrNaN(const Src value,
+ const bool is_valid) {
+ using SrcType = typename internal::UnderlyingType<Src>::type;
+ return (StaticDstRangeRelationToSrcRange<T, SrcType>::value ==
+@@ -598,32 +598,32 @@ class CheckedNumericState<T, NUMERIC_FLOATING> {
+ template <typename Src, NumericRepresentation type>
+ friend class CheckedNumericState;
+
+- constexpr CheckedNumericState() : value_(0.0) {}
++ CheckedNumericState() : value_(0.0) {}
+
+ template <typename Src>
+- constexpr CheckedNumericState(Src value, bool is_valid)
++ CheckedNumericState(Src value, bool is_valid)
+ : value_(WellDefinedConversionOrNaN(value, is_valid)) {}
+
+ template <typename Src>
+- constexpr explicit CheckedNumericState(Src value)
++ explicit CheckedNumericState(Src value)
+ : value_(WellDefinedConversionOrNaN(
+ value,
+ IsValueInRangeForNumericType<T>(value))) {}
+
+ // Copy constructor.
+ template <typename Src>
+- constexpr CheckedNumericState(const CheckedNumericState<Src>& rhs)
++ CheckedNumericState(const CheckedNumericState<Src>& rhs)
+ : value_(WellDefinedConversionOrNaN(
+ rhs.value(),
+ rhs.is_valid() && IsValueInRangeForNumericType<T>(rhs.value()))) {}
+
+- constexpr bool is_valid() const {
++ bool is_valid() const {
+ // Written this way because std::isfinite is not reliably constexpr.
+ // TODO(jschuh): Fix this if the libraries ever get fixed.
+ return value_ <= std::numeric_limits<T>::max() &&
+ value_ >= std::numeric_limits<T>::lowest();
+ }
+- constexpr T value() const { return value_; }
++ T value() const { return value_; }
+ };
+
+ template <template <typename, typename, typename> class M,
+diff --git a/third_party/base/stl_util.h b/third_party/base/stl_util.h
+index 795414b..cec9ea3 100644
+--- a/third_party/base/stl_util.h
++++ b/third_party/base/stl_util.h
+@@ -33,7 +33,6 @@ bool ContainsValue(const Collection& collection, const Value& value) {
+ template <class T>
+ class FakeUniquePtr : public std::unique_ptr<T> {
+ public:
+- using std::unique_ptr<T>::unique_ptr;
+ ~FakeUniquePtr() { std::unique_ptr<T>::release(); }
+ };
+
diff --git a/external/pdfium/visibility.patch.1 b/external/pdfium/visibility.patch.1
new file mode 100644
index 000000000000..66199b70910f
--- /dev/null
+++ b/external/pdfium/visibility.patch.1
@@ -0,0 +1,30 @@
+diff --git a/public/fpdfview.h b/public/fpdfview.h
+index 7378d5f..6d37d9e 100644
+--- a/public/fpdfview.h
++++ b/public/fpdfview.h
+@@ -126,14 +126,20 @@ typedef struct _FS_RECTF_ {
+ // Const Pointer to FS_RECTF structure.
+ typedef const FS_RECTF* FS_LPCRECTF;
+
+-#if defined(_WIN32) && defined(FPDFSDK_EXPORTS)
+-// On Windows system, functions are exported in a DLL
++#if defined(PDFIUM_DLLIMPLEMENTATION)
++#ifdef _WIN32
+ #define DLLEXPORT __declspec(dllexport)
+-#define STDCALL __stdcall
+ #else
+-#define DLLEXPORT
+-#define STDCALL
++#define DLLEXPORT __attribute__ ((visibility("default")))
++#endif
++#else
++#ifdef _WIN32
++#define DLLEXPORT __declspec(dllimport)
++#else
++#define DLLEXPORT __attribute__ ((visibility("default")))
+ #endif
++#endif
++#define STDCALL
+
+ // Exported Functions
+ #ifdef __cplusplus