Age | Commit message (Collapse) | Author |
|
This CL moves the two accessor functions from being in an anonymous
namespace to being public and makes the member itself private.
Change-Id: Idd5dd1e6cc617d0be0fdd57ceace2dbc684a8b00
Reviewed-on: https://pdfium-review.googlesource.com/29856
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
This CL removes the unused CXFA_Document param from various anonymous
namespace methods in CXFA_Document.
Change-Id: Ic10b4d2830936091da4db0919b33c16875cbd427
Reviewed-on: https://pdfium-review.googlesource.com/29853
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL moves the CXFA_Document methods from xfa_document_datamerger_imp
into the cxfa_document.cpp file.
Change-Id: Idcb0696d2488bff5a4882675b3b876e0ec9e38bb
Reviewed-on: https://pdfium-review.googlesource.com/29851
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
The existing code for spellchecking is non-functional and we are not
planning on fixing/finishing it, so removing it, since it currently is
marking everything as misspelt.
BUG=pdfium:1054
Change-Id: I23aaa13c09aed483376d7d06f47fdf31d890786b
Reviewed-on: https://pdfium-review.googlesource.com/29790
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
Change-Id: I803f7816e2b2fecc5737a3ed26ff156bbff0ae2f
Reviewed-on: https://pdfium-review.googlesource.com/29770
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Currently rect invalidations in XFA are only sent to the embedder
only when RunInvalidate() is executed.
For things which redraw on a timer, such as the caret, there was
no user event to call RunInvalidate() so the page would not redraw.
This CL changes the XFA code to send the invalidations to the
embedder immediately and expects the embedder to combine the
invalidations to limit overdraw.
Bug: chromium:828561
Change-Id: I298052fd7d0c373b029eec191cc6c74c63978348
Reviewed-on: https://pdfium-review.googlesource.com/29670
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This Cl updates CFWL_Edit to keep the cursor from extending pass the end
of the text. If we set the cursor past the end it will trigger the
ASSERT in the text edit engine as the edit engine assumes the caller
does the right thing.
Bug: pdfium:1023
Change-Id: Idfed4b240c13d666a686d0e09b78bcc9a1406794
Reviewed-on: https://pdfium-review.googlesource.com/29650
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
This might make the memory tools more effective in finding OOBs.
Change-Id: Id093bb0a88c37954c80d612ac00b5a168e75bdbf
Reviewed-on: https://pdfium-review.googlesource.com/29550
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
This CL decreases the kMaxPostExpressions to 256. This is the number of
accessors you can attach to a single statement (e.g. foo.#A.#A.#A).
Having a very large number can cause stack overflows. The accessor does
not seem like it would expect hundreds of entries on a single element.
Bug: chromium:820688
Change-Id: I19966b43c96f5d1d02a79af127a0c96609420811
Reviewed-on: https://pdfium-review.googlesource.com/29330
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
For the cases where we always initialize the font managers, do it in the
constructor instead of as a secondary call.
Change-Id: Ic59b331d1eb357878cd5786b187b5b79bace4498
Reviewed-on: https://pdfium-review.googlesource.com/29291
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Unused, removed.
Change-Id: I0c7e65224777932e38ca93d81709c8321aecb1c5
Reviewed-on: https://pdfium-review.googlesource.com/29290
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I9bf8d55d7d3624210cd54bc93db2c3671bec3a8f
Reviewed-on: https://pdfium-review.googlesource.com/29270
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL removes proxy methods from CXFA_FFNotify and calls them
directly.
Change-Id: I1fecc625e0b81b659baeffc9ca567c5c20e12c23
Reviewed-on: https://pdfium-review.googlesource.com/29252
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
Change-Id: I2f7f152f229371704e1a9a5496908059a6e11c0e
Reviewed-on: https://pdfium-review.googlesource.com/29251
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
This CL cleans up code for the CXFA_LocaleMgr class.
Change-Id: I4a3c9394be021d6605dadd8003c7619b19bb9fc0
Reviewed-on: https://pdfium-review.googlesource.com/29250
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Mark the other ArgbEncode() variant as constexpr.
Change-Id: I84207d805766e5efc669638bd8a15cfead356a41
Reviewed-on: https://pdfium-review.googlesource.com/28577
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Since that is what it really returns. Add a replacement ArgbToColorRef()
that only returns a FX_COLORREF, and remove a duplicate implementation.
Then update callers and only use ArgbToAlphaAndColorRef() where
appropriate.
Also update comments to explain what FX_COLORREF is.
Change-Id: I5ed3d71683898dc2b3a66395dea0ec2562c14a68
Reviewed-on: https://pdfium-review.googlesource.com/28575
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
FX_COLORREF should work like win32 COLORREF, which is BGR.
Change-Id: I9f8bb3e2d30a64dc822ac6b8c46130358a03678a
Reviewed-on: https://pdfium-review.googlesource.com/28574
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
This replaces it with FXSYS_iswspace, which uses ICU to perform
correct Unicode space checking.
BUG=pdfium:1035
Change-Id: I7a4ed01a6b50f56a6f9d1434a7f0b01596fe42db
Reviewed-on: https://pdfium-review.googlesource.com/28510
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
Instances are either replaced with FXSYS_iswalpha, which calls out to
the ICU library to do the proper Unicode operations, or have been
converted to a isascii && isalpha pair, if ASCII alpha is actually
what was wanted.
BUG=pdfium:1035
Change-Id: I971ff639ee1ff818ad08793a1900a8bcbb0a3e04
Reviewed-on: https://pdfium-review.googlesource.com/28450
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
A number of our character helper methods take in wide character types,
but only do tests/operations on the ASCII range of characters. As a
very quick first pass I am renaming all of the foot-gun methods to
explictly call out this behaviour, while I do a bigger
cleanup/refactor.
BUG=pdfium:1035
Change-Id: Ia035dfa1cb6812fa6d45155c4565475032c4c165
Reviewed-on: https://pdfium-review.googlesource.com/28330
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This fixes a crash that happens after interacting with the scrollbar
a few times.
Bug: chromium:820210
Change-Id: I458337f21c9322351474a1574ab596c600dcbbbf
Reviewed-on: https://pdfium-review.googlesource.com/28290
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I27118d2c8d0d7e4509b6a89cd32a7c9c906d19bc
Reviewed-on: https://pdfium-review.googlesource.com/28270
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
When building the formcalc parser trees we need to limit on width along
with depth. It's possible to generate a tree of a single depth but is
more then 20k nodes wide. This will eventuall cause stack overflow
issues.
This CL re-uses the depth check for the grammar expressions in which
we're extending the width of the tree we count that against our depth
check.
Bug: chromium:813346
Change-Id: I01f6567a75776a75374465eacc1ff546db46cac1
Reviewed-on: https://pdfium-review.googlesource.com/28170
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This Cl adds checking for the conditionals of if and elseif expressions.
If the conditional fails to parse we should return nullptr. This already
happens by accident in the if() case, but with elseif() conditions we'll
fail the ASSERT in the CXFA_FMIfExpression constructor and crash.
This CL explicitly checks for the expressions and early exists if they
failed to parse.
Bug: chromium:819509
Change-Id: I9a90182c7709c8c4c0d3ae17d6be67cb668c0c6a
Reviewed-on: https://pdfium-review.googlesource.com/28131
Commit-Queue: dsinclair <dsinclair@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Most of the CPU time when moving around XFA forms is spent rendering
these gradients.
Bug: chromium:592748
Change-Id: I08c68c60996755a2be25243dfd2143b6cbb13af9
Reviewed-on: https://pdfium-review.googlesource.com/28090
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This CL renames IFX classes in core/fxge to Iface.
Change-Id: I137167ddd4ff1563d8002d9501222c27183408cc
Reviewed-on: https://pdfium-review.googlesource.com/27990
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL renames the 3 IFX files in core/fxcrt to Iface instead.
Change-Id: I7cee6836650b71bc5c5729a8147fda62f0910fe3
Reviewed-on: https://pdfium-review.googlesource.com/27970
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL removes the checks for empty declaration bodies.
Change-Id: I06a8f602f49d7709bce86442cae2d38991fa5d82
Reviewed-on: https://pdfium-review.googlesource.com/27950
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL refactors the signature parsing for formcalc functions.
Change-Id: I69634968ab1cbd9698a3ce3ae321e14bafe918c6
Reviewed-on: https://pdfium-review.googlesource.com/27930
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
This CL cleans up the setting of m_error. In most cases we don't need to
set m_error it will be set when we bubble up the nullptr return from the
various parse methods.
The m_error was set inconsitently previously and was confusing on if it
needed to be set or not.
Change-Id: I8648b6296ef15239bd2663e6543a960b88177721
Reviewed-on: https://pdfium-review.googlesource.com/27910
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: Icd76a6a98a66c977e45ed82663b68f6b05479e76
Reviewed-on: https://pdfium-review.googlesource.com/27891
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
Bug: chromium:809612
Change-Id: I171d836927fc707388444726d3918b2cbbb39002
Reviewed-on: https://pdfium-review.googlesource.com/27890
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
|
|
This removes the need for them to have their own runner. Due to other
upstream changes some of the expectation files needed to be
updated. The suppressions have been updated to make sure the tests do
not run for non-XFA builds.
Having these tests run on the bots surfaced an MSAN issue in the XFA
code, which is fixed in this CL.
BUG=pdfium:1020,pdfium:1008
Change-Id: I44e2fa1cba2d07f30f56f5792749acbe1ebf4b62
Reviewed-on: https://pdfium-review.googlesource.com/27710
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
Change-Id: Ic1260417e7d1475dd518655b2ab08f0184955d88
Reviewed-on: https://pdfium-review.googlesource.com/27170
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
These are generally cheap enough to compute as needed, rather than
keeping around in memory all the time (plus the memory for the static
flag the compiler generates to check if initialized).
Change-Id: If3a5365521f6a7781e66fb11f04883a5c673ee11
Reviewed-on: https://pdfium-review.googlesource.com/27150
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Get things out of the .data section.
Change-Id: I375cf00186a3d5d8d10f5d147bd4b692f5db3683
Reviewed-on: https://pdfium-review.googlesource.com/27130
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This CL creates a CXFA_FMAST root for the AST tree instead of
overloading the CXFA_FMFunctionDefinition. This Removes the m_global
from FunctionDefinition and simpifies the code.
Change-Id: I9347769a291ef1753539701f334cc8dd69b7187e
Reviewed-on: https://pdfium-review.googlesource.com/27590
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Change-Id: I5b81a483c57b97598a0d36ceaebc382016e95ae3
Reviewed-on: https://pdfium-review.googlesource.com/27591
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL simplifies the if expression parsing. The elseif construct has
been split into its own list of IfExpressions and no longer gets
stuffed into the elseExpression. A loop was added into the output methods
for the elseif expressions, which also means we can go from having:
if () {
} else {
if () {
} else {
}
}
to
if () {
} else if () {
} else {
}
Which is a bit nicer.
Change-Id: I6edf75215500d6a32a8d7218d477b6960f03de51
Reviewed-on: https://pdfium-review.googlesource.com/27571
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This extends the test case for slightly more coverage.
Change-Id: I97613c2d8df416b37718ff747d218dd61ea02b37
Reviewed-on: https://pdfium-review.googlesource.com/27570
Commit-Queue: dsinclair <dsinclair@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
This CL makes minor clarity cleanups to the formcalc parser and attempts
to record the productions each method is processing.
Change-Id: Ie12bb55647abf06251d1734fd05d08a964a32ebc
Reviewed-on: https://pdfium-review.googlesource.com/27550
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL switches the empty destructors in the FormCalc expressions to
use default.
Change-Id: I0a2ea520c89a96d29a2e2564572a7cf345f9f31a
Reviewed-on: https://pdfium-review.googlesource.com/27510
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
In all the places we call ParseBlockExpression we really mean to parse
an ExpressionList. Using ParseBlockExpression is confusing because the
formcalc grammar has a BlockExpression defined which corresponds to our
ParseDoExpression.
This CL converts the use of ParseBlockExpression into calls to
ParseExpressionList and then builds the BlockExpression class as needed.
Change-Id: Iab9b6e783f01d35df905539d4dbc20ba18a7b0f9
Reviewed-on: https://pdfium-review.googlesource.com/27470
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
The expression type is no longer used, removed.
Change-Id: I4c8b17ed1644560afd7fc87a7fb6c7d893b9de5c
Reviewed-on: https://pdfium-review.googlesource.com/27450
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL combines the elseif and else output code for formcalc. This
causes an extra set of {}'s to be output in the else case but should be
syntactically the same.
Change-Id: Ie30a51efadae2034d117f4bf280b9f7abc950a23
Reviewed-on: https://pdfium-review.googlesource.com/27431
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
The if token in formcalc is an internal keyword and can not be used as
an identifier. The current if parsing code will turn if into an
identifier if it fails to find the 'then' statement after the argument
list.
This should be a failed parse instead of coverting if to an identifier
and resetting the lexer.
Change-Id: Ieebf6a1aabc27482fcaeaf7a9bd4be40fc01e9ad
Reviewed-on: https://pdfium-review.googlesource.com/27430
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
The recorded line number from the formcalc parse is never used. This Cl
removes the parameter and removes the need to pass it through all of the
constructors.
Change-Id: Ice716cc4880dd17dc05bffcdce1dc1e4745108ea
Reviewed-on: https://pdfium-review.googlesource.com/27412
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This Cl moves the code to create literals in the AST from
ParsePrimaryExpression to ParseLiteral.
Change-Id: I41ba20f28f1cb1d76d753c5baec790872acdf1da
Reviewed-on: https://pdfium-review.googlesource.com/27411
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Change-Id: I11ede1eb4f984b516275f03798996e6fc34880dc
Reviewed-on: https://pdfium-review.googlesource.com/27410
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|