Age | Commit message (Collapse) | Author |
|
Change-Id: I2c52828c25b4941669503328517c12a0a1dd770e
Reviewed-on: https://pdfium-review.googlesource.com/41850
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: Ib0a2bd21fe4304163cf9c080e07475e7c033c299
Reviewed-on: https://pdfium-review.googlesource.com/41570
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I600013bcbf44661fd132ce786bcd08980a7ecd4e
Reviewed-on: https://pdfium-review.googlesource.com/41572
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Then revert the ones that break compilation.
Fix one IWYU noticed during presubmit.
Change-Id: I881a8a72818e55dbc4816247e35ff5e3015194e7
Reviewed-on: https://pdfium-review.googlesource.com/41470
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
It is not a source from which you can get CFX_DIBs, but rather a
base class from which all DIBs inherit.
Do the same thing for the CPDF_DIBSource wrapper class.
Mechanical change apart from adding a one-line comment in cfx_dibbase.h
Change-Id: Id2bde87813ca301d9fafc55ce08d703dfc6a7184
Reviewed-on: https://pdfium-review.googlesource.com/41352
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Proves we own the memory that the class will eventually free.
Change-Id: Ie9523da8db738e7478a1c73e3e1a6b24aed38442
Reviewed-on: https://pdfium-review.googlesource.com/41290
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
This CL fixes instances of variable shadowing that are
discovered by turning on -Wshadow.
BUG=pdfium:1137
Change-Id: I418d50de89ecbeb12e85b23a358bc61e8f16e888
Reviewed-on: https://pdfium-review.googlesource.com/41150
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
The arg determined returning value for X or Y dimension. Splitting
into two separate methods is much clearer at the call sites.
Add missing consts along the way.
Change-Id: I498ea5a8fb4618166727b8a08ade6fcca2111d17
Reviewed-on: https://pdfium-review.googlesource.com/41170
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
The flag is unused.
Change-Id: I15eb3e20e6a632ae2aa2afc19cb09d2402e607e0
Reviewed-on: https://pdfium-review.googlesource.com/41031
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I0658f63a0d8fb8a5233e135dacedc4153532f01d
Reviewed-on: https://pdfium-review.googlesource.com/41112
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: I86c6f7526e2ef4c3e8de30ebaff223095ee70fc4
Reviewed-on: https://pdfium-review.googlesource.com/40811
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
CXFA_TextParser::GetEmbeddedObj() does the same thing twice in a row.
Change-Id: Ia46a0a697ff667b2884cea82258399889dbb5dc6
Reviewed-on: https://pdfium-review.googlesource.com/40775
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Change-Id: I976a8841f1519310cbf934103336dc050a7c293d
Reviewed-on: https://pdfium-review.googlesource.com/40773
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
Mark two other fields which must remain raw.
Change-Id: Idcd9b074aad23f35dc6607feeaa4fa6701efffaa
Reviewed-on: https://pdfium-review.googlesource.com/40916
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: I4420fbf7402a8b08e33ca525e98690643d59efdf
Reviewed-on: https://pdfium-review.googlesource.com/40930
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Bug: pdfium:1135
Change-Id: Iea16a65a5eebcb914192eb49de17a2c4eda83320
Reviewed-on: https://pdfium-review.googlesource.com/40690
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Change "EmbbedObj" to "EmbeddedObj".
Change-Id: Ia6a8ec45b4563b3ec64b91a10e087dbf32a8d8db
Reviewed-on: https://pdfium-review.googlesource.com/40751
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Defer upscaling as late as possible so that intermediary data
structures are smaller.
Made a couple of changes along the way to preserve the barcode
correctness and fix some padding issues.
For my example, this is a ~21x improvement in rendering time, down
from ~190ms per barcode to ~9ms.
Bug: 872907, pdfium:1135
Change-Id: If532e0f168f02fea9c31d473f34c0009da4f4612
Reviewed-on: https://pdfium-review.googlesource.com/40010
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
Change-Id: Ia002b26d70f5d6e5b66a3341978483636f943db8
Reviewed-on: https://pdfium-review.googlesource.com/40672
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Introduced in:
https://pdfium-review.googlesource.com/c/pdfium/+/18271/13/xfa/fxfa/parser/cxfa_node.cpp
Bug: 872899
Change-Id: I9e71e384cd8682dd09378f0cb92ae443138a19d8
Reviewed-on: https://pdfium-review.googlesource.com/40870
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
Small size penalty in removing the union, but unions can lead
to type errors.
Change-Id: I8ff9fd63b1f87d05df18db17edbaf770226e1252
Reviewed-on: https://pdfium-review.googlesource.com/40790
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
- Make methods const or move them into the anonymous namespace.
- Make GetItemLabel() return the value.
Change-Id: Ic6938d14e7efa09f1851950c28d3c855690d9aaf
Reviewed-on: https://pdfium-review.googlesource.com/40650
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
Fix some nits in CXFA_FFField as well.
Change-Id: I6d0d4569322a01192cdd4bf9d98325ff86642abe
Reviewed-on: https://pdfium-review.googlesource.com/40651
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
The root cause is an extremely large reserve count. Limit it to the size
of the widget.
BUG=chromium:875282
Change-Id: Ia3bbb07503ce349adc2662731d22317bda7df4ef
Reviewed-on: https://pdfium-review.googlesource.com/40652
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I57cd74581849a8f434f64c4ec3c4ad3ce1f92546
Reviewed-on: https://pdfium-review.googlesource.com/40630
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: If57552b9e48d9607f84e853aadb2742a8c135b46
Reviewed-on: https://pdfium-review.googlesource.com/40470
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: I0a20734c0ad3f6bbc83a85a53f09b5e8ccdfa548
Reviewed-on: https://pdfium-review.googlesource.com/40450
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: I832b694dea58de354ef115bacc11f92e072abe80
Reviewed-on: https://pdfium-review.googlesource.com/40430
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: I559d8208b8415e42e520e81114f9d2d66e74b288
Reviewed-on: https://pdfium-review.googlesource.com/40391
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: Ide4a972337afaf346e46edc4ede48140cd4544c1
Reviewed-on: https://pdfium-review.googlesource.com/40390
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Conformity with standards.
Change-Id: Ia718700526477fd1826eb4900ab333ebf4c8a517
Reviewed-on: https://pdfium-review.googlesource.com/40353
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
The way it was working before is:
Look at the width and height provided for the barcode. If the maximum
number of codewords to fit in that space was within the spec limits
(1 <= cols <= 30 and 3 <= rows <= 90), cram as many codewords as
possible. The unused space was filled with padding.
With this CL, instead look at the amount of content that needs to fit
into the barcode and favor fewer codewords rather than as many as
possible.
Bug: pdfium:1135
Change-Id: Ia96be82ec7c5f4f920cff58def1a44000bf04761
Reviewed-on: https://pdfium-review.googlesource.com/40350
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
This is useful for debugging and validation purposes. The hashes that
are in BarcodeTest are not necessarily for valid outputs.
This CL refactors the code in embedder_test.png that already does this,
moving it to testing/utils where unit tests can access it too.
Bug: pdfium:1135
Change-Id: I6f1d70a4e133f8f04dbe52646087f99c448e95f8
Reviewed-on: https://pdfium-review.googlesource.com/40152
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Reduce the logical size of the barcode by removing unnecessary
region duplication.
As far as I can tell, the line thickness is useless and the aspect
ratio causes arbitrary changes in rounding, but ultimately the
dimensions of a barcode are defined by its width and height, rather
than by this ratio.
The improvement with this CL is from ~580ms to ~390ms per barcode,
so about 1.5x. Combined with
https://pdfium-review.googlesource.com/c/pdfium/+/40010
the improvement is to ~15ms, which is about 39x.
This also fixes the rendering of the barcode in the pixel and
corpus tests. You can verify this pointing a barcode reader app at
the screen. It does not however fix every case, as the unit test is
still unreadable.
Bug: 872907, pdfium:1135
Change-Id: Ic28e60f54719552cfe69ace7ebc3f730c338a129
Reviewed-on: https://pdfium-review.googlesource.com/40030
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Setting these to anything outside of [1, 10] is non-op. Not sure why
the test did that, but these lines have no effect.
Bug: pdfium:1135
Change-Id: I175d07137674ab1b6b9c86b3bc68b4a128601b9f
Reviewed-on: https://pdfium-review.googlesource.com/40250
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
Callers always want one form or the other, so split into separate
methods. This may save some branching.
Remove forms that are not used.
Put more helpful helper function in .cpp file.
Change-Id: I4e025de7f69ce3f323cd290a5dc8202dd4f8ca07
Reviewed-on: https://pdfium-review.googlesource.com/40270
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Non-consecutive mode has questionable correctness and is not an obvious
performance win.
Change-Id: Idaa66e5ee5c4604628a0f55b67d5a04ab47ea5ec
Reviewed-on: https://pdfium-review.googlesource.com/40050
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Replace it with CFX_ReadOnlyMemoryStream, which does the same thing.
Take some checks from CFX_BufferSeekableReadStream and add them
CFX_ReadOnlyMemoryStream.
Change-Id: I25554c3aec3ec96967f8df16ca68a64dba121b6f
Reviewed-on: https://pdfium-review.googlesource.com/40070
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Bring in line with standards.
Remove argument entirely for mac code that is always nullptr.
Change-Id: I0710bdbd51fc0bc2e1d428ef44976be39a631147
Reviewed-on: https://pdfium-review.googlesource.com/40091
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
It is always true now.
BUG=pdfium:263
Change-Id: I74fd0091f5815701718e8cd5acc6e7a0de772a85
Reviewed-on: https://pdfium-review.googlesource.com/40031
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: Id097320ab2d9b5d1579582e5797e29c701499501
Reviewed-on: https://pdfium-review.googlesource.com/39991
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
More const pointers, less const_casts.
BUG=pdfium:263
Change-Id: I47fc6d8f2f837390e40ad22d8b67946065294eaa
Reviewed-on: https://pdfium-review.googlesource.com/39879
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
No need to even bring any .cpp files in line with these headers.
Change-Id: I934169d77ae09adc11f02e5ea92b1f8b078c9477
Reviewed-on: https://pdfium-review.googlesource.com/39876
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Introduce const/non-const versions of method where required.
Part of the war on const_cast<>. Tidy one expression to use []
instead of .data().
Change-Id: I41e45669c79eee242ff2244c7dc3afcf6386a433
Reviewed-on: https://pdfium-review.googlesource.com/39852
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Turns out that "FromUnicode" is misleading in that, on linux, it simply
removes any characters beyond 0xFF and passes the rest unchanged, so
no unicode decoding actually takes place. On Windows, it passes it into
the system function specifying FX_CODEPAGE_DefANSI, converting it into
the so-called "default ANSI code plane", passing some characters,
converting others to '?' and still others to 'A'. Either way, nothing
resembling UTF8 comes out of this, so pick a better name.
These now immediately look suspicious, so a follow-up CL will see
which ones should really be WideString::UTF8Encode() instead.
Making this a normal method on a widestring rather than a static
method on a bytestring feels more natural; this is parallel to
the UTF8Encode and UTF16LE_Encode functions.
Add a test that shows these conversions.
Change-Id: Ia7551b47199eba61b5c328a97bfe9176ac8e583c
Reviewed-on: https://pdfium-review.googlesource.com/39690
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Limits the number of elements that can be added to the expressions
list in the FormCalc parser. This handles cases like long strings of !
repeated, since ! is a valid identifier and identifiers are valid
expression, even though it will be no-op. This is another case of
something that is valid, but stupid.
BUG=chromium:870385
Change-Id: I8e34ce00bcbe4499e0a45bd5dc38541793144481
Reviewed-on: https://pdfium-review.googlesource.com/39630
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
Simpler, faster, and avoids platform idiosyncracies of wprintf().
Change-Id: I91676bc38199ca2c30936094ca145239f915bc53
Reviewed-on: https://pdfium-review.googlesource.com/39610
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: If3eb4396232daed28f2b63ffe1d110075c9299de
Reviewed-on: https://pdfium-review.googlesource.com/39230
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Provides consistency with the naming of other traverse strategies.
Fix dubious casting inside the strategy.
Change-Id: Ic96b1922ae1dc601a37c8c3b3dd0f118ab6b2eea
Reviewed-on: https://pdfium-review.googlesource.com/39210
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Add more checks for |m_pLocaleMgr| before dereferencing it.
Change-Id: I39ab44d652364f5530266d2b724fa6703d1b51f1
Reviewed-on: https://pdfium-review.googlesource.com/39114
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|