Age | Commit message (Collapse) | Author |
|
CPWL_ComboBox's unowned pointers to other CPWL_Wnds need to be released
at the right time. Also release the unowned pointer for CPWL_Wnd's
vertical scroll bar at the right time.
BUG=729041
Change-Id: I06a1da35fcb18dae8faf9cd4fbc0b75d38f115b0
Reviewed-on: https://pdfium-review.googlesource.com/6418
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
FXFT_Get_First(Next)_Char can return large unsigned values. This CL avoids
integer overflow and adds some missing checks regarding the ranges of the
values returned by those methods.
Bug: chromium:727086
Change-Id: Ice7bbb3759e384b7174680a82a2a9380c3611382
Reviewed-on: https://pdfium-review.googlesource.com/6436
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
As per Lei's comments while looking back at annotation API CLs to
attempt to fix Bug 747.
Bug=pdfium:737
Change-Id: I96369bf8dcc7afdf49e9a137e7bcba4ff1aeef67
Reviewed-on: https://pdfium-review.googlesource.com/6431
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Instead of one general RemoveAt() method, split it into:
- RemoveAt(index)
- Truncate(nNewSize)
- Clear()
Update callers, which are now easier to understand.
Update existing unit tests and add new tests.
Change-Id: I38fe40146ce8f2479677b2caadd20a1756678768
Reviewed-on: https://pdfium-review.googlesource.com/6417
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
Bug=pdfium:747
Change-Id: I51656750e5e5e7f7cecefc5244a66333a0213f19
Reviewed-on: https://pdfium-review.googlesource.com/6433
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: Jane Liu <janeliulwq@google.com>
|
|
Came across this error in FPDFPage_TransformAnnots, where SetNewAt()
would fail on a bound assertion when a newly created array calls it.
This CL contains a fix in the function and adds an embedder test for
this.
Bug=pdfium:745
Change-Id: I569f225598d956d270ef8f11ee3225acf48aadc7
Reviewed-on: https://pdfium-review.googlesource.com/6353
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Jane Liu <janeliulwq@google.com>
|
|
1. Added API for adding annotations and modifying common annotation
properties
* Added three embedder tests covering all of the API functions.
Bug=pdfium:737
Change-Id: I369d9e17f589f896f9e8c672382f082e524ae534
Reviewed-on: https://pdfium-review.googlesource.com/6351
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
The Contents stream of a page is optional per PDF spec 1.7 Table 3.27.
This CL fixes the empty creation test to acknowledge that.
Change-Id: I1e59a1fedbf00eafabe87962830d62d8883a5e1f
Reviewed-on: https://pdfium-review.googlesource.com/6311
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
Change-Id: Idd04530986a78370459c4361197a5500ae5347f3
Reviewed-on: https://pdfium-review.googlesource.com/6210
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: Ib381423b81e718410cb1d199aadbf396ee08b29a
Reviewed-on: https://pdfium-review.googlesource.com/6251
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: I7ed0ba0acbbee291e285555974ebf50c0073668f
Reviewed-on: https://pdfium-review.googlesource.com/6250
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: Ic2e1639ab003f0a4981be0c61714ca9cd0b04c5f
Reviewed-on: https://pdfium-review.googlesource.com/6230
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Rename CPWL_TimerHandler and simplify CPWL_Wnd.
Change-Id: Ib3850570fc5afdc2fa30f47a5b8754fea3cbf3e6
Reviewed-on: https://pdfium-review.googlesource.com/6175
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: Ied77912f0f657ebc8e36469365de230e552e4956
Reviewed-on: https://pdfium-review.googlesource.com/6233
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
- Consolidate assertions for m_pFormFillEnv.
- Remove check for m_pFormFillEnv being NULL.
- Pass in a CPDFSDK_Widget* instead of an Annot* and then casting.
- Remove unused LoadPopupMenuString() method.
Change-Id: Ic22e75c9e41eb54002be812945a3ee80debeca8b
Reviewed-on: https://pdfium-review.googlesource.com/6232
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I27164e023c622d5c0d9490aa2b09ac4e66dda0fb
Reviewed-on: https://pdfium-review.googlesource.com/6231
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I96c3429dbe2c572ed409706adfe3707b8b9bf51b
Reviewed-on: https://pdfium-review.googlesource.com/6176
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
1. Added API for extracting annotation properties:
* Added testing flag "--annot" that outputs the annotation properties
into a .txt file.
* Added two embedder tests covering all the API functions.
Bug=pdfium:737
Change-Id: I95943a9b2b3d5d431bc8a74a31b27b4f4b521026
Reviewed-on: https://pdfium-review.googlesource.com/6092
Commit-Queue: Jane Liu <janeliulwq@google.com>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I934150415e5ba515fddd37dab6e028d016052ab8
Reviewed-on: https://pdfium-review.googlesource.com/6173
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Update implementation and caller, and clean up surrounding code.
Change-Id: I40975f79a5d4f560d6a7ee0d327b2e97241d29bd
Reviewed-on: https://pdfium-review.googlesource.com/6172
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
In turn, fix type information for New*() return values.
In turn, resolve some ambiguity in a ? operator expression.
Change-Id: I45c31d81f815b11590b46dacc8060d8e489dde5c
Reviewed-on: https://pdfium-review.googlesource.com/6131
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Calling ToLocalChecked() will crash otherwise.
Bug: 707673
Change-Id: I66a5b36d8cf1710a725e30c2d14a195d08ef25a4
Reviewed-on: https://pdfium-review.googlesource.com/6130
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
BUG=pdfium:717
R=dsinclair@chromium.org,thestig@chromium.org
Change-Id: I7e0e6fd301d40f9b5341d40cf11167b7748af243
Reviewed-on: https://pdfium-review.googlesource.com/6071
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: Ia65dab9fa12f2c7645f05651565446fe85330fbc
Reviewed-on: https://pdfium-review.googlesource.com/6132
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
So call it as such. Fix two places where we're invoking it off
of an intance.
Change-Id: I08712fa27dbdf85c9195cedcc62d7d741b0ad091
Reviewed-on: https://pdfium-review.googlesource.com/6110
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Bug: 727048
Change-Id: Ib2ce898eeb814f17fca852bcf670678f734d905f
Reviewed-on: https://pdfium-review.googlesource.com/6083
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
The generating method is not needed for just inserting and rendering. Its
purpose seems to be for usage when an already inserted image has been modified
or when a copy of the PDF will be saved.
Change-Id: I72250b3ba8c53b75249b4ef9ca1bef2d1231288d
Reviewed-on: https://pdfium-review.googlesource.com/6091
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
Make CFX_RenderDevice, which owns the IFX_RenderDeviceDriver, responsible
for restoring driver state as part of its destruction so that its callers
don't have to do so out of turn.
Then re-order CPDF_PageRenderContext destruction order so that
the progressive renderer is destroyed before the device, and the
device destroyed before the options because of unowned pointers
to objects owned by these.
Bug: 726755
Change-Id: I9a6f23da12140b2758b86e6f33f715ad1c679c3f
Reviewed-on: https://pdfium-review.googlesource.com/6073
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
BUG=pdfium:720
R=npm@chromium.org
Change-Id: I2a43b34da6946265ca06502b9ff19ad352fd18cb
Reviewed-on: https://pdfium-review.googlesource.com/5953
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
BUG=pdfium:721
R=npm@chromium.org
Change-Id: I71b6281346b3ed67f6b8703eccd7794588559819
Reviewed-on: https://pdfium-review.googlesource.com/6013
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
BUG=pdfium:719
R=npm@chromium.org
Change-Id: Ifd9330de265f8419d588b65fbd6a6187f17badd1
Reviewed-on: https://pdfium-review.googlesource.com/5950
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
BUG=pdfium:718
R=npm@chromium.org
Change-Id: Icdc1546c87a676a7d05330dece2c5eacd92c0c92
Reviewed-on: https://pdfium-review.googlesource.com/5951
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
Change-Id: I8365ba80e3395d59a3cf35dbd9d9162e86e712e3
Reviewed-on: https://pdfium-review.googlesource.com/5970
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Sed + minimal conversions to compile, including moving some
constructors into the .cpp file. Any that caused ASAN issues
during the tests were omitted rather than trying to resolve
the underlying issue.
Change-Id: I00a421f33b253eb4071ffd9af3f2922c7443b335
Reviewed-on: https://pdfium-review.googlesource.com/5891
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I4eab5e843580845753c5f80c05cf9490a85114b6
Reviewed-on: https://pdfium-review.googlesource.com/5890
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Freetype can get to values larger than 0x10FFFF, but our current implementation
of the ToUnicode mapping and the function FXSYS_ToUTF16BE does not support
these values.
Bug: chromium:724962
Change-Id: I7069f33429527dbf2d0bfd2033512fe909970c02
Reviewed-on: https://pdfium-review.googlesource.com/5810
Commit-Queue: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I88466943171f19259f84add69679741d44c8e123
Reviewed-on: https://pdfium-review.googlesource.com/5551
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: I551b4210c95db0b916e9fe6cddf11e6c3d015c50
Reviewed-on: https://pdfium-review.googlesource.com/5790
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Fix type mismatches.
Change-Id: Id475f927d0919f60a84f17bd9545ec67d569ff64
Reviewed-on: https://pdfium-review.googlesource.com/5740
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Sometimes, web links are written with other text such as punctuations
which makes the extracted web links invalid. We improve this by trimming
invalid chars at the end of host name only URLs. For example, host names
never ends with ';' or ','.
BUG=chromium:720578
Change-Id: Id619025b2153531376d268a69a3a89c3d49fce08
Reviewed-on: https://pdfium-review.googlesource.com/5692
Commit-Queue: Wei Li <weili@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
More straight forward than CFX_GEModule owning in and CPDF_ModuleMgr
holding a pointer to it.
Remove assumptions that the codec modules may return nullptr, and do
IWYU.
Change-Id: Iba7fc3c7ec223fd6d29a1ab74ed13d35689bc5d5
Reviewed-on: https://pdfium-review.googlesource.com/5654
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
See the explanation in CPDFSDK_FormFillEnvironment.h
Change-Id: I52feb25fb358831233a636e3ead5aa70e98c5baa
Reviewed-on: https://pdfium-review.googlesource.com/5658
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Change interform to avoid temp StringC with dangling ptr.
Change-Id: I8d8659973bcdf2cdbcaa6efa6012e4acce5f1604
Reviewed-on: https://pdfium-review.googlesource.com/5571
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
CPDFXFA_DocEnvionment is part of the heirarchy of objects owned by
the embedder under its FPDF_Document object.
IJS_EventContext is part of the hierarchy of objects owned by the
embedder under its FPDF_FormHandle object.
The FPDF_Document must outlive the FPDF_FormHandle, so there is a
lifetime inversion with the m_pJSEventContext member. No matter,
event contexts are transient and allocated in a stack-based manner
as control bounces from C++ to JS and vice versa, and keeping a
persistent one seems wrong. So make it only as needed.
Bug: 723644
Change-Id: I74dd328ad4b501e4adf57821b44ecc78d945eb0f
Reviewed-on: https://pdfium-review.googlesource.com/5656
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
The test, as written, is only correct for the non-xfa case, where
the FPDF_Document opaque type is equivalent to the CPDF_Document.
Under XFA, however, there is another layer of indirection that
the test harness needs to respect.
Sorry, I missed this the first time around when I signed off
on the CL that introduced this test.
Change-Id: Ida3579edf639fbfca2939dc151c0420247e90ab3
Reviewed-on: https://pdfium-review.googlesource.com/5657
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
This reverts commit b084c1f615e9b5d82a36aeedcff2339b7ac91265.
Reason for revert: new crashes.
BUG=723415
TBR=dsinclair@chromium.org
Change-Id: I5194170f74a5781dad213d08a28e574eb6d56156
Reviewed-on: https://pdfium-review.googlesource.com/5655
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This CL replaces some reinterpret_cast with static_cast in fpdfsdk. It also
removes an obsolete comment in fpdfedit.h
Change-Id: I36c29bfcd6382490a8c955b50ccfa4c93ab351c7
Reviewed-on: https://pdfium-review.googlesource.com/5632
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
In particular, doing m_pPtr = nullptr; in your dtor to evade this
check will not longer work.
Fix slight mis-ordering observeds in CFX_Font and CPDFXFA_Context.
Change-Id: I3e6137159430333b091364021283a54a13d916b5
Reviewed-on: https://pdfium-review.googlesource.com/5570
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Bug: pdfium:667
Change-Id: I8c3d07d2c533e6dd2a98099673b136c587c37a98
Reviewed-on: https://pdfium-review.googlesource.com/5630
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
In particular, prefer an explicit .release() call when handing
ownership of an object to a caller across a C-API.
Change-Id: Ic3784e9d0b2d378a08d388989eaea7c9166bacd1
Reviewed-on: https://pdfium-review.googlesource.com/5470
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|