diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2019-05-20 21:37:39 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2019-05-21 09:04:37 +0200 |
commit | 3dbe66b7895a412ad7ad9aede4be383489d805de (patch) | |
tree | 320811104999c50ad5875bb0315a0418bc8314c0 | |
parent | 08509b747c9077e4753759338a899b76514ba3b7 (diff) |
external: update pdfium to 3794
Change-Id: Ie4c42943445813c7c50bf06cb710cedf2a61f3a9
Reviewed-on: https://gerrit.libreoffice.org/72619
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
-rw-r--r-- | download.lst | 4 | ||||
-rw-r--r-- | external/pdfium/Library_pdfium.mk | 5 | ||||
-rw-r--r-- | external/pdfium/UnpackedTarball_pdfium.mk | 5 | ||||
-rw-r--r-- | external/pdfium/build.patch.1 | 13 | ||||
-rw-r--r-- | external/pdfium/visibility.patch.1 | 31 | ||||
-rw-r--r-- | external/pdfium/windows7.patch.1 | 34 |
6 files changed, 66 insertions, 26 deletions
diff --git a/download.lst b/download.lst index 70a989ddd086..81b6dbda6516 100644 --- a/download.lst +++ b/download.lst @@ -200,8 +200,8 @@ export OWNCLOUD_ANDROID_LIB_SHA256SUM := b18b3e3ef7fae6a79b62f2bb43cc47a5346b633 export OWNCLOUD_ANDROID_LIB_TARBALL := owncloud-android-library-0.9.4-no-binary-deps.tar.gz export PAGEMAKER_SHA256SUM := 66adacd705a7d19895e08eac46d1e851332adf2e736c566bef1164e7a442519d export PAGEMAKER_TARBALL := libpagemaker-0.0.4.tar.xz -export PDFIUM_SHA256SUM := dfaaae78f1d371378c6b715862f9b3b67f9a6857c7864bfaebfd88a962d03bca -export PDFIUM_TARBALL := pdfium-3730.tar.bz2 +export PDFIUM_SHA256SUM := e3faddcf741336c64ca2e6f72b23e9e60979969b2cf67c878c9a5bc38328cfc4 +export PDFIUM_TARBALL := pdfium-3794.tar.bz2 export PIXMAN_SHA256SUM := 21b6b249b51c6800dc9553b65106e1e37d0e25df942c90531d4c3997aa20a88e export PIXMAN_TARBALL := e80ebae4da01e77f68744319f01d52a3-pixman-0.34.0.tar.gz export LIBPNG_SHA256SUM := 505e70834d35383537b6491e7ae8641f1a4bed1876dbfe361201fc80868d88ca diff --git a/external/pdfium/Library_pdfium.mk b/external/pdfium/Library_pdfium.mk index d96da860d543..b70adf146c6c 100644 --- a/external/pdfium/Library_pdfium.mk +++ b/external/pdfium/Library_pdfium.mk @@ -13,7 +13,8 @@ $(eval $(call gb_Library_use_unpacked,pdfium,pdfium)) $(eval $(call gb_Library_set_warnings_not_errors,pdfium)) -$(eval $(call gb_Library_set_precompiled_header,pdfium,$(SRCDIR)/external/pdfium/inc/pch/precompiled_pdfium)) +# FIXME this needs updating +#$(eval $(call gb_Library_set_precompiled_header,pdfium,$(SRCDIR)/external/pdfium/inc/pch/precompiled_pdfium)) $(eval $(call gb_Library_set_include,pdfium,\ -I$(call gb_UnpackedTarball_get_dir,pdfium) \ @@ -203,7 +204,6 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ 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 \ @@ -633,6 +633,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ UnpackedTarball/pdfium/core/fxge/win32/fx_win32_gdipext \ UnpackedTarball/pdfium/core/fxge/win32/fx_win32_print \ UnpackedTarball/pdfium/core/fxcrt/cfx_fileaccess_windows \ + UnpackedTarball/pdfium/third_party/base/win/win_util \ )) $(eval $(call gb_Library_use_system_win32_libs,pdfium,\ diff --git a/external/pdfium/UnpackedTarball_pdfium.mk b/external/pdfium/UnpackedTarball_pdfium.mk index eda4fd781e8d..8f493ea3a0d6 100644 --- a/external/pdfium/UnpackedTarball_pdfium.mk +++ b/external/pdfium/UnpackedTarball_pdfium.mk @@ -12,6 +12,8 @@ pdfium_patches += visibility.patch.1 pdfium_patches += ubsan.patch # Fixes build on our baseline. pdfium_patches += build.patch.1 +# Avoids Windows 8 build dependency. +pdfium_patches += windows7.patch.1 $(eval $(call gb_UnpackedTarball_UnpackedTarball,pdfium)) @@ -41,7 +43,8 @@ $(eval $(call gb_UnpackedTarball_set_post_action,pdfium,\ mv third_party/base/allocator/partition_allocator/partition_bucket.cc third_party/base/allocator/partition_allocator/partition_bucket.cpp && \ mv third_party/base/allocator/partition_allocator/partition_oom.cc third_party/base/allocator/partition_allocator/partition_oom.cpp && \ mv third_party/base/allocator/partition_allocator/partition_page.cc third_party/base/allocator/partition_allocator/partition_page.cpp && \ - mv third_party/base/allocator/partition_allocator/partition_root_base.cc third_party/base/allocator/partition_allocator/partition_root_base.cpp \ + mv third_party/base/allocator/partition_allocator/partition_root_base.cc third_party/base/allocator/partition_allocator/partition_root_base.cpp && \ + mv third_party/base/win/win_util.cc third_party/base/win/win_util.cpp \ )) # vim: set noet sw=4 ts=4: diff --git a/external/pdfium/build.patch.1 b/external/pdfium/build.patch.1 index a1ec25e8b223..562b2e6198d3 100644 --- a/external/pdfium/build.patch.1 +++ b/external/pdfium/build.patch.1 @@ -71,16 +71,3 @@ index 7f4eb86c0..5e227f86e 100644 }; #endif // CORE_FPDFDOC_CPDF_DEST_H_ -diff --git a/core/fpdfdoc/cpdf_filespec.h b/core/fpdfdoc/cpdf_filespec.h -index 7050f695b..916afed8b 100644 ---- a/core/fpdfdoc/cpdf_filespec.h -+++ b/core/fpdfdoc/cpdf_filespec.h -@@ -41,7 +41,7 @@ class CPDF_FileSpec { - - private: - UnownedPtr<const CPDF_Object> const m_pObj; -- UnownedPtr<CPDF_Object> const m_pWritableObj; -+ UnownedPtr<CPDF_Object> m_pWritableObj; - }; - - #endif // CORE_FPDFDOC_CPDF_FILESPEC_H_ diff --git a/external/pdfium/visibility.patch.1 b/external/pdfium/visibility.patch.1 index 04e89b38ab10..9983723b2055 100644 --- a/external/pdfium/visibility.patch.1 +++ b/external/pdfium/visibility.patch.1 @@ -1,26 +1,41 @@ diff --git a/public/fpdfview.h b/public/fpdfview.h -index 1ff0aeb26..f48036f2b 100644 +index f5212599f..57d6cda13 100644 --- a/public/fpdfview.h +++ b/public/fpdfview.h -@@ -129,14 +129,20 @@ typedef int FPDF_ANNOTATION_SUBTYPE; +@@ -154,31 +154,20 @@ typedef int FPDF_ANNOT_APPEARANCEMODE; // Dictionary value types. typedef int FPDF_OBJECT_TYPE; --#if defined(_WIN32) && defined(FPDFSDK_EXPORTS) --// On Windows system, functions are exported in a DLL +-#if defined(COMPONENT_BUILD) +-// FPDF_EXPORT should be consistent with |export| in the pdfium_fuzzer +-// template in testing/fuzzers/BUILD.gn. +-#if defined(WIN32) +-#if defined(FPDF_IMPLEMENTATION) +#if defined(PDFIUM_DLLIMPLEMENTATION) +#ifdef _WIN32 #define FPDF_EXPORT __declspec(dllexport) --#define FPDF_CALLCONV __stdcall #else +-#define FPDF_EXPORT __declspec(dllimport) +-#endif // defined(FPDF_IMPLEMENTATION) +-#else +-#if defined(FPDF_IMPLEMENTATION) +-#define FPDF_EXPORT __attribute__((visibility("default"))) +-#else -#define FPDF_EXPORT --#define FPDF_CALLCONV +-#endif // defined(FPDF_IMPLEMENTATION) +-#endif // defined(WIN32) +#define FPDF_EXPORT __attribute__ ((visibility("default"))) +#endif -+#else + #else +-#define FPDF_EXPORT +-#endif // defined(COMPONENT_BUILD) +- +-#if defined(WIN32) && defined(FPDFSDK_EXPORTS) +-#define FPDF_CALLCONV __stdcall +#ifdef _WIN32 +#define FPDF_EXPORT __declspec(dllimport) -+#else + #else +-#define FPDF_CALLCONV +#define FPDF_EXPORT __attribute__ ((visibility("default"))) #endif +#endif diff --git a/external/pdfium/windows7.patch.1 b/external/pdfium/windows7.patch.1 new file mode 100644 index 000000000000..00603c0570cb --- /dev/null +++ b/external/pdfium/windows7.patch.1 @@ -0,0 +1,34 @@ +diff --git a/third_party/base/win/win_util.cc b/third_party/base/win/win_util.cc +index 9c90b9d62..356eca74d 100644 +--- a/third_party/base/win/win_util.cc ++++ b/third_party/base/win/win_util.cc +@@ -12,28 +12,7 @@ namespace base { + namespace win {
+
+ bool IsUser32AndGdi32Available() {
+- static auto is_user32_and_gdi32_available = []() {
+- // If win32k syscalls aren't disabled, then user32 and gdi32 are available.
+-
+- typedef decltype(
+- GetProcessMitigationPolicy)* GetProcessMitigationPolicyType;
+- GetProcessMitigationPolicyType get_process_mitigation_policy_func =
+- reinterpret_cast<GetProcessMitigationPolicyType>(GetProcAddress(
+- GetModuleHandle(L"kernel32.dll"), "GetProcessMitigationPolicy"));
+-
+- if (!get_process_mitigation_policy_func)
+- return true;
+-
+- PROCESS_MITIGATION_SYSTEM_CALL_DISABLE_POLICY policy = {};
+- if (get_process_mitigation_policy_func(GetCurrentProcess(),
+- ProcessSystemCallDisablePolicy,
+- &policy, sizeof(policy))) {
+- return policy.DisallowWin32kSystemCalls == 0;
+- }
+-
+- return true;
+- }();
+- return is_user32_and_gdi32_available;
++ return true;
+ }
+
+ } // namespace win
|