Age | Commit message (Collapse) | Author |
|
When creating the XFA doc view we always pass the same docview flag (0).
So, the map will only ever have one item in it. This Cl simplifies
the code by removing the map and just dealing with a single doc view.
Change-Id: If17e2cda4c3f6c1f45dec921844f09538cc890fc
Reviewed-on: https://pdfium-review.googlesource.com/3149
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
More method simplification, new helper GetGrayWithBlend
Change-Id: Ice28591c590e2210f3b2864ac16b2d57abedeeb0
Reviewed-on: https://pdfium-review.googlesource.com/3145
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
If ParseIndirectObjectAt fails, the replaced object will be null. So we can't
ASSERT the output of ValidatePage. CL introducing the ASSERT:
https://codereview.chromium.org/2483633002/
BUG=chromium:702897
Change-Id: Ib6e8c0bccaf2c05893f0abef27d431e112064865
Reviewed-on: https://pdfium-review.googlesource.com/3146
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
md5's with text are changed, so need to allow both the previous and the new one.
Pixel tests with text also fail on 10.12, so suppressing those.
Found many unexpected successes, so will unsuppress those once all bots are 10.12
BUG=chromium:703912
Change-Id: I6b34aa2f581eb8ea705f3876960b49c89e249347
Reviewed-on: https://pdfium-review.googlesource.com/3144
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
Change-Id: I3300b3013396885ae2c9f85caee630915799e181
Reviewed-on: https://pdfium-review.googlesource.com/3143
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: Ia024aff32e7e6fb2d5f6454b9856518a76365de2
Reviewed-on: https://pdfium-review.googlesource.com/3142
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This Cl replaces the CFX_FixedBufGrow class with std::vector.
Change-Id: I85c85b7a8de4794840b561e09841bb464cfa9dfe
Reviewed-on: https://pdfium-review.googlesource.com/3138
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Add relational operators to replace CmpWord().
Leave CmpLine() for the moment as it saves some work.
Remove CmpSec() and just inline comparison of the one member.
Invert IsExist() as IsEmpty(). There is a big philosophical
discussion as to whether things that are empty exist. I say
they do, but they're just empty.
Rename Default() to Reset(). Default sounds like a noun.
Add AdvanceSection() method and call as appropriate.
Change-Id: I01d9479f63a4860e0fd228255540d6d94dc24a9f
Reviewed-on: https://pdfium-review.googlesource.com/3139
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This Cl moves the Matrix and Vector code which is only used by the
colorspace code into the colorspace cpp file.
Change-Id: Ie37bcee0978278a56d345e63704494b5b67e5b24
Reviewed-on: https://pdfium-review.googlesource.com/3137
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
BUG=pdfium:11
Change-Id: I375460695f10753d81535533a0b3fc607a38652e
Reviewed-on: https://pdfium-review.googlesource.com/3140
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL replaces the FileSizeListArray code with a std::map.
Change-Id: Ic158ad95e7055693168d186ba428806a59b04c95
Reviewed-on: https://pdfium-review.googlesource.com/3136
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
- Merged two methods into CompositeRow_AToMask
- Simplified CompositeRow_Argb2Graya a lot
Change-Id: Icc96ac30121082ef4d6cb170d1e4f918b109b1be
Reviewed-on: https://pdfium-review.googlesource.com/3134
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
If the Kids array for the Pages dictionary does not exist, just treat this
dictionary as the unique page in the document.
BUG=chromium:702883
Change-Id: I9cb9645a53d60306ffe563f9b27cbbd37442f4ec
Reviewed-on: https://pdfium-review.googlesource.com/3135
Commit-Queue: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I4354a841d6e2d4f30ccb298d13dffa49b9f3a3b3
Reviewed-on: https://pdfium-review.googlesource.com/3131
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: I637fe236ae351bf6fcf8aa2913b94f55d997c612
Reviewed-on: https://pdfium-review.googlesource.com/3132
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
This Cl conbines several more methods from RTFBreak and TXTBreak into
the common Break baseclass.
Change-Id: Ibe2236eb4fd30faab239e7c9c8b578164014eb39
Reviewed-on: https://pdfium-review.googlesource.com/3108
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Fix some nits, add helper methods GetAlpha and GetGray to reduce code
duplication.
Change-Id: I5ea7e9ae306a4fc83f861f0e65879731e680f4f8
Reviewed-on: https://pdfium-review.googlesource.com/3109
Commit-Queue: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: If3f67767f738b7f23230ca8c37c9af2e31696e82
Reviewed-on: https://pdfium-review.googlesource.com/3117
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I4c00324990a62b624596110f442969a988631cb3
Reviewed-on: https://pdfium-review.googlesource.com/3105
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
We never push nullptrs into this array, so remove some checks for
nullness, but be really careful about bounds checking.
Change-Id: I79960a4cc9a729b3d5985f297aea8c4b03ceb601
Reviewed-on: https://pdfium-review.googlesource.com/3103
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Will allow us to re-land this
https://skia-review.googlesource.com/c/9891/
BUG=skia:6366
Change-Id: I8a82610309f835065487039883180b8a35733a76
Reviewed-on: https://pdfium-review.googlesource.com/3116
Commit-Queue: Mike Reed <reed@google.com>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This CL removes the CFX_DateTime class and moves the one used method
into the CFX_Unitime class.
Change-Id: I89f6d099b2c436d8f12b9dc2c5f10ac236ad56ef
Reviewed-on: https://pdfium-review.googlesource.com/3104
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This Cl cleans up some members which are always the same value.
Change-Id: Ic3feeb5cd8c8a8c3de5a7d6ec3628d32efc600ef
Reviewed-on: https://pdfium-review.googlesource.com/3107
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
BUG=pdfium:667
Change-Id: I6e7620948086f3f620e4cde778a4144570e1bd6d
Reviewed-on: https://pdfium-review.googlesource.com/3106
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
This CL removes unused methods, removes default params and moves static
methods into an anonymous namespace.
Change-Id: I9a0d9907b46907ababbfb8730f1f6c76002d238a
Reviewed-on: https://pdfium-review.googlesource.com/3091
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Ue it to fix a typo as well.
BUG=pdfium:634
Change-Id: I2d686242ffb841aedc2fae6a3cf7a00bea667404
Reviewed-on: https://pdfium-review.googlesource.com/3113
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: I2e1bc6cd8ba45fef2bde55bcc3f0c19947d46ed5
Reviewed-on: https://pdfium-review.googlesource.com/3111
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
The spec says the N dictionary field is required and must be set to
a valid value. Adjust the code based on this assertion.
BUG=pdfium:675,chromium:691967,chromium:702238
Change-Id: Iaa76fa0e16ce4aaa9822ad471668cbf8af5fb7cb
Reviewed-on: https://pdfium-review.googlesource.com/3112
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
m_LineArray only grows via push_back of non-null pointer, so
remove some null checks.
Another little idiosyncrasy is CLines::Clear() doesn't clear the
items in CLines, only the things that were once in CLines but aren't
anymore. So don't call it.
Change-Id: Icc434be94b1b0522533c7533b8f6b2736bb864c4
Reviewed-on: https://pdfium-review.googlesource.com/3099
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
In agg, the length is of type coord_type, which we have as int16. So having
points bigger than the max short will not work properly.
BUG=chromium:699982
Change-Id: I0e4cab6ae2b6aa023359aec4b5b3d611f8a8eb4f
Reviewed-on: https://pdfium-review.googlesource.com/3101
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
When a web link has a hyphen at the end of line, we consider it to
be continued to the next line. For example, "http://www.abc.com/my-\r\ntest"
should be extracted as "http://www.abc.com/my-test".
BUG=pdfium:650
Change-Id: I64a93d9c66faf2be0abdaf8cfe8ee496c435d0ca
Reviewed-on: https://pdfium-review.googlesource.com/3092
Commit-Queue: Wei Li <weili@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
There exists PDFs with many redundant path points, and keeping track of
them all uses a lot of memory.
BUG=chromium:679353
Change-Id: I514610cbba181658b6396e30f5bf58a3661359f5
Reviewed-on: https://pdfium-review.googlesource.com/3110
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Moved CFX_Renderer to namespace and added some private auxiliary methods to
reduce duplicated code. Also, more nit cleanup (casts, brackets, etc).
Change-Id: I66f36177767325068a8a9ebf04a5d9b3a1762d94
Reviewed-on: https://pdfium-review.googlesource.com/3093
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
BUG=pdfium:559
Change-Id: Id0a01bcc2de597ce2b2e3d60dd5c737af75c93ab
Reviewed-on: https://pdfium-review.googlesource.com/2958
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Pre-requisite for easily fixing some leaks in sample code,
fuzzers, etc.
Kill off some types completely unused in the C API.
Change-Id: I67f0a5c6eef63d8e062ca4bc97c9db03970fe337
Reviewed-on: https://pdfium-review.googlesource.com/3095
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
This Cl cleans up a bit of the locale code in fgas, removing unused
code and cleaning up some of the other code.
Change-Id: Ieb18df552cf5d803c1bbdbfe11a4f5a88c4b3af3
Reviewed-on: https://pdfium-review.googlesource.com/3094
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
We'll add callers in a later CL.
BUG=pdfium:678
Change-Id: I98c8b2832c4750df326218e24ee8c1bd33b89b50
Reviewed-on: https://pdfium-review.googlesource.com/3066
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: I959dbfebdc7a5a1ec9b201a80ff6cfdc031572b0
Reviewed-on: https://pdfium-review.googlesource.com/2833
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: Icfeb3a6dce20e8c2b619aaff1e19cde56347cb52
Reviewed-on: https://pdfium-review.googlesource.com/3011
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
Add public FPDFPageObj_NewImageObj() call to replace
FPDFPageObj_NewImgeObj() which is missing a letter.
Change-Id: I5355ee5e5bf7e6e161e2004ec7e9257c85a463f7
Reviewed-on: https://pdfium-review.googlesource.com/2840
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I190d27e79d62b9cae21b08ddfc1e422bbb37ab30
Reviewed-on: https://pdfium-review.googlesource.com/2969
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Remove the array of AppendChar methods and use a switch instead to
clarify the code.
Change-Id: I68809caf70919bf6d8dab16bfd3fa2e9ff2b7f90
Reviewed-on: https://pdfium-review.googlesource.com/3062
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This CL starts extracting common members between the two break classes
into a common base class. This also normalizes some of the member names
to be the same across classes.
Change-Id: I7f4e5065f2dac79eb4ebba397458236cc0609d38
Reviewed-on: https://pdfium-review.googlesource.com/3058
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I2e4eba78c5764de108c203b0e0efcd4e81b7bab2
Reviewed-on: https://pdfium-review.googlesource.com/3068
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Since we are going to divide i by 0, it is better to compare it to epsilon
and avoid wonkiness from division by something too close to 0.
BUG=chromium:702041
Change-Id: I8136d6063f8debd41cef37eaab7e4097b3f32f4b
Reviewed-on: https://pdfium-review.googlesource.com/3090
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I62499a271e753e44234412fd855fbd8a56763d71
Reviewed-on: https://pdfium-review.googlesource.com/3055
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
JS Array Buffers are the first candidate to be allocated from
PartitionAlloc when it becomes available, so add test first.
Presently, we will return as large an array buffer as the system
can handle; this is generally a bad idea so limit them to 256MB
and test that we handle failure.
Change-Id: I205745a7938d69eb32ac883b90824f2f9e584ec7
Reviewed-on: https://pdfium-review.googlesource.com/3065
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
If the PDF declares it has a gazillion pages when it does not, we just start
traversing again from the start. This CL fixes that.
BUG=chromium:680222
Change-Id: Ie9b55abc0aaa372429b3d995a7e1e7ab58fb7965
Reviewed-on: https://pdfium-review.googlesource.com/3060
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I005f9da5ab64558689204f23d3444cdc68f3c59b
Reviewed-on: https://pdfium-review.googlesource.com/3064
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I7a26c961c6c2667440bcc04bfd636087660ea238
Reviewed-on: https://pdfium-review.googlesource.com/3063
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|