summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-08-23Swap width and height params in CBC_BarcodeMatrix constructor.Henrique Nakashima
Change-Id: I74f3a147914c6483e7d443cff70e09115c424ca5 Reviewed-on: https://pdfium-review.googlesource.com/41091 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-08-23Cleanup CPDF_TextPage::GetRectArrayNicolas Pena
Change-Id: I12b418b06b097af87f1143dbda3b6e304ba437c6 Reviewed-on: https://pdfium-review.googlesource.com/41210 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
2018-08-23Reorder RenderResult and RenderDeviceResult in CBC_TwoDimWriter.chromium/3532Henrique Nakashima
They should appear in the order that they are necessarily called. Change-Id: I6901d384122003f72b0c43bf1df6260e2e196a7d Reviewed-on: https://pdfium-review.googlesource.com/41050 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2018-08-23Remove bool bPromptCJK argument (several places)Tom Sepez
It gets computed, and passed around, but in the end no decisions are made because of it. Change-Id: If67f6f0cd0c37e52993832be1fb83498fd851914 Reviewed-on: https://pdfium-review.googlesource.com/41190 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-08-23Remove m_bTruncated flag from CBC_PDF417Writer.Henrique Nakashima
The flag is unused. Change-Id: I15eb3e20e6a632ae2aa2afc19cb09d2402e607e0 Reviewed-on: https://pdfium-review.googlesource.com/41031 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-08-23Fold CPDF_Document::LoadDocInternal() into caller.Tom Sepez
It is only called in one place. It also has a superfluous test and return as it is currently written introduced in https://pdfium-review.googlesource.com/c/pdfium/+/35490 Change-Id: Iba1aaac6e93c261f71729f39e51741f19c5dbb57 Reviewed-on: https://pdfium-review.googlesource.com/41071 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-08-23BUILD.gn - put cfx_windowsrenderdevice.h in win-specific section.Tom Sepez
It just looks wrong otherwise. Change-Id: Id4f45d9111a76a78ec35c8234465d2cdf93299bc Reviewed-on: https://pdfium-review.googlesource.com/41090 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2018-08-22Use UnownedPtr<> in CXFA_RenderContext.chromium/3531Tom Sepez
Change-Id: I0658f63a0d8fb8a5233e135dacedc4153532f01d Reviewed-on: https://pdfium-review.googlesource.com/41112 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-08-22Remove m_currentRow from the state of CBC_BarcodeMatrix.Henrique Nakashima
Change-Id: I2003d32f3f6972c0102b37ad545316a76b09fd1f Reviewed-on: https://pdfium-review.googlesource.com/41030 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2018-08-22Simplify internal state of CBC_BarcodeMatrix.Henrique Nakashima
Change-Id: Icd66f42c240984df6821c2bae640bbfacfa62ad2 Reviewed-on: https://pdfium-review.googlesource.com/41010 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-08-22Remove unused barcode matrix scaling code.Henrique Nakashima
Change-Id: Id15088a40fd308ba91317e95a6fa8075e7306608 Reviewed-on: https://pdfium-review.googlesource.com/40992 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2018-08-22Properly handle language markers in decoded textRyan Harrison
In text like document title 0x001B is used as a marker for the beginning/end of a language metadata section. Currently PDFium does nothing with this data, but when returning the 'decoded' text it needs to be stripped out. The existing code assumed that the two bytes following a marker would be the data to be removed and did nothing to track if it was in/out of one of these regions. This led to a situation where it would always strip the two bytes following the region, since it assumed the end marker was the beginning of a new region. This CL corrects the detection and handling of these regions, and adds a regression test for the reported bug. BUG=pdfium:182 Change-Id: I92ddba5666274a8986fed03f502a0331f150f7ac Reviewed-on: https://pdfium-review.googlesource.com/41070 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2018-08-22Change in/out params in CBC_PDF417Writer::Encode to only out.Henrique Nakashima
The value passed was always 0. This also prevented the scaling from being executed, so that can be removed. Change-Id: I143a9ed31b231d3b9fa297b0bf9dcc0fa6072889 Reviewed-on: https://pdfium-review.googlesource.com/40990 Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2018-08-22Use UnownedPtr<> in IJS_Runtime.Tom Sepez
Change-Id: I9f5f3c54144163b5ac188e38fcb8d8fa93d4bd7a Reviewed-on: https://pdfium-review.googlesource.com/40951 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-08-22Use UnownedPtr<> in JBig2_TrdProc, part 2.Tom Sepez
Re-order some locals to obey strict lifetime constraint. Pack a little tighter. Change-Id: Iae011d21b934fac865cf10ac20c046c8917d3a98 Reviewed-on: https://pdfium-review.googlesource.com/40915 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-08-22Use UnownedPtr<> in CPDFSDK_FileWriteAdapter.Tom Sepez
Make member naming match chromium conventions. Change-Id: Iaa88d1446d445da3a059a339b35a5ef2152811ff Reviewed-on: https://pdfium-review.googlesource.com/40952 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-08-22Remove unused setters in CBC_BarcodeMatrix and CBC_BarcodeRow.Henrique Nakashima
Change-Id: I01c83d96f07eac776e8269b7d1e06b2b07ca75ea Reviewed-on: https://pdfium-review.googlesource.com/40932 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2018-08-22Mark CFX_XMLNode pointers as const in various places.Lei Zhang
Change-Id: I86c6f7526e2ef4c3e8de30ebaff223095ee70fc4 Reviewed-on: https://pdfium-review.googlesource.com/40811 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2018-08-22Add GetLowerCaseElementAttributeOrDefault() helper function.Lei Zhang
CXFA_TextParser::GetEmbeddedObj() does the same thing twice in a row. Change-Id: Ia46a0a697ff667b2884cea82258399889dbb5dc6 Reviewed-on: https://pdfium-review.googlesource.com/40775 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2018-08-22Fix integer overflow in CPDF_CIDFont::GetCharBBoxNicolas Pena
Bug: chromium:875924 Change-Id: I85c86d3f90ee62b5593b0b20e44283c5056702ff Reviewed-on: https://pdfium-review.googlesource.com/40730 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
2018-08-22Simplify GetEmbeddedObj() methods.Lei Zhang
Change-Id: I976a8841f1519310cbf934103336dc050a7c293d Reviewed-on: https://pdfium-review.googlesource.com/40773 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2018-08-22Roll tools/clang/ dec27d726..13b165992 (29 commits)Lei Zhang
https://chromium.googlesource.com/chromium/src/tools/clang/+log/dec27d726d78..13b165992adf TBR=rharrison@chromium.org Change-Id: Ifbc50bcbda25655a07b9e33885721d347aa00303 Reviewed-on: https://pdfium-review.googlesource.com/40976 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-08-22Roll third_party/depot_tools/ 5484b866d..02d534031 (93 commits; 18 trivial ↵Lei Zhang
rolls) https://chromium.googlesource.com/chromium/tools/depot_tools.git/+log/5484b866dc93..02d53403125b Created with: roll-dep third_party/depot_tools TBR=rharrison@chromium.org Change-Id: I1b8808b314b932d94add43fed7f3876cbb7dab79 Reviewed-on: https://pdfium-review.googlesource.com/40975 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-08-22Roll third_party/zlib/ 39b4a6260..dcf1d0f8c (6 commits)Lei Zhang
https://chromium.googlesource.com/chromium/src/third_party/zlib.git/+log/39b4a6260702..dcf1d0f8c952 Created with: roll-dep third_party/zlib TBR=rharrison@chromium.org Change-Id: I4cdad0cbc3ff95d77a3aad31dfc0dd0dbdfdb4f1 Reviewed-on: https://pdfium-review.googlesource.com/40974 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-08-22Roll third_party/binutils/ e146228c2..4110e0919 (2 commits)Lei Zhang
https://chromium.googlesource.com/chromium/src/third_party/binutils.git/+log/e146228c20af..4110e0919711 Created with: roll-dep third_party/binutils TBR=rharrison@chromium.org Change-Id: I2e5cdb5fc688dcf5f50a6e5aa19e3b4fd9b32ca7 Reviewed-on: https://pdfium-review.googlesource.com/40973 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-08-22Roll third_party/googletest/src/ ce468a17c..d52663267 (62 commits)Lei Zhang
https://chromium.googlesource.com/external/github.com/google/googletest.git/+log/ce468a17c434..d5266326752f TBR=rharrison@chromium.org Created with: roll-dep third_party/googletest/src Change-Id: I2392318a07dc267106a558c42e2f66562b0350a7 Reviewed-on: https://pdfium-review.googlesource.com/40971 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-08-21Use UnownedPtr in CPDF_VariableTextTom Sepez
Re-arrange order of some variables so that the lifetime constraints are not violated, even temporarilly. Change-Id: I859f1217d5af0f4c703a3d8ed742c1f144cc1c61 Reviewed-on: https://pdfium-review.googlesource.com/40950 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-08-21Use UnownedPtr<> to theme provider in cfwl_widgetproperties.hTom Sepez
Mark two other fields which must remain raw. Change-Id: Idcd9b074aad23f35dc6607feeaa4fa6701efffaa Reviewed-on: https://pdfium-review.googlesource.com/40916 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-08-21Use UnownedPtr<> in xfa_resolvenode_rs.hTom Sepez
Change-Id: I4420fbf7402a8b08e33ca525e98690643d59efdf Reviewed-on: https://pdfium-review.googlesource.com/40930 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-08-21Remove dead code in CBC_CommonBitMatrix.Henrique Nakashima
Change-Id: Ie22666217b040872e576d58d0afa77138bca3870 Reviewed-on: https://pdfium-review.googlesource.com/40931 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2018-08-21Use UnownedPtr<> in JBIG2_SDDProc.Tom Sepez
Pack a little tighter while at it. Change-Id: If7cbb324ebf828a4bb60eb364fc3e0f31625e57f Reviewed-on: https://pdfium-review.googlesource.com/40913 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-08-21Use UnownedPtr<> in JBig2_GrrdProc.h.Tom Sepez
Change-Id: Ie3502443b801ae4af6e4c9e533f28d102703104c Reviewed-on: https://pdfium-review.googlesource.com/40912 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-08-21Remove excessive padding above and below PDF417 barcodes.Henrique Nakashima
Bug: pdfium:1135 Change-Id: Iea16a65a5eebcb914192eb49de17a2c4eda83320 Reviewed-on: https://pdfium-review.googlesource.com/40690 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-08-21Use UnownedPtr<> in CJBig2_TRDProc.Tom Sepez
First real use case of assigning Unowned to MaybeOwned. Change-Id: Ia5bc7102012f7a09120ba02d38cf751547d5c005 Reviewed-on: https://pdfium-review.googlesource.com/40914 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-08-21Avoid copying some big vectors in JBIG2_SymbolDictTom Sepez
Change-Id: I662f65b53a1a17be0062c92452d82acbbe157477 Reviewed-on: https://pdfium-review.googlesource.com/40910 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-08-21Change GetEmbbedObj() to return an Optional<WideString>.Lei Zhang
Change "EmbbedObj" to "EmbeddedObj". Change-Id: Ia6a8ec45b4563b3ec64b91a10e087dbf32a8d8db Reviewed-on: https://pdfium-review.googlesource.com/40751 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-08-21Fix lifetime issue in CJBig2_GRDProc::ProgressiveArithDecodeStateTom Sepez
Bug: 876222 Change-Id: I56c20c006ee26650f32b9ec90f3c7f91466b7470 Reviewed-on: https://pdfium-review.googlesource.com/40890 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-08-21Allow creation of a MaybeOwned<T> from UnownedPtr<T>.Tom Sepez
Small test to show these forms compile and do not transfer ownership. Change-Id: I1787a57d4d0bf70da7b6101c1f958cfe9a8f9dda Reviewed-on: https://pdfium-review.googlesource.com/40830 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-08-21Optimize rendering of two dimensional barcodes: defer upscale.Henrique Nakashima
Defer upscaling as late as possible so that intermediary data structures are smaller. Made a couple of changes along the way to preserve the barcode correctness and fix some padding issues. For my example, this is a ~21x improvement in rendering time, down from ~190ms per barcode to ~9ms. Bug: 872907, pdfium:1135 Change-Id: If532e0f168f02fea9c31d473f34c0009da4f4612 Reviewed-on: https://pdfium-review.googlesource.com/40010 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2018-08-21Fix some IWYU issues in xfa/fxfa/.Lei Zhang
Change-Id: Ia002b26d70f5d6e5b66a3341978483636f943db8 Reviewed-on: https://pdfium-review.googlesource.com/40672 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2018-08-21Fix one-of property JS errors.Henrique Nakashima
Introduced in: https://pdfium-review.googlesource.com/c/pdfium/+/18271/13/xfa/fxfa/parser/cxfa_node.cpp Bug: 872899 Change-Id: I9e71e384cd8682dd09378f0cb92ae443138a19d8 Reviewed-on: https://pdfium-review.googlesource.com/40870 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2018-08-21Roll code coverage DEPS aheadchromium/3530Ryan Harrison
A major refactoring for the Chromium code coverage tools that PDFium depends on just landed. Updating cleanly applies without modification, so rolling ahead now to rule out this change being a source of future breakages. Change-Id: I9402897e765e86891e7424a3db379e0539171932 Reviewed-on: https://pdfium-review.googlesource.com/40850 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2018-08-21Fix usage of deprecated V8 Value::*Value methodsDan Elphick
These parameterless methods are deprecated since the Isolate is inferred from the memory address of the object being converted to a string which will soon not be reliable. As such these method will be removed in the very near future. Bug: v8:7786 Change-Id: Idbcd56a633c3b0b06ba8e60909fc0fb9c80f3410 Reviewed-on: https://pdfium-review.googlesource.com/40310 Commit-Queue: Jochen Eisinger <jochen@chromium.org> Reviewed-by: Jochen Eisinger <jochen@chromium.org>
2018-08-20Use UnownedPtr<> in JBig2_GrdProc.hTom Sepez
Pack a little tighter while we're at it. Change-Id: I8cbefe5df1b4340cb55ea14a5ae00ebc1ad07114 Reviewed-on: https://pdfium-review.googlesource.com/40774 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-08-20Use UnownedPtr<> in CXFA_GEColor.Tom Sepez
Small size penalty in removing the union, but unions can lead to type errors. Change-Id: I8ff9fd63b1f87d05df18db17edbaf770226e1252 Reviewed-on: https://pdfium-review.googlesource.com/40790 Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-08-20Use UnownedPtr<> in CPDF_ObjectWalker.Tom Sepez
Change-Id: I99eed369f4d44f92607a0a58ba24e8b62ee348f7 Reviewed-on: https://pdfium-review.googlesource.com/40671 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-08-20Use more UnownedPtr<> in CPWL_Wnd::CreateParams.Tom Sepez
Move some initialization/accessors to header while at it. Remove unused GetRootWnd(). Change-Id: Icd4c77ebad0c1edf8a8443f86581e7724aa1b93b Reviewed-on: https://pdfium-review.googlesource.com/40670 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-08-20Fix nits in CXFA_Node.Lei Zhang
- Make methods const or move them into the anonymous namespace. - Make GetItemLabel() return the value. Change-Id: Ic6938d14e7efa09f1851950c28d3c855690d9aaf Reviewed-on: https://pdfium-review.googlesource.com/40650 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
2018-08-20Clean up CXFA_Graphics::SetLineDash().Lei Zhang
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>
2018-08-20Fix reversed arguments to GenerateResourceDict().Lei Zhang
GeneratePopupAP() passes [Font Dict, ExtGState Dict] to GenerateResourceDict(), but GenerateResourceDict() is expecting the dictionaries to be the other way around. Change-Id: I2ed21e47edda7979f177be3b6a1030512348c448 Reviewed-on: https://pdfium-review.googlesource.com/37411 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>