Age | Commit message (Collapse) | Author |
|
This CL splits the GUID code out of fx_extension into an fx_guid.h file.
Change-Id: I915538ff98601efb07595264eff6435729193177
Reviewed-on: https://pdfium-review.googlesource.com/13090
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
File naming now matches.
Fix one usage not going through the accessor function.
Change-Id: I5cc4986238764964f2a71807a94bd2facf517263
Reviewed-on: https://pdfium-review.googlesource.com/12930
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Mid(foo, 1) is equivalent to [foo], if all you want is the character. Similarly
Left(1) is [0]. It is faster also, since it does not need to create intermediate
strings.
Right(1) is a touch more tricky, since it requires something like GetLength() ?
[GetLength() - 1] : 0;. A new method, Last() has been added to perform this
character extraction.
Multiple call sites have been updated to use more efficient/simpler
syntax. There are a number of call sites that use on these patterns, but based
on the surrounding context we actually need/want a string, so they have not been
modified.
Change-Id: I485a7f9c7b34c9bdacecada610158f996816afdd
Reviewed-on: https://pdfium-review.googlesource.com/12890
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Bug: chromium:760034
Change-Id: Id0862749b1454e065de4de7d746a27e78ac58e30
Reviewed-on: https://pdfium-review.googlesource.com/12730
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Remove dead code, move code to namespaces where possible, cleanup some
single use items.
Change-Id: Ia734477ceb2105a1ed272463bd8220f1205a7ce9
Reviewed-on: https://pdfium-review.googlesource.com/12732
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: I6df7e7d1283541ea2e6b9bcf3de172f6a886054a
Reviewed-on: https://pdfium-review.googlesource.com/12731
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL moves the BIDI code from fx_arabic to fx_bidi and conditionally
compiles based on XFA.
Change-Id: Iaba60486f03e48f0816d60e365a58a8622bc8254
Reviewed-on: https://pdfium-review.googlesource.com/12713
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
BUG=pdfium:813
Change-Id: I4c638857bf114327dbc0344cc6d231b897f0d001
Reviewed-on: https://pdfium-review.googlesource.com/11971
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This CL removes the fx_basic.h header and fixes up includes as needed.
Change-Id: I49af32a8327bdbcda40c50a61ffbd75d06609040
Reviewed-on: https://pdfium-review.googlesource.com/12670
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Instead of only having CPDF_Dictionary* GetRoot() const, provide
const CPDF_Dictionary* GetRoot() const and CPDF_Dictionary* GetRoot().
Do the same for GetInfo().
Change-Id: I6eae1208d38327fcdc7d0cd75069a01c95f4a92a
Reviewed-on: https://pdfium-review.googlesource.com/11671
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This CL moves CFX_WideTextBuf to its own files and updates includes as
needed.
Change-Id: Ibe66ecf3e66f8f01dd8e9eaf6b467588be86ad4f
Reviewed-on: https://pdfium-review.googlesource.com/12413
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL moves CFX_AutoRestorer into its own file, separate from
fx_basic.h.
Change-Id: I415cb9207416bd4744b8ac8e2d7466852db53f0a
Reviewed-on: https://pdfium-review.googlesource.com/12390
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This CL rebuilds the text edit engine in a simpler fashion. Instead of
depending on multiple pages, paragraphs and buffer fields there is a
single text edit engine which contains a gap buffer.
This makes the code easier to understand and follow.
Change-Id: I10fe85603fa9ed15a647eaac2d931f113cd0c7b0
Reviewed-on: https://pdfium-review.googlesource.com/11990
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Through out the code base there are numerous places where variables
are declared using a signed integer type when interacting with the
string classes, since they assume that FX_STRSIZE is 'int'. As part of
changing the underling type of FX_STRSIZE to be unsigned, these
locations are being changed to use FX_STRSIZE. This is necessary as
part of converting the type, but has been broken off into a separate CL,
since it should be low risk.
Some related cleanups that are low risk are included as part of
this CL.
BUG=pdfium:828
Change-Id: Ifaae54ad195ccde0fe8672f71271d29a6ebd65fd
Reviewed-on: https://pdfium-review.googlesource.com/12210
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
Change-Id: If2a8e608498c505440405e7eff675969ac4b195a
Reviewed-on: https://pdfium-review.googlesource.com/12330
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
BUG=chromium:752501
Change-Id: Ie9943cd80a4afa73ad9393c8bcd2aa2656a9d932
Reviewed-on: https://pdfium-review.googlesource.com/12290
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
CFX_Point and CFX_PointF are derived from CFX_PTemplate.
Add a helper function to replace the rarely used method where its used.
Change-Id: I28448d44bbae9aa6773d1ad5fd7daf342b67c84c
Reviewed-on: https://pdfium-review.googlesource.com/12071
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
This CL creates a global font loader for use in XFA tests. This is
needed because the CFGAS_FontMangaer takes a linearly increasing amount
of time to load fonts each time it's loaded. This can get excessively
slow for test suites which run a lot of tests.
Change-Id: Ie389844b56598ce414f4f761654fa4ed465955fd
Reviewed-on: https://pdfium-review.googlesource.com/12090
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This code will just add 0 to x and subtract 0 from y. Doing nothing.
Remove.
Change-Id: I6e0aa91d088acd49cb83d4bded29908b544b692b
Reviewed-on: https://pdfium-review.googlesource.com/12110
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
The current limit of 2000 is still causing occassional ASAN issues,
reducing to 1250.
BUG=chromium:757711
Change-Id: Idb07f97b01230afabcceaa23b29495432193ec64
Reviewed-on: https://pdfium-review.googlesource.com/11750
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This CL updates the text edit engine to load and unload the page
directly instead of calling through the edit widget.
Change-Id: I636c8e8b0e635968222430098d3d268c75224b42
Reviewed-on: https://pdfium-review.googlesource.com/11590
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL cleans up the GetPre* methods in CFDE_TextEdtEngine. In
particular:
* GetPreDeleteText was inlined as it was very simple
* GetPreReplaceText was removed as unused
* GetPreInsertText was renamed to InsertIntoTextCopy to make clear
that this was doing the insert into a copy of the text.
Change-Id: Icde0126b6ddb0ec9d4956238ebff53c9fe51c051
Reviewed-on: https://pdfium-review.googlesource.com/11531
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Previously text break was a unique_ptr inside the CFDE_TxtEdtEngine.
This CL converts it to be a member instead of a unique_ptr. We never
replace the pointer after it's created.
Change-Id: I89ab73e81c63c24abfacd38a1141db6473d77640
Reviewed-on: https://pdfium-review.googlesource.com/11530
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
The Find and ReverseFind methods for WideString, WideStringC,
ByteString, and ByteStringC have been converted from returning a raw
FX_STRSIZE, to returning Optional<FX_STRSIZE>, so that success/failure
can be indicated without using FX_STRNPOS.
This allows for removing FX_STRNPOS and by association makes the
conversion of FX_STRSIZE to size_t easier, since it forces checking
the return value of Find to be explictly done as well as taking the
error value out of the range of FX_STRSIZE.
New Contains methods have been added for cases where the success or
failure is all the call site to Find cared about, and the actual
position was ignored.
BUG=pdfium:828
Change-Id: Id827e508c8660affa68cc08a13d96121369364b7
Reviewed-on: https://pdfium-review.googlesource.com/11350
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This CL converts the return value to be an enum class and updates the
usages to use the names instead of values.
Change-Id: I8b6927551679ac4103775a04187daad2e0d6c569
Reviewed-on: https://pdfium-review.googlesource.com/11512
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Currently, all three of CFX_Matrix::TransformRect() take in rect values
and modify them in place.
This CL converts them to take in constant values and return the
transformed values instead, and fixes all the call sites.
Bug=pdfium:874
Change-Id: I9c274df3b14e9d88c100ba0530068e06e8fec32b
Reviewed-on: https://pdfium-review.googlesource.com/11550
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Jane Liu <janeliulwq@google.com>
|
|
This CL converts the enum to an enum class and updates the usage as
needed.
Change-Id: I7ba883e7d1debee00d3d9baafe941620109df8b8
Reviewed-on: https://pdfium-review.googlesource.com/11511
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL cleans up nits in CFDE_TxtEdtBuf and simplifies some of the
methods.
Change-Id: I2092da8e27281a577752fc331fec0612a349dfd6
Reviewed-on: https://pdfium-review.googlesource.com/11335
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
Converted CFDE_TxtEdtBuf::Insert(), CFDE_TxtEdtEngine::Insert(), and
CFDE_TxtEdtEngine::Inner_Insert() to take in CFX_WideString instead of
a wchar_t* and length.
Bug=pdfium:757
Change-Id: I6097e9b0d4e584b920b2117b4c5489eedef37767
Reviewed-on: https://pdfium-review.googlesource.com/11411
Commit-Queue: Jane Liu <janeliulwq@google.com>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This CL cleans up formatting and simplifies logic in CFDE_TextOut.
Change-Id: Ib675a35da79df77854f51e86bf24e5dc90b33b06
Reviewed-on: https://pdfium-review.googlesource.com/11334
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Bug: pdfium:872
Change-Id: Ib7f0e3708cea2d16d7536ae26777ddc48d7e2c1d
Reviewed-on: https://pdfium-review.googlesource.com/11370
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: Idc9dfcafe6727c1689443ce8f9568567e55d51c8
Reviewed-on: https://pdfium-review.googlesource.com/11114
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change some related code to take a const CFX_Matrix* since it is not
immediately obvious if the matrix can be made into a const-ref.
Change-Id: I15c840222b575cc479b1f6f0b6d3b3c0e50d5515
Reviewed-on: https://pdfium-review.googlesource.com/11113
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Also remove an unused method and move a bunch of internal methods into
an anonymous namespace.
Change-Id: Ic7b4a975852cc2a7384bf3f681b953a5bf7e7d29
Reviewed-on: https://pdfium-review.googlesource.com/11112
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Constify parameters as well.
Change-Id: I7e87b11cc73b133b04d49ceed1c46f5afcb89d1a
Reviewed-on: https://pdfium-review.googlesource.com/11111
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I6ea062bf5def0bc5fea7c52323198209dcf4c3e9
Reviewed-on: https://pdfium-review.googlesource.com/11110
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This CL removes a bunch of redundant members from the text edit engine.
The change information tracking was removed as most of it was unused or
was used inconsistently.
Change-Id: I92460594e46accff0b78e1183c8574fc83ce728a
Reviewed-on: https://pdfium-review.googlesource.com/11275
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL changes caret movement into an enum class and removes the
MoveNone flag.
Change-Id: I8a01b057942d45ceae9a6c3b95cfe3b8dc9ce9a5
Reviewed-on: https://pdfium-review.googlesource.com/11274
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL cleans up CFDE_TxtEdtEngine::{Insert|Delete} to cleanup return
values, input params and other unused bits.
Change-Id: I53c4475ce3dc6518058bc130e9710842df841032
Reviewed-on: https://pdfium-review.googlesource.com/11273
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
The GetTextLength method just proxies to GetTextBufLength. This CL
removes GetTextBufLength and puts the functionality into GetTextLength.
Change-Id: If324fbeddd05cd63570b6942dc613e273a1fbce7
Reviewed-on: https://pdfium-review.googlesource.com/11272
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL fixes the visibility of some methods in xfa/fde along with
removing unused methods. Unused params are also removed.
Change-Id: Ic6e6d2ac8d07dc4bdabb3e0121831e4bf3fbb8ec
Reviewed-on: https://pdfium-review.googlesource.com/11271
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Remove friendship.
De-virtualize.
Nest enum inside class.
Make copy-assignable and pass by const ref.
Make pack better on 64-bits.
Change-Id: I1ae3b6d03756fa5780e9023795db6648e8b8299a
Reviewed-on: https://pdfium-review.googlesource.com/11290
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
This CL moves several methods from the CFDE_TxtEdt* classes from the
.cpp to .h files. As well, the GetCaretRect method is updated to return
the rect instead of using an out param.
Change-Id: I1288701f47d9ac1c413fbf06627f20b295b18b86
Reviewed-on: https://pdfium-review.googlesource.com/11270
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
The three CFDE_TxtEdtEngine layout methods are always called in
sequence. Update to only have a single Layout() method. Simplify the
layout code to use existing helpers.
Change-Id: I0f4d9714f231ca3cebf43579d215d97bd2fe525a
Reviewed-on: https://pdfium-review.googlesource.com/11231
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
This CL removes the remaining friendship in CFDE_TxtEdtEngine but adding
public methods for CFDE_TxtEdtPage to access.
Change-Id: I9e6420921bc4567a499c8e688c6db51029659ae8
Reviewed-on: https://pdfium-review.googlesource.com/11230
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Due to the recursive nature of the FormCalc parser, deeply nested
expressions can lead to memory being exhausted. This check is being
added to have the parser exit early instead of running out of
memory. This should reduce the number of false positives about
addressing issues being found by fuzzers.
BUG=chromium:752433
Change-Id: I511ecfb07e32073555e1fd1658f3b8b47f1a5a91
Reviewed-on: https://pdfium-review.googlesource.com/11170
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This class is actually an accidentally renamed interface. There is only
one concrete class so fold the interface back into the concrete class.
Change-Id: If921a34595fad85750389f071ffdc9a5eae09f8e
Reviewed-on: https://pdfium-review.googlesource.com/11150
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
BUG=pdfium:864
Change-Id: Iab03e1977c859f150452825650afed3520024cca
Reviewed-on: https://pdfium-review.googlesource.com/11030
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
This CL moves the implementation of the records which handle undo/redo
in the text edit engine into an anonymous namespace in the engine.
Change-Id: I299b9738b72e3eccbbec972fd3ea956c491859fa
Reviewed-on: https://pdfium-review.googlesource.com/11010
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
BUG=chromium:754982
Change-Id: I41da6828c714d3ed12fe796ae7e228d87b168962
Reviewed-on: https://pdfium-review.googlesource.com/10890
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|