Age | Commit message (Collapse) | Author |
|
Fix some nits in CXFA_FFField as well.
Change-Id: I6d0d4569322a01192cdd4bf9d98325ff86642abe
Reviewed-on: https://pdfium-review.googlesource.com/40651
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
The root cause is an extremely large reserve count. Limit it to the size
of the widget.
BUG=chromium:875282
Change-Id: Ia3bbb07503ce349adc2662731d22317bda7df4ef
Reviewed-on: https://pdfium-review.googlesource.com/40652
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
|
Change-Id: Ide4a972337afaf346e46edc4ede48140cd4544c1
Reviewed-on: https://pdfium-review.googlesource.com/40390
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
Instead, move the methods to the subclass where they belong.
Fix IWYU in CJX_Object.h to fix compilation.
Change-Id: I4c71f28235b9cf5000e9ddaf33d6602baf22205f
Reviewed-on: https://pdfium-review.googlesource.com/39170
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
|
UI elements in XFA can have two different <picture> clauses with
different meanings. One is a formatting statement that dictates the
format the underlying data should appear in. The other <picture>
occurs within an <validate> block and specificies what format the
underlying should be. If it doesn't fit this <picture> the <validate>
block indicates what should occur.
In the existing code actually running the second <picture> type was
being conditionally guarded on whether of not the formatting of the
first type succeeded. This CL moves the calls related to data changing
earlier, to before the formatting and UI updating occurs.
BUG=pdfium:1065
Change-Id: Ib525c490074187c3272f4263ab451bf347b74f9c
Reviewed-on: https://pdfium-review.googlesource.com/37250
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
It is only called during the destructor, and does things that
the destructor would automatically do, like calling into the
superclass. So just use destructors.
Change-Id: I1196817798eeca99914b44ddee1f75781e682211
Reviewed-on: https://pdfium-review.googlesource.com/36231
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
Define constant values in the public API for the valid values of alert
button type, alert icon type, and beep type. Replace various magic
numbers through out the code base using these values. Also replace the
XFA specific versions with an enum class that is guaranteed to have the
same values, instead of #defines that just happen to.
This CL does not attempt to add error checking on these values, since
it currently doesn't exist so adding it may cause regressions.
Change-Id: Ief3aee2a4ad419691c18fc1dba8b984ad222141b
Reviewed-on: https://pdfium-review.googlesource.com/35730
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
|
|
This fixes two partially interrelated bugs with font loading in XFA
documents. First, it adds falling back to the builtin fonts if there
are no viable embedded or installed font for the top-level XFA font
manager. Additionally it changes the load font code path in
CXFA_FWLTheme to use the top level XFA font manager, instead of the
one that just handles the system installed fonts.
The main visible issue that this patch fixes is that currently using
--font-dir with pdfium_test on a XFA PDF can cause text to not be
displayed in widgets and/or NOTREACHED asserts. This occurs if there
isn't a needed fonts embedded in the document or in the font
directory, since currently PDFium will not correctly fall back to the
builtins.
BUG=pdfium:1008,pdfium:1020
Change-Id: I451a8aede63d639e401c0cc076443e61d8b7a2f8
Reviewed-on: https://pdfium-review.googlesource.com/32730
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
Removed many null checks since XFA_RectWithoutMargin already checks
if the margin is null internally.
Change-Id: I21f5101fe38559eb02f4c3aaf081ff29ce293e47
Reviewed-on: https://pdfium-review.googlesource.com/31993
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
The first step, AcceptsFocusOnButtonDown(), returns whether the
widget wants focus on a mouse click.
The second step, On{L|R}ButtonDown(), handles the click after focus
has been assigned.
Bug: chromium:820256
Change-Id: I9da1f1a930f198fc17b24acb7f1e3e6ef7f12ae4
Reviewed-on: https://pdfium-review.googlesource.com/29951
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@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>
|
|
The SetFlag method has a signature of (flag, bool) which, looking at the
callsites makes you think it will set the flag to the boolean. This
isn't what happens, the flag is always set to true and the boolean
decides if we execute some notification code.
This CL splits SetFlag into SetFlag(flag) and SetFlagAndNotify(flag) to
make it a lot clearer what is happening.
Change-Id: I3e067c87532cce10b94bda10cc88feb62b948eb0
Reviewed-on: https://pdfium-review.googlesource.com/26750
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL converts the UIType to an XFA_FFWidgetType instead of reusing
the XFA_Element type. The creation code is cleaned up to make it clearer
what's happening.
Change-Id: I5d3e4967d5c8b8a50dbb25e574b0d31fe0cf407a
Reviewed-on: https://pdfium-review.googlesource.com/24390
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL removes the calls to CXFA_Node::GetWidgetAcc() as they
redundantly return the node they were called upon.
Change-Id: I46e66cf98137a1dee7cd3fa8bc7d379eb97fded5
Reviewed-on: https://pdfium-review.googlesource.com/23630
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL merges CXFA_WidgetAcc into CXFA_Node.
Change-Id: Iab52ca7f98c9dcd4ab089c61b8f1324a565bf647
Reviewed-on: https://pdfium-review.googlesource.com/23610
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL updates CXFA_FFDocView methods and members to use CXFA_Node
objects instead of CXFA_WidgetAcc objects.
Change-Id: Ic79af39ef49152a6d50ed5acfc153063db39353d
Reviewed-on: https://pdfium-review.googlesource.com/23590
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL changes CXFA_FFField::CalculateNode to use a CXFA_Node instead
of a CXFA_WidgetAcc.
Change-Id: I305e0d48f321df845ca2c1ff0f446d201ae7b3fb
Reviewed-on: https://pdfium-review.googlesource.com/23471
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL changes the CXFA_EventParam code to store a CXFA_Node instead of
a CXFA_WidgetAcc.
Change-Id: I21510674b0b6435ca9b87bfbf97914f54e5e3464
Reviewed-on: https://pdfium-review.googlesource.com/23451
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
This CL removes the unused WidgetAcc param from both methods and updates
callsites as needed. The include for cxfa_widgetacc.h was removed from
fxfa.h and had to be inserted in locations where needed.
Change-Id: I55ae9e935a948dff3b6d906b4567665e60530eba
Reviewed-on: https://pdfium-review.googlesource.com/23391
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
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 renames the CXFA_Caption methods to make it clearer they can
return nullptr.
Change-Id: I1b4945fcd2615f16a128709b7fe07e1236a5461a
Reviewed-on: https://pdfium-review.googlesource.com/22743
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL renames CXFA_Calculate::GetScript to make it clearer it can
return nullptr.
Change-Id: I1f5c19c16ea6cb1b3e7016ddac3f7f7fd6aa0320
Reviewed-on: https://pdfium-review.googlesource.com/22741
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL renames the methods in CXFA_Box to make it clearer they can
return nullptr.
Change-Id: I521c0e06af306f69e390a4057cabb7777a0d72f5
Reviewed-on: https://pdfium-review.googlesource.com/22740
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL makes it clearer that GetExclGroup can return nullptr.
Change-Id: Ica9bdfb05be36b3b6ede20f8b54daac1154506fd
Reviewed-on: https://pdfium-review.googlesource.com/22739
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL makes it explicit that GetCalculate can return nullptr.
Change-Id: I587e3bb442df3661f083f7058ff02a8d62478ed5
Reviewed-on: https://pdfium-review.googlesource.com/22681
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL makes it explicit that GetMargin may return a nullptr.
Change-Id: I46780e8df9e966accc38baf56f8aa5149533db87
Reviewed-on: https://pdfium-review.googlesource.com/22675
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
Fix spelling mistake.
Change-Id: I1322bf898d8bf558f4d1e8d9b3294cf31f916c87
Reviewed-on: https://pdfium-review.googlesource.com/22671
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL renames GetCaption to GetCaptionIfExists to make it clear the
value returned can be a nullptr. The various callsites have been fixed
which used the caption without validating.
Change-Id: I9b600ac9ab5b9e04dfa6e8cee95ef3e9d629688d
Reviewed-on: https://pdfium-review.googlesource.com/22670
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL moves the CXFA_WidgetAcc::Process* methods to CXFA_Node.
Change-Id: Ic01b62e3786a6666a698f8877a8b7b295714bf79
Reviewed-on: https://pdfium-review.googlesource.com/22472
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL changes the various CXFA_FF* widgets to hold a CXFA_Node instead
of a CXFA_WidgetAcc wrapper.
Change-Id: I7e31633d5ffd3b61abcdcdfeee7822514c5b28da
Reviewed-on: https://pdfium-review.googlesource.com/22410
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL moves methods from WidgetAcc which just proxy to CXFA_Node.
Change-Id: Icf1006b4be3f91077de411ed1a571b1507117602
Reviewed-on: https://pdfium-review.googlesource.com/22391
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL removes the CXFA_FFDocView parameter from CXFA_WidgetAcc and
passes in the document to the methods which require a document.
Change-Id: I7b264caf0ed89d0453ae0b74c27f2ee0f31f61af
Reviewed-on: https://pdfium-review.googlesource.com/22260
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL merges the CXFA_WidgetData class into the only subclass,
CXFA_WidgetAcc. Code has been updated as needed.
Change-Id: I3f5bc83b1422bcbe065276b16bfb91e656f5c174
Reviewed-on: https://pdfium-review.googlesource.com/22252
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL folds the CXFA_CaptionData wrapper class into CXFA_Caption.
Change-Id: I65302656a89985dec4d0ec1f42b5eaa95d22aae2
Reviewed-on: https://pdfium-review.googlesource.com/22150
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL renames CXFA_BoxData to CXFA_Box and sets it to inhert from
CXFA_Node instead of CXFA_DataData. The CXFA_BoxData subclasses,
CXFA_RectangleData, CXFA_BorderData and CXFA_ArcData classes are removed
and the nodes now inherit from CXFA_Box.
Change-Id: Ia0df7d56535b5d90be29f040180a5d5fc55a64e0
Reviewed-on: https://pdfium-review.googlesource.com/22091
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL removes the CXFA_MarginData wrapper and moves the methods
directly to CXFA_Margin.
Change-Id: I7c9e979fb78d0d356605f1318489daabcb8c32cd
Reviewed-on: https://pdfium-review.googlesource.com/22110
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL folds CXFA_CalculateData into CXFA_Calculate as it is just a
thin wrapper.
Change-Id: I35efbee6c0244139a7ece19f3e8ee18bfb931dda
Reviewed-on: https://pdfium-review.googlesource.com/22090
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL removes the CXFA_ScriptData wrapper and uses CXFA_Script
directly.
Change-Id: I1f1932ef96ee4a24407de7eb1d68b8631a5a67ea
Reviewed-on: https://pdfium-review.googlesource.com/21173
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@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 cleans up return values, out-params and changes simple methods
to boolean checks where possible in CXFA_WidgetData.
Change-Id: I29daa67993730f3e9d61cb6fdf918a886cc9120e
Reviewed-on: https://pdfium-review.googlesource.com/19230
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
We never use ::GetAccess to get the value in general, just to see if
it's set to Open or not. This CL makes the usage clearer.
Change-Id: I0e978a8b8e642c7441ab2ceb8062f672ceea7d55
Reviewed-on: https://pdfium-review.googlesource.com/19210
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
This CL cleans removes out params, makes methods const and moves the
XFA_ScriptDataType into CXFA_ScriptData.
Change-Id: I5a51a0eddc3608577a387472911000daa479af0f
Reviewed-on: https://pdfium-review.googlesource.com/19090
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL adds Get*Inset helpers to CXFA_MarginData which just return a
default value of 0 if the Try*Inset method fails.
Change-Id: I03b00b7a371c39e521f95952e965b4a3ef71d517
Reviewed-on: https://pdfium-review.googlesource.com/18870
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL renames the CXFA_MarginData::Get*Inset methods to
CXFA_MarginData::Try*Inset to match the fact that they may fail. The
default value has been removed and all the callers correctly set the
default values.
Change-Id: Ib0dc8dc35807b60a0ddc0e5724604cb39845fcea
Reviewed-on: https://pdfium-review.googlesource.com/18771
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
This CL removes CXFA_DataData::operator bool in favour of an explicit
HasValidNode method. This makes the call sites a lot clearer.
Change-Id: I6fae14fdeec4674ca7916e21b9e5703070fc3069
Reviewed-on: https://pdfium-review.googlesource.com/18830
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
Change-Id: I2ae79c6e77fe2717519156af15cd6cbdd19b58f1
Reviewed-on: https://pdfium-review.googlesource.com/18813
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
|
|
The build system doesn't like name clashes over directories in XFA.
The Pattern and and Shading classes need to be renamed to not clash with
future XFA node class names.
Change-Id: I978da492d884626c0db2e11ac236a3399e9c7e58
Reviewed-on: https://pdfium-review.googlesource.com/18290
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
This CL cleans up some const refs and some enum values from the previous
rename CLs.
Change-Id: Ifaa990c9c45485bb059e0bda0026093d0a2c0944
Reviewed-on: https://pdfium-review.googlesource.com/18230
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Change-Id: I532c3d7b76b650bbc262925b6a4a26f596a16814
Reviewed-on: https://pdfium-review.googlesource.com/18331
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
|
|
This CL renames CXFA_Script to CXFA_ScriptData to show it is part of the
data hierarchy.
Change-Id: Idba3618af6a95eae2ff4541184e5a17f1457e1cb
Reviewed-on: https://pdfium-review.googlesource.com/18012
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|