Age | Commit message (Collapse) | Author |
|
This Cl fixes the naming of the size types to match their purpose. This makes
the code clearer.
Change-Id: I37a41ab0fe01782f4749054f1f8ab29ddf8d2790
Reviewed-on: https://pdfium-review.googlesource.com/2551
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This Cl updates the code to use the constructors instead of creating an
empty object and calling Set(). It also removes the various memsets of
the CFX_Rect{F} classes.
Change-Id: I6e20cec00866a38372858dcba5a30d31103172e4
Reviewed-on: https://pdfium-review.googlesource.com/2550
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This will allow the compiler to distinguish between rectangle
initialization from a point and a size vs. two points.
Add corresponding ctors, and fix style noise induced in XFA,
now that rects have become a complex type.
Change-Id: Iaa5887db63dafd41ac95f5c623989ca1d6443fd6
Reviewed-on: https://pdfium-review.googlesource.com/2533
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Not needed with modern compilers, removed.
Change-Id: Ia8977262b5791bd4445f02be8456641d1a7e18f3
Reviewed-on: https://pdfium-review.googlesource.com/2431
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: Id2ece818c80e8cce4748b9a237871131a7acd6d1
Reviewed-on: https://pdfium-review.googlesource.com/2354
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Review-Url: https://codereview.chromium.org/2650773003
|
|
Review-Url: https://codereview.chromium.org/2653743002
|
|
Fix callers conventions to avoid ambiguity.
Fix bad bounds check unmasked by change.
Directly include headers no longer pulled in by numerics itself.
Review-Url: https://codereview.chromium.org/2640143003
|
|
Also replace CFX_Int32Array typedef with CFX_ArrayTemplate<int32_t>.
Removing the typedefs makes subsequent conversion to std::vector<>
easier on a case-by-case basis.
Review-Url: https://codereview.chromium.org/2649563003
|
|
CFX_Points was unused.
Review-Url: https://codereview.chromium.org/2645523006
|
|
It's a ref-counted class, so if we're in the destructor, the ref
count has hit zero. We can't make a new ref pointer to itself here,
as it will re-invoke the destructor when it goes out of scope. This
should have been an obvious anti-pattern in hindsight.
The object in question can't be in the m_pFontManager, since the font
manager retains a reference, and we wouldn't get to this destructor
while that is present. So the cleanup isn't required.
Fixing this revealed a free-delete mismatch in cxfa_textlayout.cpp.
I also converted to use unique_ptrs in a few places near this issue.
Fixing this revealed a UAF in CFGAS_GEFont, memcpy'ing a RetainPtr
is not a good idea as it doesn't bump the ref count.
Also protect and friend the CFGAS_GEFont destructor, to make sure
random deletes don't happen.
Also kill off a const cast, and remove unnecessary conversion to
retain_ptr when we already have one.
TEST=look for absence of -11 in XFA corpus test logs, bots not
currently noticing the segv. Argh.
Review-Url: https://codereview.chromium.org/2631703003
|
|
Code is much clearer when we use the actual types
rather than this convention.
Review-Url: https://codereview.chromium.org/2618993002
|
|
Review-Url: https://codereview.chromium.org/2610813010
|
|
All usage is now replaced with stl equivalents.
Move one definition from fx_basic.h to where it's actually needed.
Review-Url: https://codereview.chromium.org/2612773007
|
|
Removes more array template usage fron non-XFA code.
Review-Url: https://codereview.chromium.org/2614013002
|
|
Use std::less<>() rather than a direct ptr1 < ptr2 comparison to
be strictly correct in face of unspecified behaviour when ptr1 and
ptr2 don't point within the same "object" (e.g. segment of memory
on a brain-dead segmented architecture).
This will allow their use as keys in maps.
Review-Url: https://codereview.chromium.org/2616683002
|
|
Required to pass pointers across C-APIs. Need this to clean
up CPDFXFA_Page and retain ptrs.
Review-Url: https://codereview.chromium.org/2583093003
|
|
I'd been waiting on this hoping the code would be refactored out
of existence, but it looks to be used.
Use tests against x.end() in place of a "null position".
This is greatly complicated by the use of "tail position", which
now calcluated by std::prev(x.end()) unless the list is empty.
Review-Url: https://codereview.chromium.org/2592163002
|
|
Fix some naming to make things clearer.
Review-Url: https://codereview.chromium.org/2587233002
|
|
In turn, make CPDF_Stream() take an unique_ptr.
Review-Url: https://codereview.chromium.org/2584683002
|
|
In turn, this makes CFX_BinaryBuf::AttachData() unused.
Review-Url: https://codereview.chromium.org/2578793002
|
|
Review-Url: https://codereview.chromium.org/2567503002
|
|
Review-Url: https://codereview.chromium.org/2562833002
|
|
Review-Url: https://codereview.chromium.org/2558373002
|
|
Minimalist changes with the tidying of the code to
use better loop iterators as a follow-up.
Review-Url: https://codereview.chromium.org/2556963004
|
|
Also convernt one nearby array to vector as well.
Review-Url: https://codereview.chromium.org/2559903002
|
|
Review-Url: https://codereview.chromium.org/2562563002
|
|
The previous CLs made the code clean, so now we can mark more things
private, and add friends as appropriate.
Review-Url: https://codereview.chromium.org/2560783003
|
|
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
|
|
Group related IFX_ classes.
Move #defines to .cpp file that uses them.
Replace loose function with static method.
Review-Url: https://codereview.chromium.org/2548583004
|
|
Fix naming to say "Stream"
Review-Url: https://codereview.chromium.org/2543043002
|
|
Review-Url: https://codereview.chromium.org/2545653003
|
|
Also remove a bool that is always false.
Review-Url: https://codereview.chromium.org/2539203002
|
|
Part of the work to get rid of |new|s. Stripped from a forthcoming CL.
Review-Url: https://codereview.chromium.org/2536973003
|
|
Fix missing second template parameter in cfx_maybe_owned.h
Review-Url: https://codereview.chromium.org/2522313002
|
|
This will allow us to get rid of more .release()s of unique_ptrs,
as shown by the changed cpdf_colorspace usage.
Review-Url: https://codereview.chromium.org/2526903002
|
|
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>
|
|
Make CDPF_Arrays intern the object they create.
Allow passing nullptr as a CFX_WeakPtr shortcut as well.
Review-Url: https://codereview.chromium.org/2509123002
|
|
BUG=chromium:663253
Review-Url: https://codereview.chromium.org/2482373002
|
|
FX_BOOL was a type just like a regular C++ bool, except that it
took 4x the space and frequently was used to hold values besides
true or false.
Review-Url: https://codereview.chromium.org/2471353002
|
|
Review-Url: https://codereview.chromium.org/2477443002
|
|
This reverts commit 747dcf7
Review-Url: https://codereview.chromium.org/2468723002
|
|
id:250001 of https://codereview.chromium.org/2453473003/ )
Reason for revert:
Potentially blocking the roll, speculative revert.
See: https://codereview.chromium.org/2464643002/
Original issue's description:
> Change FX_BOOL definition from int to bool.
>
> If this CL sticks, we can then remove it entirely.
>
> Committed: https://pdfium.googlesource.com/pdfium/+/dd65283408d9137e2f142e78dff2a1826baab5fd
TBR=thestig@chromium.org,tsepez@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review-Url: https://codereview.chromium.org/2461893002
|
|
If this CL sticks, we can then remove it entirely.
Review-Url: https://codereview.chromium.org/2453473003
|
|
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
|
|
Avoid confusing this class with other ref-counted objects.
Review-Url: https://codereview.chromium.org/2426673002
|
|
- Nit fixes.
- Remove unused methods.
- Replace FX_BOOL with bool.
Review-Url: https://codereview.chromium.org/2419433004
|
|
Review-Url: https://codereview.chromium.org/2386273004
|
|
|Clear| is too easily mistaken for "clear this pointer only."
Review-Url: https://codereview.chromium.org/2385303002
|