Age | Commit message (Collapse) | Author |
|
This tests whether RebuildCrossRef could handle well-formatted pdf file.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1409013005 .
(cherry picked from commit 4544797e8998a31e7bc3f5439a5982f7f66dff26)
Review URL: https://codereview.chromium.org/1413343004 .
|
|
This is just a straight-forward, partial merge. It does not
actually make checkdeps succeed.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1419373005 .
(cherry picked from commit 79f5a32175293620abe456554e10efb7c3f4e7c6)
Review URL: https://codereview.chromium.org/1409153007 .
|
|
Also cleans up some places in the relevant functions since we're here.
BUG=551460
TBR=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1421783004 .
Clean merge.
(cherry picked from commit 4f85605cbc652a17bc833f883186e0a68af6006d)
Review URL: https://codereview.chromium.org/1405383009 .
|
|
The state '12' is only used once. This CL folds the contents of state 12 back
into the place where we set our state to 12.
This works because all state 12 does is decrement the loop counter so we process
the same character again and move us to state 0.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1430643007 .
(cherry picked from commit 395fbedc65e1261f1fb9189205501f4856235290)
Review URL: https://codereview.chromium.org/1414033010 .
|
|
This CL adds tests for the ReadHexString method of the syntax parser.
TBR=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1433503002 .
(cherry picked from commit 71ad9a0028a183605fba734c48b4756d6caa7754)
Review URL: https://codereview.chromium.org/1424923007 .
|
|
This CL adds a unit test for the ReadHexString method.
TBR=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1408213008 .
(cherry picked from commit c89c6195373b63e99b9cd432c5a181bfb3ad8dbe)
Review URL: https://codereview.chromium.org/1417713003 .
|
|
This CL adds tests for the CMap_GetCode and CMap_GetCodeRange methods. To do
so, it moves the methods to be static private members of CPDF_CMapParser and
makes the test class a friend.
TBR=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1414013005 .
(cherry picked from commit afca65ac019d2ad4cb8ac8f585809cc1a519ac2b)
Review URL: https://codereview.chromium.org/1429943002 .
|
|
I moved the declaration to be public, instead of having it implicit in one
file and defined in a seperate cpp file.
TBR=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1410873009 .
(cherry picked from commit e948a4ee08b78e27da37bc12244fa1b66d927dc7)
Review URL: https://codereview.chromium.org/1432513002 .
|
|
There are no uses of this method, I also checked the XFA branch and there don't
appear to be any uses there either.
TBR=thestig@chromium.org
Review URL: https://codereview.chromium.org/1427913006 .
(cherry picked from commit e65be3a55628294d0f45da456d856b4539f0cb15)
Review URL: https://codereview.chromium.org/1415023005 .
|
|
This CL adds a test case for the StringToCode and
StringToWideString methods in fpdf_font.cpp. In order
to do so, it moves the methods to be private methods of CPDF_ToUnicodeMap and
make the tests friends of the class.
TBR=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1428593005 .
(cherry picked from commit 52b0b525dca3d982a04b77fa6d0913aff1e5fd9c)
Review URL: https://codereview.chromium.org/1425233004 .
|
|
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 .
|
|
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 .
|
|
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 .
|
|
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 .
|
|
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 .
|
|
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 .
|
|
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 .
|
|
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 .
|
|
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 .
|
|
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 .
|
|
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 .
|
|
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 .
|
|
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 .
|
|
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 .
|
|
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 .
|
|
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1423693005 .
|
|
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 .
|
|
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 .
|
|
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 .
|
|
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 .
|
|
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 .
|
|
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 .
|
|
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 .
|
|
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 .
|
|
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 .
|
|
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 .
|
|
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 .
|
|
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 .
|
|
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 .
|
|
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 .
|
|
TBR=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1401493002 .
(cherry picked from commit 894d1cd3f56b1c8c33c5a60ebfec14384e5002d0)
Review URL: https://codereview.chromium.org/1413213002 .
|
|
TBR=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1406363002 .
(cherry picked from commit 316e482630d5f5d9084edd9725f98a0d89a5bbdf)
Review URL: https://codereview.chromium.org/1406303006 .
|
|
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 .
|
|
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 .
|
|
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 .
|
|
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 .
|
|
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 .
|
|
- 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 .
|
|
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 .
|
|
TBR=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1360103002 .
(cherry picked from commit b8a074711108baf04017d86207e08c19ff327d8e)
Review URL: https://codereview.chromium.org/1384123002 .
|