Age | Commit message (Collapse) | Author |
|
Otherwise code coverage flags the empty body as unreachable.
Change-Id: Iee1d9a876d68276529c70d9b8c7a28276f271767
Reviewed-on: https://pdfium-review.googlesource.com/c/43514
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
SmartPtr<T> const m_Ptr, instead of const SmartPtr<T> m_Ptr.
Change-Id: I8001b0334543f49d138a24438def62088a15c6e4
Reviewed-on: https://pdfium-review.googlesource.com/c/43512
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I10679c9d28eb495c6bc21fd1355cb3ef330a1209
Reviewed-on: https://pdfium-review.googlesource.com/c/43471
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Use it in a couple of places. Make the similar code in the two places
even more so.
Change-Id: I3fc6a567088217e24506cdf7ab927b94cb5a4d52
Reviewed-on: https://pdfium-review.googlesource.com/43330
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I996c9b32d767960a5388e44e13180e1f6577ce38
Reviewed-on: https://pdfium-review.googlesource.com/43190
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Because I nearly botched this trivial calculation in the previous CL.
Change-Id: I7438f9d3476d93b7899c2d7d761234769f53f9e3
Reviewed-on: https://pdfium-review.googlesource.com/43010
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Use std::vector<float> for dash array.
Use compiler-generated default operations.
Squeeze some enums.
Fix obvious logic botch in DashChanged().
Change-Id: If1d809cc46a3cf2db98a09a3f5a49d22138c0640
Reviewed-on: https://pdfium-review.googlesource.com/42613
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Also remove dead code found along the way, and fix lint errors.
BUG=pdfium:410
Change-Id: I4cd0ede516483209cf49a6686d909953ab196106
Reviewed-on: https://pdfium-review.googlesource.com/42771
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I00ce0109251d1231858e87ffc3889abe6937fa26
Reviewed-on: https://pdfium-review.googlesource.com/42811
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I7010cedee8d17d05b2c37a94d767e6f3a9c48f7d
Reviewed-on: https://pdfium-review.googlesource.com/42790
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Classes marked |final| should not have |protected| members. In turn,
"private field m_dwEncryptObjNum is not used" warning is produced.
Change-Id: I51a96aca5a5f499381a6764d892962f7f2dc0327
Reviewed-on: https://pdfium-review.googlesource.com/42611
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
FX_CreateFontEncodingEx() always passes FXFM_ENCODING_NONE. Just get rid
of it instead.
Change-Id: I417f84d8ae2f10ba874265a92576d3ef8481a9d6
Reviewed-on: https://pdfium-review.googlesource.com/42460
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I410909be359a5b5bb0c90d42064144771183525e
Reviewed-on: https://pdfium-review.googlesource.com/42461
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
BUG=chromium:835667
Change-Id: I3b9fd04d26f1baa30d48f938616b187410134b5f
Reviewed-on: https://pdfium-review.googlesource.com/42311
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
There is missing build coverage, apparently.
Change-Id: Ibaf3a8d3f478eca6ab683bdcf0d7a91eeddafde3
Reviewed-on: https://pdfium-review.googlesource.com/42290
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Change-Id: Iff900bc3e1cd9c9dd6b023230c1feba78759581c
Reviewed-on: https://pdfium-review.googlesource.com/41710
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I3f811b20399efac1b511e75d950699eee7192c65
Reviewed-on: https://pdfium-review.googlesource.com/41650
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Move some platform-specific ifdefs so the come last in each
section as it is easier to read, perhaps.
Change-Id: Ic1c2652c46ecebc63b66213735ed6d94737a7f32
Reviewed-on: https://pdfium-review.googlesource.com/41630
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>
|
|
It is not a source from which you can get CFX_DIBs, but rather a
base class from which all DIBs inherit.
Do the same thing for the CPDF_DIBSource wrapper class.
Mechanical change apart from adding a one-line comment in cfx_dibbase.h
Change-Id: Id2bde87813ca301d9fafc55ce08d703dfc6a7184
Reviewed-on: https://pdfium-review.googlesource.com/41352
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
This CL fixes instances of variable shadowing that are
discovered by turning on -Wshadow.
BUG=pdfium:1137
Change-Id: I418d50de89ecbeb12e85b23a358bc61e8f16e888
Reviewed-on: https://pdfium-review.googlesource.com/41150
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
The refcounting is useless, since CFPF_SkiaFontMgr always has a
reference to the fonts anyway. Just make CFPF_SkiaFontMgr own the fonts,
like on other platforms.
Change-Id: Ifadb5c4e09f151ada4a0a68e0588166c2f2974d4
Reviewed-on: https://pdfium-review.googlesource.com/40610
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: Ia3f98fb166743c2a38954b279e3bbf96e5e09073
Reviewed-on: https://pdfium-review.googlesource.com/40591
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Initialize via the ctor instead. Also fix refcounting for the class, so
the refcount does not go negative for invalid fonts.
Change-Id: I5cf51ae9051f5fc5e0204193d18f8eb37b34c244
Reviewed-on: https://pdfium-review.googlesource.com/40590
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Use ByteString instead of char* for string data.
Change-Id: I28dee8f3544b8b85ea46f2e8bc84249f32e368a0
Reviewed-on: https://pdfium-review.googlesource.com/40570
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Instead of raw pointers.
Change-Id: Ie46af37bbe3fe287bdff25249afaeb90589c85b3
Reviewed-on: https://pdfium-review.googlesource.com/40552
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
CFPF_SkiaFontDescriptor only has a single subclass. Merge it with the
subclass.
Change-Id: I26d19ee527c010d2d69acd820d8acc9634b12239
Reviewed-on: https://pdfium-review.googlesource.com/40551
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
The classes are never instantiated.
Change-Id: I108d3c397464e50b337bc46702d4adbc263e8814
Reviewed-on: https://pdfium-review.googlesource.com/40550
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Fix some nits as well.
Change-Id: Idfe3e737bc737fe4ad42581aa735398fdc0ebab5
Reviewed-on: https://pdfium-review.googlesource.com/40510
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I6a2bd03e00ad4e3d57f6931c0c6cf4ae0c760afb
Reviewed-on: https://pdfium-review.googlesource.com/40290
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Bring in line with standards.
Remove argument entirely for mac code that is always nullptr.
Change-Id: I0710bdbd51fc0bc2e1d428ef44976be39a631147
Reviewed-on: https://pdfium-review.googlesource.com/40091
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Introduce const/non-const versions of method where required.
Part of the war on const_cast<>. Tidy one expression to use []
instead of .data().
Change-Id: I41e45669c79eee242ff2244c7dc3afcf6386a433
Reviewed-on: https://pdfium-review.googlesource.com/39852
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Because I saw one in some other code and decided to hunt them all.
These are all defined in C++ context, so no chance of C compatiblity.
Note that such a declaration without a struct tag will bypass the
[chromium-style] out-of-line constructor/destructor warnings, so
add constructors/destructors where required.
Change-Id: Ib821d8bc2f68ccf7028b0f73432e8e7c93a953ba
Reviewed-on: https://pdfium-review.googlesource.com/39851
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
There's a missing const in a qualifier in the third party FT library
header, so rather than casting on every invocation, consolidate these
into our wrapper macro. This may be easier to remove should the API
ever get corrected.
Part of the war on const_cast<>.
Change-Id: I80cdb220730f40297e54aee10acc8bbd2c983b6d
Reviewed-on: https://pdfium-review.googlesource.com/39850
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: I1d5e3e73804efb0a8ed467d29777d017935a8824
Reviewed-on: https://pdfium-review.googlesource.com/39833
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Remove a bunch of const_cast<uint8_t*> or equivalent. This will also
help when we convert to span<>, since casting spans is a nuisance.
Change-Id: I330e5041cbaf33a84425fc4242a3dfacf5ca8011
Reviewed-on: https://pdfium-review.googlesource.com/39831
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Turns out that "FromUnicode" is misleading in that, on linux, it simply
removes any characters beyond 0xFF and passes the rest unchanged, so
no unicode decoding actually takes place. On Windows, it passes it into
the system function specifying FX_CODEPAGE_DefANSI, converting it into
the so-called "default ANSI code plane", passing some characters,
converting others to '?' and still others to 'A'. Either way, nothing
resembling UTF8 comes out of this, so pick a better name.
These now immediately look suspicious, so a follow-up CL will see
which ones should really be WideString::UTF8Encode() instead.
Making this a normal method on a widestring rather than a static
method on a bytestring feels more natural; this is parallel to
the UTF8Encode and UTF16LE_Encode functions.
Add a test that shows these conversions.
Change-Id: Ia7551b47199eba61b5c328a97bfe9176ac8e583c
Reviewed-on: https://pdfium-review.googlesource.com/39690
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: Id52bb57efea2a6a46bea645e4f3e54957982a40b
Reviewed-on: https://pdfium-review.googlesource.com/39154
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
BUG=chromium:751423
Change-Id: I2fcc46b80e89cb651e255bd1fd2d6883a05cf9c7
Reviewed-on: https://pdfium-review.googlesource.com/39153
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
The SkColorSetARGBInline alias was removed, use simply SkColorSetARGB
instead.
Bug: pdfium:11
Change-Id: I8636e305cf938df9427d01a6ca63b3d492a087f3
Reviewed-on: https://pdfium-review.googlesource.com/38252
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
Change-Id: I6fa3fd93638bc3aeaaef854676fe31476888433b
Reviewed-on: https://pdfium-review.googlesource.com/37671
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Fix some {} along the way.
Change-Id: I5277c03328b63e0cead058fc07dc65311d7b97b0
Reviewed-on: https://pdfium-review.googlesource.com/36791
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
These appear in compile-time const data. Adding the comment makes
it easier to see what work remains when using grep.
Change-Id: Ibb5fe920dc9fc99dd4c866f9ddf800a58f6a67a8
Reviewed-on: https://pdfium-review.googlesource.com/36690
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Bug: chromium:853430
Change-Id: I1c42de1e3db10dfb6399cd8abdd13c56addc8827
Reviewed-on: https://pdfium-review.googlesource.com/35850
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
Skia is moving to normalize on std::swap instead of its own SkTSwap.
This removes the use of SkTSwap from PDFium so that Skia can remove it.
Change-Id: If77708c1f363f4fd82a4c7905c7fbb2060900532
Reviewed-on: https://pdfium-review.googlesource.com/35470
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Bug: pdfium:177
Change-Id: I63f2e7579de37f52fd67f02988d72de7e1b3c7ba
Reviewed-on: https://pdfium-review.googlesource.com/35111
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
The callers are all in blocks controlled by the same ifdef.
Change-Id: I2bf1dfd8725eefcfab5b05460fc31b0e7e08c75e
Reviewed-on: https://pdfium-review.googlesource.com/35090
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
This landed earlier as part of a larger change that got reverted for
unrelated reasons. Now re-land it by itself. See
https://pdfium-review.googlesource.com/c/pdfium/+/33370
The current code could cause FT to try to free memory allocated by the
caller, with potentially a different allocator. It appears that this may
have been added ages ago as a way to kludge around a leak. If we're
leaking, msan will find it, and we can deal with it properly rather
than trying to force FT to tidy after us.
Change-Id: I20abf4cd35d465de1f435ebe6d94b10c3ff74002
Reviewed-on: https://pdfium-review.googlesource.com/34930
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This reverts commit 38cb7263a0923dd5613da24b18d3d7ef052ff5e3.
Reason for revert: Blocking prior revert.
Original change's description:
> Remove more ifndef XFA cases
>
> Remove FXFT_Clear_Face_External_Stream() calls, period. This would cause
> FT to try to free memory allocated by the caller, with potentially a
> different allocator. If we're leaking, msan will find it, and we can
> deal with it properly rather than trying to force FT to tidy after us.
>
> Always call SetView(), if we have a PDF page. At worst, the link won't
> be used in the XFA case.
>
> Always return 0 for the null document permissions. If we don't have a
> document, then we can't dynamically tell if its an XFA doc, so there's
> no reason to believe it should have all permissions. If there is an
> XFA doc under the covers, then the extension will give us the value.
>
>
> Change-Id: I6e3fb589eda722786567d96288cb35f43643437b
> Reviewed-on: https://pdfium-review.googlesource.com/33370
> Commit-Queue: Tom Sepez <tsepez@chromium.org>
> Reviewed-by: Lei Zhang <thestig@chromium.org>
TBR=thestig@chromium.org,tsepez@chromium.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: I68b6a50ef28fb3d6ab9d8494c4486ca9fb66589e
Reviewed-on: https://pdfium-review.googlesource.com/33734
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Remove FXFT_Clear_Face_External_Stream() calls, period. This would cause
FT to try to free memory allocated by the caller, with potentially a
different allocator. If we're leaking, msan will find it, and we can
deal with it properly rather than trying to force FT to tidy after us.
Always call SetView(), if we have a PDF page. At worst, the link won't
be used in the XFA case.
Always return 0 for the null document permissions. If we don't have a
document, then we can't dynamically tell if its an XFA doc, so there's
no reason to believe it should have all permissions. If there is an
XFA doc under the covers, then the extension will give us the value.
Change-Id: I6e3fb589eda722786567d96288cb35f43643437b
Reviewed-on: https://pdfium-review.googlesource.com/33370
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|