Age | Commit message (Collapse) | Author |
|
- 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>
|
|
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: 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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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: I1e30d68dae3bf70cf3c426f6126d593b7f1c3ba4
Reviewed-on: https://pdfium-review.googlesource.com/2991
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
Change-Id: I229a3108a787725bbf2f000c39ee19d0680e9150
Reviewed-on: https://pdfium-review.googlesource.com/2968
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I9eb6e8c621b0562413873ac67b362efa68fc3ab8
Reviewed-on: https://pdfium-review.googlesource.com/3061
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: Ie69dfc32e7b526eca2ac6ae621eed879ad98476e
Reviewed-on: https://pdfium-review.googlesource.com/3054
Commit-Queue: dsinclair <dsinclair@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: I44af42c02232742edaf9f59ee63f4575e33513fb
Reviewed-on: https://pdfium-review.googlesource.com/3057
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Make RLE error handling more consistent.
BUG=chromium:700576
Change-Id: I37290ede666ba3e0a697d9d6eb209f869a07293d
Reviewed-on: https://pdfium-review.googlesource.com/2990
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: Iddd99312aee6447c05be5633eead023a004e65e1
Reviewed-on: https://pdfium-review.googlesource.com/3034
Reviewed-by: Nicolás Peña <npm@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Avoid writing |Type| in CollectionSize<Type>() so that index
type can change without rewriting conditions.
Change-Id: I40c94ca39148b379908760ba9b861114b88af7bb
Reviewed-on: https://pdfium-review.googlesource.com/3056
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: Iccd9e374dc982da5cb2a9c75e5e16b2ea261e346
Reviewed-on: https://pdfium-review.googlesource.com/3053
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
The CIDs are unsigned integers. Avoid overflow since they are given as input
from the PDF file.
BUG=chromium:700787
Change-Id: Icdc3efbbd0f4f2ad8d5b4f4f52926e20f7e06391
Reviewed-on: https://pdfium-review.googlesource.com/3052
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
Currently m_Pos is a FX_POSITION. The value stored into the void* is
typically a uint32_t. We sometimes read that uint32_t value as a size_t
to compare against vector lengths. This Cl converts all usages to be
uint32_t and uses pdfium::CollectionSize to get the correct typed vector
size.
Change-Id: I5f452817ab6049e03477945e4622c6911c89f877
Reviewed-on: https://pdfium-review.googlesource.com/3032
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I158b7d80b0ec28b742a9f2d5a96f3dde7fb3ab56
Reviewed-on: https://pdfium-review.googlesource.com/3031
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
Change-Id: Ife4a46157ec1044b24965f7d282858f8261031b1
Reviewed-on: https://pdfium-review.googlesource.com/3030
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I96e0a20d66b9184d22f64d8e4ce0dadd5a78c1e8
Reviewed-on: https://pdfium-review.googlesource.com/2967
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This Cl merges the CFX_TxtPiece and CFX_RTFPiece classes into
CFX_BreakPiece. CFX_TxtLine and CFX_RTFLine into CFX_BreakLine and
CFX_TxtChar and CFX_RTFChar into CFX_Char.
Change-Id: I95421bdf4cafd5e394db9238dea3603ccb8349c3
Reviewed-on: https://pdfium-review.googlesource.com/2966
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Review-Url: https://codereview.chromium.org/2071693002
|
|
When the value read is equal to -INT_MIN, we cannot negate it since it will
be out of bounds, so return error in this case.
BUG=chromium:628559
Change-Id: I7e47a71ef0d35cfb2d1fddc0ba644f9aac79ec3f
Reviewed-on: https://pdfium-review.googlesource.com/2965
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
Change-Id: I9dc32342e24361389841ecba83081a97fc043377
Reviewed-on: https://pdfium-review.googlesource.com/2959
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I16acba7b3eda26b4edfbfe0cb356267bd536fee8
Reviewed-on: https://pdfium-review.googlesource.com/2964
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
The spec says a1 is to the right of a0, a2 to the right of a1. I think that
means that the run lengths have to be positive, but that certainly means that
they cannot be negative.
BUG=chromium:699340
Change-Id: Ic07a272e63610f7a66c5073179cdb2768f80e2b8
Reviewed-on: https://pdfium-review.googlesource.com/2963
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
The rotation value is always 0 so we end up doing nothing for the
rotation.
Change-Id: Ib12a269d4f3c16961b1b934bf9dfc04d1c368e51
Reviewed-on: https://pdfium-review.googlesource.com/2943
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This Cl removes some CFX_TxtBreak methods which aren't called.
Change-Id: Ic66a89fa9c99aefb78d8314e1a3ebee089ef83cf
Reviewed-on: https://pdfium-review.googlesource.com/2940
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This Cl removes the FX_TXTBREAK defines and unifies the type with the
CFX_RTFBreakType which is renamed to CFX_BreakType.
Change-Id: I890ae5e08a65f922d714aaaa9ab0f9f8a882cb3c
Reviewed-on: https://pdfium-review.googlesource.com/2939
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
The cbox values are long. We should make sure they are not too big before
putting them into FX_RECT, which holds integers. The bound is chosen to also
avoid overflow when multiplying by 1000.
BUG=chromium:699961
Change-Id: Ie4443848e0319348110f7215bd1c909ef19dad9f
Reviewed-on: https://pdfium-review.googlesource.com/2956
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
PDF spec, section 'DeviceCMYK Color Space' states that:
'Each component is specified by a number in the range 0.0 to 1.0'
BUG=chromium:699459
Change-Id: Ie476bbe8740c7b1b33c80be3e3dc4207df5e6e28
Reviewed-on: https://pdfium-review.googlesource.com/2954
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This CL cleans up the namespacing along with some type confusion in the flate
codec class.
Change-Id: I4772ee571bcd78f1c839b5cefc370860aca06bb3
Reviewed-on: https://pdfium-review.googlesource.com/2917
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
BMP_WIDTHBYTES starts with: (width * bitCount) + 31. Since bitCount can be as
large as 32, to avoid this overflowing we need width <= 67108863.
BUG=chromium:628559
Change-Id: I4fd33b65da76225c8200a22380f2bfc4523c5c8d
Reviewed-on: https://pdfium-review.googlesource.com/2934
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This Cl removes unused defines and methods. It also merges fx_arb into fx_arabic
as the arb methods are only used in the arabic file and they are always included
together.
Change-Id: I1e6f75d5cb5f5bcc8db3b54cb2a14d284da5b7b1
Reviewed-on: https://pdfium-review.googlesource.com/2899
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
Not cloning is causing issues when printing to XPS printer. I have no idea why.
CL being reverted: https://codereview.chromium.org/2518063005/
BUG=698350
Change-Id: I7c814c712f9959d10d0b6502a28e15ecd752f94a
Reviewed-on: https://pdfium-review.googlesource.com/2930
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|