Age | Commit message (Collapse) | Author |
|
Return a std::pair instead of having a non-const ref out parameter. Use
early returns / continues to simplify code.
Change-Id: I093fe667d31447ed42b8d44e354405094adaf8fd
Reviewed-on: https://pdfium-review.googlesource.com/39070
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
https://chromium.googlesource.com/chromium/src/third_party/freetype2.git/+log/b532d7ce708c..578bcf103a12
BUG=pdfium:1125
Change-Id: I6cf423c4e64e54c05c47e7f706039ef2d4ef49dc
Reviewed-on: https://pdfium-review.googlesource.com/39350
Reviewed-by: Nicolás Peña Moreno <npm@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Also initialize members in the header when possible.
Change-Id: I458bc433f79ac2f6c04d645f44db6f460fd0bdc1
Reviewed-on: https://pdfium-review.googlesource.com/39330
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: 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>
|
|
Change-Id: I7809f2648d24b4ae0dd1a5a0d4fd98a0bd4d8939
Reviewed-on: https://pdfium-review.googlesource.com/39113
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Also fix C++ style errors.
Change-Id: Ia4b815c2fa8430791bb44a218ef93f8efde8c3af
Reviewed-on: https://pdfium-review.googlesource.com/39050
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
Fix some nits as well.
BUG=chromium:868271
Change-Id: Ia3231fde98c3e16e41b092a9833402cedc8e828d
Reviewed-on: https://pdfium-review.googlesource.com/39112
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
This follows the same pattern as DefaultGetFaceName(), so the client has
to call this function twice, but allocation of the string buffer happens
outside pdfium.
Change-Id: I06b7dcd00aca9b9b94799dad3f139617d7f5451e
Reviewed-on: https://pdfium-review.googlesource.com/38870
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
We don't need anything that the parent class can't provide, so
avoid dubious casting.
Change-Id: I9f3d9735f3bfbcf005865772af31817c2b8addef
Reviewed-on: https://pdfium-review.googlesource.com/39270
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Because bools are bogus.
Change-Id: I54a2627443784cec40912288230e657c63a35408
Reviewed-on: https://pdfium-review.googlesource.com/39190
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Instead, move the methods to the subclass where they belong.
Fix IWYU in CJX_Object.h to fix compilation.
Change-Id: I4c71f28235b9cf5000e9ddaf33d6602baf22205f
Reviewed-on: https://pdfium-review.googlesource.com/39170
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
... and then immediately release it, but it is a step in the right
direction.
Change-Id: Ib52972c6789d8f98a576d1c69f8019541c96ac51
Reviewed-on: https://pdfium-review.googlesource.com/39152
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
We'll get a nice safe segv should this somehow happen in the wild
instead of a type confusion error. We'll assert later on in the
debug builds when the null is seen, as well.
Change-Id: Iabd8468adcbacaa0acdc7c68f27cc8f94e0e68cc
Reviewed-on: https://pdfium-review.googlesource.com/39151
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
There's no reason that every CXFA_LayoutItem must be a
CXFA_ContentLayout item, so use checked conversions. The
code may already be arranging things so the constraint is
already satisfied, but this adds an additional layer of
safety.
Tidy some long expressions with pre-existing typedef for node
iterator while we're at it.
Change-Id: If1448131ca73bfedb2266b070f1a913688598e64
Reviewed-on: https://pdfium-review.googlesource.com/39051
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: I3fdc6d473f08835b6caeacbbd583bb651a9c5678
Reviewed-on: https://pdfium-review.googlesource.com/39111
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
It is reachable, and the action is currently a no-op, so let it be. Also
change FormValueNode_SetChildContent() to return void since no caller
checks the return value. Remove its default argument, since all the
callers set it.
Change-Id: I742ca2d936872a3b3d609c178321199abc06546c
Reviewed-on: https://pdfium-review.googlesource.com/39115
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
This cache is never read.
Change-Id: Iaa4dcf8debf01ab783c2e757a19b18c0317d6fe1
Reviewed-on: https://pdfium-review.googlesource.com/39150
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
Bug: chromium:868477
Change-Id: I5957c5ef051bc4fa8eb51efa6a7fc142996742c5
Reviewed-on: https://pdfium-review.googlesource.com/39130
Commit-Queue: Art Snake <art-snake@yandex-team.ru>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
It makes illegal casts and requires its callers to double-check the
type validity of results before use. Instead, use the parent
class iterator and perform checked casts.
No functional difference, since it looks like the requisite checks
were being made in all places.
Make one "using" visible to other files to save some verbosity.
Change-Id: I894ca15b4bdddd4723b787663950a58bc58b7f06
Reviewed-on: https://pdfium-review.googlesource.com/39030
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
XFA introduces some additional subclasses, so it doesn't hurt
to be sure in all cases before making a static cast.
Change-Id: I7447ca58be0b57201b39ba40a3fc5f47505cee58
Reviewed-on: https://pdfium-review.googlesource.com/39013
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
All usages were previously checked correctly, but this consolidates
some code as well.
Change-Id: I63711748b31b698a3f21f98fdb536db1e9e0b1cf
Reviewed-on: https://pdfium-review.googlesource.com/39010
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
https://pdfium.googlesource.com/pdfium_tests/+log/48945a35..4e2bafc0
TBR=hnakashima@chromium.org
BUG=chromium:828177
Change-Id: I79908a09396798ff60b7aab0bccaa1c7574acaab
Reviewed-on: https://pdfium-review.googlesource.com/39011
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
BUG=chromium:828177
NOTRY=true
Change-Id: I94de26cf74b27b7c71795a2ee189c9c6b4c56ac6
Reviewed-on: https://pdfium-review.googlesource.com/38903
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
BUG=chromium:828177
NOTRY=true
Change-Id: I30123087bbe11aaaa6175b5f729b7ab55107a975
Reviewed-on: https://pdfium-review.googlesource.com/38902
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
Bug: 860896
Change-Id: I0220f3f46619ee0eac054b39938da053a7a16dec
Reviewed-on: https://pdfium-review.googlesource.com/39014
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Ryan Tseng <hinoka@google.com>
|
|
Because we don't want to trust anything V8 gives us back.
Use a deep namespace so we can have a short declaration in the
structs, but avoid collisions.
Change-Id: Ibb832a5dcd34c652159c3343dd70c9e2ee561537
Reviewed-on: https://pdfium-review.googlesource.com/38972
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
This CL merges DecodeArithTemplateXUnopt for X=0,1,2. This is similar to
how three methods were merged into DecodeArithOpt3.
Change-Id: Ib0d4f14de6a8c924517d82eaec7577961503a325
Reviewed-on: https://pdfium-review.googlesource.com/38935
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: I435ced292df79118fb65dd2922292ed29824dc1c
Reviewed-on: https://pdfium-review.googlesource.com/38970
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: Ib22db6c57d2066ef70c0ef12e44d1e5eee6611a5
Reviewed-on: https://pdfium-review.googlesource.com/36410
Commit-Queue: Art Snake <art-snake@yandex-team.ru>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
https://pdfium.googlesource.com/pdfium_tests/+log/d2389ab3..48945a35
TBR=hnakashima@chromium.org
Change-Id: Idd52b14d473a9384536feb25426929b6435894ef
Reviewed-on: https://pdfium-review.googlesource.com/38990
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Introduces checks in a few new places, but mainly just consolidates
checking/casting logic.
Change-Id: I634a03060d254db099972c6978249992367e146c
Reviewed-on: https://pdfium-review.googlesource.com/38900
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
https://pdfium.googlesource.com/pdfium_tests/+log/9b7ff5b8..d2389ab3
TBR=art-snake@yandex-team.ru
Change-Id: I5a7ce225dc1044aaf5a42d25d5a211057ef5732d
Reviewed-on: https://pdfium-review.googlesource.com/38931
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Part of the effort to reduce unchecked static casts.
Change-Id: I1bff1c53aa7c5804660de4b65cf01523d70fcbb7
Reviewed-on: https://pdfium-review.googlesource.com/38896
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
The cache is never accessed and retains fonts in memory that will
not be used anymore.
Change-Id: Ia763499dc88a99741a85afc4ddd09257e8e1119c
Reviewed-on: https://pdfium-review.googlesource.com/38898
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
Value::ToString is deprecated since the Isolate is inferred from the
memory address of the object being converted to a string which will soon
not be reliable. As such this method will be removed in the very near
future.
Change-Id: I1e5a1a0464f2052cc3aa5eeb1ddbdb7b0a9222d3
Reviewed-on: https://pdfium-review.googlesource.com/38914
Commit-Queue: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
|
|
This is required in LUCI because python packages on LUCI are
hermetically defined, and pywin32 is required for ninja.
Bug: 860896
Change-Id: I37b5e8c1016d2f6bce2ad3638662b81e613b0d25
Reviewed-on: https://pdfium-review.googlesource.com/38901
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Ryan Tseng <hinoka@google.com>
|
|
Because it is a stronger pattern at runtime.
These were found by essentially: grep -ni '\bassert\b.*type'
Change-Id: I913d77139053e8980528597a6633e1859e5204c4
Reviewed-on: https://pdfium-review.googlesource.com/38890
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Allows killing off static_cast<> in two places.
Change-Id: I467b69d92e8cbda5c2916b6ed2e97c173d8b4f2f
Reviewed-on: https://pdfium-review.googlesource.com/38897
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Remove |kInvalidHeaderOffset|.
Change-Id: I5978e745e97aa4e13299dd21028721725ac0c996
Reviewed-on: https://pdfium-review.googlesource.com/38853
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Art Snake <art-snake@yandex-team.ru>
|
|
The subtypes are listed in "PDF Reference 1.7", page 617.
Bug: chromium:856331
Change-Id: I41d6094949ff22007a72ef7c1493c413c5af5f7b
Reviewed-on: https://pdfium-review.googlesource.com/38790
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
Replace with CFX_BufferSeekableReadStream, which allows for spans and
const inputs.
Change CXFA_DocumentParser to take IFX_SeekableReadStream instead of
IFX_SeekableStream in the process.
Change-Id: I0168451350c9fc250231f0414c38738a4d86ca42
Reviewed-on: https://pdfium-review.googlesource.com/38852
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Clearer that just using indexing off of raw pointers, and makes the
code more closely resemble other functions.
Change-Id: I7cc8363b505e66120bc1c686bb23b2bdf8fc401f
Reviewed-on: https://pdfium-review.googlesource.com/38894
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Bug: 860896
TBR: thestig
Change-Id: I61208b951e3746dae363f91dc9eab2319378b48f
Reviewed-on: https://pdfium-review.googlesource.com/38895
Reviewed-by: Ryan Tseng <hinoka@google.com>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Ryan Tseng <hinoka@google.com>
|
|
Change-Id: Ib9e20fdfc637b2ba0358586e23ad72454b0b8ad1
Reviewed-on: https://pdfium-review.googlesource.com/38851
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
- Remove #if guards in the .cpp file and flip the #if guard in the
header to produce an error when incorrectly included.
- Do the same for cfx_fileaccess_posix.cpp.
- Also remove forward declarations for win32 APIs.
Change-Id: I81056ea6198d342e62744bd3240b3a28ac53d5c0
Reviewed-on: https://pdfium-review.googlesource.com/38410
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
- CPDF_SyntaxParser can no longer be initialized multiple times.
- Make the file length and header offset const.
- Make the header offset type FX_FILESIZE consistently.
- Simplify for the common case where the header offset is 0.
Change-Id: I7138db1fbcec3b7578b0239b92fc1154fa4dc4ce
Reviewed-on: https://pdfium-review.googlesource.com/38850
Reviewed-by: Art Snake <art-snake@yandex-team.ru>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Bug: chromium:842503
Change-Id: If411815d8324929f482e3cad0fda54f24d370c2a
Reviewed-on: https://pdfium-review.googlesource.com/37830
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
And use it in place of ASSERT() that the type was correct. Since we
can check it, doing so at runtime may help avoid type confusion, and
we'll get a nice safe SEGV if the asserted condition ever fails.
Change-Id: I46b65a4b70e819a670d7cad7966e0d100f0d9a63
Reviewed-on: https://pdfium-review.googlesource.com/38810
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Because the other helpers are declared here.
Rename VariablesThis to ThisProxy in a few places; VariablesThis is
a slightly different concept (see GetVariablesThis()).
Then introduce helper for CXFA_List subclass as well.
Remove unused const version of some helpers.
Change-Id: Ia328d8cd170a8b97015e98c1c770fa8a44810455
Reviewed-on: https://pdfium-review.googlesource.com/38670
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|