Kaydet (Commit) 3dbe66b7 authored tarafından Miklos Vajna's avatar Miklos Vajna

external: update pdfium to 3794

Change-Id: Ie4c42943445813c7c50bf06cb710cedf2a61f3a9
Reviewed-on: https://gerrit.libreoffice.org/72619
Tested-by: Jenkins
Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.com>
üst 08509b74
...@@ -200,8 +200,8 @@ export OWNCLOUD_ANDROID_LIB_SHA256SUM := b18b3e3ef7fae6a79b62f2bb43cc47a5346b633 ...@@ -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 OWNCLOUD_ANDROID_LIB_TARBALL := owncloud-android-library-0.9.4-no-binary-deps.tar.gz
export PAGEMAKER_SHA256SUM := 66adacd705a7d19895e08eac46d1e851332adf2e736c566bef1164e7a442519d export PAGEMAKER_SHA256SUM := 66adacd705a7d19895e08eac46d1e851332adf2e736c566bef1164e7a442519d
export PAGEMAKER_TARBALL := libpagemaker-0.0.4.tar.xz export PAGEMAKER_TARBALL := libpagemaker-0.0.4.tar.xz
export PDFIUM_SHA256SUM := dfaaae78f1d371378c6b715862f9b3b67f9a6857c7864bfaebfd88a962d03bca export PDFIUM_SHA256SUM := e3faddcf741336c64ca2e6f72b23e9e60979969b2cf67c878c9a5bc38328cfc4
export PDFIUM_TARBALL := pdfium-3730.tar.bz2 export PDFIUM_TARBALL := pdfium-3794.tar.bz2
export PIXMAN_SHA256SUM := 21b6b249b51c6800dc9553b65106e1e37d0e25df942c90531d4c3997aa20a88e export PIXMAN_SHA256SUM := 21b6b249b51c6800dc9553b65106e1e37d0e25df942c90531d4c3997aa20a88e
export PIXMAN_TARBALL := e80ebae4da01e77f68744319f01d52a3-pixman-0.34.0.tar.gz export PIXMAN_TARBALL := e80ebae4da01e77f68744319f01d52a3-pixman-0.34.0.tar.gz
export LIBPNG_SHA256SUM := 505e70834d35383537b6491e7ae8641f1a4bed1876dbfe361201fc80868d88ca export LIBPNG_SHA256SUM := 505e70834d35383537b6491e7ae8641f1a4bed1876dbfe361201fc80868d88ca
......
...@@ -13,7 +13,8 @@ $(eval $(call gb_Library_use_unpacked,pdfium,pdfium)) ...@@ -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_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,\ $(eval $(call gb_Library_set_include,pdfium,\
-I$(call gb_UnpackedTarball_get_dir,pdfium) \ -I$(call gb_UnpackedTarball_get_dir,pdfium) \
...@@ -203,7 +204,6 @@ $(eval $(call gb_Library_add_generated_exception_objects,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_pagemodule \
UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_pageobject \ UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_pageobject \
UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_pageobjectholder \ 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_path \
UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_pathobject \ UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_pathobject \
UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_pattern \ UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_pattern \
...@@ -633,6 +633,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ ...@@ -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_gdipext \
UnpackedTarball/pdfium/core/fxge/win32/fx_win32_print \ UnpackedTarball/pdfium/core/fxge/win32/fx_win32_print \
UnpackedTarball/pdfium/core/fxcrt/cfx_fileaccess_windows \ UnpackedTarball/pdfium/core/fxcrt/cfx_fileaccess_windows \
UnpackedTarball/pdfium/third_party/base/win/win_util \
)) ))
$(eval $(call gb_Library_use_system_win32_libs,pdfium,\ $(eval $(call gb_Library_use_system_win32_libs,pdfium,\
......
...@@ -12,6 +12,8 @@ pdfium_patches += visibility.patch.1 ...@@ -12,6 +12,8 @@ pdfium_patches += visibility.patch.1
pdfium_patches += ubsan.patch pdfium_patches += ubsan.patch
# Fixes build on our baseline. # Fixes build on our baseline.
pdfium_patches += build.patch.1 pdfium_patches += build.patch.1
# Avoids Windows 8 build dependency.
pdfium_patches += windows7.patch.1
$(eval $(call gb_UnpackedTarball_UnpackedTarball,pdfium)) $(eval $(call gb_UnpackedTarball_UnpackedTarball,pdfium))
...@@ -41,7 +43,8 @@ $(eval $(call gb_UnpackedTarball_set_post_action,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_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_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_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: # vim: set noet sw=4 ts=4:
...@@ -71,16 +71,3 @@ index 7f4eb86c0..5e227f86e 100644 ...@@ -71,16 +71,3 @@ index 7f4eb86c0..5e227f86e 100644
}; };
#endif // CORE_FPDFDOC_CPDF_DEST_H_ #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/public/fpdfview.h b/public/fpdfview.h diff --git a/public/fpdfview.h b/public/fpdfview.h
index 1ff0aeb26..f48036f2b 100644 index f5212599f..57d6cda13 100644
--- a/public/fpdfview.h --- a/public/fpdfview.h
+++ b/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. // Dictionary value types.
typedef int FPDF_OBJECT_TYPE; typedef int FPDF_OBJECT_TYPE;
-#if defined(_WIN32) && defined(FPDFSDK_EXPORTS) -#if defined(COMPONENT_BUILD)
-// On Windows system, functions are exported in a DLL -// 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) +#if defined(PDFIUM_DLLIMPLEMENTATION)
+#ifdef _WIN32 +#ifdef _WIN32
#define FPDF_EXPORT __declspec(dllexport) #define FPDF_EXPORT __declspec(dllexport)
-#define FPDF_CALLCONV __stdcall
#else #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_EXPORT
-#define FPDF_CALLCONV -#endif // defined(FPDF_IMPLEMENTATION)
-#endif // defined(WIN32)
+#define FPDF_EXPORT __attribute__ ((visibility("default"))) +#define FPDF_EXPORT __attribute__ ((visibility("default")))
+#endif +#endif
+#else #else
-#define FPDF_EXPORT
-#endif // defined(COMPONENT_BUILD)
-
-#if defined(WIN32) && defined(FPDFSDK_EXPORTS)
-#define FPDF_CALLCONV __stdcall
+#ifdef _WIN32 +#ifdef _WIN32
+#define FPDF_EXPORT __declspec(dllimport) +#define FPDF_EXPORT __declspec(dllimport)
+#else #else
-#define FPDF_CALLCONV
+#define FPDF_EXPORT __attribute__ ((visibility("default"))) +#define FPDF_EXPORT __attribute__ ((visibility("default")))
#endif #endif
+#endif +#endif
......
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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment