summaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2018-01-10 09:17:28 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2018-01-10 14:35:13 +0100
commite1026e267b4b1b0b0bd645c6bc212d6fa71544f8 (patch)
tree1a6f7615b928ede745684a592d55a7eea915a93c /external
parentd9bde4c6af35beca7be6da93834fc56a6c1bf753 (diff)
pdfium: update to 3312
Change-Id: I3e81c097870264bfcdd8c14407dcb95f5b153793 Reviewed-on: https://gerrit.libreoffice.org/47689 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'external')
-rw-r--r--external/pdfium/Library_pdfium.mk10
-rw-r--r--external/pdfium/UnpackedTarball_pdfium.mk2
-rw-r--r--external/pdfium/build.patch.121
-rw-r--r--external/pdfium/ubsan.patch8
4 files changed, 34 insertions, 7 deletions
diff --git a/external/pdfium/Library_pdfium.mk b/external/pdfium/Library_pdfium.mk
index 9bc2d67b400f..a508d83be107 100644
--- a/external/pdfium/Library_pdfium.mk
+++ b/external/pdfium/Library_pdfium.mk
@@ -76,6 +76,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
UnpackedTarball/pdfium/fpdfsdk/fsdk_filewriteadapter \
UnpackedTarball/pdfium/fpdfsdk/fpdfannot \
UnpackedTarball/pdfium/fpdfsdk/fpdfattachment \
+ UnpackedTarball/pdfium/fpdfsdk/fpdfcatalog \
))
# fdrm
@@ -272,6 +273,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_stitchfunc \
UnpackedTarball/pdfium/core/fpdfapi/parser/cpdf_object_avail \
UnpackedTarball/pdfium/core/fpdfapi/parser/cpdf_page_object_avail \
+ UnpackedTarball/pdfium/core/fpdfapi/parser/cpdf_cross_ref_avail \
))
# fpdfdoc
@@ -302,7 +304,6 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
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_wordinfo \
@@ -367,7 +368,6 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
UnpackedTarball/pdfium/core/fxcrt/fx_ucddata \
UnpackedTarball/pdfium/core/fxcrt/fx_unicode \
UnpackedTarball/pdfium/core/fxcrt/xml/cxml_attritem \
- UnpackedTarball/pdfium/core/fxcrt/xml/cxml_attrmap \
UnpackedTarball/pdfium/core/fxcrt/xml/cxml_databufacc \
UnpackedTarball/pdfium/core/fxcrt/xml/cxml_element \
UnpackedTarball/pdfium/core/fxcrt/xml/cxml_parser \
@@ -405,6 +405,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
UnpackedTarball/pdfium/core/fxcrt/fx_random \
UnpackedTarball/pdfium/core/fxcrt/fx_string \
UnpackedTarball/pdfium/core/fxcrt/widestring \
+ UnpackedTarball/pdfium/core/fxcrt/cfx_seekablemultistream \
))
# fxge
@@ -463,7 +464,8 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
# javascript, build with pdf_enable_v8 disabled.
$(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
- UnpackedTarball/pdfium/fpdfsdk/javascript/JS_Runtime_Stub \
+ UnpackedTarball/pdfium/fxjs/cjs_event_context_stub \
+ UnpackedTarball/pdfium/fxjs/cjs_runtimestub \
))
# pwl
@@ -524,6 +526,7 @@ $(eval $(call gb_Library_add_generated_cobjects,pdfium,\
UnpackedTarball/pdfium/third_party/libopenjpeg20/t2 \
UnpackedTarball/pdfium/third_party/libopenjpeg20/tcd \
UnpackedTarball/pdfium/third_party/libopenjpeg20/tgt \
+ UnpackedTarball/pdfium/third_party/libopenjpeg20/sparse_array \
))
# pdfium_base
@@ -574,6 +577,7 @@ $(eval $(call gb_Library_add_generated_cobjects,pdfium,\
UnpackedTarball/pdfium/third_party/freetype/src/src/base/ftlcdfil \
UnpackedTarball/pdfium/third_party/freetype/src/src/base/ftmm \
UnpackedTarball/pdfium/third_party/freetype/src/src/base/ftsystem \
+ UnpackedTarball/pdfium/third_party/freetype/src/src/base/ftfntfmt \
UnpackedTarball/pdfium/third_party/freetype/src/src/cff/cff \
UnpackedTarball/pdfium/third_party/freetype/src/src/cid/type1cid \
UnpackedTarball/pdfium/third_party/freetype/src/src/psaux/psaux \
diff --git a/external/pdfium/UnpackedTarball_pdfium.mk b/external/pdfium/UnpackedTarball_pdfium.mk
index c3a48dce9583..47c38d70291c 100644
--- a/external/pdfium/UnpackedTarball_pdfium.mk
+++ b/external/pdfium/UnpackedTarball_pdfium.mk
@@ -11,6 +11,8 @@ pdfium_patches :=
pdfium_patches += visibility.patch.1
pdfium_patches += ubsan.patch
pdfium_patches += freetype.patch.1
+# Fixes build on our baseline.
+pdfium_patches += build.patch.1
$(eval $(call gb_UnpackedTarball_UnpackedTarball,pdfium))
diff --git a/external/pdfium/build.patch.1 b/external/pdfium/build.patch.1
new file mode 100644
index 000000000000..b852383ff84b
--- /dev/null
+++ b/external/pdfium/build.patch.1
@@ -0,0 +1,21 @@
+diff --git a/core/fxge/dib/cfx_imagetransformer.cpp b/core/fxge/dib/cfx_imagetransformer.cpp
+index 8e01127b0..f4ce4d915 100644
+--- a/core/fxge/dib/cfx_imagetransformer.cpp
++++ b/core/fxge/dib/cfx_imagetransformer.cpp
+@@ -315,14 +315,14 @@ bool CFX_ImageTransformer::Continue(IFX_PauseIndicator* pPause) {
+ } else if (pDestMask) {
+ CalcData cdata = {
+ pDestMask.Get(), result2stretch, pSrcMaskBuf,
+- m_Storer.GetBitmap()->m_pAlphaMask->GetPitch(),
++ static_cast<uint32_t>(m_Storer.GetBitmap()->m_pAlphaMask->GetPitch()),
+ };
+ CalcMask(cdata);
+ }
+
+ CalcData cdata = {pTransformed.Get(), result2stretch,
+ m_Storer.GetBitmap()->GetBuffer(),
+- m_Storer.GetBitmap()->GetPitch()};
++ static_cast<uint32_t>(m_Storer.GetBitmap()->GetPitch())};
+ if (m_Storer.GetBitmap()->IsAlphaMask()) {
+ CalcAlpha(cdata);
+ } else {
diff --git a/external/pdfium/ubsan.patch b/external/pdfium/ubsan.patch
index 7e4e2e9276a8..56f47840ae88 100644
--- a/external/pdfium/ubsan.patch
+++ b/external/pdfium/ubsan.patch
@@ -23,16 +23,16 @@
--- core/fxge/cfx_facecache.cpp
+++ core/fxge/cfx_facecache.cpp
-@@ -223,7 +223,8 @@ std::unique_ptr<CFX_GlyphBitmap> CFX_FaceCache::RenderGlyph(
+@@ -183,7 +183,8 @@ std::unique_ptr<CFX_GlyphBitmap> CFX_FaceCache::RenderGlyph(
}
}
} else {
- memset(pDestBuf, 0, dest_pitch * bmheight);
+ if (dest_pitch != 0 && bmheight != 0)
+ memset(pDestBuf, 0, dest_pitch * bmheight);
- if (anti_alias == FXFT_RENDER_MODE_MONO &&
- FXFT_Get_Bitmap_PixelMode(FXFT_Get_Glyph_Bitmap(m_Face)) ==
- FXFT_PIXEL_MODE_MONO) {
+ int rowbytes = std::min(abs(src_pitch), dest_pitch);
+ for (int row = 0; row < bmheight; row++)
+ memcpy(pDestBuf + row * dest_pitch, pSrcBuf + row * src_pitch, rowbytes);
--- third_party/agg23/agg_rasterizer_scanline_aa.h
+++ third_party/agg23/agg_rasterizer_scanline_aa.h
@@ -349,14 +349,14 @@ public: