summaryrefslogtreecommitdiff
path: root/xfa
AgeCommit message (Collapse)Author
2018-10-15Make fxjs/ pass gn check.Lei Zhang
Use allow_circular_includes_from as a crutch for now. Change-Id: I8c53bafd864048506a77354f57e27cac50369005 Reviewed-on: https://pdfium-review.googlesource.com/c/43989 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2018-10-15Make fpdfsdk/ pass gn check.Lei Zhang
Use allow_circular_includes_from as a crutch for now. Change-Id: I58e90da4b71a22dd54fd59e8d644b6eef740d4cd Reviewed-on: https://pdfium-review.googlesource.com/c/43988 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2018-10-15Make xfa/ pass gn check.Lei Zhang
Use allow_circular_includes_from as a crutch for now. Change-Id: I1aad3276a6fd571071270090235b0cfb625e337b Reviewed-on: https://pdfium-review.googlesource.com/c/43986 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-10-12Make core/fxcrt pass gn check.Lei Zhang
Split some XFA-only code into their own targets to avoid circular dependencies. Make CFX_SeekableMultiStream XFA-only. Change-Id: I88f49556623d52dddd4d0013cc3308b694c01d42 Reviewed-on: https://pdfium-review.googlesource.com/c/43973 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-10-12Do IWYU in xfa.Lei Zhang
Change-Id: Ia104471caffe79f92d439920baeea37a71c71c50 Reviewed-on: https://pdfium-review.googlesource.com/c/43971 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-10-12Split core/fxcrt build rules into core/fxcrt/BUILD.gn.Lei Zhang
Change-Id: I9b3608bd76ec4911a4bb820fcda62c5d9533fb4f Reviewed-on: https://pdfium-review.googlesource.com/c/43947 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-10-12Remove more unnecessary includes and do IWYU as needed.Lei Zhang
Also move some implementations out of headers. Change-Id: I321fc26970c440d874b135bd28e8bc8156b9afee Reviewed-on: https://pdfium-review.googlesource.com/c/43890 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2018-10-12Split fxjs build rules into fxjs/BUILD.gn.Lei Zhang
Change-Id: I7d9d5bb14a4a2b11afeab0da25bad35322560d3b Reviewed-on: https://pdfium-review.googlesource.com/c/43942 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
2018-10-12Split xfa build rules into various BUILD.gn files in xfa/.Lei Zhang
Change-Id: I3e6624d0e7af6c4f7ec9674d5990ae25cc3954d0 Reviewed-on: https://pdfium-review.googlesource.com/c/43941 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
2018-10-12Rename CPDF_{Array,Dictionary}::GetCount() to size().Lei Zhang
Make them compatible with pdfium::CollectionSize(). Change-Id: Ibef3b182e35a7eca7c656cf590462782de0cc157 Reviewed-on: https://pdfium-review.googlesource.com/c/43937 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-10-12Mark the bigint target as XFA only.chromium/3579Lei Zhang
Depend on it directly from the only user, fxbarcode. Change-Id: I303dc7b0e713d683257fb3d893e74fdd40ac2046 Reviewed-on: https://pdfium-review.googlesource.com/c/43939 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-10-09Do IWYU for retain_ptr.h and unowned_ptr.hLei Zhang
Change-Id: I2897feee27f80c85f0328f0b220ae5be93686170 Reviewed-on: https://pdfium-review.googlesource.com/c/43610 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2018-10-09Do IWYU for ptr_util.h.Lei Zhang
Change-Id: Ib96a66eb47bea791f061e1d6da8aadad8037a99d Reviewed-on: https://pdfium-review.googlesource.com/c/43609 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2018-10-09Do IWYU for cpdf_dictionary.h.Lei Zhang
Move some method implementations out of headers in the process. Change-Id: I8701e360d4addd9aec39fe887d932209985d2443 Reviewed-on: https://pdfium-review.googlesource.com/c/43608 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-10-04Change |virtual ~Foo(){}| to |virtual ~Foo()=default;|chromium/3571Tom Sepez
Otherwise code coverage flags the empty body as unreachable. Change-Id: Iee1d9a876d68276529c70d9b8c7a28276f271767 Reviewed-on: https://pdfium-review.googlesource.com/c/43514 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-10-04Reject argument lists that are not comma separatedRyan Harrison
The FormCalc grammar explicitly calls out that argument lists must have commas separating the simple expressions that make up the elements. The current implementation will accept the invalid string !a!b!c, which is 3 variables; !a, !b, and !c. BUG=chromium:890407 Change-Id: I3e2da4abce9989e9e9b929ce2da030e0f8dfd371 Reviewed-on: https://pdfium-review.googlesource.com/c/43430 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2018-10-03Use numbers to test barcode encodings that do not accept letters.Henrique Nakashima
Bug: pdfium:1172 Change-Id: I8399a0add43dcb1f3269101d6ea212cfc33d3ca7 Reviewed-on: https://pdfium-review.googlesource.com/c/43454 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2018-10-03Fix nits in CFX_FontSourceEnum_File.Lei Zhang
Change-Id: I116745419311b4cd37ce69c85f6ce6972d5325f4 Reviewed-on: https://pdfium-review.googlesource.com/43351 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2018-10-03Split CFX_FontSourceEnum_File into its own file.Lei Zhang
Change-Id: I85d2094f77866d18c0dce060755583ea289bb9ea Reviewed-on: https://pdfium-review.googlesource.com/43350 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2018-10-03Simplify CFX_FontSourceEnum_File's file iterator.Lei Zhang
Break the methods down to their basic functionality, and built up from there. Change-Id: I691abaf08375425b59f2382cf95577c3917aca9d Reviewed-on: https://pdfium-review.googlesource.com/42972 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-10-02Clean up some XFA forward declarations.Lei Zhang
Change-Id: I2d30ceb5e475290c0842fe4add7ffb965dc77572 Reviewed-on: https://pdfium-review.googlesource.com/c/43316 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-10-02Avoid overloading CFGAS_FontMgr::LoadFont().Lei Zhang
Rename the internal one LoadFontInternal. Remove unused out parameter. Change-Id: Ia108bc4fc29ef0ad7732eacad9bb924a8e424c2e Reviewed-on: https://pdfium-review.googlesource.com/c/43317 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2018-10-02Make CFGAS_DefaultFontManager a class with only static methods.Lei Zhang
It has no member variables. Change-Id: I25b333e201d76e90d25e3f526cf23bccd2b4687a Reviewed-on: https://pdfium-review.googlesource.com/c/43315 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2018-10-02Reduce includes in cfgas_defaultfontmanager.hLei Zhang
Do IWYU elsewhere, and unindent CFGAS_DefaultFontManager::GetFont(). Change-Id: Idb06c4ae75ce2d72b231cc4c84f61e5ca8a80cc5 Reviewed-on: https://pdfium-review.googlesource.com/c/43314 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2018-10-02Remove unneeded cfgas_fontmgr.h includes.Lei Zhang
Fix IWYU issues in affected files. Change-Id: I92c145348549d2d0f0e066e134e649b3b958e068 Reviewed-on: https://pdfium-review.googlesource.com/c/43313 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2018-10-01Initialize more CXFA_Node members in the header.Lei Zhang
And remove some unnecessary casts. Change-Id: Ifbc78e7b399ce668c92122c8c45d5995b599c971 Reviewed-on: https://pdfium-review.googlesource.com/43193 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2018-10-01Use size_t and FX_ArraySize() for some arrays.Lei Zhang
Change-Id: Ib8caef1f46478e9bf1c0e717997accb71000124a Reviewed-on: https://pdfium-review.googlesource.com/43192 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2018-09-24Give CFX_GraphStateData a work-over.chromium/3561Tom Sepez
Use std::vector<float> for dash array. Use compiler-generated default operations. Squeeze some enums. Fix obvious logic botch in DashChanged(). Change-Id: If1d809cc46a3cf2db98a09a3f5a49d22138c0640 Reviewed-on: https://pdfium-review.googlesource.com/42613 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-09-22Remove useless charset data in CFGAS_FontMgr.Lei Zhang
Fix some nits too. Change-Id: I7d088f28b3b6898fcfbafb9c0e6eac6442ff1515 Reviewed-on: https://pdfium-review.googlesource.com/42910 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2018-09-22Move some CFGAS_FontMgr methods into an anonymous namespace.Lei Zhang
They do not have to be part of the class. Fix nits and lint errors too. Change-Id: Ie8f745f378beeebf05841ff17a98141924999613 Reviewed-on: https://pdfium-review.googlesource.com/42890 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-09-20Fix misc lint errors and other cleanups.Lei Zhang
Change-Id: I00ce0109251d1231858e87ffc3889abe6937fa26 Reviewed-on: https://pdfium-review.googlesource.com/42811 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-09-20Remove more unneeded STL #includes from headers.Lei Zhang
Remove some variables named "string" to avoid false positives from the linter. Change-Id: I00a53e6970451fd0cea8ab2f8178183650ca00d2 Reviewed-on: https://pdfium-review.googlesource.com/42810 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-09-20Remove many unneeded STL #includes from headers.Lei Zhang
Change-Id: I7010cedee8d17d05b2c37a94d767e6f3a9c48f7d Reviewed-on: https://pdfium-review.googlesource.com/42790 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-09-17Fix final/protected conflicts.Tom Sepez
Classes marked |final| should not have |protected| members. In turn, "private field m_dwEncryptObjNum is not used" warning is produced. Change-Id: I51a96aca5a5f499381a6764d892962f7f2dc0327 Reviewed-on: https://pdfium-review.googlesource.com/42611 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-09-17Make CBC_CodeBase::SetTextLocation() virtual.Lei Zhang
Do the same for a few other CBC_CodeBase methods, instead of trying to implement virtual methods manually using memory pointers. Change-Id: Iec0e3a4f8eabc54962c7ac0a00a1b80b192ff474 Reviewed-on: https://pdfium-review.googlesource.com/42600 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-09-15Remove FXFM_ENCODING_NONE.Lei Zhang
FX_CreateFontEncodingEx() always passes FXFM_ENCODING_NONE. Just get rid of it instead. Change-Id: I417f84d8ae2f10ba874265a92576d3ef8481a9d6 Reviewed-on: https://pdfium-review.googlesource.com/42460 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-09-14Use pdfium::Optional in CFGAS_GEFont.Lei Zhang
Change-Id: I1fe90d94ed782f59745dc47e38cda561c5b5ac47 Reviewed-on: https://pdfium-review.googlesource.com/42512 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-09-14Use fxcrt::MaybeOwned in CFGAS_GEFont.Lei Zhang
Change-Id: Ie1f4763e37832475a60c55b26263405e0bbf09b3 Reviewed-on: https://pdfium-review.googlesource.com/42510 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2018-09-14Use UnownedPtr in CFX_UnicodeEncoding.Lei Zhang
Change-Id: I410909be359a5b5bb0c90d42064144771183525e Reviewed-on: https://pdfium-review.googlesource.com/42461 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-09-14Clean up CFGAS_GEFont members.Lei Zhang
Remove unused members and initialize the rest in the header. Change-Id: Ic2122fc1d49024632b9ebd4cb490c14dd0724de6 Reviewed-on: https://pdfium-review.googlesource.com/42491 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-09-11Make flate decode functions' buffer out parameter unique_ptrs.Lei Zhang
Change-Id: Idb14846e87a8287dd911b0a2f7a32146e86c2af7 Reviewed-on: https://pdfium-review.googlesource.com/41853 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2018-09-04Remove unneeded fpdf_parser_decode.h #includes.Lei Zhang
Change-Id: I2c52828c25b4941669503328517c12a0a1dd770e Reviewed-on: https://pdfium-review.googlesource.com/41850 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-08-29Use pdfium::span<> in fpdf_parser_decode.h helper functions.Tom Sepez
Change-Id: Ib0a2bd21fe4304163cf9c080e07475e7c033c299 Reviewed-on: https://pdfium-review.googlesource.com/41570 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-08-29Move XFA_RESOLVENODE_TagName to xfa_resolvenode_rs.h.Lei Zhang
Change-Id: I600013bcbf44661fd132ce786bcd08980a7ecd4e Reviewed-on: https://pdfium-review.googlesource.com/41572 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-08-27The final game: mark everything final.Tom Sepez
Then revert the ones that break compilation. Fix one IWYU noticed during presubmit. Change-Id: I881a8a72818e55dbc4816247e35ff5e3015194e7 Reviewed-on: https://pdfium-review.googlesource.com/41470 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-08-24Rename CFX_DIBSource to CFX_DIBBase.Tom Sepez
It is not a source from which you can get CFX_DIBs, but rather a base class from which all DIBs inherit. Do the same thing for the CPDF_DIBSource wrapper class. Mechanical change apart from adding a one-line comment in cfx_dibbase.h Change-Id: Id2bde87813ca301d9fafc55ce08d703dfc6a7184 Reviewed-on: https://pdfium-review.googlesource.com/41352 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-08-23Pass unique_ptr<> to CFX_MemoryStream constructorTom Sepez
Proves we own the memory that the class will eventually free. Change-Id: Ie9523da8db738e7478a1c73e3e1a6b24aed38442 Reviewed-on: https://pdfium-review.googlesource.com/41290 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-08-23Fix shadowed variablesRyan Harrison
This CL fixes instances of variable shadowing that are discovered by turning on -Wshadow. BUG=pdfium:1137 Change-Id: I418d50de89ecbeb12e85b23a358bc61e8f16e888 Reviewed-on: https://pdfium-review.googlesource.com/41150 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
2018-08-23Remove bool arg from CFWL_Widget::GetBorderSize().Tom Sepez
The arg determined returning value for X or Y dimension. Splitting into two separate methods is much clearer at the call sites. Add missing consts along the way. Change-Id: I498ea5a8fb4618166727b8a08ade6fcca2111d17 Reviewed-on: https://pdfium-review.googlesource.com/41170 Reviewed-by: Lei Zhang <thestig@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>