Age | Commit message (Collapse) | Author |
|
The previous reshuffling means we always have the create params
earlier, so pass them in at create time.
Clean up two forward declarations that were not needed as
noticed in the process.
Change-Id: I5d3861f3c1e3508e0d25950e919859244fac5f8b
Reviewed-on: https://pdfium-review.googlesource.com/c/44710
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Instead, make it an explicit method called on the parent outside
of create. Rename Create() to Realize() to be sure to catch all
usages, and add the new required call.
Attachment to the parent now takes place a little earlier on in
the life-cycle as a result but should be ok.
Precursor to converting to smart pointers.
Change-Id: I45c459fcd28b5d03c428ce5809d0432506cf4ec6
Reviewed-on: https://pdfium-review.googlesource.com/c/44690
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
This requires moving it out of CreateParams, since that must be
a copyable struct, and implies that currently there is some
questionable sharing going on. To resolve this, introduce a
Clone() method so that each window gets its own copy.
Make GetAttachedData() return a const pointer, so that callers
can't free it behind our back.
Tidy initializations along the way.
Change-Id: Iadc97688b4692bf4fafefe8cff88af88672f7110
Reviewed-on: https://pdfium-review.googlesource.com/c/44590
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Shorten some names to try to avoid
CPDF_InteractiveForm* pInteractiveForm = GetInteractiveForm();
Change-Id: I77fafd6c4cce20aa46908830afde12f87784680e
Reviewed-on: https://pdfium-review.googlesource.com/c/43815
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Just rename the files in this CL.
Change-Id: I39f7fefa885977fffab6c909762b05484a1c923d
Reviewed-on: https://pdfium-review.googlesource.com/c/43814
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Return Optional<WideString> instead. Change the call stack to accept
Optional<WideString>.
Change-Id: I020589fac8a1de4974070268a19b4acad64c4092
Reviewed-on: https://pdfium-review.googlesource.com/c/43601
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: Ib96a66eb47bea791f061e1d6da8aadad8037a99d
Reviewed-on: https://pdfium-review.googlesource.com/c/43609
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Remove the member and simplify logic in all the places this
is passed.
Change-Id: I39b979793fe84f0dc460261223655dd7f50555cc
Reviewed-on: https://pdfium-review.googlesource.com/c/43474
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Then revert the ones that break compilation.
Fix one IWYU noticed during presubmit.
Change-Id: I881a8a72818e55dbc4816247e35ff5e3015194e7
Reviewed-on: https://pdfium-review.googlesource.com/41470
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Conversion to span makes this more elegant in a number of places,
owing to std::vector directly converting to span, and the bytestring's
ToRawSpan().
Disambiguate single-argument forms to allow passing {} as
an argument.
Change-Id: Ibd5eaadca8d8cbbd589338f375c7ee8439fd3eb2
Reviewed-on: https://pdfium-review.googlesource.com/41272
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Re-arrange order of some variables so that the lifetime
constraints are not violated, even temporarilly.
Change-Id: I859f1217d5af0f4c703a3d8ed742c1f144cc1c61
Reviewed-on: https://pdfium-review.googlesource.com/40950
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Many of these are converting ByteString => c_str => ByteStringView, since
the ByteStringView ctor is implicit. This is unfortunate, since that
involves a strlen() which the ByteString already knows if we use
AsStringView() instead.
This changed one test result where we can now return the string
"\0" instead of "" -- since strlen no longer eats the NUL. This
seems consistent, say, with String.fromCharCode().
Change-Id: I17f68d1a1f4b352960208f9148e68ab4c4d78bd2
Reviewed-on: https://pdfium-review.googlesource.com/35590
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
So remove it and combine the XFA/non-XFA cases.
Change-Id: I13d718de13ec31bf4f5c045164ea5791bf22f92d
Reviewed-on: https://pdfium-review.googlesource.com/35050
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I153747ef587a184eaef58ff09dbf8f214c9ddfb3
Reviewed-on: https://pdfium-review.googlesource.com/17230
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Art Snake <art-snake@yandex-team.ru>
|
|
This CL converts CPDF_DefaultAppearance to return
Optional<CFX_Color:Type> items instead of having a HasColor. This saves
the double parse of the appearance stream.
Change-Id: Ib3c136da6e2adfb559e495de1d299cce0b4ad25f
Reviewed-on: https://pdfium-review.googlesource.com/29630
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL changes the CPDF_DefaultAppearance code to remove the HasFont
method and change GetFont to return an Optional. This forces all the
call sites to verify a font was returned correctly and removes the need
for the duplicate appearance stream parsing.
Bug: chromium:827430
Change-Id: If09e0a7d3f7dd63ad77b97a5a388127e4a02da61
Reviewed-on: https://pdfium-review.googlesource.com/29610
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
This CL converts the CPDF_DefaultAppearance::GetColor methods to return
instead of using reference parameters.
Change-Id: I9ba6bf060a536290a83d3c9ce6e115511f28664c
Reviewed-on: https://pdfium-review.googlesource.com/29410
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
Change-Id: I07f4363046be920816e8d0dae766c7af833284db
Reviewed-on: https://pdfium-review.googlesource.com/28582
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I6baab14c989e8ae692ed1c846b135af95c09ce37
Reviewed-on: https://pdfium-review.googlesource.com/20210
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
This CL converts the use of CPVT_Color to CFX_Color and removes the
CPVT_Color class.
Change-Id: I86a2d06524cd8f0fbce2335f0185426cc41dbe84
Reviewed-on: https://pdfium-review.googlesource.com/16030
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
SetVisible() may be called during Destroy() which may be called
during SetVisible().
This fixes the latest in a family of bugs that happen after an
instance is freed by code triggered by JS code while it's executing
a method.
The CL has a lot of protection for many of these points where JS
may be executed and potentially destroy objects. The return types
of many methods that may execute JS have been changed to bool,
indicating whether the instance is still alive after the call.
Bug: chromium:770148
Change-Id: If5a9db4d8d6aac10f4dd6b645922bb96c116684d
Reviewed-on: https://pdfium-review.googlesource.com/15190
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@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>
|
|
This nesting makes so much more sense when I read the code.
Fix member naming for this in CPWL_Wnd.
Pass in/out CreateParams arg as pointer.
Kill Reset() method, only called during destroy and nothing needs
explicit cleanup.
Change-Id: If50e403e11c131e7656da09c0cb36866223d64c6
Reviewed-on: https://pdfium-review.googlesource.com/14070
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: I94b2e8f6fd522b97c917037e32fb3bcbeea0cbeb
Reviewed-on: https://pdfium-review.googlesource.com/8911
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
This makes it clearer what the directory contains.
Change-Id: I34fc38dd30b8e0f6e057052ea33c8b5a10f1b9c3
Reviewed-on: https://pdfium-review.googlesource.com/8791
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|