Age | Commit message (Collapse) | Author |
|
R=jun_fang@foxitsoftware.com, tsepez@chromium.org
Review URL: https://codereview.chromium.org/1458633004 .
|
|
Using Chromium's clang + build options, there's more override warnings.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1453643002 .
|
|
That refer to parent directories.
R=dsinclair@chromium.org
Review URL: https://codereview.chromium.org/1434223002 .
|
|
During decoding, when an image decoder is encountered, any
subsequent decoders are ignored, but remain in the array. However,
later on CPDF_DIBSource::ValidateDictParam expects the image
decoder to be the last in the array, causing issues.
A check is also added in CPDF_DIBSource::GetScanline to ensure
that the calculated pitch value is <= the (4-aligned) pitch value in the
cached bitmap to prevent future issues.
Also cleans up some NULL usages.
BUG=552046
R=jun_fang@foxitsoftware.com, tsepez@chromium.org
Review URL: https://codereview.chromium.org/1406943005 .
|
|
- Remove CPDF_Stream::Create() and checks that it might fail.
- Remove m_pCryptoHandler that's always a nullptr.
- Remove m_FileOffset that's always 0.
- Rename file version of InitStream() to InitStreamFromFile().
- Use IsMemoryBased() in more places.
R=dsinclair@chromium.org
Review URL: https://codereview.chromium.org/1415163009 .
|
|
R=dsinclair@chromium.org
Review URL: https://codereview.chromium.org/1436573003 .
|
|
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1408063016 .
|
|
- In non-standalone builds, use the provided jpeg library.
- Run gn format over all the GN files.
- Also roll DEPS for buildtools to c2f2598.
BUG=541704
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1425153006 .
|
|
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1419373005 .
|
|
This CL adds tests for the ReadHexString method of the syntax parser.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1433503002 .
|
|
I moved the declaration to be public, instead of having it implicit in one
file and defined in a seperate cpp file.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1410873009 .
|
|
BUG=446715
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1353093003 .
|
|
This CL adds a helper to check if a given character is a \n or \r.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1418073006 .
|
|
This CL adds helpers to provide more descriptive access to
PDF_CharType.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1407913004 .
|
|
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 .
|
|
Also fix a potential object leak.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1414963005 .
|
|
There appear to be a bunch of corpus tests which fail with this change such
as FAILURE: shading1.pdf
This reverts commit 85361b227ad6786d2aeef8409b79a8d077a26ee9.
Make m_pShadingObj a CPDF_Stream instead of CPDF_Object.
This object is required to be a stream and was being converted as such. With
the new type checking this caused us to pass a nullptr where previously we'd
have, incorrectly, cast a CPDF_Dictionary to a CPDF_Stream.
This CL changes the m_pShadingObj to always be a CPDF_Stream. Then, we never
go down the bad code path because we check if m_pShadingObj is nullptr earlier
and bail out.
BUG=chromium:547706
TBR=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1414283003 .
|
|
This object is required to be a stream and was being converted as such. With
the new type checking this caused us to pass a nullptr where previously we'd
have, incorrectly, cast a CPDF_Dictionary to a CPDF_Stream.
This CL changes the m_pShadingObj to always be a CPDF_Stream. Then, we never
go down the bad code path because we check if m_pShadingObj is nullptr earlier
and bail out.
BUG=chromium:547706
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1426713002 .
|
|
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 .
|
|
This is causing pixel test failures on the bots.
FAILURE: bug_543018_2.in
FAILURE: bug_543018_1.in
FAILURE: bug_524043_1.in
This reverts commit 9024e026dae1af064b8467bb0f62278417fb82d1.
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
TBR=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1420973002 .
Review URL: https://codereview.chromium.org/1414393006 .
|
|
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/1420973002 .
|
|
R=thestig@chromium.org, tsepez@chromium.org
Review URL: https://codereview.chromium.org/1411043003 .
|
|
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 .
|
|
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 .
|
|
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 .
|
|
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 .
|
|
This Cl adds ToNumber, CPDF_Object::AsNumber and CPDF_Object::IsNumber and
updates the src to use them as needed.
BUG=pdfium:201
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1410673005 .
|
|
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.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1422473002 .
|
|
This CL adds ToBoolean, CPDF_Object::AsBoolean and CPDF_Object::IsBoolean 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/1417623005 .
|
|
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 .
|
|
This reverts commit 4816432671eef6467354aa252f22bb80acc315b7.
Reason, broke the javascript_test Rendering PDF file
/mnt/data/b/build/slave/linux/build/pdfium/out/Debug/gen/pdfium/testing/javascript/document_methods.pdf.
Non-linearized path...
FAILURE: document_methods.in; Command
'['/mnt/data/b/build/slave/linux/build/pdfium/out/Debug/pdfium_test',
'/mnt/data/b/build/slave/linux/build/pdfium/out/Debug/gen/pdfium/testing/javascript/document_methods.pdf']'
returned non-zero exit status -11
BUG=pdfium:201
TBR=thestig@chromium.org
Review URL: https://codereview.chromium.org/1412413002 .
|
|
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/1399233003 .
|
|
Make this a function in the fpdfsdk/ layer, rather than a method
in the core/ layer. Nothing in core should know about public FPDF
types.
BUG=pdfium:217
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1396283006 .
|
|
This will be used to abstract one major difference between master
and XFA, namely that the CPDF_Document is not a direct cast in XFA.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1395493007 .
|
|
Also remove some gotos and move code into an anonymous namespace.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1356373003 .
|
|
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1360103002 .
|
|
files""
This reverts commit fa9756f77ad6145940d3dc697814b84f5755ae17.
TBR=thestig@chromium.org
Review URL: https://codereview.chromium.org/1307353005/
|
|
This reverts commit 9bd18183ba8210c91d71c3060146235750a4c71c.
|
|
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
R=thestig@chromium.org, tsepez@chromium.org
Review URL: https://codereview.chromium.org/1307353005 .
|
|
Fixes the remaining issues, except for JBIG2/Skia ...
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1298393003 .
|
|
Part 1. Move to headers so compiler can type check against
the definitions.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1299963002 .
|
|
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1290383003 .
|
|
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1292613003 .
|
|
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1289693008 .
|
|
Cloning a CPDF_Stream actually happens via CPDF_Object::Clone().
Transitively, remove:
- GetStreamFilter()
-- all the filters.
R=jam@chromium.org
Review URL: https://codereview.chromium.org/1288543002 .
|
|
Adobe acrobat defines keywords "\nendstream\n" and "\nendobj\n" in object's stream.
However, Pdfium searches "endstream" and "endobj" as the keywords in the streams of objects.
Some words like "(endstream)" are wrongly treated as keywords in pdfium.
This fix follows Adobe's solution.
BUG=493126
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1219133005 .
|
|
Move that operation closer to the embedder's call.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1269073003 .
|
|
Hence, some of the routines taking filename strings are unused. This,
in turn allows us to get rid of some other fopen-ishy looking things
inside the library.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1264423003 .
|
|
No behavior change.
Generated by:
find . -name '*.cpp' -o -name '*.h' | \
grep -E -v 'third_party|thirdparties|lpng_v163' | \
xargs ../../buildtools/mac/clang-format -i
See thread "tabs vs spaces" on pdfium@googlegroups.com for discussion.
BUG=none
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1265503005 .
|
|
- Bool functions should not return -1 for error.
- Bool variables should not be assigned 2
- Bool / int32_t prototypes should match.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1254973004 .
|