Age | Commit message (Collapse) | Author |
|
WideString::Compare() went bad but no embedder test failed. Improve
coverage by hand crafting a PDF similar to the sample PDF in the bug
report.
BUG=chromium:823369
Change-Id: I267f53ba3ef7612bf54771a85f8305b2cbc3cfcb
Reviewed-on: https://pdfium-review.googlesource.com/28910
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@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>
|
|
FPDFDest_GetDestPageIndex() has a well defined return value for
errors (-1). Keeping FPDFDest_GetPageIndex() to avoid changing
behavior of the old API for whoever relies on it.
Bug: pdfium:938
Change-Id: Iad528923cb156e957a419540c262a65f45cb777d
Reviewed-on: https://pdfium-review.googlesource.com/24811
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Fix a bunch of nits as well.
Change-Id: I874f9b1d4676823635aad8986fcf23a11ae6efd9
Reviewed-on: https://pdfium-review.googlesource.com/22473
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
FPDFDest_GetView returns the view fit type and the parameters of the
view for a given destination.
This is useful to have more precise internal links and bookmarks that
are able to manipulate the viewport position and zoom level to focus
on the part of the PDF that it links to.
Bug: 55776, 535978, 748852
Change-Id: Ibf7df40a852030d75ec78cec7662380319569850
Reviewed-on: https://pdfium-review.googlesource.com/21790
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
With a newly created document, there is no parser. CPDF_Document is
missing a nullptr check which can be triggered via FPDF_GetMetaText().
BUG=pdfium:915
Change-Id: If9a300a6dc2ca5914c3544eae5c27fe3139dd821
Reviewed-on: https://pdfium-review.googlesource.com/16490
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Update embedder tests to simulate unavailable data and download requests.
Change-Id: I634fa89d2a0c859243e849752936da87568909f4
Reviewed-on: https://pdfium-review.googlesource.com/11890
Commit-Queue: Art Snake <art-snake@yandex-team.ru>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Automated using git grep & sed.
Replace StringC classes with StringView classes.
Remove the CFX_ prefix and put string classes in fxcrt namespace.
Change AsStringC() to AsStringView().
Rename tests from TEST(fxcrt, *String*Foo) to TEST(*String*,
Foo).
Couple of tests needed to have their names regularlized.
BUG=pdfium:894
Change-Id: I7ca038685c8d803795f3ed02545124f7a224c83d
Reviewed-on: https://pdfium-review.googlesource.com/14151
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
Change-Id: I27d26691a3b7bd8593581483d4a21729040fbe95
Reviewed-on: https://pdfium-review.googlesource.com/13910
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
Change-Id: I8d2eaea9696b6ac4ea7ba5cb323bf74546c31d46
Reviewed-on: https://pdfium-review.googlesource.com/13890
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
This is unused except for being a pathway for indirect deps.
Change-Id: I717290235ccbc59429ad24231033382958e2a086
Reviewed-on: https://pdfium-review.googlesource.com/6910
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@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>
|
|
Moving to std::vector from the more forgiving CFX_ArrayTemplate
revealed the dubious page tree traversal, which depends on the
correctness of the /Count entries to properly summarize the total
descendants under a given node.
The only "correct" thing to do is to throw away these counts as parsed,
and re-compute them, perhaps in CountPages(). But I'm not willing to do
that since it may break unknown documents in the wild.
Pass out-params as pointers while we're at it.
BUG=680376
Review-Url: https://codereview.chromium.org/2636403003
|
|
The API was originally committed as FPDF_GetPagelLabel but should be
FPDF_GetPageLabel.
BUG=pdfium:479
Review-Url: https://codereview.chromium.org/2559513002
|
|
BUG=pdfium:479
Review-Url: https://codereview.chromium.org/2521843003
|
|
The -build/include setting was masking out build/include_what_you_use. This CL
restores them, fixes any build errors, and adds NOLINT as needed. As well,
the runtime/explicit and runtime/printf flags are aslo enabled and NOLINT'd.
lint cleanups
Change-Id: Ib013b3eb29c8d0e48cad74c5df9028684130719f
Reviewed-on: https://pdfium-review.googlesource.com/2030
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Add an API to get the value of the /XYZ destination parameter.
This CL was originally from https://codereview.chromium.org/1960193003/ by
halcanary@.
Review-Url: https://codereview.chromium.org/2481743004
|
|
BUG=pdfium:611
Review-Url: https://codereview.chromium.org/2382723003
|
|
Review-Url: https://codereview.chromium.org/2032613003
|
|
Currently when you call DelegePage on a CPDFXFA_Document the page will not be
correctly removed. The page is left in the underlying document and, if
GetPage was never called for that page index nothing will happen.
This CL updates the code to always remove the page_index from the underlying
CPDF_Document then, if needed, the original code runs to clear out the
XFA page list for that page.
BUG=chromium:596373
Review URL: https://codereview.chromium.org/1921033003
|
|
This makes pdfium code on Linux and Mac sign-compare warning free.
The warning flag will be re-enabled after checking on windows clang build.
BUG=pdfium:29
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1841643002 .
|
|
This CL moves the fxcrt code into the core/fxcrt directory. The only exception
was fx_bidi.h which was moved into core/fxcrt as it is not used outside of
core/.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1825953002 .
|
|
This CL moves the files in fpdfsdk/src/ up one level to fpdfsdk/ and fixes
up the include paths, include guards and build files.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1799773002 .
|