pdfium.git
4 years agoMerge to XFA: Add unit test for top-level bookmarks.
Tom Sepez [Wed, 14 Oct 2015 16:26:32 +0000]
Merge to XFA: Add unit test for top-level bookmarks.

Original Review URL: https://codereview.chromium.org/1404723002 .
(cherry picked from commit 7d54a9f70f977ce9b72959ef55dc6300713ccafe)

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

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

4 years agoChanges to XFA to more closely match master.
Tom Sepez [Tue, 13 Oct 2015 22:49:36 +0000]
Changes to XFA to more closely match master.

These files should change in XFA in order to reduce the number of
"noise diffs" between master and XFA as seen in
    https://codereview.chromium.org/1399273003/

These include: blank lines and missed merges:
  3c012fe else-after-returns (partial)
  fb07e28 Tidy up CPDFDOC_Environment (partial, consts missing).
  624b166 Allow FPDFBookmark_GetFirstChild to return the top level bookmark

R=thestig@chromium.org

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

4 years agoMerge to XFA: Pass IJS_Runtime, not IJS_Context, to native object constructors.
Tom Sepez [Tue, 13 Oct 2015 22:00:10 +0000]
Merge to XFA: Pass IJS_Runtime, not IJS_Context, to native object constructors.

Original Review URL: https://codereview.chromium.org/1389163007 .
(cherry picked from commit 848a13b6777cbff8cc4aea3ab3d69eaa0b82ae6c)

Merge conflics in:
fpdfsdk/src/javascript/JS_Runtime.cpp
fpdfsdk/src/javascript/JS_Runtime_Stub.cpp
fpdfsdk/src/jsapi/fxjs_v8.cpp

R=thestig@chromium.org

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

4 years agoMerge to XFA: wstring allocations waste up to 7 wasted bytes.
Tom Sepez [Tue, 13 Oct 2015 19:11:15 +0000]
Merge to XFA: wstring allocations waste up to 7 wasted bytes.

Original Review URL: https://codereview.chromium.org/1399983003 .
(cherry picked from commit 6eeffab789800e2afa1b9d10de70c9116db32355)

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

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

4 years agoMerge to XFA: Allow compiling PDFium without V8.
Tom Sepez [Tue, 13 Oct 2015 16:27:27 +0000]
Merge to XFA: Allow compiling PDFium without V8.

Original Review URL: https://codereview.chromium.org/1395733006 .
(cherry picked from commit f1c713663192368d26031a4caed1f9705f4510af)

Conflicts:
  BUILD.gn
  fpdfsdk/src/fpdfview.cpp
  fpdfsdk/src/javascript/JS_Runtime.cpp
  pdfium.gyp
  samples/BUILD.gn
  samples/samples.gyp

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

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

4 years agoupgrade openjpeg to commit# cf352af
Jun Fang [Tue, 13 Oct 2015 07:28:55 +0000]
upgrade openjpeg to commit# cf352af

BUG=457480,497355
R=tsepez@chromium.org

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

4 years agoAllow building of XFA branch without XFA
Tom Sepez [Mon, 12 Oct 2015 22:47:07 +0000]
Allow building of XFA branch without XFA

R=thestig@chromium.org

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

4 years agoXFA: Move fx_codec's lpng and tiff to third_party/
Tom Sepez [Mon, 12 Oct 2015 22:43:01 +0000]
XFA: Move fx_codec's lpng and tiff to third_party/

We did this with the other codecs in master, but these two are
XFA-only, and did not get the same treatment.

Remove some fx_ prefixes in the third-party file names.

R=thestig@chromium.org

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

4 years agoFix XFA GN build
Tom Sepez [Mon, 12 Oct 2015 22:38:22 +0000]
Fix XFA GN build

R=thestig@chromium.org

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

4 years agoXFA: Update standalone.gypi and .gitignore to match master
Tom Sepez [Mon, 12 Oct 2015 22:36:53 +0000]
XFA: Update standalone.gypi and .gitignore to match master

R=thestig@chromium.org

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

4 years agoMerge to XFA: Sanitize CJBig2_SymbolDict's memory usage.
Lei Zhang [Fri, 9 Oct 2015 20:57:36 +0000]
Merge to XFA: Sanitize CJBig2_SymbolDict's memory usage.

- Use std::vector<JBig2ArithCtx> instead of storing pointers to arrays.
- Make CJBig2_SymbolDict's members private with accessors.
- Use std::vector<JBig2ArithCtx> in related places.
- Steal Chromium's vector_as_array() and use it as an adaptor as needed.

BUG=514891
TBR=tsepez@chromium.org

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

(cherry picked from commit 3acb1ef909a22368507ed13817c4988c818e3aee)

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

4 years agoMerge to XFA: Fix include paths for fx_system.h
Lei Zhang [Fri, 9 Oct 2015 20:55:41 +0000]
Merge to XFA: Fix include paths for fx_system.h

TBR=dml@google.com

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

(cherry picked from commit fb0334733cf4a541636128f77f9fe8067a8c70f6)

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

4 years agoMerge to XFA: Parallelize run_corpus_tests.py.
Lei Zhang [Fri, 9 Oct 2015 20:49:17 +0000]
Merge to XFA: Parallelize run_corpus_tests.py.

- Use the number of cores as the default -j value
- Fall back to old code for -j 1

TBR=nparker@chromium.org

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

(cherry picked from commit fd751f28cecce61ab36038799043639d570e0b26)

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

4 years agoMerge to XFA: Fix a compiling error on Mac
Jun Fang [Fri, 9 Oct 2015 05:40:38 +0000]
Merge to XFA: Fix a compiling error on Mac

BUG=497357

TBR=tsepez@chromium.org

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

4 years agoMerge to XFA: Fix heap-buffer-overflow in color_sycc_to_rgb
Jun Fang [Fri, 9 Oct 2015 05:14:54 +0000]
Merge to XFA: Fix heap-buffer-overflow in color_sycc_to_rgb

It's a bug existing in the conversion from YUV420 to RGB.
For YUV 420 format, four pixels have 4 Y but only one U and
one V. In some cases, there are odd columns or lines in
some images. The pixels on last line or column may have Y
but no U or V data. For this case, We shall extend U or V
using the data on previous column or line.

BUG=497357
R=tsepez@chromium.org

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

4 years agoMerge to XFA: Fix a malloc/delete mismatch introduced in commit 8a9ce57.
Lei Zhang [Thu, 8 Oct 2015 22:55:15 +0000]
Merge to XFA: Fix a malloc/delete mismatch introduced in commit 8a9ce57.

Just get rid of the malloc altogether and use CJBig2_List instead.

BUG=540873
TBR=tsepez@chromium.org

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

(cherry picked from commit 06f255ca4040f3d73cf09f1dbd63a3b167f6a4c1)

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

4 years agoMerge to XFA: Various changes to JBig2 cache:
Lei Zhang [Thu, 8 Oct 2015 22:14:24 +0000]
Merge to XFA: Various changes to JBig2 cache:

- Makes the cache be per-document
- Keys the cache on ObjNum and stream offset instead of keying on a pointer to the data (which can result in false cache hits).
- Makes it so the cache is only used for the globals stream.
- Reenable the cache.

R=dml@google.com
TBR=dml@google.com

BUG=pdfium:207

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

(cherry picked from commit f1b88e76134808f36f16b9e53a2e9dd89b12c8fd)

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

4 years agoMerge to XFA: Put CJBig2_SymbolDict's images in a CJBig2_List container.
Lei Zhang [Thu, 8 Oct 2015 19:32:46 +0000]
Merge to XFA: Put CJBig2_SymbolDict's images in a CJBig2_List container.

Also mark it private.

TBR=tsepez@chromium.org

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

(cherry picked from commit 8793b4a071fad51a770b93838e0752505b020e43)

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

4 years agoMerge to XFA: Wean CJS_Value off of v8::Isolate.
Tom Sepez [Thu, 8 Oct 2015 19:24:19 +0000]
Merge to XFA: Wean CJS_Value off of v8::Isolate.

(cherry picked from commit 287b63d9ab410783d71cf37291f09fd57d3059b4)
Original Review URL: https://codereview.chromium.org/1394103002 .

R=thestig@chromium.org

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

4 years agoMerge to XFA: Relax the check on 0 length streams.
Lei Zhang [Thu, 8 Oct 2015 19:09:58 +0000]
Merge to XFA: Relax the check on 0 length streams.

CPDF_SyntaxParser::ReadStream() originally created stream objects when
the length is 0. Commit 2526930 tightened the constraint and returned
NULL. This has some adverse affects, as seen in Chromium's print
preview of PDFs.

Instead, relax the constraint a little so when the length is 0, return a
CPDF_Stream with NULL data and size 0.

BUG=531835

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

(cherry picked from commit 4fa0e27ba39f49ba92fb4c160ab836a6f1dd2893)

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

4 years agoMerge to XFA: Fix a leak with g_DefaultGlobalObjectTemplate.
Lei Zhang [Thu, 8 Oct 2015 19:08:47 +0000]
Merge to XFA: Fix a leak with g_DefaultGlobalObjectTemplate.

As seen when running FXJSV8Embeddertest.Getters.

TBR=tsepez@chromium.org

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

(cherry picked from commit eda27bd13270f5324ce3caa34a09a40cffc4026f)

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

4 years agoMerge to XFA: Only call DefineJSObjects() once for the global V8 isolate.
Lei Zhang [Thu, 8 Oct 2015 19:04:47 +0000]
Merge to XFA: Only call DefineJSObjects() once for the global V8 isolate.

BUG=539106
TBR=tsepez@chromium.org

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

(cherry picked from commit 7dfe5929282cb6d78d7b5e32e1d72e9db99d3066)

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

4 years agoMerge to XFA: Rename IFXJS_Runtime and IFXJS_Context to IJS_.
Tom Sepez [Thu, 8 Oct 2015 19:03:00 +0000]
Merge to XFA: Rename IFXJS_Runtime and IFXJS_Context to IJS_.

Merge conflicts in:
  fpdfsdk/src/javascript/Document.cpp
  fpdfsdk/src/javascript/JS_Define.h

New code in:
 fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h
 fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp

(cherry picked from commit 213a172779fddbd7e588ee2e2b3906ccc47d6896)
Original Review URL: https://codereview.chromium.org/1386173002 .

R=thestig@chromium.org

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

4 years agoMerge to XFA: Refcount external V8 isolate initialization / release.
Lei Zhang [Thu, 8 Oct 2015 19:00:14 +0000]
Merge to XFA: Refcount external V8 isolate initialization / release.

BUG=531339
R=tsepez@chromium.org

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

(cherry picked from commit 9b6735445f20ae17b883b5739bf79a7c1f99e139)

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

4 years agoMerge to XFA: Stop inlining CJBig2_BitStream.
Lei Zhang [Thu, 8 Oct 2015 04:33:55 +0000]
Merge to XFA: Stop inlining CJBig2_BitStream.

TBR=tsepez@chromium.org

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

(cherry picked from commit a0f2b67bd659e3f1780edfac56d8754bca685d5f)

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

4 years agoMerge to XFA: Fix the Windows build after commit 8a9ce57.
Lei Zhang [Thu, 8 Oct 2015 04:32:07 +0000]
Merge to XFA: Fix the Windows build after commit 8a9ce57.

TBR=tsepez@chromium.org

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

(cherry picked from commit 80aa8c26887d98f654a9eecf7298663656cfc40f)

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

4 years agoMerge to XFA: Remove gotos in JBig2 code.
Lei Zhang [Thu, 8 Oct 2015 04:31:16 +0000]
Merge to XFA: Remove gotos in JBig2 code.

TBR=tsepez@chromium.org

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

(cherry picked from commit 8a9ce5778e0789beb7ba15a62c592a353a51bcdd)

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

4 years agoMerge to XFA: Fix regression in JBIG2 decoding from commit ce37d73.
Lei Zhang [Thu, 8 Oct 2015 04:30:06 +0000]
Merge to XFA: Fix regression in JBIG2 decoding from commit ce37d73.

many callers can tolerate CJBig2_ArithIntDecoder::decode() OOB failure.

BUG=539749, pdfium:209
TBR=tsepez@chromium.org

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

(cherry picked from commit 35902e725aa6cc83a317c3b6fdd1926b81b8e44b)

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

4 years agoMerge to XFA: Remove some dead code from CCodec_Jbig2Module. Variable was only ever...
Lei Zhang [Thu, 8 Oct 2015 04:26:47 +0000]
Merge to XFA: Remove some dead code from CCodec_Jbig2Module. Variable was only ever set to false.

TBR=dml@google.com

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

(cherry picked from commit 1f439a7a3b7c44235ecdac9a411add8fb62b0d83)

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

4 years agoMerge to XFA: Remove unused global argument from FXJS_CONSTRUCTOR.
Tom Sepez [Wed, 7 Oct 2015 20:09:38 +0000]
Merge to XFA: Remove unused global argument from FXJS_CONSTRUCTOR.

(cherry picked from commit ebd39a6a8fcbbbf1c5a2e6f1b2e30f452971d0ee)
Original Review URL: https://codereview.chromium.org/1389003003 .

TBR=thestig@chromium.org

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

4 years agoMerge to XFA: Pass v8::Isolate to PDFium at init time.
Tom Sepez [Wed, 7 Oct 2015 17:17:53 +0000]
Merge to XFA: Pass v8::Isolate to PDFium at init time.

New code changes in JS_Runtime.cpp.

(cherry picked from commit 3dedace9623fef6161a8666e53a4ab2b9be61e4c)
Original Review URL: https://codereview.chromium.org/1367033002 .

Also merge to XFA: Run FXJS_V8 embedder tests against a shared isolate,
since the two go together.

(cherry picked from commit 4ea721cb7954898a9722c389dae86c62957352d0)
Original Review URL: https://codereview.chromium.org/1377293004 .

R=thestig@chromium.org

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

4 years agoMerge to XFA: Store object definition ID in each js_class.
Tom Sepez [Tue, 6 Oct 2015 18:45:28 +0000]
Merge to XFA: Store object definition ID in each js_class.

Manual edits in JS_Define.h.

(cherry picked from commit f0a5b2803c09f3605dcd606e764ef604f0d2a8ea)
Original Review URL: https://codereview.chromium.org/1382263002 .

R=thestig@chromium.org

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

4 years agoMerge to XFA: Make the vast majority of JS headers private to src/javascript.
Tom Sepez [Tue, 6 Oct 2015 18:33:46 +0000]
Merge to XFA: Make the vast majority of JS headers private to src/javascript.

(cherry picked from commit 5b3d0208723f21c50b9922bdc500c9d78c359a25)
Original Review URL: https://codereview.chromium.org/1389783002 .

New changes to fix IWYU in:
  fpdfsdk/include/fpdfxfa/fpdfxfa_app.h
  xfa/include/fxfa/fxfa.h
  xfa/include/fxfa/fxfa_objectacc.h

R=thestig@chromium.org

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

4 years agoMerge to XFA: Disable JBIG2 cache; prevent data corruption - try 2.
Lei Zhang [Tue, 6 Oct 2015 00:09:11 +0000]
Merge to XFA: Disable JBIG2 cache; prevent data corruption - try 2.

Also change CJBig2_SymbolDict::DeepCopy() to return a unique_ptr to
prevent a potential leak if the cache size was 0.

BUG=pdfium:207
R=tsepez@chromium.org, jbreiden@google.com

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

(cherry picked from commit fd12ec5584d9a17f310a2c0c408a438ef3b1ce63)

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

4 years agoMerge to XFA: Remove pointless CPDFSDK_PageView usage in CJS_Object / CJS_EmbedObj.
Lei Zhang [Tue, 6 Oct 2015 00:06:09 +0000]
Merge to XFA: Remove pointless CPDFSDK_PageView usage in CJS_Object / CJS_EmbedObj.

R=tsepez@chromium.org

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

(cherry picked from commit 4942ed7a79188bd832c2a599e7dd94ea59b674ae)

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

4 years agoMerge to XFA: CJS_Timer should observe CJS_Runtime destruction.
Lei Zhang [Tue, 6 Oct 2015 00:00:03 +0000]
Merge to XFA: CJS_Timer should observe CJS_Runtime destruction.

Also remove dead CJS_EmbedObj::{Begin,End}Timer code.

BUG=539107
R=tsepez@chromium.org

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

(cherry picked from commit 794c9b67d3d519342aa7e15052766f7d4a99f551)

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

4 years agoMerge to XFA: Remove JavaScript.h
Tom Sepez [Mon, 5 Oct 2015 23:44:41 +0000]
Merge to XFA: Remove JavaScript.h

Small manaul merge in JS_Object.cpp

(cherry picked from commit 5e8b7356d68e35d7d631a2a917e651a4e7c73b65)
Original Review URL: https://codereview.chromium.org/1385983002 .

TBR=thestig@chromium.org

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

4 years agoMerge to XFA: Added a fallback Win32 font information class for win32k lockdown.
Tom Sepez [Mon, 5 Oct 2015 20:11:43 +0000]
Merge to XFA: Added a fallback Win32 font information class for win32k lockdown.

(cherry picked from commit d7ba833df5c9dc70cb94dba2d0aae1339b345ae4)
Original Review URL: https://codereview.chromium.org/1306883002 .

TBR=forshaw@chromium.org
BUG=523278

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

4 years agoMerge to XFA: Fix NULL pointer dereference in CPDF_InterForm.
Lei Zhang [Sun, 4 Oct 2015 06:29:26 +0000]
Merge to XFA: Fix NULL pointer dereference in CPDF_InterForm.

BUG=537772
TBR=tsepez@chromium.org

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

(cherry picked from commit 4f277fc8d41303cbf007335dfbbff60b81fffde0)

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

4 years agoMerge to XFA: Do not call into formfiller code with a NULL PageView.
Lei Zhang [Sun, 4 Oct 2015 06:26:09 +0000]
Merge to XFA: Do not call into formfiller code with a NULL PageView.

BUG=537173
TBR=tsepez@chromium.org

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

(cherry picked from commit ac67d4765a8ac36cd00c9fc8b6f2b80a3e1cff72)

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

4 years agoMerge to XFA: Get rid of gotos in CPDF_SyntaxParser and FlateUncompress().
Lei Zhang [Fri, 2 Oct 2015 20:30:25 +0000]
Merge to XFA: Get rid of gotos in CPDF_SyntaxParser and FlateUncompress().

TBR=tsepez@chromium.org

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

(cherry picked from commit b8a074711108baf04017d86207e08c19ff327d8e)

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

4 years agoMerge to XFA: Turn a couple functions that always return true to return void.
Lei Zhang [Fri, 2 Oct 2015 19:28:32 +0000]
Merge to XFA: Turn a couple functions that always return true to return void.

R=tsepez@chromium.org

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

(cherry picked from commit dcfa0ba2928072c962fe8835d1a2ccd309eafbbd)

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

4 years agoMerge to XFA: Prevent divide by zeros in CJBig2_GSIDProc::decode_MMR().
Lei Zhang [Fri, 2 Oct 2015 18:19:21 +0000]
Merge to XFA: Prevent divide by zeros in CJBig2_GSIDProc::decode_MMR().

Check the image size before attempting to decode.

BUG=538103
TBR=tsepez@chromium.org

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

(cherry picked from commit 9fb70fbded5c0bf4f5313a49fd3496b4d4fa71ca)

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

4 years agoMerge to XFA: Fix a leak in PDF_DataDecode() on failure.
Lei Zhang [Fri, 2 Oct 2015 18:18:01 +0000]
Merge to XFA: Fix a leak in PDF_DataDecode() on failure.

Found using the test examples from https://crbug.com/537780

TBR=tsepez@chromium.org

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

(cherry picked from commit 63d0a52a6af7d327fdb5792f520cc8d93fe2f1bb)

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

4 years agoMerge to XFA: Fix PNG decoding divide by zero error due to zero row count.
Lei Zhang [Fri, 2 Oct 2015 18:10:17 +0000]
Merge to XFA: Fix PNG decoding divide by zero error due to zero row count.

BUG=537790
TBR=tsepez@chromium.org

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

(cherry picked from commit 095a83c59120c108d9ac6f0ab71fd3faa5eea810)

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

4 years agoXFA: Remove tests for new in fxge and fpdfsdk.
Lei Zhang [Fri, 2 Oct 2015 17:28:27 +0000]
XFA: Remove tests for new in fxge and fpdfsdk.

R=tsepez@chromium.org

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

4 years agoXFA: Remove test for new.
Lei Zhang [Fri, 2 Oct 2015 17:22:14 +0000]
XFA: Remove test for new.

R=tsepez@chromium.org

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

4 years agoXFA: Remove more checks for new returning NULL.
Lei Zhang [Fri, 2 Oct 2015 17:11:43 +0000]
XFA: Remove more checks for new returning NULL.

This is partially based on https://codereview.chromium.org/1198903002/

R=tsepez@chromium.org

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

4 years agoXFA: Remove checks for new returning NULL in fpdfsdk.
Lei Zhang [Fri, 2 Oct 2015 17:10:49 +0000]
XFA: Remove checks for new returning NULL in fpdfsdk.

Based on parts of https://codereview.chromium.org/1089823004

R=tsepez@chromium.org

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

4 years agoMerge to XFA: Refactor some common code for bounding boxes.
Lei Zhang [Fri, 2 Oct 2015 17:08:48 +0000]
Merge to XFA: Refactor some common code for bounding boxes.

R=tsepez@chromium.org

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

(cherry picked from commit 721f003bcb6a3631571bd8f046bc90bcb6def13a)

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

4 years agoMerge to XFA: Add test case for parsing endobj keywords.
Tom Sepez [Fri, 2 Oct 2015 16:31:14 +0000]
Merge to XFA: Add test case for parsing endobj keywords.

(cherry picked from commit 5bd88ec07e79215400777f3095c6843e0627cade)
Original Review URL: https://codereview.chromium.org/1232803005 .

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

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

4 years agoMerge to XFA: Correct mistakes in test case for 507316
Tom Sepez [Fri, 2 Oct 2015 16:16:40 +0000]
Merge to XFA: Correct mistakes in test case for 507316

(cherry picked from commit ccc8b21622a7d6a7723bc04e065e0ec3666dab64)
Original Review URL: https://codereview.chromium.org/1377403003 .

TBR=thestig@chromium.org

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

4 years agoMerge to XFA: Fix static initializer in fxjs_v8.cpp
Tom Sepez [Fri, 2 Oct 2015 15:59:57 +0000]
Merge to XFA: Fix static initializer in fxjs_v8.cpp

(cherry picked from commit 20fc82efdc9c9e4caa6e72d05a83b9206e8c8f72)
Original Review URL: https://codereview.chromium.org/1372103004 .

TBR=thestig@chromium.org

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

4 years agoXFA: remove new tests from fpdftext
Lei Zhang [Fri, 2 Oct 2015 05:31:56 +0000]
XFA: remove new tests from fpdftext

This is a manual merge of 7f6b6677665588a27b9d14babc6358840454ce17
Original review: https://codereview.chromium.org/1085363003
TBR=tsepez@chromium.org

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

4 years agoXFA: Remove checks in fxcrt now that new can't return 0.
Lei Zhang [Fri, 2 Oct 2015 05:22:51 +0000]
XFA: Remove checks in fxcrt now that new can't return 0.

This is a manual merge.
Original review: https://codereview.chromium.org/1052553006
TBR=tsepez@chromium.org

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

4 years agoMerge to XFA: Disable JBIG2 cache; prevent data corruption
Lei Zhang [Thu, 1 Oct 2015 22:26:38 +0000]
Merge to XFA: Disable JBIG2 cache; prevent data corruption

BUG=pdfium:207

Original author: jbreiden@google.com
Original CL: http://codereview.chromium.org/1362133003/

TBR=jbreiden@google.com

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

(cherry picked from commit 7886d8dcf3bc9ef9b51e733d77bd3243ef32adb8)

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

4 years agoXFA: Remove tests for failures after new statements.
Lei Zhang [Thu, 1 Oct 2015 22:08:10 +0000]
XFA: Remove tests for failures after new statements.

Manual merge of commit 357d16f8453c2cf0c0afd00eec9e86d03d55fe69.
Original code review: https://codereview.chromium.org/1090693002

R=tsepez@chromium.org

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

4 years agoMerge to XFA: Clean up some image decoder classes:
Lei Zhang [Thu, 1 Oct 2015 21:08:32 +0000]
Merge to XFA: Clean up some image decoder classes:

- Use std::vector<uint8_t> instead of raw uint8_t*
- Make ICodec_ScanlineDecoder::GetScanline() return const uint8_t*
- Add FxFreeDeleter, use it in CCodec_ImageDataCache.
- Make CCodec_ImageDataCache encapsulate its data members.

TBR=tsepez@chromium.org

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

(cherry picked from commit 022da0014faa103901ec107ed6a33e5ab00c7931)

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

4 years agoMerge to XFA: Cleanup JBig2_ArithIntDecoder.
Lei Zhang [Thu, 1 Oct 2015 21:03:33 +0000]
Merge to XFA: Cleanup JBig2_ArithIntDecoder.

TBR=tsepez@chromium.org

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

(cherry picked from commit ce37d7347f1ab4c9fc1f48a137628da641bb4f14)

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

4 years agoMerge to XFA: Add signatures to FXJS_V8.
Tom Sepez [Wed, 30 Sep 2015 22:50:57 +0000]
Merge to XFA: Add signatures to FXJS_V8.

(cherry picked from commit 158e335717efba9dce3aa6f6d1e31ed884e1f59e)
Original Review URL: https://codereview.chromium.org/1353193004 .

TBR=jochen@chromium.org, krasin@google.com

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

4 years agoMerge to XFA: Cleanup CJBig2_ArithDecoder.
Lei Zhang [Wed, 30 Sep 2015 04:29:53 +0000]
Merge to XFA: Cleanup CJBig2_ArithDecoder.

TBR=tsepez@chromium.org

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

(cherry picked from commit 0fef7dd405ac85660dbeddd2e47620daffa70cb5)

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

4 years agoMerge to XFA: Fix blank page issue caused by too strict correction on bpc
Jun Fang [Tue, 29 Sep 2015 02:24:54 +0000]
Merge to XFA: Fix blank page issue caused by too strict correction on bpc

For bit per component (bpc), PDF spec mentions that a RunLengthDecode or
DCTDecode filter shall always deliver 8-bit samples. However, some PDF files
don't follow this rule. We can find that filter is RunLengthDecode but bpc is
1 in the provided test file. In this case, pdfium will correct bpc to 8 but
the actual bpc is 1. It causes a failure because the data is much more than
the expected. To handle this case, pdfium doesn't correct bpc to 8 when the
original bpc is 1.

BUG=512557
R=tsepez@chromium.org

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

4 years agoMerge to XFA: Cleanup some fx_codec_fax.cpp code.
Lei Zhang [Mon, 28 Sep 2015 21:21:09 +0000]
Merge to XFA: Cleanup some fx_codec_fax.cpp code.

R=tsepez@chromium.org
TBR=tsepez@chromium.org

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

(cherry picked from commit 39cd934a4705f69c30e1bbf13eab347f66999020)

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

4 years agoMerge to XFA: Introduce kPerIsolateDataIndex and tidy JS_Define.h
Tom Sepez [Mon, 28 Sep 2015 17:31:27 +0000]
Merge to XFA: Introduce kPerIsolateDataIndex and tidy JS_Define.h

(cherry picked from commit d6d9dc6b9a45368abdf43477592ee9f6cdb6102e)
(cherry picked from commit cfff2f65aaec70247d020188bc68a0dc4fb34c3e)

Original Review URL: https://codereview.chromium.org/1372963003 .
Original Review URL: https://codereview.chromium.org/1367813003 .

TBR=jochen@chromium.org

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

4 years agoXFA: Pass IFXJS_Runtime via V8 contexts, not V8 isolates
Tom Sepez [Mon, 28 Sep 2015 16:06:03 +0000]
XFA: Pass IFXJS_Runtime via V8 contexts, not V8 isolates

This makes the XFA branch look more like the master.  I suspect a patch
was lost during the intial XFA checkin.

R=jochen@chromium.org

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

4 years agoMerge to XFA: Add Mac-specific pixel test expectations.
Lei Zhang [Sat, 26 Sep 2015 05:52:41 +0000]
Merge to XFA: Add Mac-specific pixel test expectations.

The font is slightly different from Linux/Windows.

BUG=524043
TBR=jun_fang@foxitsoftware.com

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

(cherry picked from commit 6c5afa68ed4e21f9d0bfd1ecc01e824d946c5485)

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

4 years agoMerge to XFA: Fix the issue that pdfium swallows 'fi' or 'ff' in some pdf files
Lei Zhang [Sat, 26 Sep 2015 05:51:39 +0000]
Merge to XFA: Fix the issue that pdfium swallows 'fi' or 'ff' in some pdf files

Pdfium swallows 'fi' or 'ff' in some tested files because it doesn't load the embedded font file correctly. The root cause is that there is incorrect keyword like 'ngendstream' in the stream of the embedded font file. Pdfium tries to find another correct keyword but uses wrong offset rather than accumulated offset.

BUG=524043
TBR=jun_fang@foxitsoftware.com

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

(cherry picked from commit 9bd18183ba8210c91d71c3060146235750a4c71c)

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

4 years agoMerge to XFA: Fix a leak in CJBig2_Context.
Lei Zhang [Thu, 24 Sep 2015 21:38:44 +0000]
Merge to XFA: Fix a leak in CJBig2_Context.

- Remove dead code
- Use unique_ptr

BUG=pdfium:202
TBR=tsepez@chromium.org

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

(cherry picked from commit 01c1e54a506329b36f87b0e37d3b419b70973342)

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

4 years agoMerge to XFA: Split up JBig2_GeneralDecoder.cpp.
Lei Zhang [Thu, 24 Sep 2015 08:13:26 +0000]
Merge to XFA: Split up JBig2_GeneralDecoder.cpp.

TBR=tsepez@chromium.org

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

(cherry picked from commit 630a28442364f03c1d3d9b48873da42755e1fddf)

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

4 years agoMerge to XFA: Fix a leak in CJBig2_CachePair.
Lei Zhang [Thu, 24 Sep 2015 00:07:33 +0000]
Merge to XFA: Fix a leak in CJBig2_CachePair.

TBR=jbreiden@google.com

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

(cherry picked from commit b6b336a0a1849526f66c49588daa2ccdd09d42cd)

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

4 years agoMerge to XFA: Flip conditionals to positive logic in pdfium_test.
Lei Zhang [Wed, 23 Sep 2015 22:35:25 +0000]
Merge to XFA: Flip conditionals to positive logic in pdfium_test.

TBR=tsepez@chromium.org

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

(cherry picked from commit c4e940d803113552a146cd059b1ca793a1f72a22)

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

4 years agoMerge to XFA: Allow external font-path configuration from pdfium_test.
Lei Zhang [Wed, 23 Sep 2015 22:31:44 +0000]
Merge to XFA: Allow external font-path configuration from pdfium_test.

TBR=tsepez@chromium.org

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

(cherry picked from commit 9311163b564785a3a3ccdcb09bd3b7d0b2976d1a)

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

4 years agoMerge to XFA: Fix a couple potential file handle leaks in pdfium_test.
Lei Zhang [Wed, 23 Sep 2015 21:52:53 +0000]
Merge to XFA: Fix a couple potential file handle leaks in pdfium_test.

Fix lint issues / git cl format.

R=tsepez@chromium.org

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

(cherry picked from commit 155345e2c47188fa65da1603b7f06c986707bb69)

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

4 years agoMerge to XFA: Change nonstd::unique_ptr to take a custom deleter.
Lei Zhang [Wed, 23 Sep 2015 04:53:22 +0000]
Merge to XFA: Change nonstd::unique_ptr to take a custom deleter.

Code is mostly stolen from Chromium's scoped_ptr.

- Add unit tests.
- Use this to fix a leak.

BUG=chromium:531408
TBR=tsepez@chromium.org

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

(cherry picked from commit cef2a9c51bee4b987fc813013d45dad6535a9a46)

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

4 years agoMerge to XFA: Add missing 'return' keyword.
Lei Zhang [Wed, 23 Sep 2015 01:28:39 +0000]
Merge to XFA: Add missing 'return' keyword.

Discovered with experimental Clang plugin that flags temporary objects
that are immediately destroyed.

patch from issue 1359063003 at patchset 1 (http://crrev.com/1359063003#ps1)

A=mdempsky@chromium.org
TBR=mdempsky@chromium.org

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

(cherry picked from commit f316bfe37e2fc977376e18f7534aae9824da240a)

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

4 years agoMerge to XFA: Use std::set<> to track active event handlers.
Tom Sepez [Tue, 22 Sep 2015 22:50:03 +0000]
Merge to XFA: Use std::set<> to track active event handlers.

Merge conflicts in JS_Runtime.cpp

(cherry picked from commit d8d223127d706aa4961b2c9b0037ab256fce9a8f)
Original Review URL: https://codereview.chromium.org/1352393003 .

R=thestig@chromium.org

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

4 years agoMerge to XFA: Add nonstd::unique_ptr move assigment operator.
Tom Sepez [Tue, 22 Sep 2015 22:22:48 +0000]
Merge to XFA: Add nonstd::unique_ptr move assigment operator.

(cherry picked from commit dd7a7f012424ec8505830710ac0dd0183203c189)
Original Review URL: https://codereview.chromium.org/1358163002 .

TBR=jyasskin@chromium.org

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

4 years agoMerge to XFA: [Docs] Add wiki content to Markdown docs
Tom Sepez [Tue, 22 Sep 2015 15:52:52 +0000]
Merge to XFA: [Docs] Add wiki content to Markdown docs

(cherry picked from commit 61327fe3c46b73141b4c885a98e97cd5d1412aba)
Original Review URL: https://codereview.chromium.org/1356323002 .

TBR=andybons@chromium.org

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

4 years agoXFA: contention between FXJSE and FXJS over isolate data slots
Tom Sepez [Tue, 22 Sep 2015 15:36:17 +0000]
XFA: contention between FXJSE and FXJS over isolate data slots

This probably broke at 06b60021e when the FXJS slot moved to 0
from 1 unless explicitly overriden by the embedder, which conflicted
with the FXJSE_ usage of slot 0.

Also simplify some logic used to track global intialization of the
underling JS.

TEST=run_javascript_tests.py on XFA branch doesn't segv.
R=jochen@chromium.org

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

4 years agoMerge to XFA: Remove CJS_RuntimeFactory
Tom Sepez [Tue, 22 Sep 2015 00:07:49 +0000]
Merge to XFA: Remove CJS_RuntimeFactory

New edits in:
  fpdfsdk/include/fpdfxfa/fpdfxfa_app.h
  fpdfsdk/include/javascript/IJavaScript.h
  fpdfsdk/src/fpdfxfa/fpdfxfa_app.cpp

(cherry picked from commit bca779d0957965eb2ebfad5479e0894844749626)
Original Review URL: https://codereview.chromium.org/1360523004 .

R=thestig@chromium.org

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

4 years agoMerge to XFA:More tidy of CJS_Object, kill implicit cast operator
Tom Sepez [Mon, 21 Sep 2015 16:22:05 +0000]
Merge to XFA:More tidy of CJS_Object, kill implicit cast operator

(cherry picked from commit 270fc65d5824eeedbb2ed17516a72721bde9c9ef)
Original Review URL: https://codereview.chromium.org/1349423006 .

TBR=thestig@chromium.org

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

4 years agoMerge to XFA: Fix a #include in fpdf_page_func.cpp.
Lei Zhang [Thu, 17 Sep 2015 22:48:48 +0000]
Merge to XFA: Fix a #include in fpdf_page_func.cpp.

Not sure why building with gyp was working despite the missing '../' but
it wasn't working in stricter build systems.

TBR=dml@google.com

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

(cherry picked from commit fa31d9630aadfe101d3b35e26ce0fc926ec1505b)

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

4 years agoMerge to XFA: Add a missing #include that's needed for call to FXSYS_tolower.
Lei Zhang [Thu, 17 Sep 2015 22:46:15 +0000]
Merge to XFA: Add a missing #include that's needed for call to FXSYS_tolower.

TBR=dml@google.com

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

(cherry picked from commit 8ad46d3d6829d879cd342caec4c6f7eaae43cba0)

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

4 years agoMerge to XFA: Don't pass null isolates to FXJS_ when we have a real isolate.
Tom Sepez [Thu, 17 Sep 2015 22:40:06 +0000]
Merge to XFA: Don't pass null isolates to FXJS_ when we have a real isolate.

(cherry picked from commit 34b39e1d4fa0b16d47770b823230344356cc451a)
Original Review URL: https://codereview.chromium.org/1350703003 .

TBR=thestig@chromium.org

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

4 years agoMerge to XFA: Ensure functions in FXJS_V8 are prefixed by FXJS_.
Tom Sepez [Thu, 17 Sep 2015 22:25:23 +0000]
Merge to XFA: Ensure functions in FXJS_V8 are prefixed by FXJS_.

Manual edits:
  fpdfsdk/include/javascript/JS_Define.h
  fpdfsdk/src/fpdfxfa/fpdfxfa_app.cpp
  fpdfsdk/src/javascript/Document.cpp
  fpdfsdk/src/javascript/JS_Runtime.cpp
  fpdfsdk/src/jsapi/fxjs_v8.cpp

(cherry picked from commit 506df426d5d64d68e9dc27ffebcf56f6c6a1bccf)
Original Review URL: https://codereview.chromium.org/1347833002 .

(cherry picked from commit 455019ca48f60bd285e043986471f51f17c69a0d)
Original Review URL: https://codereview.chromium.org/1349783003 .

(cherry picked from commit 1af240cc45480520b447be767686e73a29c48f9e)
Original Review URL: https://codereview.chromium.org/1348693003 .

R=thestig@chromium.org

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

4 years agoMerge to XFA: Convert some unneeded gotos into returns.
Lei Zhang [Thu, 17 Sep 2015 21:53:39 +0000]
Merge to XFA: Convert some unneeded gotos into returns.

R=tsepez@chromium.org
TBR=tsepez@chromium.org

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

(cherry picked from commit da0938f8671958aba0522a69fc687a7bbb01b435)

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

4 years agoMerge to XFA: Implement FPDFAction_GetFilePath().
Lei Zhang [Thu, 17 Sep 2015 21:51:48 +0000]
Merge to XFA: Implement FPDFAction_GetFilePath().

The API is the same as the Foxit version, except the encoding is
specified as UTF-8 instead of local encoding.

Also remove CPDF_LWinParam since it's unused.

BUG=chromium:517713
R=tsepez@chromium.org

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

(cherry picked from commit 0b3c8f742613da294f812e2f6e908f4026499f96)
(cherry picked from commit a9d4bc541179ec0436adc4b2e18b7fdecc5952dc)
(cherry picked from commit 4ffd89ed556e32a6527d0e88952fe20ec1e2f362)

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

4 years agoMerge to XFA: gyp_pdfium should use ninja by default.
Lei Zhang [Tue, 15 Sep 2015 23:37:28 +0000]
Merge to XFA: gyp_pdfium should use ninja by default.

TBR=tsepez@chromium.org

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

(cherry picked from commit 8b1cb99abd4dcff132367fe338df38e48971bd1d)

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

4 years agoMerge to XFA: Cleanup JBig2_GeneralDecoder.cpp.
Lei Zhang [Tue, 15 Sep 2015 23:28:45 +0000]
Merge to XFA: Cleanup JBig2_GeneralDecoder.cpp.

- FX_Alloc() can't fail and return.
- Use unique_ptr / remove gotos.
- NULL -> nullptr.
- Combine common code.

TBR=tsepez@chromium.org

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

(cherry picked from commit d15cda90f598ce52fa601552577ef7fd8a89fce3)

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

4 years agoMerge to XFA: Cleanup: Fix a typo. s/Processive/Processing/
Lei Zhang [Tue, 15 Sep 2015 23:27:31 +0000]
Merge to XFA: Cleanup: Fix a typo. s/Processive/Processing/

TBR=tsepez@chromium.org

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

(cherry picked from commit a5fde67ea3c9d20d3f19354ec9e7e1be600d7589)

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

4 years agoMerge to XFA: Cleanup casting of FX_Alloc() return values.
Lei Zhang [Tue, 15 Sep 2015 23:24:58 +0000]
Merge to XFA: Cleanup casting of FX_Alloc() return values.

Also convert some FX_AllocOrDie() calls to FX_Alloc().

TBR=tsepez@chromium.org

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

(cherry picked from commit 6aca3e209ff6148f1d77b86b8b97d3bdf18e3eba)

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

4 years agoMerge to XFA: Refactor fxjs_v8 and add embeddertests for it.
Tom Sepez [Tue, 15 Sep 2015 22:30:34 +0000]
Merge to XFA: Refactor fxjs_v8 and add embeddertests for it.

(cherry picked from commit b17d62601b21dfce85718e08cfd0ffce3a45d74e)
(cherry picked from commit 09ed30750282bf56a92d0e646ab22c64bea81a36)
Manual edits:
  fpdfsdk/src/jsapi/fxjs_v8_embeddertest.cpp - add lockers.
  fppdfsdk/src/javascript/JS_Runtime.cpp - rework XFA init path.

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

R=thestig@chromium.org

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

4 years agoMerge to XFA: Add move ctor to nonstd::unique_ptr.
Tom Sepez [Tue, 15 Sep 2015 17:49:41 +0000]
Merge to XFA: Add move ctor to nonstd::unique_ptr.

(cherry picked from commit ac8fda05418b7c96255d320fdec296935c552187)
(cherry picked from commit 72d51871ae152163eeb9b005fd0a74d5c1651cd2)

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

TBR=thestig@chromium.org

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

4 years agoMerge to XFA: Get CJS_RuntimeFactory out of CJS_GlobalData management.
Tom Sepez [Mon, 14 Sep 2015 22:06:53 +0000]
Merge to XFA: Get CJS_RuntimeFactory out of CJS_GlobalData management.

(cherry picked from commit 9a817f092e6800e9338b41acf4ea0416b6ad4467)
Original Review URL: https://codereview.chromium.org/1338993005 .

Small manual merge in
  fpdfsdk/src/javascript/JS_GlobalData.cpp
  fpdfsdk/src/javascript/global.cpp

TBR=thestig@chromium.org

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

4 years agoMerge to XFA: Fix strings, ..., void return types for Consts.h.
Tom Sepez [Fri, 11 Sep 2015 20:21:50 +0000]
Merge to XFA: Fix strings, ..., void return types for Consts.h.

(cherry picked from commit f9e40aec10263f9445d69598657f42550294d653)
Orignal Review URL: https://codereview.chromium.org/1342433002 .

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

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

4 years agoMerge to XFA: Rename Init methods to more accurately describe purpose
Tom Sepez [Fri, 11 Sep 2015 15:35:03 +0000]
Merge to XFA: Rename Init methods to more accurately describe purpose

(cherry picked from commit df4de98c06075b0e491ac645f2d118a6813cedc9)
Trivial manual merges in
  fpdfsdk/include/javascript/JS_Runtime.h
  fpdfsdk/src/javascript/JS_Runtime.cpp

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

TBR=thestig@chromium.org

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

4 years agoMerge to XFA: Guard against null image data in CJBig2_GRRDProc.
Lei Zhang [Thu, 10 Sep 2015 23:42:35 +0000]
Merge to XFA: Guard against null image data in CJBig2_GRRDProc.

Credit to karl at skomski.com for the initial version of the CL.

BUG=527174
TBR=tsepez@chromium.org

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

(cherry picked from commit 89d8b4681ce98894a1ee1a6cf4bae77e00d28797)

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

4 years agoMerge to XFA: Remove CJBig2_Object, CJBig2_Module, and friends.
Lei Zhang [Thu, 10 Sep 2015 23:40:49 +0000]
Merge to XFA: Remove CJBig2_Object, CJBig2_Module, and friends.

TBR=tsepez@chromium.org

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

(cherry picked from commit 70f4404e9a9e69afdfdd07715aa946f6561ce0cb)

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

4 years agoMerge to XFA: Remove CJBig2_Module::JBig2_Error and friends.
Lei Zhang [Thu, 10 Sep 2015 23:36:10 +0000]
Merge to XFA: Remove CJBig2_Module::JBig2_Error and friends.

TBR=tsepez@chromium.org

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

(cherry picked from commit 6087a2f18e0c779c1bae62812801cee98fe8a09d)

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

4 years agoMerge to XFA: Make a bunch of JBig2 classes independent of CJBig2_Object.
Lei Zhang [Thu, 10 Sep 2015 23:34:17 +0000]
Merge to XFA: Make a bunch of JBig2 classes independent of CJBig2_Object.

TBR=tsepez@chromium.org

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

(cherry picked from commit 800bf5ac07305ccf9c9522c8c76f728a4fd99da5)

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