Age | Commit message (Collapse) | Author |
|
This CL renames CFX_RetainPtr to RetainPtr and places in the fxcrt
namespace.
Bug: pdfium:898
Change-Id: I8798a9f79cb0840d3f037e8d04937cedd742914e
Reviewed-on: https://pdfium-review.googlesource.com/14616
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Instead of only having CPDF_Dictionary* GetRoot() const, provide
const CPDF_Dictionary* GetRoot() const and CPDF_Dictionary* GetRoot().
Do the same for GetInfo().
Change-Id: I6eae1208d38327fcdc7d0cd75069a01c95f4a92a
Reviewed-on: https://pdfium-review.googlesource.com/11671
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This CL renames DLLEXPORT to FPDF_EXPORT and STDCALL to FPDF_CALLCONV to
be more PDFium specific.
This is split off of https://pdfium-review.googlesource.com/c/8970 by
Felix Kauselmann.
Bug: pdfium:825
Change-Id: I0aea9d43f1714b1e10e935c4a7eea685a5ad8998
Reviewed-on: https://pdfium-review.googlesource.com/10610
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
builds."
This reverts commit 00334675c18a0203f313cceb670c970a77280f49.
Reason for revert: Breaking the deps roller - https://chromium-review.googlesource.com/c/609307
Original change's description:
> Add a build target and a proper export header for shared library builds.
>
> This CL adds support for Chromium's component build feature to pdfium.
>
> The export header stub in fpdfview.h is expanded to match Chromium's
> export mechanisms and patterns (fixes pdfium:825).
>
> A component/shared library build can be triggered by adding
>
> is_component_build = true
>
> as a gn argument. Please note that setting this will also affect some
> of pdfiums dependencies like v8, which will be build as components
> too.
>
> Additionally, this CL provides a "pdf_source_set" template which
> dynamically enables the use of "source_set" when building a complete
> static library or a shared library to reduce build time.
>
> When testing this it is recommended to only build the pdfium target as
> most of pdfiums test rely on non-public functions which aren't exported
> by the shared library.
>
> Bug: pdfium:825,pdfium:826
> Change-Id: Icedc538ec535e11d1e53c4d5fabc8c064b275752
> Reviewed-on: https://pdfium-review.googlesource.com/8970
> Reviewed-by: dsinclair <dsinclair@chromium.org>
> Commit-Queue: dsinclair <dsinclair@chromium.org>
TBR=thestig@chromium.org,tsepez@chromium.org,brucedawson@chromium.org,dsinclair@google.com,dsinclair@chromium.org,licorn@gmail.com
Change-Id: Ib02af2298932481293f50d362ae87bfedf284821
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: pdfium:825, pdfium:826
Reviewed-on: https://pdfium-review.googlesource.com/10550
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
This CL adds support for Chromium's component build feature to pdfium.
The export header stub in fpdfview.h is expanded to match Chromium's
export mechanisms and patterns (fixes pdfium:825).
A component/shared library build can be triggered by adding
is_component_build = true
as a gn argument. Please note that setting this will also affect some
of pdfiums dependencies like v8, which will be build as components
too.
Additionally, this CL provides a "pdf_source_set" template which
dynamically enables the use of "source_set" when building a complete
static library or a shared library to reduce build time.
When testing this it is recommended to only build the pdfium target as
most of pdfiums test rely on non-public functions which aren't exported
by the shared library.
Bug: pdfium:825,pdfium:826
Change-Id: Icedc538ec535e11d1e53c4d5fabc8c064b275752
Reviewed-on: https://pdfium-review.googlesource.com/8970
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I60f556f107f740b854237bc89184b09e4f1d2585
Reviewed-on: https://pdfium-review.googlesource.com/6790
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This Cl moves the adapater out of the fpdfsave.cpp file into its own
h/cpp files. The adapter was renamed for clarity. The CPDF_Creator was
modified to take the adapter as a constructor param and the Create
methods consolidated.
Change-Id: Icb104f195ef532dda053c859aae356a8d4a7a54c
Reviewed-on: https://pdfium-review.googlesource.com/5151
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I4adbeafa7ecfd509abca08d97be132fd709e1261
Reviewed-on: https://pdfium-review.googlesource.com/4691
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
The CFX_MemoryStream is the only implementation of IFX_MemoryStream.
This CL removes the interfaces and uses CFX_MemoryStream directly.
Change-Id: I2f43fa39e82dafa7673517d214ae15fd2d0df331
Reviewed-on: https://pdfium-review.googlesource.com/4391
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL cleans up the fx_extension file. The stream code was moved to
fx_stream. IFX_FileAccess was removed and CFX_CRTFileAccess split to its
own file. Code shuffled from header to cpp file.
Change-Id: I700fdfcc9797cf4e8050cd9ba010ad8854feefbf
Reviewed-on: https://pdfium-review.googlesource.com/4371
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Pass stream argument to constructor; it feels like a
stream accessor should always be made from a stream rather
than passing one in after the fact.
Change-Id: Iaa46cb37677b81f0170f5d39bab76ad38ea4af44
Reviewed-on: https://pdfium-review.googlesource.com/3620
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
This CL replaces some new's with pdfium::MakeUnique.
Change-Id: I50faf3ed55e7730b094c14a7989a9dd51cf33cbb
Reviewed-on: https://pdfium-review.googlesource.com/3430
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This Cl moves more of the CFX classes defined in the xfa/ directory to
the core/fxcrt directory and conditionally builds them.
Change-Id: I811e6c6acd31dfbe75b49880be43661f78334013
Reviewed-on: https://pdfium-review.googlesource.com/3372
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL moves the .h files to have names corresponding to the contained
classes. The .cpp files are moved alongside the .h files. Any extra
classes in the .h files have been split into their own files.
Change-Id: I14b4efc02417f0df946500e87b6c502e77020db8
Reviewed-on: https://pdfium-review.googlesource.com/3160
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This Cl synchronizes the DocType's defined in XFA with the DOCTYPE
flag used in public/. The internal XFA version is converted to an
enum class.
Change-Id: I1f7be71a200c1ec0f09f9b08099791da1f4fa2e4
Reviewed-on: https://pdfium-review.googlesource.com/3152
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
We can remove a lot of "bOwnsStream" logic in the process.
Always pass these by const reference, in case the called method
wants to hang on to the stream (one exception is where we stick
a raw pointer into a void* slot in a context from another layer).
Review-Url: https://codereview.chromium.org/2451493002
|
|
Also remove a bool that is always false.
Review-Url: https://codereview.chromium.org/2539203002
|
|
Review-Url: https://codereview.chromium.org/2520493002
|
|
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>
|
|
BUG=
Review-Url: https://codereview.chromium.org/2498223005
|
|
Add convenience routines to create and add object in
one step.
Review-Url: https://codereview.chromium.org/2489283003
|
|
Review-Url: https://codereview.chromium.org/2453683011
|
|
The CPDFXFA_Document class isn't a document, it contains documents. Renamed
to make the purpose a bit clearer.
Review-Url: https://codereview.chromium.org/2469813004
|
|
This Cl moves the CPDFXFA_App code into CPDFXFA_Document.
Review-Url: https://codereview.chromium.org/2424993002
|
|
This reverts commit a282c7380f3964de41ea93c9980b12c4513d3473.
This CL changes CPDFXFA_App from a global object to a child of the
CPDFXFA_Document objects.
BUG=pdfium:623
Review-Url: https://codereview.chromium.org/2421603002
|
|
Review-Url: https://codereview.chromium.org/2450183003
|
|
It's been troubling for some time that an IFX_FileStream might
actually be an in-memory buffer with no backing file.
Review-Url: https://codereview.chromium.org/2443723002
|
|
This reverts commit 3ba098595ae56b64eacc0c25ab76b89a4d78d920.
TBR=thestig@chromium.org,weili@chromium.org
Review URL: https://codereview.chromium.org/2424533003 .
|
|
Doing so highlights a few places where ownership is dubious.
Add convenience functions to return an unowned reference to
a newly-created indirect object.
Review-Url: https://codereview.chromium.org/2419173002
|
|
https://codereview.chromium.org/2418653003/ )
Reason for revert:
https://build.chromium.org/p/client.pdfium/builders/linux_xfa_asan_lsan/builds/117/steps/corpus%20tests/logs/stdio
Original issue's description:
> Reland: Make the CPDFXFA_App non-global
>
> This reverts commit b685e6471075bebd26711bc183de3128f54932e3.
>
> This CL changes CPDFXFA_App from a global object to a child of the CPDFXFA_Document objects.
>
> BUG=pdfium:623
>
> Committed: https://pdfium.googlesource.com/pdfium/+/f3736bca5f874b0889c5906ffbd74a405089f671
TBR=tsepez@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=pdfium:623
Review-Url: https://codereview.chromium.org/2414883006
|
|
This reverts commit b685e6471075bebd26711bc183de3128f54932e3.
This CL changes CPDFXFA_App from a global object to a child of the CPDFXFA_Document objects.
BUG=pdfium:623
Review-Url: https://codereview.chromium.org/2418653003
|
|
https://codereview.chromium.org/2416753002/ )
Reason for revert:
https://build.chromium.org/p/client.pdfium/builders/linux_xfa_asan_lsan/builds/112/steps/embeddertests/logs/stdio
msan is sad.
Original issue's description:
> Make the CPDFXFA_App non-global
>
> This CL changes CPDFXFA_App from a global object to a child of the
> CPDFXFA_Document objects.
>
> BUG=pdfium:623
>
> Committed: https://pdfium.googlesource.com/pdfium/+/abefb79577b32d291d14d7e01a70f6f8cf213bd3
TBR=tsepez@chromium.org,thestig@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=pdfium:623
Review-Url: https://codereview.chromium.org/2412903004
|
|
This CL changes CPDFXFA_App from a global object to a child of the
CPDFXFA_Document objects.
BUG=pdfium:623
Review-Url: https://codereview.chromium.org/2416753002
|
|
Each of these files contains a single class, rename the file to match the
internal class name.
Review-Url: https://codereview.chromium.org/2385423004
|
|
BUG=pdfium:603
Review-Url: https://codereview.chromium.org/2392603004
|
|
BUG=pdfium:603
Review-Url: https://codereview.chromium.org/2386263003
|
|
BUG=pdfium:611
Review-Url: https://codereview.chromium.org/2383593002
|
|
BUG=pdfium:611
Review-Url: https://codereview.chromium.org/2384503003
|
|
BUG=pdfium:611
Review-Url: https://codereview.chromium.org/2381993002
|
|
BUG=pdfium:611
Review-Url: https://codereview.chromium.org/2382723003
|
|
BUG=pdfium:611
Review-Url: https://codereview.chromium.org/2383543002
|
|
BUG=pdfium:611
Review-Url: https://codereview.chromium.org/2381863003
|
|
BUG=pdfium:597
Review-Url: https://codereview.chromium.org/2345063002
|
|
Also, it's idempotent, so simplify some logic in callers to
not care if objnum is zero.
The alternate forms are rarely used, using the objnum form
makes it clear that SetReferenceFor() can't possibly register
the object as a side-effect.
Review-Url: https://codereview.chromium.org/2361713002
|
|
We remove the indirect object holder argument and check that
call sites pass ownable objects, adding a reference in one
place that always was passing an indirect object.
Also check that the invariant isn't violated, we need to fail
here in the wild and investigate -- these are existing UAFs.
Review-Url: https://codereview.chromium.org/2355083002
|
|
Replace the CPDF_Stream(nullptr, 0, nullptr) pattern with
a default ctor.
Remove unused parameters from CPDF_Stream::SetData(). Both
are always passed as FALSE.
CPDF_Stream declared its own m_GenNum, which shadowed the one
in CPDF_Object. It was used only to distinguish file/memory
streams, so add a bool explicitly for this purpose.
Remove the union, it would be sad if we confused user data
with a C++ object with virtual function calls.
Use unique_ptrs with appropriate deleters to manage memory.
Review-Url: https://codereview.chromium.org/2347993002
|
|
This Cl makes the Get and Set methods consistenly use {G|S}et<Type>For.
BUG=pdfium:596
Review-Url: https://codereview.chromium.org/2334323005
|
|
Remove methods that always just return without doing any work. Clean up the
IXFA_DocProvider interface calls for those methods and cleanup the callers
that were calling the methods.
Review-Url: https://codereview.chromium.org/2323523002
|
|
This change mainly contains files in fpdfsdk/ directory.
This is part of the efforts to make PDFium code compilable
by Clang chromium style plugins.
The changes are mainly the following:
-- move inline constructor/destructor of complex class/struct out-of-line;
-- add constructor/destructor of complex class/struct if not
explicitly defined;
-- add explicit out-of-line copy constructor when needed;
-- move inline virtual functions out-of-line;
-- Properly mark virtual functions with 'override';
-- some minor cleanups plus removing an unused file and splitting
cxfa_eventparam out from fxfa.h
BUG=pdfium:469
Review-Url: https://codereview.chromium.org/2062313002
|
|
Review-Url: https://codereview.chromium.org/2031653003
|