Age | Commit message (Collapse) | Author |
|
This CL changes the CXFA_Node parent pointer back to a raw pointer from
an UnownedPtr. The other tree pointers have been renamed for clarity.
Change-Id: I366a0b5b41d49d87b11bec0eea9890fbc79c1c62
Reviewed-on: https://pdfium-review.googlesource.com/26370
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
We converted the <v8.h> includes to "v8/include/v8.h" some revs back,
so we need not explicitly tell the compiler to look there.
Change-Id: Id71f1bad81a969eebf418c9d97b32864ea78480b
Reviewed-on: https://pdfium-review.googlesource.com/26251
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Bug: pdfium:1011
Change-Id: Ie12595f321888c50ae74ab22bb147aef7e20f40d
Reviewed-on: https://pdfium-review.googlesource.com/26390
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
Change-Id: I653619faa61181137795bb3675418fd8d0945d25
Reviewed-on: https://pdfium-review.googlesource.com/25590
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
FX_AllocOrDie, FX_AllocOrDie2D and FX_ReallocOrDie contained
unreachable code which in jumbo builds with some Visual Studio
versions/configurations resulted in a compiler warning.
By reordering the code, the unreachable code can be removed.
Bug: pdfium:964
Change-Id: I8c040a31ea6af0ca896d8f68297e263719d6bdfa
Reviewed-on: https://pdfium-review.googlesource.com/26190
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Didn't find any bugs, but also doesn't require much boilerplate.
Bug: TODO
Change-Id: I5f30183c55216f1333c79fcb46476d281720873e
Reviewed-on: https://pdfium-review.googlesource.com/26210
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
|
|
Change-Id: I4ced221fb5691927485deceb7002dac880c2c210
Reviewed-on: https://pdfium-review.googlesource.com/26110
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
Instead of having separate floats for width and height.
Also remove some out parameters and just return them instead.
Change-Id: I798b1453910c89477d422dcb7c0805b90823bf98
Reviewed-on: https://pdfium-review.googlesource.com/26090
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Shirleen Lou <xlou@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
- Fix typos.
- Do not pass by value.
- Return early if the page range string is empty after removing spaces.
- Simplify and rearrange bits of the implementation.
Change-Id: Ia4c4f43c2ca18383ad1edc8233969a7013e34722
Reviewed-on: https://pdfium-review.googlesource.com/24290
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Shirleen Lou <xlou@chromium.org>
|
|
Change-Id: I8c6d813e488b2612a85fb1973382f979728df563
Reviewed-on: https://pdfium-review.googlesource.com/25571
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Make pdfium_embeddertests explicity depend on fxjs, which exposes
v8 via public_deps, and hopefully stops the compiler from instantiating
v8 code in our module.
TBR=rharrison@chromium.org
Change-Id: If6f2750a7a3b7a508275dedacfe07235ca8727f6
Reviewed-on: https://pdfium-review.googlesource.com/26250
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: Idcba60bb36c0d47c0d2acb21ddfa3b3b46cdfe49
Reviewed-on: https://pdfium-review.googlesource.com/26170
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Place the template map definitions entirely in .cpp file.
Change-Id: I2643f1b99f5582b69aa985857c4aa6f9b5ab57c8
Reviewed-on: https://pdfium-review.googlesource.com/26150
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Test the lowest layer without firing up the whole library. Requires
firing up v8 in the unit test main, though.
Move array buffer allocator to cfx_v8 to allow building isolates.
Change-Id: I9a56d503a48e0e555d3310f2997fa12137695860
Reviewed-on: https://pdfium-review.googlesource.com/26130
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Retain CPDF_PageOrganizer as a base class. Add CPDF_PageExporter and
CPDF_NPageToOneExporter sub-classes. The sub-classes only do one type of
exporting. Therefore it is much easier to understand what part of the
original combined CPDF_PageOrganizer is used where.
Change-Id: I424ef9c32b101d23e8397fc9a656d9b0b5da6a27
Reviewed-on: https://pdfium-review.googlesource.com/26011
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Shirleen Lou <xlou@chromium.org>
|
|
This is to prepare for splitting CPDF_PageOrganizer into multiple
classes.
Change-Id: Ibf54342096aeb66465fd24dc1ba40c73112fb4c9
Reviewed-on: https://pdfium-review.googlesource.com/26010
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Shirleen Lou <xlou@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I9286b24957f9d96da10869098eb0e04991bd6571
Reviewed-on: https://pdfium-review.googlesource.com/25570
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
The layering should be CJS => CFXJS => CFX_V8 with the CJS name
being higher up.
Change-Id: Ic130f248906e9c4df641dd508389b0555786b999
Reviewed-on: https://pdfium-review.googlesource.com/26051
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
These belong more properly in CFXJS_Engine, and a small amount of
casting is required to get to the sub-class.
Change-Id: Id954d182b7a7d51fe0a522c04a50a1b362746c72
Reviewed-on: https://pdfium-review.googlesource.com/26050
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
This reverts commit f0e386de64e030f6d692acfa27e2bc0a50018710.
Reason for revert: After chatting with tsepez@, we've got a better direction to take these changes.
Original change's description:
> Convert CXFA_Node to store a vector of children
>
> This CL changes CXFA_Node to use a vector of nodes as children instead
> of a singly linked list of siblings and child pointers.
>
> Change-Id: Ica8219f63d783a07d90b9541ae62a35c49166e44
> Reviewed-on: https://pdfium-review.googlesource.com/26030
> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
> Commit-Queue: dsinclair <dsinclair@chromium.org>
TBR=dsinclair@chromium.org,hnakashima@chromium.org,rharrison@chromium.org
Change-Id: I115779a292d39694ad5faf0b748a617c491b40f0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://pdfium-review.googlesource.com/26070
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Avoids call to CFXJS_Engine::EngineFromIsolateCurrentContext() during
the Dispose() path, which feels scary because there aren't guarantees
about it having an engine at isolate "dispose" time. Fortunately, |this|
is not used, so make that fact clear.
Replace some c-style callbacks with std::function while we're at it.
Change-Id: Ia1a1a1fcc085d8657939e6f8c8d34fc511afddfe
Reviewed-on: https://pdfium-review.googlesource.com/25970
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This CL changes CXFA_Node to use a vector of nodes as children instead
of a singly linked list of siblings and child pointers.
Change-Id: Ica8219f63d783a07d90b9541ae62a35c49166e44
Reviewed-on: https://pdfium-review.googlesource.com/26030
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
- Keep track of pages in a single map when calling LoadPage(). It is
simpler and performance is not crucial as the number of loaded pages
is usually very small.
- Verify UnloadPage() is only called for loaded pages.
- Verify there are no loaded pages in TearDown().
- Verify RenderLoadedPage methods are only rendering loaded pages.
- Fix pages that are using FPDF_LoadPage() and FPDF_ClosePage() when
they should be using LoadPage() and UnloadPage().
- Disallow calling LoadPage() for the same page number repeatedly. No
caller does this and it makes verification in UnloadPage() harder.
Change-Id: I58878ea8ade21dde28f1bbebd3a3304ce677561d
Reviewed-on: https://pdfium-review.googlesource.com/25550
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
We want to change the signature of {CreateDefaultPlatform} in the V8
API to return a unique_ptr instead of a raw pointer to indicate that the
caller owns the platform. With this change we prepare pdfium for this
change.
In this second attempt, keep the old InitializeV8ForPDFium() method
around to complete the Chromium DEPS roll. Once that lands safely,
remove it from PDFium.
This relands commit 608e8dd6 and commit 3355f459, which commit b3a3eaab
reverts.
Change-Id: Icc60b17ca202637d34ae242c0785d939194d0fe6
Reviewed-on: https://pdfium-review.googlesource.com/25950
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Do some additional checks in test cases where pages were rendered but
the resulting bitmap was immediately destroyed.
Change-Id: I2f4678140cdc672ab4ced70f748135464447ff59
Reviewed-on: https://pdfium-review.googlesource.com/25510
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
One can be performed by the CJS_V8 layer, the other requires the
full FXJS mechanism. Avoids using -1 as a special case.
Change-Id: I4a14ccb6a7fea393f84b70a07ada03b1a83c7d36
Reviewed-on: https://pdfium-review.googlesource.com/25830
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
The existing code has a couple of issues that need to be
addressed. First it assumes that for a hash, there will be an entry in
the map and blindly calls the [] operator and takes the address of the
result. If there isn't an entry for the hash then this will cause a
crash. This has been converted to a call to find and returning
nullptr, which is the fail result, if it cannot find an entry for the
hash.
The other issue is that it assumed that the first entry in the vector
would be a valid pointer. When removing fonts from the vector,
RemoveFont, first nulls out entries. Once all of the entries have been
removed from a vector on subsequent calls to RemoveFont, then the
vector is removed from the map. Thus the first entry in the vector
might not be the correct value to return. This has been changed to a
linear scan of the vector for a valid pointer.
BUG=chromium:648177
Change-Id: Ife758636545f0d10fb726c243e3e0a5b7c1d1138
Reviewed-on: https://pdfium-review.googlesource.com/25930
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Add replacement methods that make themselves clear as to what they are
rendering, and return unique_ptrs to help prevent leakage. Mark existing
methods deprecated.
Change-Id: I9055407e614dfbe765428fb32a7da64df3418d1d
Reviewed-on: https://pdfium-review.googlesource.com/25470
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
CFWL_Edit::UpdateCursorRect now checks if the edit is empty before
getting the caret position.
Bug: chromium:592750
Change-Id: I792e90537741a78141fa084a646380bfe7ce4637
Reviewed-on: https://pdfium-review.googlesource.com/25910
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
When a very large, bogus value, was being passed in for the number of
bytes to read, this could cause an overflow in the check for if there
is data available.
BUG=chromium:809824
Change-Id: I54af6655b61d39275f3ae6fabb27be2bee3fef05
Reviewed-on: https://pdfium-review.googlesource.com/25871
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
Mechanically uniquify all the kFoo variables in xfa/fxfa/parser.
BUG=pdfium:964
Change-Id: Iffe15015282d572147f31f2101fa0127f2198620
Reviewed-on: https://pdfium-review.googlesource.com/25890
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
This CL removes the unused return values from InsertChild and
RemoveChild methods in CXFA_Node.
Bug: chromium:807863
Change-Id: Iac468afc5c48f51e7df3ea12d11b128a0ac124ea
Reviewed-on: https://pdfium-review.googlesource.com/25670
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
This reverts commit 608e8dd6b87b15772862dca9b7b2e6791a25dab6.
Reason for revert: Breaks the roll into Chromium
pdf/pdfium/fuzzers/pdfium_fuzzer_helper.cc:238:5: error: no matching function for call to 'InitializeV8ForPDFium'
InitializeV8ForPDFium(ProgramPath(), "", &natives_blob, &snapshot_blob,
^~~~~~~~~~~~~~~~~~~~~
../../third_party/pdfium/testing/test_support.h:94:31: note: candidate function not viable: requires 4 arguments, but 5 were provided
std::unique_ptr<v8::Platform> InitializeV8ForPDFium(
^
https://logs.chromium.org/v/?s=chromium%2Fbb%2Ftryserver.chromium.linux%2Flinux_chromium_compile_dbg_ng%2F461077%2F%2B%2Frecipes%2Fsteps%2Fcompile__with_patch_%2F0%2Fstdout
Original change's description:
> [v8-platform] Store the platform in a unique_ptr
>
> We want to change the signature of {CreateDefaultPlatform} in the V8
> API to return a unique_ptr instead of a raw pointer to indicate that the
> caller owns the platform. With this change we prepare pdfium for this
> change.
>
> R=thestig@chromium.org
>
> Change-Id: I4a0a466dfc37b28387a91543623a7a481ca8035a
> Reviewed-on: https://pdfium-review.googlesource.com/18191
> Commit-Queue: Lei Zhang <thestig@chromium.org>
> Reviewed-by: Lei Zhang <thestig@chromium.org>
TBR=thestig@chromium.org,ahaas@chromium.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: I418c97653e8aba93560537f0d41e1aaa238bf3b4
Reviewed-on: https://pdfium-review.googlesource.com/25850
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
- Pass by const ref.
- Simplify logic.
- Return page number vector directly.
Change-Id: If68c89437380b871ca6635f2355049dd19a9e512
Reviewed-on: https://pdfium-review.googlesource.com/24270
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Shirleen Lou <xlou@chromium.org>
|
|
The code changes include two parts:
1. Only updating resources' reference caused font not to clone properly.
Hence changing to update reference from the root of the source page
dictionary.
2. Since PDF objects are at document level, pObjNumberMap needs to be
defined before pages are created to avoid same object being copied more
than one times with different object numbers.
Change-Id: I6f90aff2e3901cee73ce09fe550ad79add6be7eb
Reviewed-on: https://pdfium-review.googlesource.com/25190
Commit-Queue: Shirleen Lou <xlou@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
In the existing code pCharPos is manipulated directly without being
reset. This means that for the second iteration it is at the end of
the range instead of the start. This CL introduces temporary iterators
that are intialized to the value of pCharPos and then manipulated to
avoid this issue and having to reset pCharPos.
BUG=chromium:648177
Change-Id: I5c9344c1b67a015b01470a0dc337361552ffd447
Reviewed-on: https://pdfium-review.googlesource.com/25750
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
This makes the caret appear (again?), blink, and fixes its positioning
to be a little spaced from the last character.
Known issue: when the edit is empty, the caret is not necessarily
aligned with where the text will be.
Bug: chromium:592750
Change-Id: I950b0ea236db8855c6ed50f48ec1935d97e6ccf8
Reviewed-on: https://pdfium-review.googlesource.com/25451
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
They have move semantics, so they can directly be members of the array.
Change-Id: Ia73cbc06fd22665693ae1a4efe6a6f64eca1b5fb
Reviewed-on: https://pdfium-review.googlesource.com/25490
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: Idb1f6879a78e4ada8129250eedd37142b6f26588
Reviewed-on: https://pdfium-review.googlesource.com/25530
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: I79c756153608a345f27c7ccac8009bf68512dba8
Reviewed-on: https://pdfium-review.googlesource.com/25790
Commit-Queue: Mike Reed <reed@google.com>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This CL converts the CXFA_Node parent pointer to be an Unowned pointer
instead of a raw pointer.
Bug: chromium:807863
Change-Id: I266c9216cfe8153e234bf66b88fbac6c8d96ebb4
Reviewed-on: https://pdfium-review.googlesource.com/25650
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
BUG=pdfium:1006
Change-Id: I84d2a13ac7b24e7f2f5cba8765d6433860241b58
Reviewed-on: https://pdfium-review.googlesource.com/25710
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
BUG=chromium:808336
Change-Id: I84443a00e2ebaf0a1e8590464486ec92bcb0e3b5
Reviewed-on: https://pdfium-review.googlesource.com/25690
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
BUG=chromium:808336
Change-Id: I3201805a374b5403149eca701714ef4369a2e337
Reviewed-on: https://pdfium-review.googlesource.com/25630
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
BMPDecompressor -> CFX_BmpDecompressor
CBmpContext -> CFX_BmpContext
BUG=chromium:808336
Change-Id: If8ef5294171e3619ae1d7c5175ddf23b7673ec78
Reviewed-on: https://pdfium-review.googlesource.com/25611
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
BUG=chromium:808336
Change-Id: Id721787dd77d1bcac6daf6e3c149f79e8d1d9fe4
Reviewed-on: https://pdfium-review.googlesource.com/25610
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
Currently there is no indication in the name of it being a member
variable and the capitalization is inconsistent. This CL brings them
all into line with Chromium style.
BUG=chromium:808336
Change-Id: Iaed0272b69350f316371a67eb513934a0169f451
Reviewed-on: https://pdfium-review.googlesource.com/25430
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
Mark pages as loaded before calling FORM_DoPageAAction().
BUG=chromium:808898
Change-Id: I82c481ba759842ea794b5578120101465b37f16a
Reviewed-on: https://pdfium-review.googlesource.com/25511
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
One test is added to render the output pdf of FPDF_ImportNPagesToOne,
and check the width, height and hash value of the rendered image.
Change-Id: Idd3f953d62ecd4e85ad52a9323eb13243dc49597
Reviewed-on: https://pdfium-review.googlesource.com/25330
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Bug: chromium:802094
Change-Id: I99d2d75cd431afe1cdb966e1431143ab43dd9a73
Reviewed-on: https://pdfium-review.googlesource.com/24730
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|