Age | Commit message (Collapse) | Author |
|
This CL moves the methods and members related to the UI nodes from the
CXFA_WidgetAcc class to the CXFA_Node class.
Change-Id: I1fdc5173787141065f1e607bbfefa3b22af738b4
Reviewed-on: https://pdfium-review.googlesource.com/23290
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL updates CXFA_Object to have a flag which annotates if the node
is ready. Ready means that we've gone through the OnNodeReady call in
CXFA_FFNotify. Previously we'd check if the WidgetAcc exists on the node
which is created in OnNodeReady.
This CL replaces all the points where we check for a WidgetAcc existing
with a IsWidgetReady() call.
Change-Id: I54e8160269c3104cdae7a516c1814c13bee15130
Reviewed-on: https://pdfium-review.googlesource.com/23190
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
The non-Maybe versions will soon be deprecated.
Where the code was already handling failures, I did the same; where the
code was not handling failures, I inserted ToLocalChecked() calls. Thus
the behavior before and after this patch should be the same.
For consistency, also updated the use of v8::Function::Call
in CFXJSE_Context::ExecuteScript() to the Maybe version, so
that all code in that function now branches on the non-emptyness
of MaybeLocals, rather than TryCatch::HasCaught(). ASSERTs were
inserted to sanity-check the API usage.
Bug: v8:7269, v8:7273, v8:7274
Change-Id: I59696e63a64a233a9f9c2b72c621a05b5e349a31
Reviewed-on: https://pdfium-review.googlesource.com/23270
Commit-Queue: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
|
|
Bug: pdfium:987
Change-Id: Ieee2850ceec12d6fff3ba6e0fb5a775e62c5c76e
Reviewed-on: https://pdfium-review.googlesource.com/23230
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Nicolás Peña Moreno <npm@chromium.org>
|
|
The guard being removed was moved lower down in the code, but it
appears the original creeped back in while I was rebasing at some
point. This is causing clusterfuzz failures.
BUG=chromium:803732,chromium:803735
Change-Id: I5bcc6046e64d6060a674f390e243dd8eda9d1d17
Reviewed-on: https://pdfium-review.googlesource.com/23250
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
The translations were in the opposite order they should be.
First the specified (x, y) coord needs to be translated to the
origin, then rotation should be applied, then the translation should
be reversed. To translate (x, y) to the origin, the initial
translation should be Tx = -x, Ty = -y.
Bug: pdfium:987
Change-Id: I7f873c6a20858bf7fd03e5fdb49020b196b44a1d
Reviewed-on: https://pdfium-review.googlesource.com/23210
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Nicolás Peña Moreno <npm@chromium.org>
Reviewed-by: Shirleen Lou <xlou@chromium.org>
|
|
WriteColorResult(), which calls NeedAlpha(), runs on a per-pixel basis
in CFX_ImageTransformer. NeedAlpha() repeats some conditional
calculations. Remove that for a slight speed-up.
Change-Id: I0bb3f92001b9ccdb65c4d59c9f832fe9edfa71f4
Reviewed-on: https://pdfium-review.googlesource.com/23175
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
This completes jumbo build support for non-XFA builds.
BUG=pdfium:964
Change-Id: Ife4ed23f9b438623581a863685014e64a06cf0d8
Reviewed-on: https://pdfium-review.googlesource.com/22775
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This CL removes the free XFA_IsCreateWidget method and moves the
functionality into CXFA_Object::HasCreatedUIWidget to clarify the
purpose.
Change-Id: Icca1f49238040b5d87fbb4eb33340f9309f5e2f3
Reviewed-on: https://pdfium-review.googlesource.com/23133
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
BUG=chromium:802983
Change-Id: I866ece9c370bf05571b76b50ad23598f5038332b
Reviewed-on: https://pdfium-review.googlesource.com/23151
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: Ifabaf71bb45ffa7e9af7da4acb21d8757e9596ce
Reviewed-on: https://pdfium-review.googlesource.com/23150
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: I0a07dbc9850bef2184ed35ff04b08385fc1bdd17
Reviewed-on: https://pdfium-review.googlesource.com/22891
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Refactoring the big image format switch in ContinueDecode to call
separate methods for each image format, instead of having one giant
switch block. This should have no functional changes.
BUG=pdfium:976
Change-Id: Ide4892526ee823023c233f0e43b1c98ac8bd1477
Reviewed-on: https://pdfium-review.googlesource.com/23134
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
Refactoring the big image format switch in StartDecode to call
separate methods for each image format, instead of having one giant
switch block. This should have no functional changes.
BUG=pdfium:976
Change-Id: I4e609ecaec0c5d0e173957c0795555b37c38f9a2
Reviewed-on: https://pdfium-review.googlesource.com/23131
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Refactoring the big image format switch in DetectImageType to call
separate methods for each image format, instead of having one giant
switch block. This should have no functional changes.
BUG=pdfium:976
Change-Id: I52cc83879da20b33d471420016f6b1eb53993f0b
Reviewed-on: https://pdfium-review.googlesource.com/23130
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
The WidgetAcc of a node will return the node from GetNode. So, calling
GetNode()->GetWidgetAcc()->GetNode() will return the same thing as
GetNode().
Change-Id: I82bffb191fd539a6f9b1e4a72e8ffcba1bdc1cc9
Reviewed-on: https://pdfium-review.googlesource.com/23132
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
By catching this early we are now actually returning the wrong
value. The bad value should be passed into the jpeg library code,
which will cause a fatal error and jump out to the common error
handling code for this method.
BUG=pdfium:986
Change-Id: Ib3d32939aa38aece887c014c3a477407ee178193
Reviewed-on: https://pdfium-review.googlesource.com/23119
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This moves the setjmps needed for handling fatal errors in the jpeg
library up a level to be in line with how other instances of this are
being modified. This additionally reduces the number of times that
setjmp needs to be called and documents why it is occurring.
This covers the Start and ReadScanLine methods. It also adds in
setting the error member, which had been missed in previous CLs.
BUG=pdfium:986
Change-Id: I7db87288ffe0ee8b29899d97035c30ad812da76a
Reviewed-on: https://pdfium-review.googlesource.com/23117
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
This move the setjmp needed for handling fatal errors in the jpeg
library up a level to be in line with how other instances of this are
being modified. This additionally reduces the number of times that
setjmp needs to be called and documents why it is occuring.
BUG=pdfium:986
Change-Id: Ia57821e1ce65aae811618effb3f2fa6256e1ab8c
Reviewed-on: https://pdfium-review.googlesource.com/23115
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
The non-Isolate version will soon be deprecated.
Bug: v8:7269, v8:7282
Change-Id: I204e45bd73f5b809d6c44b77bbcf62d32e7ccbec
Reviewed-on: https://pdfium-review.googlesource.com/23058
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Commit-Queue: Jochen Eisinger <jochen@chromium.org>
|
|
Including cjx_node.h pulls in v8 headers for many XFA files.
Change-Id: I80a32d0a56b8de5787db5275db48c568da6d0144
Reviewed-on: https://pdfium-review.googlesource.com/22890
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This functional part of this CL is mostly a revert of
"Change behaviour of FPDF_RenderPageBitmapWithMatrix"
24b0733a72bbc4013bff8628f198b0aea807aa06
Besides the revert, the parameters passed to
pPage->GetDisplayMatrix() are changed to fix a bug with the previous
implementation: the page was scaled to fit inside the clipping_rect,
instead of clipped.
Bug: pdfium:849
Change-Id: I95d0a303a979c998026a3bd6963c8684a1209f03
Reviewed-on: https://pdfium-review.googlesource.com/22931
Reviewed-by: Nicolás Peña Moreno <npm@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
This CL moves XFA_StrokeTypeSetLineDash into the CXFA_Stroke class and
cleans up the unused CXFA_Graphics code for setting line dash values.
Change-Id: If6db6c315571dbcea630bc32e0d05dae6c0f10be
Reviewed-on: https://pdfium-review.googlesource.com/23114
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Shuffle some code around, make things a little cleaner.
Change-Id: I4cbdf4fc7e7d0a372cdc5cb63b45ca196a037543
Reviewed-on: https://pdfium-review.googlesource.com/23113
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL renames the CXFA_Box arc methods to make it clear they aren't
just for handling arcs.
Change-Id: Id2fa16c572f9529d6a13a921d59c2dcbf8a50b7a
Reviewed-on: https://pdfium-review.googlesource.com/23112
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL moves the code related to getting the fill path for rectangles
to the CXFA_Rectangle class.
Change-Id: I83c43c259d2decadaeb99d1f081f3972ddf8294e
Reviewed-on: https://pdfium-review.googlesource.com/23111
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL moves code related to drawing rectangles to the CXFA_Rectangle
class. This also turns CXFA_Border into a CXFA_Rectangle to share the
drawing code.
Change-Id: I91e2e73b33ecbcda477cf953cf7609310a01fcd4
Reviewed-on: https://pdfium-review.googlesource.com/23110
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
The current implementation treats both returning false and longjmp'ing
out of jpeg_start_decompress as indicating that the decompression has
paused and needs more data. This is incorrect, in reality only the
false return value indicates this. The longjmp path indicates a fatal
error in the processing of the jpeg. The default implementation
actually calls exit() in this case, and the documentation explicitly
calls out that in this case recovery isn't possible and the decode
process will have to start from scratch.
This resolves a situation where the progressive decoder would get a
malformed jpeg and keep on grabbing blocks from it and try to start
decoding it. This would eventually fail when it ran out of data to
read, but would cause a large memory leak and a crash on the MSAN
fuzzers.
BUG=pdfium:986,chromium:798665
Change-Id: Ifd2ed7a2dc46fa20bab34e9c461a8d4c4718c4d7
Reviewed-on: https://pdfium-review.googlesource.com/23072
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
Bug: pdfium:981
Change-Id: I87d750cd8de079dfc61923fee58af42518f5b6d1
Reviewed-on: https://pdfium-review.googlesource.com/23090
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
This CL moves the code related to drawing fills and the various types of
fill to the specific fill classes.
Change-Id: Ie151089b00ca96c5fa88d22ab5f697d9425297cd
Reviewed-on: https://pdfium-review.googlesource.com/23071
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL moves the code related to drawing boxes from CXFA_FFWidget to
CXFA_Box.
Change-Id: Ie69c59bb0b1eda1fcedbc26c6f8f30d53e2e268c
Reviewed-on: https://pdfium-review.googlesource.com/23070
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
The flags are always set to the same value. This CL removes them and
inlines the value as needed.
Change-Id: I379a053aee31829229d83291d666904564b99aea
Reviewed-on: https://pdfium-review.googlesource.com/23057
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
The transparency flag was always false, this CL removes the flag and any
code as needed.
Change-Id: Ia4aecd7919b17c446c1b59361042e6a7444064af
Reviewed-on: https://pdfium-review.googlesource.com/23056
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
The m_BlendType flag was never changed from the default. Removed.
Change-Id: I0b347369339babf273c43861715d67f2f6bbfb17
Reviewed-on: https://pdfium-review.googlesource.com/23055
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Remove the m_bPrint value from CXFA_ImageRenderer which is always false.
Change-Id: Id4b1ea3328d1a7627526a503a8cd94a31e3c6091
Reviewed-on: https://pdfium-review.googlesource.com/23054
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
The m_Result value is set but never used. Remove.
Change-Id: Iba9e9a27b5d08072e2f810e0c6f574cb6880c87b
Reviewed-on: https://pdfium-review.googlesource.com/23053
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL removes the fill ARGB value from CFX_ImageRenderer which is
always set to 0.
Change-Id: I445abd6268c14f05184988177b2fa6b80f50d41d
Reviewed-on: https://pdfium-review.googlesource.com/23052
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
The bitmap alpha value is always set to 255, this CL removes the
parameter and passes 255 directly where needed.
Change-Id: I435fbdd00121cae4dda0e2a790b339993f5e8a07
Reviewed-on: https://pdfium-review.googlesource.com/23051
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL moves the code to initialize the variables into the constructor
and changes the Start command into the StartDIB command.
Change-Id: Iba3c1dcd9a872b4e2a1eadf87050f39c73b8e704
Reviewed-on: https://pdfium-review.googlesource.com/23050
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I46eb5789b303040f4e62d39882f32537f637e01a
Reviewed-on: https://pdfium-review.googlesource.com/22970
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
- Move enums/structs other than CFDE_TextOut to a separate header.
- Move CFDE_TTOLine into CFDE_TextOut.
Change-Id: I63196ebe6c02bc88d1c20ecb625505013edbfa26
Reviewed-on: https://pdfium-review.googlesource.com/22930
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
This CL Splits CL_ImageRenderer out of CXFA_FFWidget and moves to a
separate file. Methods in CXFA_FFWidget are shuffled around to put the
global methods at the top of the file and static methods in the
anonymous namespace.
Change-Id: I9887a5c9bf9fda63deead7ff785dc4ef3d7e15c8
Reviewed-on: https://pdfium-review.googlesource.com/23031
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL moves the code to draw the stroke path to the stroke class.
Change-Id: I76ae96e15a166d8bae19618c762d5ad923ed8d8a
Reviewed-on: https://pdfium-review.googlesource.com/23030
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
It is never used.
Change-Id: I46c8202cb9e449317fdc1889ff9a610d5ea15d92
Reviewed-on: https://pdfium-review.googlesource.com/22910
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
The CXFA_FFWidget::DrawBorderWithFlags method only takes one flag to
force rounded drawing. This CL renames the int32_t flags to a simple
bool to make the usage clear.
Change-Id: I4fb552dc77ce76e35225b15d15f2edbb7f5dcf01
Reviewed-on: https://pdfium-review.googlesource.com/23010
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This is a util method to output the png to a file for visually
validating the result of an embedder test. Once validated, the
md5 can be considered correct.
Bug: pdfium:981
Change-Id: I544dfbf2e85295e6ca2cdf48d1bc3f0bd5f415e9
Reviewed-on: https://pdfium-review.googlesource.com/22990
Reviewed-by: Nicolás Peña Moreno <npm@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
This API returns the intersection of the media box and the crop box
of a page.
Bug: pdfium:973
Change-Id: I57a19ee526ea6d4cd621e1ad6019e51f69f92308
Reviewed-on: https://pdfium-review.googlesource.com/22810
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This adds to form field types specific types for XFA form fields to be
used instead of the generic XFA value when possible.
BUG=pdfium:952,chromium:763129,chromium:592758
Change-Id: I8d1cff6a280d71db348b7c31a251cbe2e398ec79
Reviewed-on: https://pdfium-review.googlesource.com/22677
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
Because system pagesize is 4K on general system, such as x86 etc.
But Loongson have 16K system pagesize and unable to print pages
with use print preview.
Therefore, the relevant pagesize places needs to be changed.
Also refer to:
https://chromium.googlesource.com/chromium/src/+/0752dbc988222d7edef2ef7c4e19555089c35fdf
Bug: 801045
R= palmer@chromium.org
Change-Id: Icc5ceae7b8a66be0ced1abb448a80c23fa518f34
Reviewed-on: https://pdfium-review.googlesource.com/22735
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This CL marks the methods in CXFA_Value to make it clear which can
return nullptr and updates callsites as needed.
Change-Id: If1f794bcbbddaa57a1efdd67195df58a77b4373a
Reviewed-on: https://pdfium-review.googlesource.com/22773
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|