summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-08-22Prepare safetynet_job.py to have its output sent in emailsHenrique Nakashima
- Add --no-color option. - Fix exit code ambiguity (2 means bad usage) Change-Id: I04be9c3f21b5a71857b7847b3cc32bf595084994 Reviewed-on: https://pdfium-review.googlesource.com/11490 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org>
2017-08-22Avoid an ASSERT failure in CFX_SeekableStreamProxy.Lei Zhang
BUG=chromium:718503 Change-Id: I6ff332c2ab5320d1b5f39a9aa1564e7e3e243cbe Reviewed-on: https://pdfium-review.googlesource.com/11570 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-08-21Unify cross ref item check.chromium/3193Artem Strygin
Change-Id: I7c68d0f5a668019d23bbeebc66373f9b245f91a2 Reviewed-on: https://pdfium-review.googlesource.com/9551 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Art Snake <art-snake@yandex-team.ru>
2017-08-21Convert FDE_TXTEDIT_LINEEND to a private enum classDan Sinclair
This CL converts the enum to an enum class and updates the usage as needed. Change-Id: I7ba883e7d1debee00d3d9baafe941620109df8b8 Reviewed-on: https://pdfium-review.googlesource.com/11511 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-08-21Cleanup CFDE_TxtEdtBuf and simplify some logic.Dan Sinclair
This CL cleans up nits in CFDE_TxtEdtBuf and simplifies some of the methods. Change-Id: I2092da8e27281a577752fc331fec0612a349dfd6 Reviewed-on: https://pdfium-review.googlesource.com/11335 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
2017-08-21Avoid annotation popups to be clipped at page edgesJane Liu
Currently, annotation popups are placed at a fixed location relative to the annotation. If an annotation is too much on the right or the bottom of the page, then its popup will be clipped at the edge of the page. This CL translates the popups appropriately to avoid getting clipped at page edges. Also, if an annotation is at the bottom-right corner of the page, then the popup is placed above and to the left of the annotation, instead of below and to the right of it. See a set of comparison screenshots here: https://drive.google.com/drive/folders/0B7Fvv7JszRyGZXZXR05yVEFWSlE?usp=sharing Bug=chromium:645367,pdfium:750 Change-Id: Ie048281e965523c292dcc704b51188d794f8877b Reviewed-on: https://pdfium-review.googlesource.com/11470 Commit-Queue: Jane Liu <janeliulwq@google.com> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-08-21Remove useless code.Artem Strygin
Change-Id: Idd656dcf372c0b8ed515a4e0635b5098c0781d76 Reviewed-on: https://pdfium-review.googlesource.com/10991 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-08-21Converted CFDE_TxtEdt{Buf|Engine}::Insert() to take CFX_WideStringJane Liu
Converted CFDE_TxtEdtBuf::Insert(), CFDE_TxtEdtEngine::Insert(), and CFDE_TxtEdtEngine::Inner_Insert() to take in CFX_WideString instead of a wchar_t* and length. Bug=pdfium:757 Change-Id: I6097e9b0d4e584b920b2117b4c5489eedef37767 Reviewed-on: https://pdfium-review.googlesource.com/11411 Commit-Queue: Jane Liu <janeliulwq@google.com> Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-08-21Converted CFX_FloatRect::{Init|Update}Rect() to take point objectsJane Liu
Converted CFX_FloatRect::Init() and CFX_FloatRect::UpdateRect() to take in a CFX_PointF object instead of two coordinates. Bug=pdfium:770 Change-Id: Ibcb620f192d6c086158c39f23c411777286005d0 Reviewed-on: https://pdfium-review.googlesource.com/11450 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-08-21Cleanup CFDE_TextOutDan Sinclair
This CL cleans up formatting and simplifies logic in CFDE_TextOut. Change-Id: Ib675a35da79df77854f51e86bf24e5dc90b33b06 Reviewed-on: https://pdfium-review.googlesource.com/11334 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-08-21Converted DrawCosmeticLine() to take point objectsJane Liu
Converted CFX_RenderDevice::DrawCosmeticLine() and IFX_RenderDeviceDriver:: DrawCosmeticLine() to take in CFX_PointF objects instead of two coordinates per point. Bug=pdfium:769 Change-Id: I6116e4106a61487184a71e79c1dca3a85e8c7c27 Reviewed-on: https://pdfium-review.googlesource.com/11410 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-08-21Fixing crash on delete or backspace in XFA text edit box.Henrique Nakashima
Bug: pdfium:872 Change-Id: Ib7f0e3708cea2d16d7536ae26777ddc48d7e2c1d Reviewed-on: https://pdfium-review.googlesource.com/11370 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-08-21Roll yasm to 1.3.0.Lei Zhang
This basically copies https://chromium-review.googlesource.com/608869 Change-Id: I95acc3018e99a7822b9aaee7f83bc6080c0b3ec0 Reviewed-on: https://pdfium-review.googlesource.com/11336 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-08-17Change XFA DrawWidget() code to take its CFX_Matrix by const-ref.chromium/3192chromium/3191chromium/3190chromium/3189Lei Zhang
Change-Id: Idc9dfcafe6727c1689443ce8f9568567e55d51c8 Reviewed-on: https://pdfium-review.googlesource.com/11114 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-08-17Change CXFA_FFWidget::RenderWidget() to take a const CFX_Matrix&.Lei Zhang
Change some related code to take a const CFX_Matrix* since it is not immediately obvious if the matrix can be made into a const-ref. Change-Id: I15c840222b575cc479b1f6f0b6d3b3c0e50d5515 Reviewed-on: https://pdfium-review.googlesource.com/11113 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-08-17Remove default parameters from CXFA_FFWidget methods.Lei Zhang
Also remove an unused method and move a bunch of internal methods into an anonymous namespace. Change-Id: Ic7b4a975852cc2a7384bf3f681b953a5bf7e7d29 Reviewed-on: https://pdfium-review.googlesource.com/11112 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-08-17Remove default parameters in CXFA_Graphics methods.Lei Zhang
Constify parameters as well. Change-Id: I7e87b11cc73b133b04d49ceed1c46f5afcb89d1a Reviewed-on: https://pdfium-review.googlesource.com/11111 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-08-17Remove default argument for CXFA_Graphics::SetLineWidth().Lei Zhang
Change-Id: I6ea062bf5def0bc5fea7c52323198209dcf4c3e9 Reviewed-on: https://pdfium-review.googlesource.com/11110 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-08-17Remove redundant members in CFDE_TxtEdtEngineDan Sinclair
This CL removes a bunch of redundant members from the text edit engine. The change information tracking was removed as most of it was unused or was used inconsistently. Change-Id: I92460594e46accff0b78e1183c8574fc83ce728a Reviewed-on: https://pdfium-review.googlesource.com/11275 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-08-17Roll DEPS for Skia to e0e2075.Lei Zhang
TBR=caryclark@google.com Change-Id: I4766f232240acf120db5203b4ae2379bd72f1b3c Reviewed-on: https://pdfium-review.googlesource.com/11332 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2017-08-17Roll DEPS for third_party/instrumented_lib to 644afd3.Lei Zhang
Just a routine roll. TBR=thomasanderson@chromium.org Change-Id: I06dca28c88fbee163950f33274c183c467410b3c Reviewed-on: https://pdfium-review.googlesource.com/11331 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2017-08-17Roll DEPS for ICU to 08cb956.Lei Zhang
Just a routine roll. TBR=jshin@chromium.org Change-Id: I4db431888d4d3868eb7f38f9ce7045cce02baef6 Reviewed-on: https://pdfium-review.googlesource.com/11330 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2017-08-17Turn caret movement into an enum classDan Sinclair
This CL changes caret movement into an enum class and removes the MoveNone flag. Change-Id: I8a01b057942d45ceae9a6c3b95cfe3b8dc9ce9a5 Reviewed-on: https://pdfium-review.googlesource.com/11274 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-08-17Cleanup CFDE_TxtEdtEngine Insert and Delete methodsDan Sinclair
This CL cleans up CFDE_TxtEdtEngine::{Insert|Delete} to cleanup return values, input params and other unused bits. Change-Id: I53c4475ce3dc6518058bc130e9710842df841032 Reviewed-on: https://pdfium-review.googlesource.com/11273 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-08-17Unify GetTextLength and GetTextBufLength in CFDE_TxtEdtEngineDan Sinclair
The GetTextLength method just proxies to GetTextBufLength. This CL removes GetTextBufLength and puts the functionality into GetTextLength. Change-Id: If324fbeddd05cd63570b6942dc613e273a1fbce7 Reviewed-on: https://pdfium-review.googlesource.com/11272 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-08-17Cleanup visibilty and unused methods in xfa/fdeDan Sinclair
This CL fixes the visibility of some methods in xfa/fde along with removing unused methods. Unused params are also removed. Change-Id: Ic6e6d2ac8d07dc4bdabb3e0121831e4bf3fbb8ec Reviewed-on: https://pdfium-review.googlesource.com/11271 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-08-17Roll clang to a1420b8.Lei Zhang
AKA roll clang 309984:310694. Roll build to bee933a to pick up corresponding changes there. TBR=thakis@chromium.org Change-Id: I5d7fac2caaaacb6a028fbbb58a3ca1cf068639f6 Reviewed-on: https://pdfium-review.googlesource.com/11295 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2017-08-17Roll V8 to 539f7ab3.Lei Zhang
Just a routine roll to version 6.2.266. TBR=jochen@chromium.org Change-Id: I8ae0cbca4a2af045896536edaa7d23b65aaa7486 Reviewed-on: https://pdfium-review.googlesource.com/11294 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2017-08-17Roll build_revision to bff6ee8.Lei Zhang
Also roll buildtools_revision to f90f6a5 and update Android code that did not previously pass the Chromium style plugin. TBR=dsinclair@chromium.org Change-Id: Ifb1193cee8f68ac99a31c8d43195e4d7005eeafb Reviewed-on: https://pdfium-review.googlesource.com/11293 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2017-08-17Roll clang to 7770b47.Lei Zhang
AKA roll clang 308728:309984. TBR=thakis@chromium.org Change-Id: I041eb632d4d19cd3d7b4ab2a27f6a7d68a718228 Reviewed-on: https://pdfium-review.googlesource.com/11292 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2017-08-17Fix some issues with individual image mask renderingrbpotter
Re-enable individual image mask rendering to improve spool sizes, with bug fixes and improvements: - Fix bug with missing images by ensuring all masks are recorded - Fix printing to landscape paper sizes - Improve spool sizes by processing the location of the masks in the progressive renderer when rendering to the printer instead of needlessly fully rendering them (they will be rendered as bitmaps anyway). Bug: chromium:753700 Change-Id: I86bdcce9f10855274c56ba2ddae2c2522b36426d Reviewed-on: https://pdfium-review.googlesource.com/11115 Commit-Queue: Rebekah Potter <rbpotter@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2017-08-16Tidy CXFA_Color class and argument passing.Tom Sepez
Remove friendship. De-virtualize. Nest enum inside class. Make copy-assignable and pass by const ref. Make pack better on 64-bits. Change-Id: I1ae3b6d03756fa5780e9023795db6648e8b8299a Reviewed-on: https://pdfium-review.googlesource.com/11290 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2017-08-16Move some CFDE_TxtEdt* methods to the headerschromium/3188Dan Sinclair
This CL moves several methods from the CFDE_TxtEdt* classes from the .cpp to .h files. As well, the GetCaretRect method is updated to return the rect instead of using an out param. Change-Id: I1288701f47d9ac1c413fbf06627f20b295b18b86 Reviewed-on: https://pdfium-review.googlesource.com/11270 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
2017-08-16Simplify CFDE_TxtEdtEngine layout codeDan Sinclair
The three CFDE_TxtEdtEngine layout methods are always called in sequence. Update to only have a single Layout() method. Simplify the layout code to use existing helpers. Change-Id: I0f4d9714f231ca3cebf43579d215d97bd2fe525a Reviewed-on: https://pdfium-review.googlesource.com/11231 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
2017-08-16Fixing crash on mouse movement in XFA form.Henrique Nakashima
Bug: pdfium:868 Change-Id: Ifd39c5c7c5486560987c18e9afb6ae3d2a4b7454 Reviewed-on: https://pdfium-review.googlesource.com/11190 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2017-08-16Fix another unguarded string element accessRyan Harrison
BUG=chromium:754969 Change-Id: I4f92d301499c658c57393fde01f1252ea84e59a8 Reviewed-on: https://pdfium-review.googlesource.com/11250 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2017-08-16Remove friendship from TxtEdtEngine and TxtEdtPageDan Sinclair
This CL removes the remaining friendship in CFDE_TxtEdtEngine but adding public methods for CFDE_TxtEdtPage to access. Change-Id: I9e6420921bc4567a499c8e688c6db51029659ae8 Reviewed-on: https://pdfium-review.googlesource.com/11230 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-08-16Add parse depth limit to FormCalc parserRyan Harrison
Due to the recursive nature of the FormCalc parser, deeply nested expressions can lead to memory being exhausted. This check is being added to have the parser exit early instead of running out of memory. This should reduce the number of false positives about addressing issues being found by fuzzers. BUG=chromium:752433 Change-Id: I511ecfb07e32073555e1fd1658f3b8b47f1a5a91 Reviewed-on: https://pdfium-review.googlesource.com/11170 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-08-16Add in missting string length checkRyan Harrison
BUG=chromium:754984 Change-Id: I106d460c80804797cee537d1990f901b5bf5a519 Reviewed-on: https://pdfium-review.googlesource.com/11171 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-08-16Fix potential OOM / integer overflow in CPDF_Parser.Lei Zhang
The count passed into ParseAndAppendCrossRefSubsectionData() may be invalid. BUG=chromium:752796 Change-Id: Ic7bbfd16761d1df0855e6c77e4abc68823b12395 Reviewed-on: https://pdfium-review.googlesource.com/11130 Reviewed-by: Art Snake <art-snake@yandex-team.ru> Commit-Queue: Lei Zhang <thestig@chromium.org>
2017-08-16Check for possible empty object returns from NewFxDynamicObj()Tom Sepez
Avoid some potential crashiness. TBR=jochen@chromium.org Bug: 754610 Change-Id: Ie8143c1909df7ba5783b7d20b61e31f093d04b34 Reviewed-on: https://pdfium-review.googlesource.com/10970 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-08-16Fixed the return values of FPDFAnnot_Get{Rect|AttachmentPoints}Jane Liu
Currently, FPDFAnnot_Get{Rect|AttachmentPoints} would return BBox if the annotation's appearance stream is defined, which does not make much sense to the user since BBox is defined in the form space; upon rendering, the annotation's position in the device space is solely defined by its rectangle. This CL removes references to BBox in FPDFAnnot_Get{Rect| AttachmentPoints}; instead, they will only return rectangle or quadpoints as requested. The embedder test is also modified to reflect this change, and also to demonstrate that an annotation's position is changed only if its rectangle is changed. Bug=pdfium:861 Change-Id: I489876511aa5d93131dd695170d46bbc49d16574 Reviewed-on: https://pdfium-review.googlesource.com/11050 Commit-Queue: Jane Liu <janeliulwq@google.com> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-08-16Remove CFWL_WidgetMgrDelegateDan Sinclair
This class is actually an accidentally renamed interface. There is only one concrete class so fold the interface back into the concrete class. Change-Id: If921a34595fad85750389f071ffdc9a5eae09f8e Reviewed-on: https://pdfium-review.googlesource.com/11150 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-08-16Changed the return type of FPDFAnnot_Get{Rect|AttachmentPoints}()Jane Liu
Instead of returning structs, changed FPDFAnnot_GetRect() and FPDFAnnot_GetAttachmentPoints() to return a bool and take a struct as an out parameter. Change-Id: I380e76eb1566b2488150fb31e9dad564a3ee10d4 Reviewed-on: https://pdfium-review.googlesource.com/10470 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Jane Liu <janeliulwq@google.com>
2017-08-16API and test for retrieving metadata from image objectsJane Liu
Added FPDFImageObj_GetImageMetadata() for retriving the image metadata of image objects, including its dimension, DPI, bits per pixel, and colorspace. * Added a corresponding embedder test. Bug=pdfium:677 Change-Id: I4229334d1ac2125b21a46e2e44ea937ea2e94b51 Reviewed-on: https://pdfium-review.googlesource.com/10110 Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Jane Liu <janeliulwq@google.com>
2017-08-15Change a bunch of methods to take a const CFX_Matrix& param.chromium/3187Lei Zhang
Simplify some code along the way. Change-Id: I0022c8a82188192c63b9ac0bc87e9b9dbf983040 Reviewed-on: https://pdfium-review.googlesource.com/10852 Reviewed-by: dsinclair <dsinclair@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2017-08-15Remove CFX_ByteTextBuf.Henrique Nakashima
Bug: pdfium:731 Change-Id: I00d2097bca369aa4d1743716c4b2615e37a8444d Reviewed-on: https://pdfium-review.googlesource.com/10910 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2017-08-15Simplify CPWL_EditImpl_Undo.Lei Zhang
Change-Id: I15307562fcf8f0aebd6e14293b46a10106c4ace7 Reviewed-on: https://pdfium-review.googlesource.com/10858 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-08-15Add to navbar link to SafetyNet readme.Henrique Nakashima
Change-Id: I50eb3b4e94b72efe5978b02db137fab3eb6b21da Reviewed-on: https://pdfium-review.googlesource.com/11090 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-08-15Make errors in called processes more evident and easier to debug.Henrique Nakashima
Also trying to get unicode filenames right again. Change-Id: I501c94921b92b8a8cd6a10441aff1595fc6d878e Reviewed-on: https://pdfium-review.googlesource.com/10630 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>