summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-01-11Rename CXFA_Event methodsDan Sinclair
This CL renames CXFA_Event methods for clarity and fixes callers where needed. Change-Id: I902a35f36ee91c1b4aadd10382d93988ef26dc1c Reviewed-on: https://pdfium-review.googlesource.com/22750 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-11Rename CXFA_Caption methods for clarityDan Sinclair
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>
2018-01-11Rename CXFA_Calculate methods to make return clearerDan Sinclair
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>
2018-01-11Rename CXFA_Box methods to make return clearerDan Sinclair
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>
2018-01-11Rename GetExclGroup to GetExclGroupIfExistsDan Sinclair
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>
2018-01-11Rename GetItem to GetItemIfExistsDan Sinclair
Rename GetItem to make it clearer it can return nullptr. Change-Id: I0e09a79c3e2244b08212d3b51d3ad0e6a86edfd9 Reviewed-on: https://pdfium-review.googlesource.com/22713 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-11Rename CreateInstance to CreateInstanceIfPossibleDan Sinclair
This CL makes it clear that CreateInstance may return nullptr. Change-Id: I82f172a671761eae9055b0e9e55ab0e5a7d599aa Reviewed-on: https://pdfium-review.googlesource.com/22712 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-11Cleanup duplicate CXFA_Node accessorsDan Sinclair
These two accessors exist with other names or signatues, remove. Change-Id: Ieac073b746553160e4f2c41d9b63be47ad0ab61f Reviewed-on: https://pdfium-review.googlesource.com/22711 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-11Rename GetBind to GetBindIfExistsDan Sinclair
This CL updates the name to make it clearer the item an return nullptr. Change-Id: Icc5dbbf5ec3b9a8c73c6aaec585fdd61e2351c75 Reviewed-on: https://pdfium-review.googlesource.com/22710 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-11Rename GetFormValue to GetFormValueIfExistsDan Sinclair
This CL makes it clear that GetFormValue can return nullptr and fixes up a few callsites as needed. Change-Id: Id2e85b0956a678b5b338b9e2a4d32731fe6c4729 Reviewed-on: https://pdfium-review.googlesource.com/22690 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-11Change FPDFText_GetCharBox() to return a boolean.Lei Zhang
BUG=pdfium:858 Change-Id: Id8b6c032d60894eaf14ae0ba52098a60b2485fca Reviewed-on: https://pdfium-review.googlesource.com/22731 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-01-11Remove core/fxge/cfx_fontmgr.h from headers.Lei Zhang
Then do IWYU for CFX_FontMgr users. Change-Id: Id77529ccf45ec448c56c40412b78eb55925bd00e Reviewed-on: https://pdfium-review.googlesource.com/22531 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-01-11Change FPDFText_GetRect() to return a boolean.Lei Zhang
BUG=pdfium:858 Change-Id: Idc9900fe6f85b1fef06c97f5023653f77156d410 Reviewed-on: https://pdfium-review.googlesource.com/22730 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-01-11Rename GetDefaultValue to GetDefaultValueIfExistsDan Sinclair
This CL makes it explicit that GetDefaultValue can return nullptr. Change-Id: I871704e291358bc85a554e4f6410953f7223c61d Reviewed-on: https://pdfium-review.googlesource.com/22683 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-11Add jumbo build support for fdrm, fpdfdoc and fxcrt.Lei Zhang
BUG=pdfium:964 Change-Id: Ifde885861aeafac803948bd537de826e2a3fddca Reviewed-on: https://pdfium-review.googlesource.com/22732 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-01-11Rename Getvalidate and GetOrCreateValidateDan Sinclair
This CL renames the validation methods to make it clear they can return nullptr. Change-Id: I60d0c41cdfe9902049d99cd790f851517b11a6d9 Reviewed-on: https://pdfium-review.googlesource.com/22682 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-11Use range-based for-loops in a few more places.Lei Zhang
Change-Id: Id403abaf3d142dc30a661bc64ff48dbd5b10948e Reviewed-on: https://pdfium-review.googlesource.com/22736 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-01-11Rename GetCalculate to GetCalculateIfExistsDan Sinclair
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>
2018-01-11Configure CQ to use Linux MSAN bots.Lei Zhang
BUG=pdfium:959 TBR=dsinclair@chromium.org Change-Id: Iea2e1eb0740c9d413787cbeded4a92a2e0b2cdf6 Reviewed-on: https://pdfium-review.googlesource.com/22733 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-01-10Rename GetPara to GetParaIfExistschromium/3318Dan Sinclair
This CL renames GetPara to make it explicit it can return nullptr. Change-Id: I7c6529c15646b9947964e25a8d28938b38f091d6 Reviewed-on: https://pdfium-review.googlesource.com/22680 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-10Encapsulate CTTFontDesc.Lei Zhang
Change-Id: I602890527dae9e2e2de16e70bccfa1793e31e0f8 Reviewed-on: https://pdfium-review.googlesource.com/22530 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
2018-01-10Move FreeType version check to its own method.Lei Zhang
Fix some other nits in CFX_FontMgr as well. Change-Id: I4c15d1cc96c964c452dcab8962885d2b71d54a5d Reviewed-on: https://pdfium-review.googlesource.com/22471 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-01-10Fix some nits from commit a74e75d.Lei Zhang
Change-Id: Ib4556ac75efafee5a2566ad76acd87883303660f Reviewed-on: https://pdfium-review.googlesource.com/22679 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-01-10Rename GetTemplateNode to GetTemplateNodeIfExistsDan Sinclair
This CL makes it explicit that GetTemplateNodeIfExists can return nullptr. Various call sites are updated as needed. Change-Id: If6edd5962b59e7e4ce3dbe9bbdc957783cf76abe Reviewed-on: https://pdfium-review.googlesource.com/22678 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-10Remove unused parameter from FPDFDest_GetView().Lei Zhang
Fix a bunch of nits as well. Change-Id: I874f9b1d4676823635aad8986fcf23a11ae6efd9 Reviewed-on: https://pdfium-review.googlesource.com/22473 Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-01-10Rename GetOccur to GetOccurIfExistsDan Sinclair
This CL makes it explicit that GetOccurIfExists can return nullptr and fixes up the call sites. Change-Id: I542d0098aa316632239df7f1a5796b4ffe6ba202 Reviewed-on: https://pdfium-review.googlesource.com/22676 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-10Rename GetMargin to GetMarginIfExistsDan Sinclair
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>
2018-01-10Rename GetOrCreateFont to GetOrCreateFontIfPossibleDan Sinclair
This CL makes it explicit that GetOrCreateFontIfPossible can return nullptr. Change-Id: Ib5be6995e4225ad596dfb78a94f0bc56802716cc Reviewed-on: https://pdfium-review.googlesource.com/22674 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-10Rename GetFont to GetFontIfExistsDan Sinclair
This CL makes it explicit that GetFont may return nullptr. Change-Id: Icb7ec5ad4ed6c5f7a728230d1237898b8f2fd778 Reviewed-on: https://pdfium-review.googlesource.com/22673 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-10Rename GetOrCreateBorder to GetOrCreateBorderIfPossibleDan Sinclair
This CL makes it explicit that GetOrCreateBorderIfPossible can return a nullptr. Change-Id: I41d5e7ee506e95d95349e1e06198e40e8afa073c Reviewed-on: https://pdfium-review.googlesource.com/22672 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-10Correct spelling for XFA_RectWithoutMarginDan Sinclair
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>
2018-01-10Rename GetCaption to GetCaptionIfExistsDan Sinclair
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>
2018-01-10Add FPDFAnnot_GetAP to public API.Henrique Nakashima
The matching FPDFAnnot_SetAP will be added in a subsequent CL. Change-Id: If567e02c6c56138d218498879cb4a8ee91dff080 Reviewed-on: https://pdfium-review.googlesource.com/22450 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2018-01-10Rename CXFA_Node::GetBorder to GetBorderIfExistsDan Sinclair
Renaming GetBorder makes it clear that the method may return a nullptr. Change-Id: I50a8b511e273552e3a4a226ba72a7c0e2ae74ea3 Reviewed-on: https://pdfium-review.googlesource.com/22653 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-10Change FPDFLink_GetRect() to return a boolean.Lei Zhang
BUG=pdfium:858 Change-Id: Ib8effb64a1622feb2837f536b36b9e46847a2210 Reviewed-on: https://pdfium-review.googlesource.com/22631 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-01-10Verify GetOrCreate results are checkedDan Sinclair
This CL updates users of the GetOrCreate* methods to verify that the value returned is not null before accessing. Change-Id: I4a9fd29a26d5e4ec792ca3671c9868828e53d46e Reviewed-on: https://pdfium-review.googlesource.com/22652 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-10[OpenJPEG] Fix integer overflowNicolas Pena
Bug: 796812 Change-Id: I857f037028ea0e74544bdc7c8cd26b4b44e64ec4 Reviewed-on: https://pdfium-review.googlesource.com/22610 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
2018-01-10Remove 2 param CXFA_Node::GetNodeItemDan Sinclair
This CL removes the CXFA_Node::GetNodeItem(kind, object_type) method in favour of explicit methods. All of the callers passed in a XFA_ObjectType::ContainerNode. Change-Id: I713184d3fa188a122284f50ac2a6b0fd3d7aed26 Reviewed-on: https://pdfium-review.googlesource.com/22651 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-10Remove CXFA_Node::GetNodeItemDan Sinclair
This CL removes the generic CXFA_Node::GetNodeItem(type) method for specific calls to get the parent, child or siblings. Change-Id: Ief68284ac7b954aaa4ed7120dd82a39f8b52656a Reviewed-on: https://pdfium-review.googlesource.com/22650 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-10Make methods which create nodes more obviousDan Sinclair
This CL converts the various methods Get methods which take a boolean value to explicit Get* and GetOrCreate* methods to make the usage clearer. Change-Id: I2af68448b1b69b95713e739bf7fe14a4336d2b65 Reviewed-on: https://pdfium-review.googlesource.com/22590 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-10Add missing C API check after commit ecd063ec.Lei Zhang
TBR=dsinclair@chromium.org Change-Id: I0bbc9d7f7170649db966318daa7df98e3438e460 Reviewed-on: https://pdfium-review.googlesource.com/22630 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-01-09Expose marked content IDs for images and alt text.Julian Lunger
- Adds two new public bits of API: - StructElement_GetMCID(STRUCTELEMENT) to return the marked content ID of the struct element. - IMAGEOBJ_METADATA.mcid to contain the marked content ID of the image. - Restores ContentMark::GetMCID, which was removed with other dead code in https://pdfium-review.googlesource.com/c/pdfium/+/19170. - Adds a couple calls to tests, including a simple new PDF to test the struct tree marked content ID. Bug:pdfium:957 Change-Id: I92856e43d741df989e53a575a08258da19a39f22 Reviewed-on: https://pdfium-review.googlesource.com/20632 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-01-09Add initial jumbo build support.Lei Zhang
Convert a bunch of targets that just work. BUG=pdfium:964 Change-Id: I485be45e9f6c74c2bba88313da176a49b32b9bba Reviewed-on: https://pdfium-review.googlesource.com/21970 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-01-09Fix some nits in FPDF_BStr_Set().Lei Zhang
Change-Id: I298c7013541cc4ee77bef2f1e7d07984ecfa1705 Reviewed-on: https://pdfium-review.googlesource.com/21490 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-01-09Move barcode code from WidgetAcc to NodeDan Sinclair
This CL moves the barcode related code from CXFA_WidgetAcc to CXFA_Node. Change-Id: Id3f5f30222535a69a0bf4d59416e57d452c7d8e8 Reviewed-on: https://pdfium-review.googlesource.com/22551 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-09More Execute* methods to CXFA_Nodechromium/3317Dan Sinclair
This Cl moves the two Execute* methods from CXFA_WidgetAcc to CXFA_Node. Change-Id: I4e1d6cd2159028800b855558273ca80aad365570 Reviewed-on: https://pdfium-review.googlesource.com/22550 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-01-09Move Process* methods to CXFA_NodeDan Sinclair
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>
2018-01-09Fix cl/22012 to always call FXFT_Library_SetLcdFilter so that we render ↵Andrew Weintraub
properly regardless of whether "Harmony" is built in. Bug: Change-Id: I37bf8161d758e8789f81956ea28598480908b47f Reviewed-on: https://pdfium-review.googlesource.com/22451 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-01-09Fix death tests for UnownedPtr + MSAN.Lei Zhang
They should only expect death in ASAN builds. BUG=pdfium:958 Change-Id: I62bd51151238bc57abb5fe700985c33d7fde3e28 Reviewed-on: https://pdfium-review.googlesource.com/21930 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2018-01-09Update vs_toolchain.py build hook.Lei Zhang
Update the hook to match the hook of the same name in Chromium. This is needed to support win-cross builds for standalone PDFium. Change-Id: Ib8a44aedc2e33a15880c51f4e7ee53a4fc7f5682 Reviewed-on: https://pdfium-review.googlesource.com/21971 Reviewed-by: Bruce Dawson <brucedawson@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>