pdfium.git
4 years agoXFA: Restore early return if no FPDF_Page in FORM_DoPageAAction()
Tom Sepez [Fri, 30 Oct 2015 19:13:10 +0000]
XFA: Restore early return if no FPDF_Page in FORM_DoPageAAction()

Present in original XFA code drop.

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

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

4 years agoFix segv in CFX_BaseArray::~CFX_BaseArray
Tom Sepez [Fri, 30 Oct 2015 18:20:00 +0000]
Fix segv in CFX_BaseArray::~CFX_BaseArray

One can't blatantly memset() a class to zero if its
parent contains a vtable.

Fix some IWYU along the way.
Kill some casts along the way.

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

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

4 years agoXFA: Segv in CFXJSE_RuntimeData::Get()
Tom Sepez [Fri, 30 Oct 2015 17:28:48 +0000]
XFA: Segv in  CFXJSE_RuntimeData::Get()

Crash occurs when JS is first entered from the FXJSE_ side,
instead of the FXJS_ side. Added initializaton call to FXJSE_.

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

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

4 years agoXFA: Manual merge of Clean up IFX_BidiChar
Lei Zhang [Thu, 29 Oct 2015 22:01:55 +0000]
XFA: Manual merge of Clean up IFX_BidiChar

- Replace IFX_BidiChar with just CFX_BidiChar
- Document implementation
- Change out parameters to pointers
- Remove dead code
- Add an enum for bidi directions
- Move several externs to a header
- Add unit tests

Original CL: https://codereview.chromium.org/1197643002

This version does not remove fx_arb.h and fx_arabic.h, as there is code
on the XFA branch that still uses parts of it.

R=tsepez@chromium.org

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

4 years agoRemove register keyword from xfa files
Tom Sepez [Thu, 29 Oct 2015 19:28:57 +0000]
Remove register keyword from xfa files

These are generating compilation warnings.

R=dsinclair@chromium.org

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

4 years agoXFA: remove unsafe exif parsing code
Tom Sepez [Thu, 29 Oct 2015 16:51:03 +0000]
XFA: remove unsafe exif parsing code

Fortunately, this could only be called with a null buffer,
so none of unchecked lengths could be used.  The remaining
use of the CFX_/IFX_DIBAttributeEx class is as a table, so
put one directly in the CFX_DIBAttribute.

Fix a "register" warning along the way.

R=dsinclair@chromium.org

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

4 years agoXFA: Remove unused _JpegLoadIccProfile()
Tom Sepez [Thu, 29 Oct 2015 16:39:40 +0000]
XFA: Remove unused _JpegLoadIccProfile()

In turn, remove now unused _JpegIsIccMarker().

R=thestig@chromium.org

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

4 years agoMerge to XFA: Remove linearized path print statements
Dan Sinclair [Thu, 29 Oct 2015 13:26:51 +0000]
Merge to XFA: Remove linearized path print statements

This CL makes the pdfium_test app a little less chatty by removing the print
statements around linearized paths.

TBR=tsepez@chromium.org

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

(cherry picked from commit 0bbb2d855b938c7dda3dd56baf7131b1861ae850)

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

4 years agoMerge to XFA: Add PDFCharIsLineEnding helper
Dan Sinclair [Wed, 28 Oct 2015 21:24:07 +0000]
Merge to XFA: Add PDFCharIsLineEnding helper

This CL adds a helper to check if a given character is a \n or \r.

TBR=tsepez@chromium.org

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

(cherry picked from commit 4b38229b004b7b6493cb4c4507df450adc6085f6)

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

4 years agoMerge to XFA: Allow running individual tests.
Dan Sinclair [Wed, 28 Oct 2015 21:12:33 +0000]
Merge to XFA: Allow running individual tests.

This CL adds the ability to run a given test from the corpus, javascript and
pixel test runners. The filename to provide is relative to the testing
directory in question.

Because the directories for javascript and pixel are flat you just provide the filename (it will rewrite the .pdf to .in if .pdf is provided). For corpus tests you have to provide the path from the corpus directory.

Development/pdfium/pdfium % ./testing/tools/run_javascript_tests.py apply.pdf
Rendering PDF file /Development/pdfium/pdfium/out/Debug/gen/pdfium/testing/javascript/apply.pdf.
Non-linearized path...
Rendered 1 pages.
Skipped 0 bad pages.

Development/pdfium/pdfium % ./testing/tools/run_pixel_tests.py bug_524043_1.pdf
Rendering PDF file /Development/pdfium/pdfium/out/Debug/gen/pdfium/testing/pixel/bug_524043_1.pdf.
Linearized path...
Rendered 1 pages.
Skipped 0 bad pages.
Checking /Development/pdfium/pdfium/out/Debug/gen/pdfium/testing/pixel/bug_524043_1.pdf.0.png
diff: 0.00% passed

Development/pdfium/pdfium % ./testing/tools/run_corpus_tests.py third_party/tcpdf/example_065.pdf
Rendering PDF file /Development/pdfium/pdfium/out/Debug/gen/pdfium/testing/corpus/example_065.pdf.
Non-linearized path...
Rendered 1 pages.
Skipped 0 bad pages.
Checking /Development/pdfium/pdfium/out/Debug/gen/pdfium/testing/corpus/example_065.pdf.0.png
diff: 0.14% failed
FAILURE: example_065.pdf; Command '['/Development/pdfium/pdfium/out/Debug/pdfium_diff', '/Development/pdfium/pdfium/testing/corpus/third_party/tcpdf/example_065_expected.pdf.0.png', '/Development/pdfium/pdfium/out/Debug/gen/pdfium/testing/corpus/example_065.pdf.0.png']' returned non-zero exit status 1

Summary of Failures:
/Development/pdfium/pdfium/testing/corpus/third_party/tcpdf/example_065.pdf

TBR=thestig@chromium.org

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

(cherry picked from commit da6254ff78553773b7bb637ee1e3f5111c083c74)

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

4 years agoMerge to XFA: Revert "Add test case for parsing endobj keywords."
Dan Sinclair [Wed, 28 Oct 2015 20:28:38 +0000]
Merge to XFA: Revert "Add test case for parsing endobj keywords."

This reverts commit 5bd88ec07e79215400777f3095c6843e0627cade.

(cherry picked from commit 97dd3fec106ac8a945e03ed1509af0a8b73da993)

R=tsepez@chromium.org

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

4 years agoMerge to XFA: Add a NULL check in pdf_page_colors.cpp
Oliver Chang [Wed, 28 Oct 2015 19:13:02 +0000]
Merge to XFA: Add a NULL check in pdf_page_colors.cpp

TBR=thestig@chromium.org
BUG=548714

Clean merge.

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

(cherry picked from commit 55ed2880e9d19e79717063b117aa5eee40dd454b)

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

4 years agoXFA: Merge DEPS from master for v8, corpus changes
Tom Sepez [Wed, 28 Oct 2015 19:05:30 +0000]
XFA: Merge DEPS from master for v8, corpus changes

TBR=dsinclair@chomium.org

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

4 years agoXFA: Merge master SUPPRESSIONS files
Tom Sepez [Wed, 28 Oct 2015 19:00:42 +0000]
XFA: Merge master SUPPRESSIONS files

These have gotten out of sync with master.

TBR=dsinclair@chromium.org

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

4 years agoXFA: Update document_methods javascript test.
Tom Sepez [Wed, 28 Oct 2015 18:54:02 +0000]
XFA: Update document_methods javascript test.

TBR=dsinclair@chromium.org

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

4 years agoMerge to XFA: Add constants for the path operators.
Dan Sinclair [Wed, 28 Oct 2015 18:24:14 +0000]
Merge to XFA: Add constants for the path operators.

This CL adds constants for some of the path operators to make it more obvious
what is being checked.

TBR=thestig@chromium.org

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

(cherry picked from commit 5a4af03849c8389872cd6908222df4c4e7f99ca8)

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

4 years agoMerge to XFA: Check if document was opened during testing.
Dan Sinclair [Wed, 28 Oct 2015 17:58:49 +0000]
Merge to XFA: Check if document was opened during testing.

When we call OpenDocument we fail to check if the document was actually opened.
Currently we return true in all cases (assuming we read the file). This CL
updates the code to check if the document was opened and return false if not.

I've updated several tests to check for FALSE instead of TRUE. I verified the
documents in fact don't open with my local (non-PDFium) PDF reader.

BUG=pdfium:223
R=tsepez@chromium.org

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

(cherry picked from commit dd4cd523ef4546b43d68e8ca6ec0a97fbe8954e9)

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

4 years agoMerge to XFA: Add PositionIsInBounds to CPDF_StreamParser
Dan Sinclair [Wed, 28 Oct 2015 17:05:52 +0000]
Merge to XFA: Add PositionIsInBounds to CPDF_StreamParser

This Cl moves all of the m_Size <= m_Pos and m_Pos >= m_Size checks to an
PositionIsInBounds() helper.

TBR=tsepez@chromium.org

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

(cherry picked from commit b9d06fb2186d7002d6231d1805bcf97fc60144c5)

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

4 years agoInclude cmath so we get std::isnan
dan sinclair [Wed, 28 Oct 2015 17:00:55 +0000]
Include cmath so we get std::isnan

We need to include the <cmath> header so std::isnan exists.

BUG=pdfium:250
R=tsepez@chromium.org

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

4 years agoMerge to XFA: Add helpers to check the PDF_CharType.
Dan Sinclair [Wed, 28 Oct 2015 14:20:35 +0000]
Merge to XFA: Add helpers to check the PDF_CharType.

This CL adds helpers to provide more descriptive access to
PDF_CharType.

TBR=thestig@chromium.org

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

(cherry picked from commit e3e5675bcdd26b8df7286e10a42d585df6d2321d)

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

4 years agoA crasher due to lacking 'template' node in XFA file
Jun Fang [Wed, 28 Oct 2015 10:36:28 +0000]
A crasher due to lacking 'template' node in XFA file

A template node is mandatory in XFA file. Pdfium should
ignore processing it when no template node is found in
XFA file.

BUG=pdfium:216
R=tsepez@chromium.org

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

4 years agoMerge to XFA: Use static_cast for various CPDF_Object conversions.
Dan Sinclair [Tue, 27 Oct 2015 19:37:54 +0000]
Merge to XFA: Use static_cast for various CPDF_Object conversions.

This Cl converts a bunch of c-style casts to static_cast<CPDF_Object*>().

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

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

(cherry picked from commit 74b147b5747cf65a8936d201b3ed5b32454365cc)

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

4 years agoMerge to XFA: Give names to the shading types
Dan Sinclair [Tue, 27 Oct 2015 17:24:54 +0000]
Merge to XFA: Give names to the shading types

Currently the shading types are referenced by number. This Cl creates and enum
and updates the code to use the enum names instead of magic numbers.

R=tsepez@chromium.org

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

(cherry picked from commit 468974316ed5f6b6f8e637ab2c7afedc7c2bfe6a)

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

4 years agoMerge to XFA: Add context to file load failures in pdfium_test.
Dan Sinclair [Tue, 27 Oct 2015 17:08:41 +0000]
Merge to XFA: Add context to file load failures in pdfium_test.

Currently if pdfium_test fails to load the document it just says it failed. This
CL adds some extra context by looking at the error set by the load and reporting
it to the user.

TBR=tsepez@chromium.org

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

(cherry picked from commit e6eae266a48cdcfd464f52df68c97183a4f7987a)

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

4 years agoMerge to XFA: Fix memory leak in FXJS_ReleaseRuntime.
Oliver Chang [Tue, 27 Oct 2015 16:34:49 +0000]
Merge to XFA: Fix memory leak in FXJS_ReleaseRuntime.

Should fix a bunch of JS related memory leaks reported by LSan/DrMemory.

Clean merge.

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

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

(cherry picked from commit fbbb3c3de517309b6808d7a8f4c441aa0abf7065)

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

4 years agoMerge to XFA: Type check the m_pShadingObj before assuming it's a stream.
Dan Sinclair [Tue, 27 Oct 2015 16:19:11 +0000]
Merge to XFA: Type check the m_pShadingObj before assuming it's a stream.

The m_pShadingObj can be a stream or a dictionary depending on how it's used.
This CL adds some simple type checking to make sure that the type of the
object matches what we expect.

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

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

(cherry picked from commit 4ef782ab57979add3e3910d6bcfde6ef59f65724)

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

4 years agoRevert accidental commits to XFA.
Tom Sepez [Tue, 27 Oct 2015 15:58:46 +0000]
Revert accidental commits to XFA.

Revert "Add an embedded test case"
This reverts commit ec44186fdbca423eddf432be8b5c38914674023a.

Revert "Update the format"
This reverts commit 1df068061b5bb5e768a623318186523ffd251aaa.

Revert "Update .in file"
This reverts commit c13090439e1fbfd8a18c358058f137f897a7477b.

Revert "Address review comments"
This reverts commit 24967515b8be77a79aa1599f8fbf5d3ecbcd1769.

TBR=jun_fang@foxitsoftware.com
TBR=thestig@chromium.org

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

4 years agoAddress review comments
Jun Fang [Tue, 27 Oct 2015 03:38:33 +0000]
Address review comments

4 years agoUpdate .in file
Jun Fang [Mon, 26 Oct 2015 13:31:47 +0000]
Update .in file

4 years agoUpdate the format
Jun Fang [Mon, 26 Oct 2015 13:28:52 +0000]
Update the format

4 years agoAdd an embedded test case
Jun Fang [Mon, 26 Oct 2015 13:07:08 +0000]
Add an embedded test case

4 years agoDelete unused fpdfsdkdll.rc and resource.h.
Lei Zhang [Tue, 27 Oct 2015 01:35:33 +0000]
Delete unused fpdfsdkdll.rc and resource.h.

BUG=pdfium:241
R=brucedawson@chromium.org

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

(cherry picked from commit 24b2eab6351920dd60210b6dcd350c9921e7b3b5)

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

4 years agoMerge to XFA: Remove usage of std::vector::data
Oliver Chang [Tue, 27 Oct 2015 01:12:34 +0000]
Merge to XFA: Remove usage of std::vector::data

Clean merge.

TBR=thestig@chromium.org

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

(cherry picked from commit 044c06f11fb5e62f0984f960be2717ab9bcb540d)

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

4 years agoMerge to XFA: Partial revert of commit c6d8683 to fix a GN + Win/Clang build warning.
Lei Zhang [Tue, 27 Oct 2015 00:06:53 +0000]
Merge to XFA: Partial revert of commit c6d8683 to fix a GN + Win/Clang build warning.

BUG=547906
TBR=thakis@chromium.org

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

(cherry picked from commit f7a8b34f520f1d4892f009700972ab2995ed2681)

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

4 years agoXFA: Take style changes from master for fx_ge_font.cpp
Tom Sepez [Mon, 26 Oct 2015 23:30:45 +0000]
XFA: Take style changes from master for fx_ge_font.cpp

R=thestig@chromium.org

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

4 years agoMerge to XFA: Remove default argument from CPDF_Dictionary::SetAt().
Lei Zhang [Mon, 26 Oct 2015 22:43:44 +0000]
Merge to XFA: Remove default argument from CPDF_Dictionary::SetAt().

Also fix a potential object leak.

TBR=tsepez@chromium.org

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

(cherry picked from commit f7992b39cec908e549fb995acae477a9efba538b)

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

4 years agoRemove CPDF_Reference::Create(), make logic match master
Tom Sepez [Mon, 26 Oct 2015 22:09:33 +0000]
Remove CPDF_Reference::Create(), make logic match master

Makes the files in this CL identical to master, since there are
no XFA specifics.

R=thestig@chromium.org

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

4 years agoMerge to XFA: Fix a leak in CPDF_SyntaxParser::GetObject().
Lei Zhang [Mon, 26 Oct 2015 21:05:07 +0000]
Merge to XFA: Fix a leak in CPDF_SyntaxParser::GetObject().

As seen in FPDFViewEmbeddertest.Crasher_451830.

TBR=tsepez@chromium.org

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

(cherry picked from commit a568ff2dddd3ef44f224d21b31afff8eb14b6d31)

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

4 years agoMerge to XFA: Revert "Revert "Add type cast definitions for CPDF_Reference.""
Dan Sinclair [Mon, 26 Oct 2015 20:54:39 +0000]
Merge to XFA: Revert "Revert "Add type cast definitions for CPDF_Reference.""

This reverts commit 7e155865c90cc1115cc7193b7646a341d8f9093e.

Add type cast definitions for CPDF_Reference.

This Cl adds ToReference, CPDF_Object::AsReference and CPDF_Object::IsReference
and updates the src to use them as needed.

BUG=pdfium:201
R=tsepez@chromium.org

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

(cherry picked from commit 6ee3484bcb413f4cce303e237fe15e2bdaf51ade)

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

4 years agoXFA: Fix stray comma in BUILD.gn
Tom Sepez [Mon, 26 Oct 2015 19:45:29 +0000]
XFA: Fix stray comma in BUILD.gn

TBR=thestig@chromium.org

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

4 years agoMerge to XFA: Cleanup parts of CPDFSDK_AnnotIterator and CPDFSDK_PageView.
Lei Zhang [Mon, 26 Oct 2015 19:14:35 +0000]
Merge to XFA: Cleanup parts of CPDFSDK_AnnotIterator and CPDFSDK_PageView.

R=tsepez@chromium.org

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

(cherry picked from commit 9b2741829b8a8c511ef0f2f313ff53d77ac96307)

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

4 years agoXFA: Remove unused FXSYS_i64tow()
Tom Sepez [Mon, 26 Oct 2015 17:52:31 +0000]
XFA: Remove unused FXSYS_i64tow()

Missing merge from master.

TBR=thestig@chromium.org

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

4 years agoMerge to XFA: Convert some pointers in fpdf_parser_parser to unique_ptr and std:...
Oliver Chang [Sat, 24 Oct 2015 01:16:06 +0000]
Merge to XFA: Convert some pointers in fpdf_parser_parser to unique_ptr and std::vector.

Clean merge.

TBR=thestig@chromium.org

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

(cherry picked from commit bef190fcacb7dde4fedc1360e3019ab9968db16a)

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

4 years agoXFA: take small tidying from master in fpdf_parser_parser.cpp
Tom Sepez [Fri, 23 Oct 2015 23:05:07 +0000]
XFA: take small tidying from master in fpdf_parser_parser.cpp

R=thestig@chromium.org

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

4 years agoTake fx_apple_platform.cpp from master
Tom Sepez [Fri, 23 Oct 2015 23:01:51 +0000]
Take fx_apple_platform.cpp from master

  Also fx_quartz_device.cpp

R=thestig@chromium.org

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

4 years agoMerge to XFA: Cleanup: Remove unused CPDF_Stream::Clone().
Lei Zhang [Fri, 23 Oct 2015 22:16:01 +0000]
Merge to XFA: Cleanup: Remove unused CPDF_Stream::Clone().

Cloning a CPDF_Stream actually happens via CPDF_Object::Clone().

Transitively, remove:
- GetStreamFilter()
-- all the filters.

Also remove CXFA_FileRead.
R=jam@chromium.org

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

(cherry picked from commit c9a05f1c90860a97dbe4b8014bc4584bfa3a4580)

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

4 years agoXFA: make JBig2_HuffmanTable.cpp match master
Tom Sepez [Fri, 23 Oct 2015 21:14:26 +0000]
XFA: make JBig2_HuffmanTable.cpp match master

Includes one array bounds fix.

R=thestig@chromium.org

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

4 years agoXFA: Manually correct IsParsered to IsParsed in remaining places.
Tom Sepez [Fri, 23 Oct 2015 21:13:53 +0000]
XFA: Manually correct IsParsered to IsParsed in remaining places.

Fix a few other master formatting diffs (no-{}, newlines).

R=thestig@chromium.org

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

4 years agoXFA: Manually apply changes to fpdf_text.h and fx_font.h from master
Tom Sepez [Fri, 23 Oct 2015 19:37:42 +0000]
XFA: Manually apply changes to fpdf_text.h and fx_font.h from master

Driven off of https://codereview.chromium.org/1398383002/

Then make the other files as similar as possible.  Note that this
required changes to xfa/ code, and required adding some Set() methods.

R=thestig@chromium.org

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

4 years agoXFA: Make fx_codec_jpx_unittest.cpp match master
Tom Sepez [Thu, 22 Oct 2015 23:50:23 +0000]
XFA: Make fx_codec_jpx_unittest.cpp match master

R=thestig@chromium.org

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

4 years agoMerge to XFA: Set a recursion limit on CPDF_DataAvail::CheckPageNode
Oliver Chang [Thu, 22 Oct 2015 23:42:33 +0000]
Merge to XFA: Set a recursion limit on CPDF_DataAvail::CheckPageNode

This limit mirrors FX_MAX_PAGE_LEVEL in fpdf_parser_document.cpp

Clean merge.
TBR=thestig@chromium.org
BUG=544880

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

(cherry picked from commit 3bfb1dcf56f8470b693ad1126e24e65f9d17926c)

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

4 years agoMerge to XFA: Make parallelized run_corpus_tests.py handle ctrl-c.
Lei Zhang [Thu, 22 Oct 2015 22:24:32 +0000]
Merge to XFA: Make parallelized run_corpus_tests.py handle ctrl-c.

Thanks Stack Overflow!

TBR=tsepez@chromium.org

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

(cherry picked from commit 61fe6edb3f789feefa4bd0c8475b9645fae0d09e)

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

4 years agoMerge to XFA: Add type cast definitions for CPDF_Stream.
Dan Sinclair [Thu, 22 Oct 2015 20:45:48 +0000]
Merge to XFA: Add type cast definitions for CPDF_Stream.

This Cl adds ToStream, CPDF_Object::AsStream and CPDF_Object::IsStream and
updates the src to use them as needed.

BUG=pdfium:201
R=tsepez@chromium.org

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

(cherry picked from commit 338805f1366dcdf9a5b48cf591541cf98d7490f1)

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

4 years agoMerge to XFA: Add type cast definitions for CPDF_Array.
Dan Sinclair [Thu, 22 Oct 2015 19:02:06 +0000]
Merge to XFA: Add type cast definitions for CPDF_Array.

This Cl adds ToArray, CPDF_Object::AsArray and CPDF_Object::IsArray and
updates the src to use them as needed.

BUG=pdfium:201
R=thestig@chromium.org, tsepez@chromium.org

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

(cherry picked from commit c2bfc000e502c42c9a3017038fd9104c7997d126)

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

4 years agoXFA: Sync build and documentation differences with master.
Dan Sinclair [Thu, 22 Oct 2015 18:58:54 +0000]
XFA: Sync build and documentation differences with 

This Cl syncs the AUTHORS, and README.md and build scripts in XFA to match master where possible.

R=tsepez@chromium.org

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

4 years agoMerge to XFA: Remove unused error variable from CFX_Font::AdjustMMParams
Oliver Chang [Thu, 22 Oct 2015 18:20:22 +0000]
Merge to XFA: Remove unused error variable from CFX_Font::AdjustMMParams

Also fixes a potential memory leak.

R=tsepez@chromium.org, thestig@chromium.org
BUG=pdfium:156

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

(cherry picked from commit de49cf173d12fe7a462168e2bf6c44971d7d28f8)

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

4 years agoMerge to XFA: Remove unused CPDFSDK_InterForm::DoFDFBuffer.
Dan Sinclair [Thu, 22 Oct 2015 15:13:57 +0000]
Merge to XFA: Remove unused CPDFSDK_InterForm::DoFDFBuffer.

This method isn't used anywhere and the implementation doesn't really do
anything.

TBR=thestig@chromium.org

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

(cherry picked from commit 162f227af9c5e28885a36e6ca06a09c12c6223e0)

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

4 years agoMerge to XFA: Make DEPS use relative paths to fix recipe
Lei Zhang [Thu, 22 Oct 2015 00:11:04 +0000]
Merge to XFA: Make DEPS use relative paths to fix recipe

Context: DEPS was originally added to pdfium to allow its recipe to
automatically check out its dependencies. The recipe used absolute
paths, and so the checkout directory's name ('pdfium') had to be
prefixed to the directory checkout of every dependency, as gclient in
the recipe worked one level above the pdfium checkout itself.

After change fe4537269fc7133320a5131638757f2ffa6bd854, the recipe no
longer worked. To fix this, I'm making DEPS use relative paths.

BUG=375773
TBR=tsepez@chromium.org

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

(cherry picked from commit 39c6b4c50bb06336c2b592a407efa862ff6ed8ae)

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

4 years agoMerge to XFA: Make CFX_FontMgr member variables private. (try 2)
Lei Zhang [Thu, 22 Oct 2015 00:07:24 +0000]
Merge to XFA: Make CFX_FontMgr member variables private. (try 2)

R=tsepez@chromium.org

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

(cherry picked from commit 5a5b6fb3759daf1201ffc9702f626f4b243922d0)

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

4 years agoMerge to XFA: (Reland) Switch builds to clang by default for Linux and OS X.
Oliver Chang [Wed, 21 Oct 2015 22:29:47 +0000]
Merge to XFA: (Reland) Switch builds to clang by default for Linux and OS X.

Also adds support for ASan and sanitizer coverage.

BUG=pdfium:1,pdfium:171
R=thestig@chromium.org

Committed: https://pdfium.googlesource.com/pdfium/+/5478df43a8970257e9644ae6f57a6fe7513029c6

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

(cherry picked from commit 3b2ab45f0a883046a7c457e8435b5a9b2c1c4156)

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

4 years agoMerge to XFA: Change DEPS hooks paths to include 'pdfium/'.
Oliver Chang [Wed, 21 Oct 2015 22:19:20 +0000]
Merge to XFA: Change DEPS hooks paths to include 'pdfium/'.

This will break existing checkouts based on the instructions provided.

Instead of having a single pdfium directory, checkouts will now compromise of:
("repo" can be named anything)

repo/.gclient
repo/pdfium/.git
repo/pdfium/others...

To convert an existing checkout, do something like:

mkdir repo
mv pdfium repo
rm repo/pdfium/.gclient_entries # will be regenerated, with a warning
mv repo/pdfium/.gclient repo
edit repo/.gclient and change "name: '.'" to "name: 'pdfium'"

Instructions for getting a new checkout are in README.md in this CL.

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

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

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

4 years agoXFA: Fix two minor build errors on Windows
Qin Zhao [Wed, 21 Oct 2015 21:57:48 +0000]
XFA: Fix two minor build errors on Windows

- remove unused local variable rtArrow in CFWL_WidgetTP::DrawArrow
- remove ~ in class IFX_FontMgr

BUG=none
R=thestig@chromium.org

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

4 years agoXFA: add CPDFDocumentToFPDFDocument()
Tom Sepez [Wed, 21 Oct 2015 21:07:23 +0000]
XFA: add CPDFDocumentToFPDFDocument()

Abstracts away that master returns CPDF_Documents directly,
but XFA wraps them with a CPDFXFA_Document.

Tidy dead code along the way.

R=thestig@chromium.org

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

4 years agoMerge to XFA: Remove FFL_Utils as it is unused.
Dan Sinclair [Wed, 21 Oct 2015 19:47:26 +0000]
Merge to XFA: Remove FFL_Utils as it is unused.

None of the methods in this file are used and it is not included anywhere. Removing.

R=thestig@chromium.org

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

(cherry picked from commit 704da531215c4f81279eb763192de398f7d03748)

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

4 years agoMerge to XFA: Add type cast definitions for CPDF_Name.
Dan Sinclair [Wed, 21 Oct 2015 19:46:10 +0000]
Merge to XFA: Add type cast definitions for CPDF_Name.

This Cl adds ToName, CPDF_Object::AsName and CPDF_Object::IsName and
updates the src to use them as needed.

BUG=pdfium:201
R=tsepez@chromium.org

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

(cherry picked from commit 1c77edb7b34e03787605b7965784cea38ef9f1d7)

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

4 years agoMerge to XFA: Add type cast definitions for CPDF_String.
Dan Sinclair [Wed, 21 Oct 2015 17:29:23 +0000]
Merge to XFA: Add type cast definitions for CPDF_String.

This Cl adds ToString, CPDF_Object::AsString and CPDF_Object::IsString and
updates the src to use them as needed.

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

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

(cherry picked from commit 53d3ab125ef583be8cfac907b308a6551b93067a)

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

4 years agoMerge to XFA: Add type cast definitions for CPDF_Number.
Dan Sinclair [Wed, 21 Oct 2015 15:07:42 +0000]
Merge to XFA: Add type cast definitions for CPDF_Number.

This Cl adds ToNumber, CPDF_Object::AsNumber and CPDF_Object::IsNumber and
updates the src to use them as needed.

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

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

(cherry picked from commit 83bf02dfb860a66d756434d194118dae572d04d3)

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

4 years agoMerge to XFA: Remove void* ctor from CPDF_Number.
Dan Sinclair [Wed, 21 Oct 2015 13:04:14 +0000]
Merge to XFA: Remove void* ctor from CPDF_Number.

This Removes the ctor that took a pointer to the data to store and copied it
into the union memory. Instead, the call sites look at the type and pass the
correct value.

TBR=tsepez@chromium.org

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

(cherry picked from commit 8430a5d04883fac4666d0c321fc679bcaf99cb71)

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

4 years agoXFA: Fix unittests and embeddertests crashers
Tom Sepez [Tue, 20 Oct 2015 22:41:40 +0000]
XFA: Fix unittests and embeddertests crashers

The unittests had a case where we added an abort() call to
the code, but left the case.  And one of the expected results
was not updated with the code.

The fpdfview.cpp got broken by a recent change, and was not
caught due to all the void* returns.  Also, the tests now
clean up the page automatically.

R=thestig@chromium.org

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

4 years agoFix pdfium-i#236: memory leaks from RenderPdf
Qin Zhao [Tue, 20 Oct 2015 22:31:06 +0000]
Fix pdfium-i#236: memory leaks from RenderPdf

- add FPDFAvail_Destroy(pdf_avail) on the early return path in RenderPdf

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

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

(cherry picked from commit 0223be82e0afcfee7c501ad2754230353bff79ff)

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

4 years agoMerge to XFA: Cosmetic changes in fsdk_define.h
Tom Sepez [Tue, 20 Oct 2015 21:32:51 +0000]
Merge to XFA: Cosmetic changes in fsdk_define.h

Review URL: https://codereview.chromium.org/1412123004 .
(cherry picked from commit b5dd65f31408dc8c15d202cbb3e8d9ec2afd4520)

TBR=thestig@chromium.org

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

4 years ago[Merge to XFA] Add type cast definitions for CPDF_Boolean.
Dan Sinclair [Tue, 20 Oct 2015 20:44:57 +0000]
[Merge to XFA] Add type cast definitions for CPDF_Boolean.

This CL adds ToBoolean, CPDF_Object::AsBoolean and CPDF_Object::IsBoolean and
updates the src to use them as needed.

BUG=pdfium:201
TBR=thestig@chromium.org, tsepez@chromium.org

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

(cherry picked from commit ce4f95d61f5aa5fb9a5fc6cb8487999a9cf46458)

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

4 years ago[Merge to XFA] Revert "Revert "Add type cast definitions for CPDF_Dictionary.""
Dan Sinclair [Tue, 20 Oct 2015 20:24:45 +0000]
[Merge to XFA] Revert "Revert "Add type cast definitions for CPDF_Dictionary.""

This reverts commit 937840e1722d1f2b77d80575d6e710d760662c9c.

Add type cast definitions for CPDF_Dictionary.

This CL adds ToCPDFDictionary type definitions and updates one file to use
instead of straight casts. I had to fix two places where we'd casted off the
constness of the original pointer.

BUG=pdfium:201
R=tsepez@chromium.org

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

(cherry picked from commit 39869b641511c882d78e17548293cdb458c36f38)

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

4 years ago[Merge to XFA] Minor documentation updates for fpdfview.h.
Dan Sinclair [Tue, 20 Oct 2015 19:18:51 +0000]
[Merge to XFA] Minor documentation updates for fpdfview.h.

This does some minor copy editing and formatting of the documentation in the
fpdfview.h header.

R=tsepez@chromium.org

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

(cherry picked from commit 19169dae5bf92813b7419793f61dfca8b4fb9124)

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

4 years agoXFA: Remove cond ? TRUE : FALSE.
Lei Zhang [Tue, 20 Oct 2015 17:21:36 +0000]
XFA: Remove cond ? TRUE : FALSE.

R=tsepez@chromium.org

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

4 years agoMerge to XFA: Remove unused CFFL_Notify.
Lei Zhang [Tue, 20 Oct 2015 00:30:24 +0000]
Merge to XFA: Remove unused CFFL_Notify.

TBR=tsepez@chromium.org

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

(cherry picked from commit 8b8dfd7934d669b2c74a0502f82387e5df0f573b)

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

4 years agoMerge to XFA: Fix some override warnings in fpdfview.cpp.
Lei Zhang [Tue, 20 Oct 2015 00:27:53 +0000]
Merge to XFA: Fix some override warnings in fpdfview.cpp.

TBR=tsepez@chromium.org

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

(cherry picked from commit 0f2736742f5f9841447a4bd505dcadda22e2f574)

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

4 years agoRemove unused xfa and JS headers.
Tom Sepez [Mon, 19 Oct 2015 23:49:53 +0000]
Remove unused xfa and JS headers.

The CPDFDocumentFromFPDFDocument() helper function now completely
abstracts the difference between xfa and master for a number of
files, so they can stop including the xfa headers.

The JS header was a stray.

R=thestig@chromium.org

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

4 years agoMerge to XFA: Refactor progressive renderer.
Tom Sepez [Mon, 19 Oct 2015 23:20:03 +0000]
Merge to XFA: Refactor progressive renderer.

Hand-application of diffs from https://codereview.chromium.org/1233453014/.
This was an oversight, and was too old (pre-reformat) to apply cleanly.
Checked against origin/master, only diffs are xfa related.

R=thestig@chromium.org

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

4 years agoMerge to XFA: Consolidate test support code.
Tom Sepez [Mon, 19 Oct 2015 23:04:22 +0000]
Merge to XFA: Consolidate test support code.

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

Conflicts:
  BUILD.gn
  samples/BUILD.gn
  samples/pdfium_test.cc
  samples/samples.gyp

R=thestig@chromium.org

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

4 years agoMerge to XFA: Remove duplicate core/include/thirdparties headers.
Tom Sepez [Mon, 19 Oct 2015 21:49:02 +0000]
Merge to XFA: Remove duplicate core/include/thirdparties headers.

Review URL: https://codereview.chromium.org/1417483004 .
(cherry picked from commit ad0f4d9b371c1862a78046c2e3dea5d515043070)

TBR=thestig@chromium.org

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

4 years agoMerge to XFA: Remove dead code that was reactivated when fixing overrides.
Lei Zhang [Mon, 19 Oct 2015 21:32:16 +0000]
Merge to XFA: Remove dead code that was reactivated when fixing overrides.

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

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

(cherry picked from commit 9ddafc82bddb984ae46ee0df801ba20b446d5158)

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

4 years agoMerge to XFA: Sanity check the values of TRUE and FALSE.
Lei Zhang [Mon, 19 Oct 2015 19:11:49 +0000]
Merge to XFA: Sanity check the values of TRUE and FALSE.

Get rid of cond ? TRUE : FALSE.

TBR=tsepez@chromium.org

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

(cherry picked from commit aff4635dad81bc319266d9d84b81552580cd2b65)

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

4 years agoMerge to XFA: Remove some checks for object creation failures. They cannot fail.
Lei Zhang [Mon, 19 Oct 2015 19:08:54 +0000]
Merge to XFA: Remove some checks for object creation failures. They cannot fail.

Also reduce nesting in if statements, remove CFX_SmartPointer, and
use more unique_ptrs.

TBR=tsepez@chromium.org

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

(cherry picked from commit 6101a5f98b27888f1736ae74982ed4d409d83be0)

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

4 years agoMerge to XFA: Unrevert commit a398ca6 and apply the proper fix.
Lei Zhang [Mon, 19 Oct 2015 19:07:32 +0000]
Merge to XFA: Unrevert commit a398ca6 and apply the proper fix.

TBR=tsepez@chromium.org

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

(cherry picked from commit 894d1cd3f56b1c8c33c5a60ebfec14384e5002d0)

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

4 years agoMerge to XFA: Add FPDFAPIJPEG_ prefix to more libjpeg functions
Tom Sepez [Mon, 19 Oct 2015 18:55:14 +0000]
Merge to XFA: Add FPDFAPIJPEG_ prefix to more libjpeg functions

Original patch by Evangelos Foutras.
Orignal Review URL: https://codereview.chromium.org/1409243004 .
(cherry picked from commit 1b5084321ed924ad3fcc437c3effc81baafd18ac)

BUG=505226
TBR=thestig@chromium.org

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

4 years agoMerge to XFA: Don't bother passing -1 as the length to the CFX_ByteString ctor.
Lei Zhang [Fri, 16 Oct 2015 23:29:59 +0000]
Merge to XFA: Don't bother passing -1 as the length to the CFX_ByteString ctor.

TBR=tsepez@chromium.org

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

(cherry picked from commit 316e482630d5f5d9084edd9725f98a0d89a5bbdf)

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

4 years agoMerge to XFA: Fix a bunch of sign mismatch warnings.
Lei Zhang [Fri, 16 Oct 2015 23:22:37 +0000]
Merge to XFA: Fix a bunch of sign mismatch warnings.

Also remove some gotos and move code into an anonymous namespace.

And then do the partial revert to avoid size_t going negative.

R=tsepez@chromium.org

Review URL: https://codereview.chromium.org/1356373003 .
Review URL: https://codereview.chromium.org/1400723002 .

(cherry picked from commit d03ba8d1a5928e8f3f6bd7da063b53b0bc40abfd)
(cherry picked from commit a398ca611d1925182ff6a4e8b2b43c277c364dc0)

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

4 years agoMerge to XFA: Declare PDF_GetStandardFontName() in the header.
Lei Zhang [Fri, 16 Oct 2015 21:45:16 +0000]
Merge to XFA: Declare PDF_GetStandardFontName() in the header.

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

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

(cherry picked from commit 3d7d1d2f29e5fb099367a40822684d31f684fd62)

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

4 years agofxcrt convergence - XFA side.
Tom Sepez [Fri, 16 Oct 2015 21:18:50 +0000]
fxcrt convergence - XFA side.

Take extern tables portion only of fx_bidi change.
Take itoa fixes and corresponding unit test.
Merge typo in skia font mgr.
Kill some null checks after new.

R=thestig@chromium.org

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

4 years agoMerge to XFA: Introduce CPDFPageFromFPFDPage()
Tom Sepez [Fri, 16 Oct 2015 21:00:21 +0000]
Merge to XFA: Introduce CPDFPageFromFPFDPage()

Original Review URL: https://codereview.chromium.org/1406543004 .
(cherry picked from commit 943ea142b6a7e6edc91fe3c307013129e6eb0ef3)

R=thestig@chromium.org

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

4 years agoMerge to XFA: Update link to chromium src.
dan sinclair [Fri, 16 Oct 2015 17:10:09 +0000]
Merge to XFA: Update link to chromium src.

This CL updates the documentation link to the Chromium PDF plugin to
point to Gitiles instead of the SVN repo.

Merge clean.

TBR=tsepez@chromium.org

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

(cherry picked from commit 8969a70de3ed74bf0e2ae133378f5e7a4d1fd4c0)

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

4 years agoMerge to XFA: DEPS include_rules no longer allows core/ -> fpsdfsk/ inclusion.
Tom Sepez [Fri, 16 Oct 2015 16:44:50 +0000]
Merge to XFA: DEPS include_rules no longer allows core/ -> fpsdfsk/ inclusion.

Original Review URL: https://codereview.chromium.org/1411493002 .
(cherry picked from commit 8316a8a0274558f7a0f515e04bb13a7cca5762b2)

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

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

4 years agoMerge to XFA: Add some community and testing info to README.md.
dan sinclair [Fri, 16 Oct 2015 15:59:22 +0000]
Merge to XFA: Add some community and testing info to README.md.

This CL adds some more context to the README on the various test suites and
community mailing lists which are available.

R=thestig@chromium.org

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

(cherry picked from commit 51cf5bc00dfa3033523355e3e74f3a47f7e46682)

This merge had conflicts.

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

4 years agoMerge to XFA: Loosen checking on the bytes following 'stream'
Jun Fang [Fri, 16 Oct 2015 02:45:01 +0000]
Merge to XFA: Loosen checking on the bytes following 'stream'

PDF specs say that end of line markers shall follow the
keyword "stream". But a white space before end of line
markers follows this keyword in the test pdf files.

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

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

4 years agoMerge to XFA: Move conditionals inside target_defaults.
dan sinclair [Fri, 16 Oct 2015 02:01:23 +0000]
Merge to XFA: Move conditionals inside target_defaults.

This CL moves the conditionals inside the target_defaults configuration. This
causes the -fPIC to get picked up and allows component=shared_library to build
correctly.

Merged clean.

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

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

(cherry picked from commit 26268af2c1242dd173aea6dcbf763a36e734faf3)

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

4 years agoMerge to XFA: Plug a leak in CPDF_StreamParser::ReadInlineStream
Oliver Chang [Fri, 16 Oct 2015 00:27:14 +0000]
Merge to XFA: Plug a leak in CPDF_StreamParser::ReadInlineStream

R=tsepez@chromium.org, thestig@chromium.org
BUG=pdfium:212

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

(cherry picked from commit fb3c41e5324671bce0b0ec025f4e94ae0b20906e)

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

4 years agoMerge to XFA: Return result of GetRBG instead of TRUE
dan sinclair [Thu, 15 Oct 2015 23:34:45 +0000]
Merge to XFA: Return result of GetRBG instead of TRUE

Propagate the return value of GetRBG to the callers instead of forcing the
return of TRUE.

BUG=pdfium:44
TBR=thestig@chromium.org, tsepez@chromium.org

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

(cherry picked from commit b456ba7f62fa416f456ef78750c18fd2bdf837be)

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

4 years agoMerge to XFA: Introduce CPDF_DocumentFromFPDFDocument().
Tom Sepez [Thu, 15 Oct 2015 23:17:18 +0000]
Merge to XFA: Introduce CPDF_DocumentFromFPDFDocument().

Manual merges everywhere.

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

Original Review URL: https://codereview.chromium.org/1396283006 .
(cherry picked from commit 86adb658843658969041a13bf6cf0cc950ffe8ed)

R=thestig@chromium.org

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

4 years agoNext round of XFA changes to match master.
Tom Sepez [Wed, 14 Oct 2015 21:17:26 +0000]
Next round of XFA changes to match master.

This contains a missed merge of the Document:delay fixes.

R=thestig@chromium.org

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