Age | Commit message (Collapse) | Author |
|
Change-Id: I192f2d0f5e0d61ff09d2e32bafa4e7518573e14e
Reviewed-on: https://pdfium-review.googlesource.com/31951
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
This CL moves the switch from CFX_XMLParse::Parse into
CFX_XMLParser::DoSyntaxParse. This means all the work to build the tree
is now done in one place instead of spread between the two methods.
Change-Id: Ie9c6cd67795c3fcbd3e305187a06cd727d386a7c
Reviewed-on: https://pdfium-review.googlesource.com/31950
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL renames ParseTextChar to ProcessTextChar to make the usage
clearer. The method does not do any parsing, it just decides if the char
is part of an entity or not.
Change-Id: I9b70a82a421b02e2352cd07bd88b1e581d8578b7
Reviewed-on: https://pdfium-review.googlesource.com/31930
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
All usages were prepending the "Today" string, so move it inside
GetTodayText().
Change-Id: I454fb683c9507e76b61bf69ca29a0ee9b49f1a58
Reviewed-on: https://pdfium-review.googlesource.com/31970
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Change-Id: Ifbcb727402c1c28a6e8abe02511d6da6828c02f7
Reviewed-on: https://pdfium-review.googlesource.com/31915
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
When we fail to parse an XFA document we would free the XML document
that is created immediately. This causes issues because the XML nodes
may have been set into the CXFA_Document already. This CL changes
ParseDoc to always save the XMLDocument and then triggers the CloseDoc()
logic if the ParseDoc method fails.
This should properly cleanup any resources on a failed document load.
Bug: chromium:837578
Change-Id: I8af7e6e34e3b756455c58ea50b22af414ffa6cbf
Reviewed-on: https://pdfium-review.googlesource.com/31710
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
This CL adds a CFX_XMLDocument to act as the XML node container. All
nodes are now owned by the document and the document is returned by the
CFX_XMLParser.
Classes which parse XML files now store the document instead of the root
node.
BUG: chromium:835636
Change-Id: I1e07d6115cf14714911d6fd4c3fa920c94fd5faf
Reviewed-on: https://pdfium-review.googlesource.com/31313
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I1088abd4ce8f6276043213218867c4d6fb0a46a9
Reviewed-on: https://pdfium-review.googlesource.com/31914
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Return a CFX_Size instead.
Change-Id: I3bef1093fbc887237aa69dc942f878af27b4e8e9
Reviewed-on: https://pdfium-review.googlesource.com/31911
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
BUG=chromium:837972
Change-Id: I6cfa28bff38870419e4b1e2bced427cfcbf843cd
Reviewed-on: https://pdfium-review.googlesource.com/31912
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
A previous CL removed the need to these inclusions.
Change-Id: Idedbb1905317e90a94935884d12dbec8245e1122
Reviewed-on: https://pdfium-review.googlesource.com/31913
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Another virtual API at the CPDF layer, to avoid a compile time
ifdef XFA.
Change-Id: Ia95c4d3b3d3b773aaf45c49ebcadff6b16ca18c6
Reviewed-on: https://pdfium-review.googlesource.com/31910
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I4039917c5342f6a4c6568029a293066901bb5db4
Reviewed-on: https://pdfium-review.googlesource.com/31870
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Replaces one compile-time #ifdef XFA with a dynamic check and
a call through a virtual API that prevents the CPDF code from
knowing anything about the XFA code.
Change-Id: If0ff9b6918b908b3eac824fe1d525c6d4f7316e7
Reviewed-on: https://pdfium-review.googlesource.com/31890
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
This is an obstacle to introducing dummy CPDF_Pages to underly all
CPDFXFA_Pages, since we would then have a parserless CPDF_Page, whose
parse could never succeed or fail. The m_ParseState would never change,
and if the caller dutifully recalls us until that changes, we hang.
Small separate CL since it might impact non-XFA cases unexpectedly.
Change-Id: I002064e5d4caa44935f50bde0f3b00e3b8cb0bfe
Reviewed-on: https://pdfium-review.googlesource.com/31850
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: I3ed6cbadeb9da756b30634b48ffdd1026a70b8a0
Reviewed-on: https://pdfium-review.googlesource.com/31853
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: Ib5f8b8754bca8198d9122700d7d876b45d1428da
Reviewed-on: https://pdfium-review.googlesource.com/31852
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
Bug: pdfium:751
Change-Id: I125fbb0dd8ff4a382c4cec33a29c52a97e67de23
Reviewed-on: https://pdfium-review.googlesource.com/31851
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
- Refer to the string in CFX_BidiString by const-ref.
- Remove useless CharAt() method.
- Turn a member variable into a local variable.
Change-Id: I30f221b7350150c839a793129789d8ea7cc1f331
Reviewed-on: https://pdfium-review.googlesource.com/31670
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
This was a bug introduced in a refactor a long, long time ago.
A line was removed (probably unintentionally).
https://chromiumcodereview.appspot.com/2435603003/diff/40001/xfa/fxfa/app/xfa_fwltheme.cpp
Bug: pdfium:751
Change-Id: I0e3d094a543bd0e31010a8093387906d62c0a5dc
Reviewed-on: https://pdfium-review.googlesource.com/31830
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
Use strict typing for FPDF_Page to ensure we don't fall into
code that expects the other page type when continuing from null
context case.
Change-Id: I7f028ef3e3d733f5557620030a87e22997da00d5
Reviewed-on: https://pdfium-review.googlesource.com/31770
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Greatly minimize the impact between going back and forth from
XFA being on/off, so that XFA case is just an extension beyond
the non-XFA data structures we've shipped for years, instead of
being a complete replacement of them.
Change-Id: I6c98206e0ec99ea443547a4931eba912b1764d54
Reviewed-on: https://pdfium-review.googlesource.com/31690
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Similar tp CPDF_Document::Extension, this is a base type for fpdfsdk/
to use to improve layering.
While we're at it, make pages point to documents to prove they don't
outlive them.
Another small step towards not passing XFA objects across FPDF.
Change-Id: Idcee9da3a18c06331fa56f3d6c188e4ce27d34f2
Reviewed-on: https://pdfium-review.googlesource.com/31631
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
This CL fixes issues with handling XML instructions in CXFA_DocumentParser.
Unittests were added to verify the behaviour.
Change-Id: Iff8d51d0e6d411419473c9b2c32c700d4bbf86f5
Reviewed-on: https://pdfium-review.googlesource.com/31810
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
This CL fixes several issues in the CFX_XML class and
adds unit tests.
Change-Id: I05270690de8f3c45dceb866e17ef899ae6d23389
Reviewed-on: https://pdfium-review.googlesource.com/31753
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
Bug: chromium:838095
Change-Id: I21de7cf88c995446049faa3d688a286faa117868
Reviewed-on: https://pdfium-review.googlesource.com/31754
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Track the decode state in one data structure. Also grab pointers to data
structure members before tight loops when decoding. It turns out
referring to this->foo in tight loops can actually slow down decoding.
Change-Id: I6a09b08ca06ef05968966055b5ad20f8c89896af
Reviewed-on: https://pdfium-review.googlesource.com/31790
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
- Mark them private when possible.
- Disambiguate method names.
- Make method names match the style guide.
- Pass in rects by reference.
Change-Id: I0bf848756e81a92d20e46a81cd6260b660eaf482
Reviewed-on: https://pdfium-review.googlesource.com/31772
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Change-Id: I183a53d08f5da73d788c92b53382e3fac3b823e2
Reviewed-on: https://pdfium-review.googlesource.com/31671
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Change-Id: Ie5bea82757682390b274ad2da77d1686cc597046
Reviewed-on: https://pdfium-review.googlesource.com/31657
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I1e04c7645b2238d292a6a8eb5fb5fa365fa958f5
Reviewed-on: https://pdfium-review.googlesource.com/31752
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Bug: chromium:838095
Change-Id: I9b5edefbff9f84b9b913ab4387a7df2588e203fb
Reviewed-on: https://pdfium-review.googlesource.com/31751
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Change-Id: I9a5acb59790fd8527ced745370bdfe35e4d21c36
Reviewed-on: https://pdfium-review.googlesource.com/31656
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Change-Id: Ib0b1d014af31493c73a74d81c1f3454a203da949
Reviewed-on: https://pdfium-review.googlesource.com/31655
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
A subsequent patch will tackle the ad-hoc ref counting, but we
can tidy this before going down that hole.
Decouple CTTFontDesc creation from face setting.
Remove union and treat single-entry case as vector's first element.
Pass unique_ptr to prove memory ownership.
Change-Id: Ic427798da04f3afbb65a56ee10045b9f22457a73
Reviewed-on: https://pdfium-review.googlesource.com/31730
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Bug: chromium:838095
Change-Id: I6fbb67ad763800eb45fb3c84f909f74e238748e0
Reviewed-on: https://pdfium-review.googlesource.com/31750
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Rolling two iterations over the input into one, and reserving the
maximum possibly output size to avoid memory thrash when
appending. Under Valgrind this reduces the instruction count by ~200x
BUG=chromium:837610
Change-Id: If12a3b98048b41906a4401d4dcc9470b513e28d2
Reviewed-on: https://pdfium-review.googlesource.com/31731
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
Small step towards removing UnderlyingDocumentType and making FPDF
documents always be CPDF documents, regardless of XFA. This improves
layering a bit in the process.
Change-Id: Ice5ed7ba1ffdd7edfc9c4719f0e3a9cfb22f5790
Reviewed-on: https://pdfium-review.googlesource.com/31672
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Use C++ style struct syntax (file already has other C++ features).
Assert that things have packed as intended since they map to
known layouts. Order these asserts in the same order as .h file.
Change-Id: I0a006c4b5789fb544783f488d5b4e609e32c7ec1
Reviewed-on: https://pdfium-review.googlesource.com/31654
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Should have been removed in commit 704a617e.
TBR=hnakashima@chromium.org
Change-Id: I3871cb5ca0fa02247530af1fab86e2c321d467ad
Reviewed-on: https://pdfium-review.googlesource.com/31653
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Bug: pdfium:243
Change-Id: I36ebe64daa042b998878ffacfca9846b5303450b
Reviewed-on: https://pdfium-review.googlesource.com/31652
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Use CJBig2_Context::HuffmanAssignCode() instead.
Change-Id: Ief187420494a8cefa26eeedb98a55683caf7807b
Reviewed-on: https://pdfium-review.googlesource.com/31538
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
The type is known where we need it, and we avoid some dubious
casts in the process. Also avoid clumsy indexing and use the
members directly in computations.
Bug: pdfium:243
Change-Id: I1e061465fd0f9045cf5b82067204f26ac7df53f0
Reviewed-on: https://pdfium-review.googlesource.com/31651
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
Bug: pdfium:751
Change-Id: I27c4cf96c1b0d314ace8461ca6020c1034eff646
Reviewed-on: https://pdfium-review.googlesource.com/31650
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
This fixes issues when a line break is deleted and the caret remains
where it was, now between two lines.
Bug: chromium:836361
Change-Id: I6cd40402a97348bcfc4c9291e7acb044a1e68113
Reviewed-on: https://pdfium-review.googlesource.com/31391
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Change-Id: I6461f81a3d8005efa75b8141c18c502a63252883
Reviewed-on: https://pdfium-review.googlesource.com/31537
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
It looks a lot like CJBig2_HuffmanTable::InitCodes(). Port over the
UBSAN error fix from commit 76c9a1b1.
BUG=chromium:709781
Change-Id: I5d2f8fb013c09099c82b0565627b77e4fb0f8a98
Reviewed-on: https://pdfium-review.googlesource.com/31536
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
Follow-on from https://pdfium-review.googlesource.com/c/pdfium/+/31591
Under XFA, the Form Fill Environment already has the XFA context, so
there is no need for callers to obtain it and pass it.
Tidy some duplicate string allocations along the way.
Change-Id: Ia7614b200146e7ca1f68a18f9d2ce118946b53e8
Reviewed-on: https://pdfium-review.googlesource.com/31610
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
One of its parameters is a member variable.
Change-Id: I0dcb78275d9ea5b05a77e211d178a0efb8699395
Reviewed-on: https://pdfium-review.googlesource.com/31535
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
Pick from a set of functions before calling it, instead of having code
to call all of the functions with the same parameters.
Change-Id: I7f479948f50bdc1a9eb2764d5eb7505dc7434418
Reviewed-on: https://pdfium-review.googlesource.com/31533
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|