Age | Commit message (Collapse) | Author |
|
This CL moves GetPDFWordString to be a method on CFX_Edit. The
FX_EDIT_ISLATINWORD define is moved into fx_edit.h.
CFWL_Edit::FX_EDIT_ISLATINWORD is renamed to FxEditIsLatinWord to make
less confusing with the define.
Change-Id: I47d12d41447b268894a1d0376ac4b2bdb409e2df
Reviewed-on: https://pdfium-review.googlesource.com/8531
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: Ic183f9aaa4c2557d755d40c5cb753fb7d11904b9
Reviewed-on: https://pdfium-review.googlesource.com/8551
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
The CFX_ListContainer was only used in CFX_ListCtrl. This CL merges the
two classes and moves simple get/set methods to the header file.
Change-Id: Ie2a79ab74551aabd3b475f5d3a8a0bccbb39a851
Reviewed-on: https://pdfium-review.googlesource.com/8550
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
This makes various IsFooKeyDown() methods static.
Transitively apply that to callers too.
Change-Id: Ia43b1fd62889c1943e0d8407e9696225b05125a8
Reviewed-on: https://pdfium-review.googlesource.com/7190
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This CL renames Clear() in CPWL_EditCtrl, CPWL_ComboBox, and CFX_Edit
to ClearSelection(), as this function's behavior is clearing text selection.
Change-Id: Ia32f5347abc1960d7219684942df6a3fede9936c
Reviewed-on: https://pdfium-review.googlesource.com/8611
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Diana Gage <drgage@google.com>
|
|
Change-Id: I24b191ecfe8b65a7d0ddc4958dc117de9ed9ae83
Reviewed-on: https://pdfium-review.googlesource.com/8630
Reviewed-by: Jane Liu <janeliulwq@google.com>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
This CL renames the CFX_Edit::GetSelText() method so that it is more
descriptive.
Change-Id: I2086f7d036cd874aba1b7d7ec04d1cbb7e182d06
Reviewed-on: https://pdfium-review.googlesource.com/8612
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
This CL changes SetSel() and GetSel() to SetSelection() and GetSelection()
in CFX_Edit and CPWL_EditCtrl, and SetEditSel() and GetEditSel() to
SetEditSelection() and GetEditSelection() in CPWL_ComboBox.
Change-Id: Idd984932bda139a04e99193e519756980b7d4397
Reviewed-on: https://pdfium-review.googlesource.com/8610
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
This CL adds two helper class to CPWL_AppStream to make sure we
correctly close stream commands.
Change-Id: I017477b16951e3e32a19e6264e63c9927bea5618
Reviewed-on: https://pdfium-review.googlesource.com/8315
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL removes the CLST_Rect and uses CFX_FloatRect directly. The
constructor params for CLST_Rect were (left, top, right, bottom) and
CFX_FloatRect (left, bottom, right, top) so the usages have been
flipped.
Change-Id: I78bb2927c4ff9d5ad6d28099dd08a5bdda7646b0
Reviewed-on: https://pdfium-review.googlesource.com/8432
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
The CFX_ListItem never calls the Height() method so doesn't need to use
CLST_Rect. This CL removes unused methods from CLST_Rect and
CPVT_FloatRect.
Change-Id: I82d4f07ec104345e9275ccd838e3c8eed1de7a50
Reviewed-on: https://pdfium-review.googlesource.com/8431
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This is another case where JS may lead to destruction of
an object far away from where we are holding it.
Bug: 737023
Change-Id: I994d5425184b8c00b5cfaeb95dbb5032a6e09edb
Reviewed-on: https://pdfium-review.googlesource.com/8350
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
This CL moves the AppSteam generation code for CPWL_Icon to a separate
method. The CPWL_Image code is also folded directly into CPWL_Icon as it
is the only subclass.
Change-Id: I7936bac4af76e34d0f73d48ca00f5713c5f20095
Reviewed-on: https://pdfium-review.googlesource.com/8314
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL moves the remaining appearance stream code to CPWL_AppStream.
The unused GetThisAppearanceStream methods have been removed.
Change-Id: I0bdfbb11962ee7975394a40a1ea45d076ee9151d
Reviewed-on: https://pdfium-review.googlesource.com/8312
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
Given a point on a page, this method returns the interactive form
annotation whose rectangle contains that point. If there is no such
annotation, nullptr is returned. FPDFPage_CloseAnnot() must be called
after the annotation this method returns is no longer needed.
The tests for this method use the returned annotation to check its
interactive form annotation flags via
FPDFAnnot_GetFormFieldFlags().
BUG=chromium:59266
Change-Id: I8728792bea5367c172e08fdb6bae83eafb70eb68
Reviewed-on: https://pdfium-review.googlesource.com/7970
Commit-Queue: Diana Gage <drgage@google.com>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Given an interactive form annotation, this method returns its annotation
flags. The flags returned are dependent upon the "Ff" field, and are
specific to interactive form annotations, such as
FPDF_FORMFLAG_MULTILINE, FPDF_FORMFLAG_COMBO, FPDF_FORMFLAG_EDIT, and
others.
To test this method more thoroughly, text_form_multiple.pdf has been
added, which is similar to text_form.pdf, but includes a read-only text
field.
BUG=chromium:59266
Change-Id: Ie66046de273f69a1be6f04a433351ebaa271f60c
Reviewed-on: https://pdfium-review.googlesource.com/7851
Commit-Queue: Diana Gage <drgage@google.com>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Since there is no guarantee of termination if the StringC was
extracted from a snippet of another string. Make it more obvious
that things like
strlen(str.unterminated_c_str())
might be a bad idea.
Change-Id: I7832248ed89ebbddf5c0bcd402aac7d40ec2adc2
Reviewed-on: https://pdfium-review.googlesource.com/8170
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
copy and pasted code does not
always work out for the best.
This makes the code compile.
R=dsinclair@chromium.org
Bug:736695
Change-Id: I41474fef629813fd21a5f52e5c7954329b7b2a64
Reviewed-on: https://pdfium-review.googlesource.com/8330
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This method is never called. Removed.
Change-Id: Iff366d68b4865d195d50a6c37376e81a5a4408b2
Reviewed-on: https://pdfium-review.googlesource.com/8313
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This CL creates a CPWL_AppStream and consolidates app stream generation
code from CPDFSDK_Widget, CPDFSDK_BAAnnot and CPWL_Utils. The remaining
app stream code from CPWL_Utils will be cleaned up in a future CL.
Change-Id: I20cfdec09a351bd509241d2c667a182fba84b0c1
Reviewed-on: https://pdfium-review.googlesource.com/8310
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
PDFium doesn't strip BOMs during parsing, but we should strip BOMs when
retrieving parsed strings in CPDF_NameTree to ensure consistency and
appropriate function behavior. See the bug for more info.
As outlined in Bug=pdfium:593, the solution is to call GetUnicodeText()
instead of GetString(). I added a GetUnicodeTextAt() function in
CPDF_Array, which is symmetrical to GetUnicodeTextFor() in
CPDF_Dictionary.
I then changed the input variable types to CPDF_NameTree functions to
be CFX_WideString instead of CFX_ByteString, and modified all the
calls to them.
I also added a unit test for nametree, which would fail prior to this
change. Nametrees with non-unicode names are already tested by embedder
tests.
Bug=pdfium:820
Change-Id: Id69d7343632f83d1f5180348c0eea290f478183f
Reviewed-on: https://pdfium-review.googlesource.com/8091
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Jane Liu <janeliulwq@google.com>
|
|
If Skia has cached some drawing, flush it
when progressive rendering at the same
point in the pipeline as the non-progressive
state.
R=dsinclair@chromium.org
Bug:736695
Change-Id: Ie24544a4be541ac8a5165dc064171772dd8893da
Reviewed-on: https://pdfium-review.googlesource.com/8270
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Cary Clark <caryclark@google.com>
|
|
1. Added API for extracting attachment properties and data.
* Expanded the embedder test to cover all the new APIs.
Bug=pdfium:174
Change-Id: I09bffd412410e9aea45faca442d2b72eefafef4e
Reviewed-on: https://pdfium-review.googlesource.com/7790
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Avoid duplicate definitions.
Change-Id: I33761277cceea538b8d58c10175cfc9e9951fcd4
Reviewed-on: https://pdfium-review.googlesource.com/8011
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
This CL adds a FPDF_RENDER_TOBECONTINUED and marks
FPDF_RENDER_TOBECOUNTINUED as deprecated.
Change-Id: Ie08dbb2715d1d7959fbae17d9f23d7fcec410600
Reviewed-on: https://pdfium-review.googlesource.com/8070
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL adds the missing STDCALL annotations from the PDFium APIs.
Bug: pdfium:818
Change-Id: I415efbb68f6f90cc367a4fc7289619764b528ade
Reviewed-on: https://pdfium-review.googlesource.com/8031
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
Re-work the previous fix to be even more particular
about the input.
Bug: chromium:740166
Change-Id: I6bea3b6a6dd320a83f830b07afd52951be7d1b63
Reviewed-on: https://pdfium-review.googlesource.com/7691
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This CL removes the drawing code from the AP stream generation code in
CPWL_Utils and places it in CFX_RenderDevice.
Change-Id: I5335fc38368740ba3ddc676ee856201a358979fc
Reviewed-on: https://pdfium-review.googlesource.com/7715
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This CL adds a method to CFX_FloatRect to get a new deflated rectangle
from a given rectangle.
Change-Id: I781222257c82baf94d5f77deede52fbe4e97c701
Reviewed-on: https://pdfium-review.googlesource.com/7850
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Test cases that are commented out are failing with our current
implementation.
Change-Id: I9f80003af5a5d182f53cc655454aec44397d278b
Reviewed-on: https://pdfium-review.googlesource.com/7890
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Updated pdfium_test's WriteAnnot() (corresponding to the --annot flag)
to output more annotation info using the new APIs.
Also fixed some nits in the annotation API code.
Bug=pdfium:737
Change-Id: I3f40e83279ec82529f732eb94f309ab7d4992d3c
Reviewed-on: https://pdfium-review.googlesource.com/7791
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Jane Liu <janeliulwq@google.com>
|
|
These files were originally renamed thinking they'd move with the
colour class up to core/. It was decided that CPWL_Color was a better
core colour class the the xfa colour so these are being renamed back to
XFA based names to make it clear where they live.
Change-Id: Ie89f2306be0609add29bd445e719567e7b439211
Reviewed-on: https://pdfium-review.googlesource.com/7754
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Need to restore this API so builds without the chromium text driver CL
do not fail.
BUG=chromium:734850
Change-Id: I320e482a54bf1224817efee8b50113169353f9be
Reviewed-on: https://pdfium-review.googlesource.com/7830
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Rebekah Potter <rbpotter@chromium.org>
|
|
This CL fixes and invalid WRITE triggered by calling util.printf. We need to
verify that the integer format will be less then 260 characters.
Bug: chromium:740166
Change-Id: I1c9047101780582da5f39088568727e2c8b4c2d2
Reviewed-on: https://pdfium-review.googlesource.com/7630
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL removes the fore/back colours in favour of just using the
colours inline and converts the m_ColorMode to an enum.
Change-Id: I1796e200d5c470680126af8625d45fc3062a1042
Reviewed-on: https://pdfium-review.googlesource.com/7751
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL moves fpdfsdk/pdfwindow/cpwl_color to core/fxge/cfx_color.
Change-Id: Ia95b7fba2c76a1b9a438014d3598c7aa55bbb2ab
Reviewed-on: https://pdfium-review.googlesource.com/7753
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL moves the ScaleRect method to Scale on CFX_FloatRect and changes it to
operate directly on the rect.
Change-Id: Ie0f91c9319be08c9e2cc81cba2519ebb5f2c35eb
Reviewed-on: https://pdfium-review.googlesource.com/7714
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This method only deals with CPVT_WordRange objects so move to the correct class.
Change-Id: If5f28178301affa8633f8ef8e89894dfb94f1ac9
Reviewed-on: https://pdfium-review.googlesource.com/7713
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This method is working on the FloatRect content so move it to CFX_FloatRect.
Change-Id: I60aabf6e3b86aa9acc59f86cff69347ec5fe5033
Reviewed-on: https://pdfium-review.googlesource.com/7712
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This CL removes CPWL_Utils::OffsetRect in favour of CFX_FloatRect::Translate.
Change-Id: I10e654fcd32639f2121fa78cd343879562c54186
Reviewed-on: https://pdfium-review.googlesource.com/7711
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL removes the custom InflateRect and Deflate rect code in CPWL_Utils in
favour of calling the CFX_FloatRect version. This required inlining some extra
code at each callsite to check the rect size and normalize.
Change-Id: I7f60e5de03fc1db0c1d8e51eaa1d0e0700ebf157
Reviewed-on: https://pdfium-review.googlesource.com/7710
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Remove members from CPDF_RenderOptions which are set but never read.
Change-Id: I9598478bbc63c94af1c4693907abf66503138eb5
Reviewed-on: https://pdfium-review.googlesource.com/7750
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Changed CPDF_FileSpec::GetFileName() to directly return CFX_WideString,
instead of taking in a CFX_WideString* and returning a bool. Also fixed
test calls in the unit test.
Bug=pdfium:808
Change-Id: Ie081fc9f4f1c15d23c86d7222d8480ab9cb56056
Reviewed-on: https://pdfium-review.googlesource.com/7671
Commit-Queue: Jane Liu <janeliulwq@google.com>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
1. Added APIs for retrieving embedded attachment count and file name.
* Added an embedder test testing them.
Bug=pdfium:174
Change-Id: I181b8e0b81495d8a7fd8c3f79dbbc0f907f5e3fd
Reviewed-on: https://pdfium-review.googlesource.com/7490
Commit-Queue: Jane Liu <janeliulwq@google.com>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Bug=pdfium:737
Change-Id: Ia485219b9288b9fe7e1ae226035b37dde2bc3abd
Reviewed-on: https://pdfium-review.googlesource.com/7213
Commit-Queue: Jane Liu <janeliulwq@google.com>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
BUG=chromium:734850
Change-Id: Icc0947e2e99e77a36d8963fcf0b6d3deea161d3e
Reviewed-on: https://pdfium-review.googlesource.com/7194
Commit-Queue: Rebekah Potter <rbpotter@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Bug: chromium:738919
Change-Id: I2ea99a47f45e2e68650bd1fa9ad7554d8df79874
Reviewed-on: https://pdfium-review.googlesource.com/7351
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
|
|
Cleanup nits in CFFL_FormFiller. Split CFFL_Button into own files.
Change-Id: I41fa7118a46aa1f495c15f90a4c4b77b309a10d3
Reviewed-on: https://pdfium-review.googlesource.com/7339
Reviewed-by: Nicolás Peña <npm@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
U+D800 to U+DFFF should not be encoded in UTF-16. However, FreeType may
have charcodes in that range, so in that case we just say that the
corresponding unicode is U+0000, NULL.
Bug: chromium:732272
Change-Id: I64e82856bab7f69545a307da1fef4df7f9df1f00
Reviewed-on: https://pdfium-review.googlesource.com/7312
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
The parameter is a CPWL_Wnd* but the only caller passes in a CPWL_Edit*,
so change it to CPWL_Edit* and remove the type checks / casting.
Change-Id: Ic2c85427bea5bf3d257b63c1e2ce9db5bee22136
Reviewed-on: https://pdfium-review.googlesource.com/7430
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|