Age | Commit message (Collapse) | Author |
|
We are using pdfium::base::checked_cast to get the width and height,
but we may overflow and abort. Therefore, we should instead early
return if the obtained width and height are not valid int32_t's.
BUG=655056
Change-Id: Ic0c6b88a16dc3d547fe82736bb14ed3122cd356a
Reviewed-on: https://pdfium-review.googlesource.com/2160
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
CAgg_PathData::BuildPath already HardClips x, y. We need to do this to
any other points used, otherwise we risk having huge numbers, and when
calling agg methods on these we'll be super slow.
BUG=670524, 678767
Change-Id: I35c1cee7bd6481ea57e0df27b2c5202d1cca3301
Reviewed-on: https://pdfium-review.googlesource.com/2158
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
We should not have valid objects where the object number is
CPDF_Object::kInvalidObjNum.
BUG=pdfium:609
Review-Url: https://codereview.chromium.org/2610393004
|
|
The td_refblackwhite value is currently assigned without validation. This
may pose an issue as the image can specify the value as nan. This will cause
problems later when we use the nan in calcluations.
This CL validates each of the float values are not nan and if they are sets
them to the default provided by the TIFF spec v6.
BUG=chromium:632883
Change-Id: I17b01f744d3f5247c4bd3f42765a27b611dc7d8c
Reviewed-on: https://pdfium-review.googlesource.com/2151
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Review-Url: https://codereview.chromium.org/2619673002
|
|
Remove unused m_Segments.
Review-Url: https://codereview.chromium.org/2618863004
|
|
Review-Url: https://codereview.chromium.org/2611413002
|
|
Review-Url: https://codereview.chromium.org/2610813010
|
|
All usage is now replaced with stl equivalents.
Move one definition from fx_basic.h to where it's actually needed.
Review-Url: https://codereview.chromium.org/2612773007
|
|
Review-Url: https://codereview.chromium.org/2616623005
|
|
Revert CL http://crrev.com/2608663003 in preparation for adding
postscript generation to Pdfium.
Note postscript generation code will not be called until additional
patches land. These patches will also include modifications needed to
make this code functional (currently missing a few compression functions).
BUG=
Review-Url: https://codereview.chromium.org/2615703002
|
|
Review-Url: https://codereview.chromium.org/2617483005
|
|
Review-Url: https://codereview.chromium.org/2617683003
|
|
This CL updates the unique_ptrs to use MakeUnique instead of new. The types
are updated to be auto.
Change-Id: I2a82a4ec6659e5c343cc03d4840b3046ecb6934e
Reviewed-on: https://pdfium-review.googlesource.com/2156
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This CL initializes the raw tif data to guard against unitialized memory access.
BUG=chromium:677377
Change-Id: If272fafacd996c2e93a41fb6e477661dc0c5492c
Reviewed-on: https://pdfium-review.googlesource.com/2150
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL removes the size arrays and variables and uses the vector to get the
size directly.
Change-Id: I0f7b5f48e53ff1ec379ad34a23807d70b02a538a
Reviewed-on: https://pdfium-review.googlesource.com/2155
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Removes more array template usage fron non-XFA code.
Review-Url: https://codereview.chromium.org/2614013002
|
|
I think the bCJK variable calculation is wrong. If not, then it is not
necessary, since currently it will always be set to false.
CL that added this code: https://codereview.chromium.org/1306883002/
Review-Url: https://codereview.chromium.org/2611843008
|
|
This CL updates ::ParseResolveResult to accept a
std::vector<std::unique_ptr<CFXJSE_Value>>& instead of a CFXJSE_Value**&. This
removes a bunch of manual new/delete code used to mantain the values.
The size parameter was also removed and is retrieved by calling .size() on the
vector now.
Change-Id: I60fc6176523ece112d41fdefc767aaefedfae2db
Reviewed-on: https://pdfium-review.googlesource.com/2153
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
We worry about cyclical references, but no leaks found.
Review-Url: https://codereview.chromium.org/2609423003
|
|
Review-Url: https://codereview.chromium.org/2612923002
|
|
GetCachedBitmap method is not being used. This removal
simplifies some of the code.
Change-Id: I075c245c3511e8a1b595c8ba148991f7c838f504
Reviewed-on: https://pdfium-review.googlesource.com/2154
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Review-Url: https://codereview.chromium.org/2617723002
|
|
Fix spelling of "pseudo" along the way.
Remove some FDE_LPCxxx typedefs for the sake of clarity.
Review-Url: https://codereview.chromium.org/2616813002
|
|
CPDF_DIBSource was already in its own file, but files needed renaming.
Change-Id: Ib3ac787a0bb33d3f78ecdcdfcdbc938867857a14
Reviewed-on: https://pdfium-review.googlesource.com/2152
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Use std::less<>() rather than a direct ptr1 < ptr2 comparison to
be strictly correct in face of unspecified behaviour when ptr1 and
ptr2 don't point within the same "object" (e.g. segment of memory
on a brain-dead segmented architecture).
This will allow their use as keys in maps.
Review-Url: https://codereview.chromium.org/2616683002
|
|
Review-Url: https://codereview.chromium.org/2594153003
|
|
Also, class Make_Pair is confusing given std::make_pair().
No need for vectors of pointers when there are reasonable copy ctors.
Save 288 bytes in a table while we're at it, and make local to file.
Fix spelling of "Numberic".
Review-Url: https://codereview.chromium.org/2595203002
|
|
Required to pass pointers across C-APIs. Need this to clean
up CPDFXFA_Page and retain ptrs.
Review-Url: https://codereview.chromium.org/2583093003
|
|
Review-Url: https://codereview.chromium.org/2593163002
|
|
Remove unused methods, fold the arrow data into the CFWL_WidgetTP instead of
a custom class and global object.
Change-Id: Ie942052555d6c8668d27072c1fcc5e8e00597518
Reviewed-on: https://pdfium-review.googlesource.com/2139
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
The GetCapacity methods return a void* because they return different types of
internal class memory based on what the calling parameter was. This is confusing
and makes it difficult to tell when then enum values can be removed.
This CL removes GetCapacity and adds methods as needed to get the real values.
Change-Id: I64c2edc858220624880e27f4ed49c2dae080f462
Reviewed-on: https://pdfium-review.googlesource.com/2137
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This CL removes the LoadString method from CPDFXFA_Context and, instead,
creates individual exception methods for each of the loaded strings and
calls as needed.
BUG=pdfium:549
Change-Id: I1d975f01f13f45a885946a9952f24b13387dc3e4
Reviewed-on: https://pdfium-review.googlesource.com/2135
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL updates CFWL_MonthCalendar to return values instead of taking an
out parameter.
Change-Id: I347d0e85897be1359bad7971d82c70dfad0d69a0
Reviewed-on: https://pdfium-review.googlesource.com/2132
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL updates the Huffman decoder in the JBig2 codex to check the low field
does not overflow.
BUG=chromium:675236
Change-Id: I7f5f6fe8329df4ece6f317fac521fe2373686479
Reviewed-on: https://pdfium-review.googlesource.com/2131
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Also pass some unqiue_ptr further down while we're at it.
Review-Url: https://codereview.chromium.org/2594103002
|
|
I'd been waiting on this hoping the code would be refactored out
of existence, but it looks to be used.
Use tests against x.end() in place of a "null position".
This is greatly complicated by the use of "tail position", which
now calcluated by std::prev(x.end()) unless the list is empty.
Review-Url: https://codereview.chromium.org/2592163002
|
|
This method just proxies to the provided item now. Remove the method and call
GetText() directly if possible.
Change-Id: Ida49e0e878f859a69f7d5bec9d0f734feb7a763d
Reviewed-on: https://pdfium-review.googlesource.com/2130
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL cleans up some of the out params in CPDFXFA_Context. In the process
several of the strings returned by ::LoadString() are inlined in their
call sites and the defines removed.
BUG=pdfium:549
Change-Id: I41a7ceeba3962299eecd0cb714ddb03d28dbb0ea
Reviewed-on: https://pdfium-review.googlesource.com/2134
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL updates CFWL_Scrollbar use return values instead of using out params.
In some cases, the same values is assigned and passed in, but passing in the
const ref is a lot clearer as to what is happening.
Change-Id: Iff72a845e09ac73ff8eac938482547eaf251f835
Reviewed-on: https://pdfium-review.googlesource.com/2133
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
The previous implementation, FindPDFPage, was already doing this since
the recursive call was always with return. Currently, we were trying to
keep going even after reaching max level. The problem is that if the
page tree is not a tree, we might loop forever. This could also be
solved by keeping track of the dictionaries that have been visited, but
this solution takes much less space.
BUG=672172
Change-Id: Ia37aea58e92b6068de69f26736c612aa6a0ff4b3
Reviewed-on: https://pdfium-review.googlesource.com/2138
Commit-Queue: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This CL makes the fix to the bug equal to that which has now been
submitted upstream. Link:
https://github.com/vadz/libtiff/commit/fa6b22a5135fdeabe860097c04f298ca0ae7f2e1
Our original CL for fixing the bug:
https://codereview.chromium.org/2545723004/
BUG=657473
Change-Id: I52ae6a062ac07a0e20d0ba4ab823cbbf1d2b1ac1
Reviewed-on: https://pdfium-review.googlesource.com/2136
Commit-Queue: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Extends the PDFium tests to collect images and meta data to be uploaded
to Gold. This feature is triggered by adding the --gold_* flags.
It extends pdfium_test to output the MD5 hash of the underlying pixel
buffer for each page it renders.
That output is then processed by test_runner.py to generate the
gold meta data.
This behavior is modeled after the 'dm' tool in skia. See
https://skia.googlesource.com/skia/+/master/dm/DM.cpp#1090
This should not cause any change in the current behavior of the tests,
it will be trigger once we update the buildbot recipe.
BUG=skia:5973
Review-Url: https://codereview.chromium.org/2578893004
|
|
Also be sure that a loop terminates without relying on
specific behaviour of the callers.
Review-Url: https://codereview.chromium.org/2598473002
|
|
Fix some naming to make things clearer.
Review-Url: https://codereview.chromium.org/2587233002
|
|
TBR=dsinclair@chromium.org
BUG=675752
Review-Url: https://codereview.chromium.org/2585113004
|
|
BUG=pdfium:644
Review-Url: https://codereview.chromium.org/2581873002
|
|
This is partially backported from upstream
https://github.com/mm2/Little-CMS/commit/4011a6e3
BUG=chromium:665054
Review-Url: https://codereview.chromium.org/2577963007
|
|
Delete some dead code in the process.
Review-Url: https://codereview.chromium.org/2585873002
|
|
- Add unit tests for sha256 implementation.
- Remove void* types from API in favor of correct actual types.
Review-Url: https://codereview.chromium.org/2577223002
|