Age | Commit message (Collapse) | Author |
|
Remove stray const in operator[] that was introduced when downgrading
from C++14 to C++11 syntax.
Add missing Get() in first() that was introduced when converting
to UnownedPtr.
Prevent ASAN from flagging spans where the UnownedPtr points to byte
N+1 of a N byte object, and the span is empty. This is legal in C for
ordinary pointers so long as the pointer isn't de-referenced, but is
not allowed per the rules for UnownedPtr.
Change-Id: Ic143c5ef4e37c1cf86f0a3e5408be6e2076a85e2
Reviewed-on: https://pdfium-review.googlesource.com/30212
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Because we can get the lifetime check for free if we do this. This
requires adding some "constexpr/noexcept" to UnownedPtr to make the
types line up with what span.h requires.
Change-Id: I45918f8723122082036eed959f769644ab4c509f
Reviewed-on: https://pdfium-review.googlesource.com/29672
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Allows indexing with better bounds-checking to occur. Some small
modifications are required to deal with PDFium being intentionally
held at C++11 compliance, not C++14.
Use in one place as check on correctness.
Change-Id: Id2875cf0a93980112bc536a93c4f9ec5306c0dac
Reviewed-on: https://pdfium-review.googlesource.com/29671
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Chris Palmer <palmer@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Use build/build_config.h instead. Having two build_config.h files is
confusing.
Change-Id: I4bd9c76ab6d913ee0aaa8b2f9c17b94bfba2d128
Reviewed-on: https://pdfium-review.googlesource.com/25111
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Chris Palmer <palmer@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
Bug: chromium:804907
Change-Id: I3562653fbc26d669d1e0a99894a69da032a0349e
Reviewed-on: https://pdfium-review.googlesource.com/23810
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
Because system pagesize is 4K on general system, such as x86 etc.
But Loongson have 16K system pagesize and unable to print pages
with use print preview.
Therefore, the relevant pagesize places needs to be changed.
Also refer to:
https://chromium.googlesource.com/chromium/src/+/0752dbc988222d7edef2ef7c4e19555089c35fdf
Bug: 801045
R= palmer@chromium.org
Change-Id: Icc5ceae7b8a66be0ced1abb448a80c23fa518f34
Reviewed-on: https://pdfium-review.googlesource.com/22735
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: I29769f78eaad10c6a8b79e27524336c4f330377e
Reviewed-on: https://pdfium-review.googlesource.com/22258
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
See the bugs and cxx post for justification and details:
https://groups.google.com/a/chromium.org/forum/#!topic/cxx/RkOHzIK6Tq8
This change was done using clang-tidy as described here:
https://chromium.googlesource.com/chromium/src/+/lkcr/docs/clang_tidy.md
Bug: chromium:778942
Change-Id: I5d94299404647d231c0dc8ef8b75a6c0539f378c
Reviewed-on: https://pdfium-review.googlesource.com/19972
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
See the bugs and cxx post for justification and details:
https://groups.google.com/a/chromium.org/forum/#!topic/cxx/RkOHzIK6Tq8
This change was done using clang-tidy as described here:
https://chromium.googlesource.com/chromium/src/+/lkcr/docs/clang_tidy.md
Bug: chromium:778955
Change-Id: Ib037ed749539e4380fb336fc6fa85648fc506118
Reviewed-on: https://pdfium-review.googlesource.com/19990
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
See the bugs and cxx post for justification and details:
https://groups.google.com/a/chromium.org/forum/#!topic/cxx/RkOHzIK6Tq8
This change was done using clang-tidy as described here:
https://chromium.googlesource.com/chromium/src/+/lkcr/docs/clang_tidy.md
Bug: chromium:776257
Change-Id: I1f6637cde8b3e41825993a736bed6763dd7beacb
Reviewed-on: https://pdfium-review.googlesource.com/19971
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
See the bugs and cxx post for justification and details:
https://groups.google.com/a/chromium.org/forum/#!topic/cxx/RkOHzIK6Tq8
This change was done using clang-tidy as described here:
https://chromium.googlesource.com/chromium/src/+/lkcr/docs/clang_tidy.md
In some cases the the tool leaves behind a string of commas where it
replaced a member initializer list
(https://bugs.llvm.org/show_bug.cgi?id=35051). They were cleaned up
with:
git diff --name-only | \
xargs sed -E -i 's/(^\s*|\)\s*):[ ,]*= default/\1 = default/'
Bug: chromium:778959, chromium:778957
Change-Id: I23e60d3d6c8bc9e8574d425710a0441cb5510d6b
Reviewed-on: https://pdfium-review.googlesource.com/19970
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This ports the non-test portion of Chromium commit r514411 to PDFium.
BUG=chromium:781473
Change-Id: Iab203edf3cb49a491aca5e524815a15e74f47581
Reviewed-on: https://pdfium-review.googlesource.com/17990
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
This is a downstream patch of https://crrev.com/502028.
Change-Id: Ib78784093332a81a7afd6959c66f5e266540f6d3
Reviewed-on: https://pdfium-review.googlesource.com/17350
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Bug: pdfium:912
Change-Id: Iea61260ccc972627950b470a44ab21dbd2b4045b
Reviewed-on: https://pdfium-review.googlesource.com/15170
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This ports
https://chromium-review.googlesource.com/c/chromium/src/+/599127 from
Chromium to PDFium.
Because VC++ does not have format-string checking for user-defined
functions during normal compiles, because clang-cl had its format-string
checking disabled, because some files are only compiled on Windows, and
because VC++'s /analyze doesn't build all targets, and because VC++'s
format-string checking is more lenient than clang's... 50 warnings about
format-string mismatches crept in to Chromium's build. Seven of these
were somewhat serious, with four being wchar_t*/char* mismatches because
of base::FilePath and the other three being size_t/%d mismatches.
Now that all of the mismatches are corrected this change enables
PRINTF_FORMAT checking with clang-cl so that these bugs never return.
Bug: pdfium:909
Change-Id: I683592f5015b31b4dd04dfe81e6866389b544efe
Reviewed-on: https://pdfium-review.googlesource.com/14834
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
It is intended to use this class instead of the std::pair<bool, Foo*>
pattern that has been used for guarded pointer returns in PDFium.
Change-Id: Id3e305d6cdb329c84e1d827c855423d3efae42c0
Reviewed-on: https://pdfium-review.googlesource.com/11610
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
Change-Id: I7a2fc956236005fca4848bd2be6db4585bc4e7d7
Reviewed-on: https://pdfium-review.googlesource.com/4477
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Allows us to apply this same predicate onto ordinary arrays.
Change-Id: I917be09ed5e55167657c9af97f45f2ea2dbc6ab4
Reviewed-on: https://pdfium-review.googlesource.com/4270
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
BUG=pdfium:691
Change-Id: If6f1e200e763827ec640b2b79171f3899ea7927e
Reviewed-on: https://pdfium-review.googlesource.com/4050
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Chris Palmer <palmer@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>
|
|
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>
|
|
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>
|
|
Fix callers conventions to avoid ambiguity.
Fix bad bounds check unmasked by change.
Directly include headers no longer pulled in by numerics itself.
Review-Url: https://codereview.chromium.org/2640143003
|
|
Otherwise, we might be silently doing an unsafe cast before
applying the check if the actual argument doesn't match the
exact src type.
Review-Url: https://codereview.chromium.org/2484953003
|
|
Corresponds to version dfd77a987650965071d0fddfbe0b806ce62ba337.
Major change is to handle div by 0 without exceptions.
Safe shift is not yet present.
TBR=thestig@chromium.org
TBR=jschuh@chromium.org
Review-Url: https://codereview.chromium.org/2473513002
|
|
The majority of these are already upstream in base/, the
remainder will need upstreaming. Also pull some upstream
changes to reduce diffing.
Upstream CL is https://codereview.chromium.org/2440143003/
BUG=657436
Review-Url: https://chromiumcodereview.appspot.com/2441753003
|
|
Review-Url: https://codereview.chromium.org/2386273004
|
|
This may be a better design because it avoids having a level
of indirection that the Observer required.
Review-Url: https://codereview.chromium.org/2326763002
|
|
Review-Url: https://codereview.chromium.org/2262473002
|
|
BUG=pdfium:29
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1821423002 .
|
|
Also move ScopedFileStream, since it isn't specific to the
parser, and belongs with the fxcrt object it manipulates.
R=ochang@chromium.org
Review URL: https://codereview.chromium.org/1780063003 .
|
|
Fix IWYU in stl_util.h
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1672283002 .
|
|
Unfortunately, it is still used on the xfa/ side, so
exclude it only for non-xfa builds.
Original Review URL: https://codereview.chromium.org/1618273004 .
(cherry picked from commit c64e4007ee4561ec2ed3ce986191caf9b024ef55)
TBR=ochang@chromium.org
TBR=thestig@chromium.org
Review URL: https://codereview.chromium.org/1631863003 .
|
|
TBR=thakis@chromium.org
Review URL: https://codereview.chromium.org/1547833002 .
(cherry picked from commit d20dfba2ae10e8aeb328328f09da79ff904110a8)
Review URL: https://codereview.chromium.org/1545183002 .
|
|
TBR=dml@google.com, thakis@chromium.org
Review URL: https://codereview.chromium.org/1544923002 .
Review URL: https://codereview.chromium.org/1545823002 .
(cherry picked from commit ba2586d2c0a50df14aa2549a0a841e1d4b9af4b6)
(cherry picked from commit 87f7d29531dabfd66e547a6be31a08272ff631d5)
Review URL: https://codereview.chromium.org/1542213002 .
|
|
appropriate.
TBR=ochang@chromium.org
Review URL: https://codereview.chromium.org/1540263003 .
(cherry picked from commit 1fc92867ca53f0fba4272fbee3814d844f487495)
Review URL: https://codereview.chromium.org/1542193002 .
|
|
The no nominmax config was lost when moving from master.
Fix a few other small differences along the way, and fully
conditionalize the build of tiff.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1514633002 .
|
|
That refer to parent directories.
TBR=dsinclair@chromium.org
Review URL: https://codereview.chromium.org/1434223002 .
(cherry picked from commit 22bc4227fbbda5a5e9abad2a2c0a98c04fe7f228)
Review URL: https://codereview.chromium.org/1439223003 .
|
|
- 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
TBR=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1388203003 .
(cherry picked from commit 3acb1ef909a22368507ed13817c4988c818e3aee)
Review URL: https://codereview.chromium.org/1401533004 .
|
|
Code is mostly stolen from Chromium's scoped_ptr.
- Add unit tests.
- Use this to fix a leak.
BUG=chromium:531408
TBR=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1351383004 .
(cherry picked from commit cef2a9c51bee4b987fc813013d45dad6535a9a46)
Review URL: https://codereview.chromium.org/1358163003 .
|
|
(cherry picked from commit dd7a7f012424ec8505830710ac0dd0183203c189)
Original Review URL: https://codereview.chromium.org/1358163002 .
TBR=jyasskin@chromium.org
Review URL: https://codereview.chromium.org/1362763002 .
|
|
Not sure why building with gyp was working despite the missing '../' but
it wasn't working in stricter build systems.
TBR=dml@google.com
Review URL: https://codereview.chromium.org/1321293003.
(cherry picked from commit fa31d9630aadfe101d3b35e26ce0fc926ec1505b)
Review URL: https://codereview.chromium.org/1345313003 .
|
|
(cherry picked from commit ac8fda05418b7c96255d320fdec296935c552187)
(cherry picked from commit 72d51871ae152163eeb9b005fd0a74d5c1651cd2)
Original Review URL: https://codereview.chromium.org/1338383002 .
TBR=thestig@chromium.org
Review URL: https://codereview.chromium.org/1344873002 .
|
|
Original Review URL: https://codereview.chromium.org/1126243007
BUG=488302
TBR=eroman@chromium.org
Review URL: https://codereview.chromium.org/1153543003
|
|
Original Review URL: https://codereview.chromium.org/1142713005
R=thestig@chromium.org
TBR=thestig@chromium.org
Review URL: https://codereview.chromium.org/1143663008
|
|
Original Review URL: https://codereview.chromium.org/1130053003
TBR=thestig@chromium.org
Review URL: https://codereview.chromium.org/1124353002
|
|
Original Review URL: https://codereview.chromium.org/1091283002
TBR=thestig@chromium.org
Review URL: https://codereview.chromium.org/1098653006
|
|
Original revieww URL: https://codereview.chromium.org/900753002
TBR=jam@chromium.org
Review URL: https://codereview.chromium.org/880603004
|