Age | Commit message (Collapse) | Author |
|
Change-Id: I80be0de1a7d9ba502b4468bc13a4595566f8fb30
Reviewed-on: https://pdfium-review.googlesource.com/20432
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This CL extracts the V8 helper methods from the CFXJS_Engine and places
them in a CJS_V8 class which the engine inherits from. This will allow
inheriting the CJS_V8 class into CFXJSE_Engine to share the
helper methods.
Change-Id: I58a7cd7ebac3af303ecbeee84c6940186a0f1dc6
Reviewed-on: https://pdfium-review.googlesource.com/20470
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Either switch to std::lower_bound(), or brute force when the search
space is very small.
Change-Id: I54db346aeb6f2e8000e95a6a9c8fbdd512df500a
Reviewed-on: https://pdfium-review.googlesource.com/20431
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Use std::lower_bound() instead.
Change-Id: I0bed2a90f3aa427a283cd86a050a027ec7a64358
Reviewed-on: https://pdfium-review.googlesource.com/20430
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: Ibac6398b5849820562830bb8ed95c3428496f7ef
Reviewed-on: https://pdfium-review.googlesource.com/20410
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
To avoid confusing UnownedPtr.
BUG=chromium:791616
Change-Id: Ieb637f726049eee7c640b6de3b6ecd848ab40384
Reviewed-on: https://pdfium-review.googlesource.com/20391
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Use floating point math and saturated_cast to calculate the transform.
Refactor CFX_BilinearMatrix::Transform() to share common code, instead
of using integer math and CheckedNumerics.
BUG=chromium:791048
Change-Id: Ib3812b3b3b9373a8eb3b1dde12cb28d424e0bb3e
Reviewed-on: https://pdfium-review.googlesource.com/20390
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Also add a comment about the various CFX_FloatRect to FX_RECT conversion
methods.
Change-Id: Ia9984797dc513cdc487fe9972b32c216c9f99ec1
Reviewed-on: https://pdfium-review.googlesource.com/20217
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
Change-Id: I14e614dbd0b7c1187b686bf574d14b94f04a3e7e
Reviewed-on: https://pdfium-review.googlesource.com/20271
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Also fix lint errors.
Change-Id: Iaf5fb440fd43d5c36b00630e16d700827c09fc7f
Reviewed-on: https://pdfium-review.googlesource.com/20270
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: Ib3aa0b6ce2fa7b2a643068cb9ffcaca9fe18d3de
Reviewed-on: https://pdfium-review.googlesource.com/20258
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I47c0ae6dbdf339ab7ade36b141c220b8a3fb2274
Reviewed-on: https://pdfium-review.googlesource.com/20257
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This CL removes the SetResultCreateNode method and inlines into the one
caller. The XFA_RESOLVENODE_RSTYPE enum is also renamed
XFA_ResolveNode_RSType to make it easier to find XFA_RESOLVENODE_RS
objects.
Change-Id: I937b612be062c5b7b05fd8d2822cd12cb882ba06
Reviewed-on: https://pdfium-review.googlesource.com/20370
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: Ia38329bf5622c0ae6f5c4173332d2140de08c567
Reviewed-on: https://pdfium-review.googlesource.com/20256
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This CL removes the CXFA_ValueArray. Some of the code in
XFA_RESOLVENODE_RS is duplicated, but the duplication makes the code
clearer.
Change-Id: I7495bb8c614a3d8919bfca858866932774f13fd8
Reviewed-on: https://pdfium-review.googlesource.com/20350
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
The return value of ResolveObjects is always used as a boolean, so
change from int32_t. The XFA_RESOLVENODE_RS object was made a pointer
from a ref.
Change-Id: I030036c01101680e36f4ddf524b468354a2e6850
Reviewed-on: https://pdfium-review.googlesource.com/20331
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: Ibb7411a7c90f723a19fd5d41552988bc8943e4ea
Reviewed-on: https://pdfium-review.googlesource.com/20330
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I5d3a01310bd5fcddbb8c39025b07a2e83ddae84f
Reviewed-on: https://pdfium-review.googlesource.com/20255
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: Ibd9ca20e902bbd2b62af12d25836497413912b1b
Reviewed-on: https://pdfium-review.googlesource.com/20254
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Use it in type 3 font code.
Change-Id: I8b0eb462cc0308f1700d21a62efc929babae8e20
Reviewed-on: https://pdfium-review.googlesource.com/20215
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
This CL makes CFXJSE_Engine methods private where possible and shuffles
static methods to the top of the declarations.
Change-Id: Ife84ce30d00e126bcbc5cb86d1a189eec2c7cb1c
Reviewed-on: https://pdfium-review.googlesource.com/20310
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I4f221d5d6c17e8507f87d9c63b87431cc2b8f45e
Reviewed-on: https://pdfium-review.googlesource.com/20253
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This CL moves some XFA code around to better match the files in which it
is either used or defined.
Change-Id: Iec3df187326e48189a048355a8bef76cccb4cdb4
Reviewed-on: https://pdfium-review.googlesource.com/20250
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Change-Id: I182388970e422bd31d011628a4f1b905d12b0da0
Reviewed-on: https://pdfium-review.googlesource.com/20193
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
We don't add anything to the tracker lists so we can remove the tracker.
The only thing the Initialize and Finialize methods are doing now is to
trigger a v8::V8::Dispose which should happen automatically at exit
anyway.
Change-Id: I1f783ae5a1df3df63fb067ab30310791b6c44929
Reviewed-on: https://pdfium-review.googlesource.com/20192
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: Ib922184ee844e66a0b29f49025e83e13eb81fdb8
Reviewed-on: https://pdfium-review.googlesource.com/20214
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Change-Id: Iea75ce6b3a7e06b7977491a89e7a31755f038312
Reviewed-on: https://pdfium-review.googlesource.com/20191
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Change-Id: Iab7ff29c2ce9ed56715b5897e89da2d9d693583c
Reviewed-on: https://pdfium-review.googlesource.com/20252
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I556934f61f24883e684865e4a8fc5e0519248cee
Reviewed-on: https://pdfium-review.googlesource.com/20251
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Fix/cleanup ctors/dtors in related classes.
Change-Id: Ia05ec9b6892fd7d19d0a417fc1226a407e3ac260
Reviewed-on: https://pdfium-review.googlesource.com/20216
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Fix ownership issues, and simplify CXFA_SimpleParser ctors.
Change-Id: Ie083080297c5c2586ae3e6a8355839fcb86ee9ea
Reviewed-on: https://pdfium-review.googlesource.com/20130
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I3efc57cd7325d16e3ca8ebdeeaec06012b2c56e3
Reviewed-on: https://pdfium-review.googlesource.com/20110
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Bug: 790693
Change-Id: I9b1d87e024229d8b01f55ec554e2cc544db6ac06
Reviewed-on: https://pdfium-review.googlesource.com/20230
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
|
|
Unlike ToFxRect(), which floors the LBRT values. Also fix some nits.
Change-Id: I0680eebb09031807a14402ca30b13558ea5b56d9
Reviewed-on: https://pdfium-review.googlesource.com/20213
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
Unlike ScaleFromCenterPoint(), Scale() just scales the LBRT values.
Also add unit tests for CFX_FloatRect::Normalize().
Change-Id: Iebf48fa9adcf47adff3255b157d3e3056f3687fc
Reviewed-on: https://pdfium-review.googlesource.com/20212
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
Change-Id: I6baab14c989e8ae692ed1c846b135af95c09ce37
Reviewed-on: https://pdfium-review.googlesource.com/20210
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
Change-Id: I08706f53bf3960cbea60b09a1702bf0ba371f1ce
Reviewed-on: https://pdfium-review.googlesource.com/20211
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I32cc3cb0a8a987980b900a5650cc051cb50dd1cc
Reviewed-on: https://pdfium-review.googlesource.com/20190
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
This CL continues removing structs from CFX_CTTGSUBTable
Change-Id: I1ede1e3e736f87292b6119406fd5f12a0bb7e7cb
Reviewed-on: https://pdfium-review.googlesource.com/20170
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
|
|
Change-Id: Iec4e999d76dabc9b6cd00323881c5c87afc5f629
Reviewed-on: https://pdfium-review.googlesource.com/19930
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
This CL cleans up the XDP packet parsing code. This is followup from a
previous CL.
Change-Id: Ic4a855e67e1b22d0703e53e9a2a9b4923775b6ad
Reviewed-on: https://pdfium-review.googlesource.com/20090
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL changes the enum XFA_ATTRIBUTEENUM to an enum class
XFA_AttributeEnum. Methods expecting an int32 have been updated to take
or return the XFA_AttrbuteEnum type.
Change-Id: I268453949545fe2dd3eae707be4d9cc7edeff763
Reviewed-on: https://pdfium-review.googlesource.com/20070
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL moves the packet information into the anonymous namespace of the
simple parser. There is slight duplication in that two of the namespace
URIs have been copied into other files but this duplication allows for a
bunch of simplification.
Change-Id: I33092424ff4cb57eaf85da97a92fa6cf7b11f2ef
Reviewed-on: https://pdfium-review.googlesource.com/20050
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
This CL changes the various parsers to use XFA_PacketType instead of
XFA_XDPPACKET. This just leaves XFA_XDPPACKET for determining if a given
node can be created in a given packet.
Change-Id: I6fd23480c0c780a131d23b64b7c7e9d8684b0220
Reviewed-on: https://pdfium-review.googlesource.com/20013
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
When a CXFA_Node is created it's created as part of a specific packet.
Previously the code would accept an XFA_XDPPACKET which was stored
internally. This had the potential to allow a node to exist in multiple
packets.
This CL changes the XFA_XDPPacket to the XFA_PacketType enum class and
cleans up a lot of uses to use the more specific packet type.
Change-Id: I7fc8c843bfa6bd32295ae58a26bcec311e43c4b0
Reviewed-on: https://pdfium-review.googlesource.com/20012
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Remove GetPacketByID, move GetPacketByName to the xfa_utils file.
Cleanup CreateNode to accept the XFA_XDPPACKET instead of the packet
info.
Change-Id: I0f246c84f61b6b4175ca307bdcd125d9bc24bb1e
Reviewed-on: https://pdfium-review.googlesource.com/20010
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
The current implementation of text extraction was difficult to
understand, duplicated logic that existed in other methods, and wasn't
clear about the units the inputs were in. It also didn't handle
control characters correctly.
The new implementation leans on the methods for converting indices
between the text buffer index and character list index spaces to avoid
duplication of code. It also makes it clear to the reader that inputs
are in the character list index space. Finally, it fixes issues being
seen in Chrome with respect of ranges being slightly off.
This CL also adds a test for extracting text that has control
characters.
BUG=pdfium:942,chromium:654578
Change-Id: Id9d1f360c2d7492c7b5a48d6c9ae29f530892742
Reviewed-on: https://pdfium-review.googlesource.com/20014
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
This CL removes XFA_GetAttributeEnumByName and moves the functionality
into CXFA_Node::NameToAttriuteEnum.
Change-Id: Id1484103c62bf7728d5406c22fb9d83fc0e032e1
Reviewed-on: https://pdfium-review.googlesource.com/19791
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This removes the need for the casting as we know the type in the caller.
Change-Id: I9fe30d9f8e6110356549c283980e2f4f37f43d02
Reviewed-on: https://pdfium-review.googlesource.com/19870
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
This is more consistent with the attribute and element to name methods.
Change-Id: I3a7f9246d6fbaffa27a0068d8f93e717f5801d2a
Reviewed-on: https://pdfium-review.googlesource.com/19851
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|