pdfium.git
4 years agoMerge to XFA: Restore checked strlen conversions.
Tom Sepez [Tue, 12 May 2015 21:58:44 +0000]
Merge to XFA: Restore checked strlen conversions.

Original Review URL: https://codereview.chromium.org/1133323003
TBR=thestig@chromium.org

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

4 years agoMerge to XFA: NEW public API for pdfwindow font manipulation.
Tom Sepez [Tue, 12 May 2015 19:37:14 +0000]
Merge to XFA: NEW public API for pdfwindow font manipulation.

Original Review URL: https://codereview.chromium.org/1126283004

BUG=486818
TBR=thestig@chromium.org

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

4 years agoMerge to XFA: Add owners file for PDFium.
Tom Sepez [Mon, 11 May 2015 23:34:25 +0000]
Merge to XFA: Add owners file for PDFium.

Original Review URL: https://codereview.chromium.org/1136533003
TBR=thestig@chromium.org

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

4 years agoMerge to XFA: Create top-level public/ header directory.
Tom Sepez [Mon, 11 May 2015 22:25:39 +0000]
Merge to XFA: Create top-level public/ header directory.

Original Review URL: https://codereview.chromium.org/1135913002

BUG=pdfium:154
R=thestig@chromium.org

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

4 years agoMerge to XFA: Fix a bunch of -Wunused-but-set-variable warnings.
Lei Zhang [Fri, 8 May 2015 20:52:49 +0000]
Merge to XFA:  Fix a bunch of -Wunused-but-set-variable warnings.

Also fix a few nits and other errors along the way.

Review URL: https://codereview.chromium.org/1098583002
Review URL: https://codereview.chromium.org/1135713004

(cherry picked from commit f0a169e6fd5718995fa6ef8749c8d16cdad84985)
(cherry picked from commit 470408c2ffe71e99cebad0d1d6887f1723f02cef)

R=tsepez@chromium.org

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

4 years agoMerge to XFA: Move function prototypes to new doc_utils.h file
Tom Sepez [Fri, 8 May 2015 20:45:01 +0000]
Merge to XFA: Move function prototypes to new doc_utils.h file

Original Review URL: https://codereview.chromium.org/1128193004
TBR=thestig@chromium.org

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

4 years agoMerge to XFA: Fix compilation under chromium checkouts.
Tom Sepez [Fri, 8 May 2015 20:30:38 +0000]
Merge to XFA: Fix compilation under chromium checkouts.

Original Review URL: https://codereview.chromium.org/1132163002

R=thestig@chromium.org
TBR=thestig@chromium.org

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

4 years agoMerge to XFA: Better error from pdfium_test when page too big to render.
Tom Sepez [Fri, 8 May 2015 19:02:05 +0000]
Merge to XFA: Better error from pdfium_test when page too big to render.

Original Review URL: https://codereview.chromium.org/1124423006

BUG=pdfium:114
TBR=thestig@chromium.org

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

4 years agoMerge to XFA: Make CFX_StockFontArray more robust.
Lei Zhang [Thu, 7 May 2015 20:05:44 +0000]
Merge to XFA: Make CFX_StockFontArray more robust.

- Check bounds when accessing array.
- Remove potential memory leak.
- Merge duplicate code.

R=tsepez@chromium.org

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

(cherry picked from commit ee2fe42f9bf3ac6afc4f05f79629a3e34179a2b9)

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

4 years agoMerge to XFA: Support arrays in nonstd::unique_ptr<>.
Tom Sepez [Thu, 7 May 2015 00:48:47 +0000]
Merge to XFA: Support arrays in nonstd::unique_ptr<>.

Original Review URL: https://codereview.chromium.org/1130053003
TBR=thestig@chromium.org

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

4 years agoMerge to XFA:Remove FX_STRSIZE casts, use safe conversions
Tom Sepez [Wed, 6 May 2015 23:17:06 +0000]
Merge to XFA:Remove FX_STRSIZE casts, use safe conversions

Original Review URL: https://codereview.chromium.org/1124043003

BUG=pdfium:153
TBR=thestig@chromium.org

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

4 years agoMerge to XFA: Fix a couple of divide by zero crashes in PNG/TIFF predictors.
Lei Zhang [Wed, 6 May 2015 22:27:42 +0000]
Merge to XFA: Fix a couple of divide by zero crashes in PNG/TIFF predictors.

BUG=484002
R=tsepez@chromium.org

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

(cherry picked from commit 6ab919ff310fb02bab8cf43d92a5553b11cbbb61)

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

4 years agoMerge to XFA: Replace FX_NEW with new, remote tests from fxcodec
Lei Zhang [Wed, 6 May 2015 22:09:06 +0000]
Merge to XFA: Replace FX_NEW with new, remote tests from fxcodec

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

(cherry picked from commit cfc1a654ef3e8b65bc447815d35932c185bf1422)

R=tsepez@chromium.org

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

4 years agoMerge to XFA: Replace FX_NEW with new, remove tests from fpdfapi
Lei Zhang [Wed, 6 May 2015 21:48:28 +0000]
Merge to XFA: Replace FX_NEW with new, remove tests from fpdfapi

Very few places where a change is required, but remove FX_NEW to show
they've been audited.

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

(cherry picked from commit 5c357a5d3d873be6b0ab01d7bec82f79d0a09f0e)

R=tsepez@chromium.org

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

4 years agoMerge to XFA: Fix a regression with cut off images.
Lei Zhang [Wed, 6 May 2015 21:00:24 +0000]
Merge to XFA: Fix a regression with cut off images.

This regressed in commit 3f41851 due to shadow variables.

BUG=478164
R=tsepez@chromium.org

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

(cherry picked from commit 97d10aff654e42c1b7c3d2abf33fbcf8d341799e)

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

4 years agoMerge to XFA: Fix fx_string.h compile error under chromium checkouts.
Tom Sepez [Wed, 6 May 2015 19:59:20 +0000]
Merge to XFA: Fix fx_string.h compile error under chromium checkouts.

Original Review URL: https://codereview.chromium.org/1127043004
TBR=thestig@chromium.org

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

4 years agoMerge to XFA: Make sure string constructors are efficient on literals
Tom Sepez [Tue, 5 May 2015 22:51:17 +0000]
Merge to XFA: Make sure string constructors are efficient on literals

Besides the merge, there's one place where a wchar vs. wstring
comparison was being made that no longer compiled.

Original Review URL: https://codereview.chromium.org/1117263004

BUG=pdfium:151
R=thestig@chromium.org

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

4 years agoMerge to XFA: Fix issues with != and == in fx_basic_wstring
Tom Sepez [Mon, 4 May 2015 22:29:42 +0000]
Merge to XFA: Fix issues with != and == in fx_basic_wstring

Original Review URL: https://codereview.chromium.org/1127753002
TBR=thestig@chromium.org

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

4 years agoMerge to XFA: Kill FX_DEFINEHANDLE
Tom Sepez [Mon, 4 May 2015 22:18:56 +0000]
Merge to XFA: Kill FX_DEFINEHANDLE

Original Review URL: https://codereview.chromium.org/1129433002

R=thestig@chromium.org

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

4 years agoMerge to XFA: Fix issuse with != and == shown by fx_basic_bstring unit tests.
Tom Sepez [Mon, 4 May 2015 21:14:33 +0000]
Merge to XFA: Fix issuse with != and == shown by fx_basic_bstring unit tests.

Original Review URL: https://codereview.chromium.org/1125703004
TBR=thestig@chromium.org

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

4 years agoMerge to XFA: Backfill some FX String/StringC unit tests for == and !=.
Tom Sepez [Sat, 2 May 2015 00:07:19 +0000]
Merge to XFA: Backfill some FX String/StringC unit tests for == and !=.

Original Review URL: https://codereview.chromium.org/1118973005
Original Review URL: https://codereview.chromium.org/1122573002

R=thestig@chromium.org
TBR=thestig@chromium.org

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

4 years agoMerge to XFA: CFX_ByteString/WideString header changes
Tom Sepez [Fri, 1 May 2015 23:12:48 +0000]
Merge to XFA: CFX_ByteString/WideString header changes

Original Review URL: https://codereview.chromium.org/1117413002
Original Review URL: https://codereview.chromium.org/1118983003

TBR=thestig@chromium.org

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

4 years agoMerge to XFA: Take adavange of unused bytes at end of CFX strings
Tom Sepez [Thu, 30 Apr 2015 22:46:34 +0000]
Merge to XFA: Take adavange of unused bytes at end of CFX strings

Original Review URL: https://codereview.chromium.org/1112423003
Original Review URL: https://codereview.chromium.org/1120703003

TBR=thestig@chromium.org

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

4 years agoMerge to XFA: Fix V8 array buffer allocator.
Tom Sepez [Thu, 30 Apr 2015 22:19:03 +0000]
Merge to XFA: Fix V8 array buffer allocator.

R=thestig@chromium.org

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

4 years agoMerge to XFA: Make CFX_WideString::LockBuffer() completely unused.
Tom Sepez [Tue, 28 Apr 2015 21:36:02 +0000]
Merge to XFA: Make CFX_WideString::LockBuffer() completely unused.

Original Review URL: https://codereview.chromium.org/1053613004
TBR=thestig@chromium.org

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

4 years agoMerge to XFA: Pin V8 version until initialization issue in b584bab resolved.
Tom Sepez [Tue, 28 Apr 2015 21:31:15 +0000]
Merge to XFA: Pin V8 version until initialization issue in b584bab resolved.

Also make a Handle => Local change for XFA required at
https://chromium.googlesource.com/v8/v8.git/+/202a97c88eb6807915135a1e6be9aa921cd8efac
to fix compile.

Original Review URL https://codereview.chromium.org/1108913004/
TBR=thestig@chromium.org

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

4 years agoMerge to XFA: SEGV in CFX_BaseSegmentedArray::Iterate().
Tom Sepez [Mon, 27 Apr 2015 20:33:26 +0000]
Merge to XFA: SEGV in CFX_BaseSegmentedArray::Iterate().

Original Review URL: https://codereview.chromium.org/1110653002

R=thestig@chromium.org
TBR=thestig@chromium.org
BUG=481363

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

4 years agoMerge to XFA: Fix windows-specific usage of CFX_WideStr::operator LPCWSTR().
Tom Sepez [Mon, 27 Apr 2015 20:22:54 +0000]
Merge to XFA: Fix windows-specific usage of CFX_WideStr::operator LPCWSTR().

Original Review URL: https://codereview.chromium.org/1103343002

R=brucedawson@chromium.org
TBR=brucedawson@chromium.org

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

4 years agoMerge to XFA: Reduce usage of operator LPCWSTR from CFX_WideString().
Tom Sepez [Mon, 27 Apr 2015 19:06:58 +0000]
Merge to XFA: Reduce usage of operator LPCWSTR from CFX_WideString().

Original Review URL: https://codereview.chromium.org/1101933003
TBR=brucedawson@chromium.org

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

4 years agoMerge to XFA: Remove unused nParamNum values from JS method tables.
Tom Sepez [Fri, 24 Apr 2015 01:14:26 +0000]
Merge to XFA: Remove unused nParamNum values from JS method tables.

Original Review URL: https://codereview.chromium.org/1084183008
TBR=thestig@chromium.org

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

4 years agoMerge to XFA: Kill overloaded cast operators in CJS_Value.
Tom Sepez [Thu, 23 Apr 2015 18:31:31 +0000]
Merge to XFA: Kill overloaded cast operators in CJS_Value.

Original Review URL: https://codereview.chromium.org/1096813008
TBR=thestig@chromium.org

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

4 years agoMerge to XFA: Fix segmentation fault 'denial of service condition'
JUN FANG [Thu, 23 Apr 2015 17:12:19 +0000]
Merge to XFA: Fix segmentation fault 'denial of service condition'

BUG=467392
R=thestig@chromium.org, tsepez@chromium.org

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

4 years agoMerge to XFA: Add missing operators for CFX_xxxString combo patch.
Tom Sepez [Wed, 22 Apr 2015 19:29:21 +0000]
Merge to XFA: Add missing operators for CFX_xxxString combo patch.

This pulls in:
Review URL: https://codereview.chromium.org/1099193002
Review URL: https://codereview.chromium.org/1090303003
Review URL: https://codereview.chromium.org/1084293003
Review URL: https://codereview.chromium.org/1099213002

Plus one fix to an XFA file to fix compilation.

TBR=thestig@chromium.org

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

4 years agoMerge to XFA: Kill CFX_StringBufTemplate.
Tom Sepez [Tue, 21 Apr 2015 22:24:49 +0000]
Merge to XFA: Kill CFX_StringBufTemplate.

Original Review URL: https://codereview.chromium.org/1098203002
TBR=thestig@chromium.org

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

4 years agoMerge to XFA: Fix a crashier due to images with abnormal size
JUN FANG [Tue, 21 Apr 2015 16:58:09 +0000]
Merge to XFA: Fix a crashier due to images with abnormal size

BUG=453553
R=thestig@chromium.org, tsepez@chromium.org

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

4 years agoMerge to XFA: Remove Release() combo patch.
Tom Sepez [Mon, 20 Apr 2015 23:33:30 +0000]
Merge to XFA: Remove Release() combo patch.

Includes:
Original Review URL: https://codereview.chromium.org/1098043002
Original Review URL: https://codereview.chromium.org/1097843003
Original Review URL: https://codereview.chromium.org/1093213002

R=thestig@chromium.org

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

4 years agoMerge to XFA: Set m_FontType in CPDF_Font() constructor.
Tom Sepez [Fri, 17 Apr 2015 20:17:49 +0000]
Merge to XFA: Set m_FontType in CPDF_Font() constructor.

Original Review URL: https://codereview.chromium.org/1060813003
TBR=thestig@chromium.org

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

4 years agoMerge to XFA: add nonstd::unique_ptr
Tom Sepez [Fri, 17 Apr 2015 20:05:21 +0000]
Merge to XFA: add nonstd::unique_ptr

Original Review URL: https://codereview.chromium.org/1091283002

TBR=thestig@chromium.org

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

4 years agoAdjust the order of const and static
JUN FANG [Fri, 17 Apr 2015 18:58:52 +0000]
Adjust the order of const and static

BUG=N/A
R=tsepez@chromium.org

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

4 years agoFix an issue 'heap use after free'
JUN FANG [Fri, 17 Apr 2015 18:46:08 +0000]
Fix an issue 'heap use after free'

This fix is for covering more scenarios. Some faces like Foxit defined faces and MM faces are managed in built-in manager. They are released in built-in manager not in fontMgr.

BUG=452793
R=tsepez@chromium.org

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

4 years agoFix heap use after free in FT_Stream_ReleaseFrame
JUN FANG [Thu, 16 Apr 2015 22:19:04 +0000]
Fix heap use after free in FT_Stream_ReleaseFrame

Adjust the release order of resource to fix this issue.

BUG=452793
R=tsepez@chromium.org

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

4 years agoXFA merge: Fix pdfium standalone to compile with VS 2015.
Bruce Dawson [Thu, 16 Apr 2015 20:49:57 +0000]
XFA merge: Fix pdfium standalone to compile with VS 2015.

This change disables several warnings that fire frequently
in pdfium and are not practical to fix at this time.

Originally on https://codereview.chromium.org/1096463005

TBR=tsepez@chromium.org
BUG=440500

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

4 years agoMerge to XFA: Fix offset outside bounds of constant string warnings
JUN FANG [Wed, 15 Apr 2015 19:00:53 +0000]
Merge to XFA: Fix offset outside bounds of constant string warnings

BUG=380476
R=tsepez@chromium.org

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

4 years agoMerge to XFA: Make FX_NEW throw on OOM.
Tom Sepez [Wed, 15 Apr 2015 17:30:05 +0000]
Merge to XFA: Make FX_NEW throw on OOM.

Original Review URL: https://codereview.chromium.org/1082253003
TBR=thestig@chromium.org

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

4 years agoFix two new / free mismatches
Tom Sepez [Tue, 14 Apr 2015 22:55:35 +0000]
Fix two new / free mismatches

R=brucedawson@chromium.org

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

4 years agoFix XFA compile under clang
Tom Sepez [Tue, 14 Apr 2015 21:31:25 +0000]
Fix XFA compile under clang

TBR=thestig@chromium.org

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

4 years agoMerge to XFA: Kill CFX_Object.
Tom Sepez [Tue, 14 Apr 2015 20:50:34 +0000]
Merge to XFA: Kill CFX_Object.

Not just a simple merge, but changes to remove CFX_Object from XFA.

Original Review URL: https://codereview.chromium.org/1088733002
TBR=thestig@chromium.org

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

4 years agoMerge to XFA: Fix a heap overflow in CJBig2_Context::parseSymbolDict
JUN FANG [Mon, 13 Apr 2015 17:34:10 +0000]
Merge to XFA: Fix a heap overflow in CJBig2_Context::parseSymbolDict

BUG=476107
R=tsepez@chromium.org

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

4 years agoMerge to XFA: Fix compiling warnings on Windows
Jun Fang [Sat, 11 Apr 2015 18:34:43 +0000]
Merge to XFA: Fix compiling warnings on Windows

TBR=tsepez@chromium.org

BUG=N/A

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

4 years agoMerge to XFA: Fix a heap buffer overflow issue in CPDF_CMap::GetNextChar
JUN FANG [Sat, 11 Apr 2015 16:33:23 +0000]
Merge to XFA: Fix a heap buffer overflow issue in CPDF_CMap::GetNextChar

Add a check to make sure offset is less than the size of string in the function of GetNextChar().

BUG=471651
R=tsepez@chromium.org

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

4 years agoXFA port: Fix the noisiest variable shadowing warnings in pdfium.
Bruce Dawson [Fri, 10 Apr 2015 22:18:07 +0000]
XFA port: Fix the noisiest variable shadowing warnings in pdfium.

Three functions in fx_coordinates.h account for 60% of the warnings
when building with VS 2015, due to variable shadowing. Renaming the
function parameters is safe, resolves the warnings, and reduces
confusion.

From https://codereview.chromium.org/1077083003

TBR=tsepez@chromium.org
BUG=440500

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

4 years agoMerge to XFA: Better fix for snprintf non-termination on windows.
Tom Sepez [Fri, 10 Apr 2015 21:54:13 +0000]
Merge to XFA: Better fix for snprintf non-termination on windows.

TBR=brucedawson@chromium.org

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

4 years agoMerge to XFA: Fix a stack overflow in CPDF_Parser::LoadCrossRefV5
JUN FANG [Fri, 10 Apr 2015 20:45:43 +0000]
Merge to XFA: Fix a stack overflow in CPDF_Parser::LoadCrossRefV5

A stack overflow was triggered by checked_cast due to
invalid index in pdf files like 'Index[45 -1661]'.

BUG=473400
R=tsepez@chromium.org

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

4 years agoMerge to XFA: Don't call FPDF_InitLibrary() in individual unit_tests.
Tom Sepez [Fri, 10 Apr 2015 17:40:55 +0000]
Merge to XFA: Don't call FPDF_InitLibrary() in individual unit_tests.

Original Review URL: https://codereview.chromium.org/1071343002
TBR=thestig@chromium.org

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

4 years agoMerge to XFA: Update DEPS to pull V8 from the new repository.
Tom Sepez [Thu, 9 Apr 2015 21:16:15 +0000]
Merge to XFA: Update DEPS to pull V8 from the new repository.

Original Review URL: https://codereview.chromium.org/1059023003
TBR=thestig@chromium.org

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

4 years agoXFA port: Include windows.h instead of the MFC header afxres.h
Bruce Dawson [Thu, 9 Apr 2015 20:52:02 +0000]
XFA port: Include windows.h instead of the MFC header afxres.h

VS 2015 RC ships without afxres.h, so fpdfsdkdll.rc fails to
compile. afxres.h is really intended for MFC apps so depending on
it is a bad idea anyway, so I changed both references to
windows.h. See http://stackoverflow.com/questions/1575559 for
some other perspective on this.

Ported from https://codereview.chromium.org/1078513002

TBR=tsepez@chromium.org
BUG=440500

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

4 years agoMerge to XFA: testing utility combo patch
Tom Sepez [Thu, 9 Apr 2015 20:37:02 +0000]
Merge to XFA: testing utility combo patch

This pulls in the following CLs from master:
Review URL: https://codereview.chromium.org/1072613003
Review URL: https://codereview.chromium.org/1058463004
Review URL: https://codereview.chromium.org/1057983003
Review URL: https://codereview.chromium.org/1036073002
Review URL: https://codereview.chromium.org/1031203003
Review URL: https://codereview.chromium.org/1029193002
Review URL: https://codereview.chromium.org/1016613004
Review URL: https://codereview.chromium.org/1026903002

TBR=thestig@chromium.org

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

4 years agoMerge to XFA: Fix ref to timezone variable - removed in VS 2015
Bruce Dawson [Thu, 9 Apr 2015 18:10:17 +0000]
Merge to XFA: Fix ref to timezone variable - removed in VS 2015

It turns out that 'timezone' has been deprecated for a while. If
deprecation messages are enabled then VS 2013 says this when 'timezone'
is referenced:

warning C4996: 'timezone': This function or variable may be unsafe.
Consider using _get_timezone instead.

Sometimes features stay deprecated for decades, but in this case
'timezone' is now gone.

Merged from change https://codereview.chromium.org/1075673002

TBR=tsepez@chromium.org
BUG=440500

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

4 years agoMerge to XFA: Fix a global buffer overflow in GCPDF_CIDFont::_CharCodeFromUnicode
Jun Fang [Thu, 9 Apr 2015 16:59:41 +0000]
Merge to XFA: Fix a global buffer overflow in GCPDF_CIDFont::_CharCodeFromUnicode

There is not a code page (CP) used for converting unicode to mutli-bytes
if the coding scheme is CID coding. Only return 0 if CID can't be retrieved.
The difference on Windows and other platforms should be the function used
for converting rather than others.

BUG=466790
R=tsepez@chromium.org

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

4 years agoMerge to XFA: Fix IWYU in formfiller/ directory.
Tom Sepez [Wed, 8 Apr 2015 23:19:33 +0000]
Merge to XFA: Fix IWYU in formfiller/ directory.

Original Review URL: https://codereview.chromium.org/1066253002
TBR=thestig@chromium.org

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

4 years agoMerge to XFA: Use pdfium-specific tree closer for gating landings
Tom Sepez [Wed, 8 Apr 2015 16:04:38 +0000]
Merge to XFA: Use pdfium-specific tree closer for gating landings

Original Review URL: https://codereview.chromium.org/1066413004
TBR=jam@chromium.org

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

4 years agoFFL_MIN and FFL_MAX are pointless and stupid.
Tom Sepez [Wed, 8 Apr 2015 15:29:46 +0000]
FFL_MIN and FFL_MAX are pointless and stupid.

Kill some nearby dead code while I'm at it.

R=thestig@chromium.org

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

4 years agoMerge to XFA: Fix a stack overflow issue caused by an invalid usage of snprintf
Jun Fang [Tue, 7 Apr 2015 23:59:05 +0000]
Merge to XFA: Fix a stack overflow issue caused by an invalid usage of snprintf

BUG=469244
R=tsepez@chromium.org

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

4 years agoMerge to XFA: Fix IWYU in pdfwindow/ directory.
Tom Sepez [Tue, 7 Apr 2015 23:12:46 +0000]
Merge to XFA: Fix IWYU in pdfwindow/ directory.

This incorporates class vs. struct fix in 34f5fc0f2a18
TBR=thestig@chromium.org

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

4 years agoMerge to XFA: Fix (nearly all) IWYU in fpdfskd/include/javascript/ headers.
Tom Sepez [Tue, 7 Apr 2015 22:35:48 +0000]
Merge to XFA: Fix (nearly all) IWYU in fpdfskd/include/javascript/ headers.

Original Review URL: https://codereview.chromium.org/1060133002
TBR=thestig@chromium.org

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

4 years agoMerge to XFA: Fix IWYU in fxcrt headers.
Tom Sepez [Mon, 6 Apr 2015 20:49:25 +0000]
Merge to XFA: Fix IWYU in fxcrt headers.

Note: new includes for XFA
Original Review URL: https://codereview.chromium.org/1064433005

R=thestig@chromium.org
TBR=thestig@chromium.org

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

4 years agoMerge to XFA: fix missing semicolons
JUN FANG [Mon, 6 Apr 2015 20:10:59 +0000]
Merge to XFA: fix missing semicolons

TBR=tsepez@chromium.org

BUG=N/A

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

4 years agoMerge to XFA: Fix a fatal error due to cloning a global document object
JUN FANG [Mon, 6 Apr 2015 19:39:51 +0000]
Merge to XFA: Fix a fatal error due to cloning a global document object

BUG=454595
R=tsepez@chromium.org

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

4 years agoMerge to XFA: Update the path of header file to avoid a compiling error in chrome
JUN FANG [Fri, 3 Apr 2015 21:39:18 +0000]
Merge to XFA: Update the path of header file to avoid a compiling error in chrome

BUG=N/A
R=tsepez@chromium.org

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

4 years agoMerge to XFA: No-op change to poke the bots after being out of sequence.
Tom Sepez [Fri, 3 Apr 2015 19:59:41 +0000]
Merge to XFA: No-op change to poke the bots after being out of sequence.

Adds a comment and changes some whitespace.
TBR=jun_fang@foxitsoftware.com

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

4 years agoMerge to XFA: Fix a compiling error in fpdf_parser_parser_embeddertest.cpp
Jun Fang [Fri, 3 Apr 2015 11:31:02 +0000]
Merge to XFA: Fix a compiling error in fpdf_parser_parser_embeddertest.cpp

BUG=N/A
R=tsepez@chromium.org

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

4 years agoMerge to XFA: Add embedder test comparing with the last patch.
JUN FANG [Fri, 3 Apr 2015 18:35:50 +0000]
Merge to XFA: Add embedder test comparing with the last patch.

When there is a wrong keyword like '??ze' in the dictionary
of the trailer, PDFium can't recognize it and aborts further
parsing. After this change, PDFium continues even it can't
get the right size at this moment. It will rebuild the cross
reference table later since the size of the table is missing.

BUG=459580
R=tsepez@chromium.org

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

4 years agoMerge to XFA: Fix uninitialized face in fx_ge_font.cpp
JUN FANG [Thu, 2 Apr 2015 17:05:06 +0000]
Merge to XFA: Fix uninitialized face in fx_ge_font.cpp

MSAN reported this issue when I tried to reproduce 460936 in the last version of freetype on Linux.

BUG=N/A
R=thestig@chromium.org

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

4 years agoMerge to XFA: doc.external - Check direction of property access before blindly getting.
Tom Sepez [Wed, 1 Apr 2015 17:12:47 +0000]
Merge to XFA: doc.external - Check direction of property access before blindly getting.

Original Review URL: https://codereview.chromium.org/1039063002
TBR=thestig@chromium.org

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

4 years agoMerge to XFA: Fix no text displayed issue when font embedded and font subsetting...
JUN FANG [Mon, 30 Mar 2015 23:24:09 +0000]
Merge to XFA: Fix no text displayed issue when font embedded and font subsetting enabled

BUG=465322
R=thestig@chromium.org

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

4 years agoMerge to XFA: Fix missing include for std::min
Tom Sepez [Fri, 20 Mar 2015 17:55:35 +0000]
Merge to XFA: Fix missing include for std::min

Original Review URL: https://codereview.chromium.org/1026843002
TBR=thestig@chromium.org

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

4 years agoMerge to XFA: Fix subtle issues in opj_skip_from_memory and add unit tests.
Tom Sepez [Thu, 19 Mar 2015 20:02:23 +0000]
Merge to XFA: Fix subtle issues in opj_skip_from_memory and add unit tests.

Original Review URL: https://codereview.chromium.org/1016203002
TBR=thestig@chromium.org

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

4 years agoMerge to XFA: Return OS status code from python test driver scripts.
Tom Sepez [Tue, 17 Mar 2015 20:30:11 +0000]
Merge to XFA: Return OS status code from python test driver scripts.

Original Review URL: https://codereview.chromium.org/1014083003
TBR=thestig@chromium.org

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

4 years agoMerge to XFA: Pull our new test case repository via deps.
Tom Sepez [Mon, 16 Mar 2015 22:27:19 +0000]
Merge to XFA: Pull our new test case repository via deps.

Original Review URL: https://codereview.chromium.org/1010833003
TBR=thestig@chromium.org

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

4 years agoMerge to XFA: Speculative fix for breakage in pdfum DEPS roll
Tom Sepez [Mon, 16 Mar 2015 21:58:06 +0000]
Merge to XFA: Speculative fix for breakage in pdfum DEPS roll

Original Review URL: https://codereview.chromium.org/1011803003
TBR=thestig@chromium.org

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

4 years agoMerge to XFA: Fix a bug that JPX images can't be shown
JUN FANG [Mon, 16 Mar 2015 18:22:52 +0000]
Merge to XFA: Fix a bug that JPX images can't be shown

In the process of opj_end_decompress, it will return fail when the end of coding stream is reached. However it returns true in the same scenario implemented in openJPEG. So the final solution is from openJPEG. Return true when the end of coding stream is reached.

BUG=452671
R=tsepez@chromium.org

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

4 years agoMerge to XFA: Fix potential integer overflow in fpdf_render_image.cpp
JUN FANG [Mon, 16 Mar 2015 17:56:16 +0000]
Merge to XFA: Fix potential integer overflow in fpdf_render_image.cpp

BUG=382661
R=tsepez@chromium.org

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

4 years agoXFA: bound memcpy length in _png_load_bmp_attribute()
Tom Sepez [Wed, 11 Mar 2015 21:41:17 +0000]
XFA: bound memcpy length in _png_load_bmp_attribute()

BUG=466338
R=thestig@chromium.org

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

4 years agoMerge to XFA: Kill remaining sprintfs
Tom Sepez [Wed, 11 Mar 2015 21:25:05 +0000]
Merge to XFA: Kill remaining sprintfs

There is fx_codec_png.cpp that has a sprintf under XFA
that was not present in master.

Original Review URL: https://codereview.chromium.org/999543002

R=thestig@chromium.org

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

4 years agoRemove the calling 'FPDF_HasXFAField' in LoadXFADoc
JUN FANG [Mon, 9 Mar 2015 21:57:38 +0000]
Remove the calling 'FPDF_HasXFAField' in LoadXFADoc

BUG=NA
R=tsepez@chromium.org

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

4 years agoMerge to XFA: Make conversions for CPDF_Link explicit.
Tom Sepez [Fri, 6 Mar 2015 20:37:13 +0000]
Merge to XFA: Make conversions for CPDF_Link explicit.

Original Review URL: https://codereview.chromium.org/985503005
TBR=thestig@chromium.org

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

4 years agoMerge to XFA: Make conversion between CPDF_Dest and its object explicit.
Tom Sepez [Fri, 6 Mar 2015 18:52:05 +0000]
Merge to XFA: Make conversion between CPDF_Dest and its object explicit.

Original Review URL: https://codereview.chromium.org/984703004
TBR=thestig@chromium.org

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

4 years agoMerge to XFA: Add gmock to .gitignore
Tom Sepez [Fri, 6 Mar 2015 17:43:29 +0000]
Merge to XFA: Add gmock to .gitignore

Original Review URL: https://codereview.chromium.org/985833002
TBR=halyavin@chromium.org

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

4 years agoMerge to XFA: Make conversion between CPDF_Action and its dictionary explicit.
Tom Sepez [Fri, 6 Mar 2015 00:44:22 +0000]
Merge to XFA: Make conversion between CPDF_Action and its dictionary explicit.

Original Review URL: https://codereview.chromium.org/984773002

R=thestig@chromium.org
TBR=thestig@chromium.org

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

4 years agoCheck whether a pdf has XFA fields before loading XFA fields
JUN FANG [Thu, 5 Mar 2015 21:39:21 +0000]
Check whether a pdf has XFA fields before loading XFA fields

BUG=452793
R=tsepez@chromium.org

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

4 years agoFix pdfium_embeddertests on XFA.
Tom Sepez [Tue, 3 Mar 2015 17:49:29 +0000]
Fix pdfium_embeddertests on XFA.

Required to avoid a DCHECK() due to recent changes
in V8 initialization.  This mirrors the changes introduced
at b045ed21 to pdfium_test.cpp in pdfium_embeddertest.cpp

R=jam@chromium.org

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

4 years agoFix a compiling error in fxjs_v8.h
JUN FANG [Tue, 3 Mar 2015 01:08:22 +0000]
Fix a compiling error in fxjs_v8.h

BUG=NA
R=thestig@chromium.org, tsepez@chromium.org

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

4 years agoMerge to XFA: Kill off JS_ErrorString type.
Tom Sepez [Mon, 2 Mar 2015 23:35:26 +0000]
Merge to XFA: Kill off JS_ErrorString type.

Orignal Review URL: https://codereview.chromium.org/971033002
TBR=thestig@chromium.org

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

4 years agoMerge to XFA: Return error information from pdfium to JS.
Tom Sepez [Mon, 2 Mar 2015 20:59:05 +0000]
Merge to XFA: Return error information from pdfium to JS.

Cherry-pick from b720d0a14601f1496ef15297bc46d401f5a2a890 +
Manually resolve merge conflicts +
Fix more IWYU to fix compile.

Original Review URL: https://codereview.chromium.org/963193003
TBR=thestig@chromium.org

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

4 years agoMerge to XFA: Do hit tests against Annots in reverse order.
Lei Zhang [Sat, 28 Feb 2015 03:58:08 +0000]
Merge to XFA: Do hit tests against Annots in reverse order.

Original Review URL: https://codereview.chromium.org/952423002

(cherry picked from commit 944ccad72d028ed5e37f53c5c8c0888866905bc3)

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

4 years agoMerge to XFA: Fix JPX image rendering that regressed due to several security fixes.
Lei Zhang [Sat, 28 Feb 2015 03:57:05 +0000]
Merge to XFA: Fix JPX image rendering that regressed due to several security fixes.

Original Review URL: https://codereview.chromium.org/892553002

(cherry picked from commit 254360730190cc6d6e3de325ee101948b78c1e32)

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

4 years agoMerge to XFA: Fix some typos in fpdf_render_loadimage.cpp.
Lei Zhang [Sat, 28 Feb 2015 03:55:44 +0000]
Merge to XFA: Fix some typos in fpdf_render_loadimage.cpp.

Original Review URL: https://codereview.chromium.org/885223004

(cherry picked from commit 900d7bf46efc26e0588e1777759f7716ed4f8dbd)

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

4 years agoMerge to XFA: Cleanup: Fix some unused-function warnings.
Lei Zhang [Sat, 28 Feb 2015 03:54:20 +0000]
Merge to XFA: Cleanup: Fix some unused-function warnings.

Original URL: https://codereview.chromium.org/891113002

(cherry picked from commit 44fc192f29a77c5864fabffe5ab63937dacdfd21)

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

4 years agoMerge to XFA: Cleanup parts of fpdf_render_loadimage.cpp.
Lei Zhang [Sat, 28 Feb 2015 03:52:52 +0000]
Merge to XFA: Cleanup parts of fpdf_render_loadimage.cpp.

Original URL: https://codereview.chromium.org/890883006

(cherry picked from commit 3f41851972a18762164d7110a82da3baed564b80)

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

4 years agoMerge to XFA: Check for NULL pointers in CJBig2_SymbolDict::DeepCopy().
Lei Zhang [Sat, 28 Feb 2015 03:51:26 +0000]
Merge to XFA: Check for NULL pointers in CJBig2_SymbolDict::DeepCopy().

Original URL: https://codereview.chromium.org/837093002

(cherry picked from commit f8105c665856863ad95da37fee6c12b98b953e2c)

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