Age | Commit message (Collapse) | Author |
|
Also change it from a macro to a constexpr function.
Change-Id: I8b2bb42c45a23da6db136abdaee24132db4471c6
Reviewed-on: https://pdfium-review.googlesource.com/28579
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Also change them from macros to constexpr functions.
Change-Id: I5ebec07487b7b7f59cc769debc95c730776d4613
Reviewed-on: https://pdfium-review.googlesource.com/28578
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Mark the other ArgbEncode() variant as constexpr.
Change-Id: I84207d805766e5efc669638bd8a15cfead356a41
Reviewed-on: https://pdfium-review.googlesource.com/28577
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I196e3148d680c9efeaf9609dd3ddbfe3f6635fa6
Reviewed-on: https://pdfium-review.googlesource.com/28576
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
- Augment/reuse existing NormalizeThreshold() function.
- Use std::min() / std::max().
Change-Id: I709e246c58bf8a69638e1d77dcc2a79ae8a27e77
Reviewed-on: https://pdfium-review.googlesource.com/28736
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
Since that is what it really returns. Add a replacement ArgbToColorRef()
that only returns a FX_COLORREF, and remove a duplicate implementation.
Then update callers and only use ArgbToAlphaAndColorRef() where
appropriate.
Also update comments to explain what FX_COLORREF is.
Change-Id: I5ed3d71683898dc2b3a66395dea0ec2562c14a68
Reviewed-on: https://pdfium-review.googlesource.com/28575
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Currently, when constructing AP for multi-line markup annotations, we
only take into account the first set of quadpoints, resulting in only
the first line of the annotation being displayed if the annotation spans
multiple lines.
This CL, initially written by Jane Liu <janeliulwq@google.com>
(https://pdfium-review.googlesource.com/12010) takes into account all
the quadpoints, so multi-line annotations can be displayed correctly.
BUG=pdfium:876
Change-Id: I8be10ee38e01eb6525ddef556df1b727189455c7
Reviewed-on: https://pdfium-review.googlesource.com/28590
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: Ia6cb19269ef93440669b68d76c3c378a5d4da7a5
Reviewed-on: https://pdfium-review.googlesource.com/28735
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
CountRects() calls GetRectArray(), which performs the same calculation.
Change-Id: I79dcd8e82f6d0fe7ed992da06237f31d0761a902
Reviewed-on: https://pdfium-review.googlesource.com/28734
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
BUG=chromium:821305
Change-Id: I371572f60ea3984ce044e25125d882b3c2d03115
Reviewed-on: https://pdfium-review.googlesource.com/28733
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
Treat values less than -1 as -1.
BUG=chromium:821305
Change-Id: Ieaced045473fa51097400e5af1286f0d3f4d0143
Reviewed-on: https://pdfium-review.googlesource.com/28732
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Found by ClangTidy.
BUG=pdfium:1039
Change-Id: I2bb9256a63d5459e959c1a3228418073245d7a86
Reviewed-on: https://pdfium-review.googlesource.com/28731
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Found by ClangTidy.
BUG=pdfium:1040
Change-Id: I6d7cb26ae2d12f5650f73596d0b991234b076f57
Reviewed-on: https://pdfium-review.googlesource.com/28712
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
One that takes a CFX_FloatRect instead of LBRT floats. Use it where
appropriate.
Change-Id: I8ba19e86c61c91d8b4ef685b5cb65c8fb717f013
Reviewed-on: https://pdfium-review.googlesource.com/28581
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
This call removes a page object from a page. We currently offer an
API to insert these objects, but not to remove.
Bug: pdfium:1037
Change-Id: I35ff596f9e7c87a39051f0cb1de40a5bec40fee5
Reviewed-on: https://pdfium-review.googlesource.com/28492
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
Per tspepez's drive by:
str, in theory, might not be terminated, and might have been allocated
right up to a guard page at the end of the heap, say, so that str[len]
could segv.
Change-Id: I6cba7b6d12b23f69e6f150c1b5296df65c2e0086
Reviewed-on: https://pdfium-review.googlesource.com/28610
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
FX_COLORREF should work like win32 COLORREF, which is BGR.
Change-Id: I9f8bb3e2d30a64dc822ac6b8c46130358a03678a
Reviewed-on: https://pdfium-review.googlesource.com/28574
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@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>
|
|
Use BGR instead of RGB in CGdiDeviceDriver::GDI_StretchBitMask(). Many
win32 GDI APIs take COLORREF as input, and COLORREF is BGR. In this
case, a win32 API was being called with RGB data.
BUG=chromium:821672
Change-Id: Ia530c7ef5582eed13ac7119935851cfe0ad57323
Reviewed-on: https://pdfium-review.googlesource.com/28573
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
- Make members const.
- Change some ints to enum classes.
- Add helper function to calculate pitch.
Change-Id: I32f94e1189d54a2c365530166fb5c9c0857b7c97
Reviewed-on: https://pdfium-review.googlesource.com/28571
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
When comparing L"a" vs L"ab", the return value should be -1 or 1, not 0
or 1. Add a regression test for this case.
BUG=chromium:821454
Change-Id: I38e2d7ca62319b7a62f8d8afeb231b8ed3bd9e86
Reviewed-on: https://pdfium-review.googlesource.com/28570
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
When adding an annotation, an appearance stream (AP) is generated.
According to the PDF spec, the Subtype, Type and BM entries it contains
should be names rather than strings. Type should be set to XObject.
BUG=pdfium:1038
Change-Id: I0131eec33c257ab3a3a48c7e0dfeac5ca8dfbe2b
Reviewed-on: https://pdfium-review.googlesource.com/28550
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
This replaces them with equivalent FXSYS_*wlower/upper methods, which
uses ICU to perform the correct Unicode operations.
BUG=pdfium:1035
Change-Id: I432db5bef9eda71762016b619d93155949d054db
Reviewed-on: https://pdfium-review.googlesource.com/28530
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
This replaces it with FXSYS_iswspace, which uses ICU to perform
correct Unicode space checking.
BUG=pdfium:1035
Change-Id: I7a4ed01a6b50f56a6f9d1434a7f0b01596fe42db
Reviewed-on: https://pdfium-review.googlesource.com/28510
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
Bug: chromium:820885
Change-Id: I3886c636b91a8499924d95ad47f4c832db9f9754
Reviewed-on: https://pdfium-review.googlesource.com/28491
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
Instances are either replaced with FXSYS_iswalpha, which calls out to
the ICU library to do the proper Unicode operations, or have been
converted to a isascii && isalpha pair, if ASCII alpha is actually
what was wanted.
BUG=pdfium:1035
Change-Id: I971ff639ee1ff818ad08793a1900a8bcbb0a3e04
Reviewed-on: https://pdfium-review.googlesource.com/28450
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
Instances are either replaced with FXSYS_iswalnum, which calls out to
the ICU library to do the proper Unicode operations, or have been
converted to a isascii && isalnum pair, if ASCII alnum is actually
what was wanted.
BUG=pdfium:1035
Change-Id: I959ec8739a4d020e61562180393ab8113a81577c
Reviewed-on: https://pdfium-review.googlesource.com/28430
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
Minor cleanups and refactoring of the CPDF_DefaultAppearance class.
Change-Id: I7b3de021e8a6a1e9ca1d70ae413f3c433627f3fd
Reviewed-on: https://pdfium-review.googlesource.com/28390
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
This CL removes default params from CPDF_DefaultAppearance methods.
Change-Id: Iaeebc7b35ebb6140850f3f0e0828c3ae9e3c5548
Reviewed-on: https://pdfium-review.googlesource.com/28350
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
A number of our character helper methods take in wide character types,
but only do tests/operations on the ASCII range of characters. As a
very quick first pass I am renaming all of the foot-gun methods to
explictly call out this behaviour, while I do a bigger
cleanup/refactor.
BUG=pdfium:1035
Change-Id: Ia035dfa1cb6812fa6d45155c4565475032c4c165
Reviewed-on: https://pdfium-review.googlesource.com/28330
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Methods unused. Removed.
Change-Id: I059b1e321b7d57f631368b77ace1d62cb75596c8
Reviewed-on: https://pdfium-review.googlesource.com/28310
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Unused. Removed.
Change-Id: I493a98b22c343d44834d3648e4ef2fe9978f88b1
Reviewed-on: https://pdfium-review.googlesource.com/28250
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Minor code cleanup.
Change-Id: Ibc3ea17d270de517058c41e9b466bc8fb042ecd7
Reviewed-on: https://pdfium-review.googlesource.com/28230
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
This method always returns true, so remove the return value.
Change-Id: I3da93fc5face39a53b589787873839c06c9fcfab
Reviewed-on: https://pdfium-review.googlesource.com/28210
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Both of these IPDF_FormNotify methods return {-1, 0, 1} but all
callsites only care about < 0 and >= 0. Convert to return a bool that
treats the 0 and 1 case as the same.
This also makse sense in terms of the API because false means validation
failure. The case where 0 was used was a place holder for we didn't try
for this field type, which also implicitly means validation passed.
Change-Id: I0950c678191b83caffd755d4a87b2f0efee71c89
Reviewed-on: https://pdfium-review.googlesource.com/28192
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Both of these IPDF_FormNotify callbacks have empty implementations which
just return 0. Removed.
Change-Id: I3324113222f19d2f7a2323ab5086e446d2064451
Reviewed-on: https://pdfium-review.googlesource.com/28191
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
The IPDF_FormNotify::AfterFormImportData method is never called.
Removed.
Change-Id: I0c436193a0af7bc94077bb719e48682bbf7a9b2b
Reviewed-on: https://pdfium-review.googlesource.com/28190
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
This CL renames IFX classes in core/fxge to Iface.
Change-Id: I137167ddd4ff1563d8002d9501222c27183408cc
Reviewed-on: https://pdfium-review.googlesource.com/27990
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL renames the 3 IFX files in core/fxcrt to Iface instead.
Change-Id: I7cee6836650b71bc5c5729a8147fda62f0910fe3
Reviewed-on: https://pdfium-review.googlesource.com/27970
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
- Deduplicate code.
- Rearrange some functions for early returns.
Change-Id: I901d9041a42ff66002b1454193e5e122e5a379cd
Reviewed-on: https://pdfium-review.googlesource.com/27810
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
BUG=pdfium:945
Change-Id: I2a880e747b6f5a2fabed4d34ce47b69ff589ce3f
Reviewed-on: https://pdfium-review.googlesource.com/27814
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: Iaf124c1b1ceca86d220ae654d9d18af7475209b6
Reviewed-on: https://pdfium-review.googlesource.com/27870
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: If819bee4809142e2f9c9b0830f00264b0fbaf862
Reviewed-on: https://pdfium-review.googlesource.com/27852
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Either return a bool or a CPDF_DIBSource::LoadState. Explain what the
bool return value means.
Change-Id: I6346d0cd61d5faee5290df181cfff3b9e4d5d84e
Reviewed-on: https://pdfium-review.googlesource.com/27851
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I97819912e564e4b52fcdae4ce7f865188fb1a520
Reviewed-on: https://pdfium-review.googlesource.com/27850
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: If93b4782016c7f27c1533417d019f3271c807941
Reviewed-on: https://pdfium-review.googlesource.com/27813
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I25c16b7159d168bd6deb4fd9936bb242d7e8c590
Reviewed-on: https://pdfium-review.googlesource.com/27812
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: Ic1260417e7d1475dd518655b2ab08f0184955d88
Reviewed-on: https://pdfium-review.googlesource.com/27170
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
These are generally cheap enough to compute as needed, rather than
keeping around in memory all the time (plus the memory for the static
flag the compiler generates to check if initialized).
Change-Id: If3a5365521f6a7781e66fb11f04883a5c673ee11
Reviewed-on: https://pdfium-review.googlesource.com/27150
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Get things out of the .data section.
Change-Id: I375cf00186a3d5d8d10f5d147bd4b692f5db3683
Reviewed-on: https://pdfium-review.googlesource.com/27130
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|