Age | Commit message (Collapse) | Author |
|
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 .
|
|
Consequence of having the same code in two places;
fx_basic_bstring.cpp is correct, but fx_basic_wstring.cpp
is missing one small change.
Noticed while working on 542403, but this will not fix that
issue. It is just a space savings.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1399983003 .
|
|
- 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
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1388203003 .
|
|
BUG=541323
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1400773002 .
|
|
BUG=497357
TBR=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1395493003 .
|
|
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 .
|
|
The values that were changed to size_t can go negative.
TBR=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1400723002 .
|
|
Also remove some gotos and move code into an anonymous namespace.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1356373003 .
|
|
Just get rid of the malloc altogether and use CJBig2_List instead.
BUG=540873
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1394933002 .
|
|
- 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=thestig@chromium.org
BUG=pdfium:207
Review URL: https://codereview.chromium.org/1380243004 .
|
|
Also mark it private.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1395613003 .
|
|
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 .
|
|
false.
R=thestig@chromium.org
BUG=
Review URL: https://codereview.chromium.org/1393153002 .
|
|
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1393823002 .
|
|
TBR=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1396533002 .
|
|
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1382613003 .
|
|
R=thestig@chromium.org
BUG=
Review URL: https://codereview.chromium.org/1390863002 .
|
|
many callers can tolerate CJBig2_ArithIntDecoder::decode() OOB failure.
BUG=539749, pdfium:209
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1384663007 .
|
|
Added a fallback Win32 font information class for win32k lockdown.
This is to support running PDFIUM within the Win32k lockdown by
removing dependancies on USER32/GDI for the font information code.
It falls back to using a freetype/directory enumeration implementation
if it detects the win32k system calls have been disabled by policy.
BUG=523278
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1306883002 .
|
|
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 .
|
|
BUG=537772
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1387703002 .
|
|
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1360103002 .
|
|
Check the image size before attempting to decode.
BUG=538103
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1377493005 .
|
|
Found using the test examples from https://crbug.com/537780
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1376413003 .
|
|
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1386463003 .
|
|
BUG=537790
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1379243002 .
|
|
BUG=pdfium:207
Original author: jbreiden@google.com
Original CL: http://codereview.chromium.org/1362133003/
R=jbreiden@google.com
Review URL: https://codereview.chromium.org/1382073002 .
|
|
- 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.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1361053002 .
|
|
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1359013003 .
|
|
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1368153003 .
|
|
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 .
|
|
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1367633005 .
|
|
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 .
|
|
- Remove dead code
- Use unique_ptr
BUG=pdfium:202
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1365903002 .
|
|
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1359233002 .
|
|
R=jbreiden@google.com
Review URL: https://codereview.chromium.org/1346043003 .
|
|
Code is mostly stolen from Chromium's scoped_ptr.
- Add unit tests.
- Use this to fix a leak.
BUG=chromium:531408
R=jyasskin@chromium.org, tsepez@chromium.org
Review URL: https://codereview.chromium.org/1351383004 .
|
|
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
R=mdempsky@chromium.org
Review URL: https://codereview.chromium.org/1359103002 .
|
|
Not sure why building with gyp was working despite the missing '../' but
it wasn't working in stricter build systems.
BUG=
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1321293003.
|
|
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=jun_fang@foxitsoftware.com
Review URL: https://codereview.chromium.org/1335373002 .
|
|
- FX_Alloc() can't fail and return.
- Use unique_ptr / remove gotos.
- NULL -> nullptr.
- Combine common code.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1337823003 .
|
|
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1338573002 .
|
|
BUG=
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1329343002.
|
|
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1332193002 .
|
|
Also convert some FX_AllocOrDie() calls to FX_Alloc().
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1332173002 .
|
|
Credit to karl at skomski.com for the initial version of the CL.
BUG=527174
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1305033006 .
|
|
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1326953006 .
|