summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-04-27Roll DEPS for ICU to e4194dc7chromium/3411Lei Zhang
https://chromium.googlesource.com/chromium/deps/icu/+log/d888fd2a..e4194dc7 TBR=dsinclair@chromium.org Change-Id: I27a492c585a1c38b50a899317b5b98fe231e15b1 Reviewed-on: https://pdfium-review.googlesource.com/31475 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-04-27Roll DEPS for build and buildtools.Lei Zhang
https://chromium.googlesource.com/chromium/src/build/+log/57e31076..037f38ae https://chromium.googlesource.com/chromium/buildtools/+log/3748a2a9..ab7b6a7b TBR=dsinclair@chromium.org Change-Id: I44b39a2e9b1f863e5f946e128dc8d56102f465f0 Reviewed-on: https://pdfium-review.googlesource.com/31474 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-04-27Roll DEPS for Clang to abe5e4f9.Lei Zhang
AKA roll Clang 329921:330570. https://chromium.googlesource.com/chromium/src/tools/clang/+log/d7c36b0a..abe5e4f9 TBR=dsinclair@chromium.org Change-Id: Ideee7789907ece375d5878076843a9288e8dae5b Reviewed-on: https://pdfium-review.googlesource.com/31472 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-04-26Reset entity start when clearing textchromium/3410Dan Sinclair
When we extract the text data we need to make sure we clear any entity start positions, otherwise our entity extraction will go badly. Bug: chromium:836661 Change-Id: Icbafdef912b1f5b495eafef426961c5df66cd3fd Reviewed-on: https://pdfium-review.googlesource.com/31450 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
2018-04-26Fix caret moving to next line upon click on line break in XFA edit.Henrique Nakashima
Bug: chromium:836361 Change-Id: I40739a21a60610bd5ab0143629f87562ba834a0d Reviewed-on: https://pdfium-review.googlesource.com/31410 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-04-26Replace some c-style cast with static_cast<>Tom Sepez
Change-Id: I9dd6a36770f77f3df6c4395572785d37402eadc2 Reviewed-on: https://pdfium-review.googlesource.com/31350 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-04-26Enter key inserts a line break correctly in XFA edits.Henrique Nakashima
Bug: chromium:836361 Change-Id: I6d86ccec813f934ed2d0ab124501527d39ce535f Reviewed-on: https://pdfium-review.googlesource.com/31390 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-04-26Improve diffing and regeneration of expected pngs.Henrique Nakashima
- If a .pdf had more than one page and any of them except the first had no expectation, that page and the ones after it were not diff'ed. - If a .pdf did not have expectations for any or all pages, --regen did not generate those expectations. Change-Id: Ie6dacf07e44feb4a14a6a92eb20c9aa19858a8f9 Reviewed-on: https://pdfium-review.googlesource.com/25770 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-04-26Optionally optimize PNGs with optipng in make_expected.sh.Lei Zhang
Change-Id: I10b1844052431fdb25d028eac39f45f481f32ba1 Reviewed-on: https://pdfium-review.googlesource.com/31351 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2018-04-25Replace reinterpret_cast with static_cast where possibleTom Sepez
Change-Id: Ic62f1def8e043494c9fa6c08a937d7d872513567 Reviewed-on: https://pdfium-review.googlesource.com/31314 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-04-25Make XFA Caret become immediately visible when moved.Henrique Nakashima
The timer resets when it moves, and the current starting state is not visible, so moving the caret around using keyboard keys, typing, the mouse, or switching focus has a 0.6s delay in showing its position. This change makes the form feel much more responsive. Change-Id: Iff38ade9be26d4c5283ee1268b3e2c307182738c Reviewed-on: https://pdfium-review.googlesource.com/31293 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2018-04-25Use local for return value in factory methodRyan Harrison
Follow requested in review after submit. BUG=chromium:835608 Change-Id: I958a35f1cdaadbdb21e7c86b8c5b297ef01a2503 Reviewed-on: https://pdfium-review.googlesource.com/31316 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2018-04-25Don't store CE (comment extension) block data when decoding GIFRyan Harrison
GIF extensions are laid out as follows: <size byte> <chunk of data> <size byte> <chunk of data> ... <terminator byte>. The decoder needs to scan along the data, finding the size bytes to determine where the block ends in the stream, even if we don't care about the content. Currently the decoder is storing all of the data chunks, which are never used and take a lot of time to concat together if they are very small. Our implementation of the GIF spec does not handle this extension, so when scanning for the end of the block, just don't bother storing data from it. BUG=chromium:833168 Change-Id: Iadf3ab3afd8145b6c5c7c22c30fe9316efcafc15 Reviewed-on: https://pdfium-review.googlesource.com/31315 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-04-25Use a bool in FindBit() in the fax codec.Lei Zhang
Change-Id: If75c0db94d341715e0bc6406f0fd89812f1ea73c Reviewed-on: https://pdfium-review.googlesource.com/31311 Commit-Queue: Lei Zhang <thestig@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2018-04-25Add PostScript PASSTHROUGH options to FPDF_SetPrintMode().Lei Zhang
The existing PostScript modes write data into EMF comments. This satisfies Chromium's use case, but other embedders want to write data out via ExtEscape() in PASSTHROUGH mode. BUG=pdfium:1068 Change-Id: I998035e99fbb84b16dcd244b750b476cecc3bd22 Reviewed-on: https://pdfium-review.googlesource.com/31299 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> Reviewed-by: Rebekah Potter <rbpotter@chromium.org>
2018-04-25Use PredictorType in more places.Lei Zhang
Change-Id: Ifbacab2868232a5597ef782fb24a749ebb4871bf Reviewed-on: https://pdfium-review.googlesource.com/31270 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2018-04-25Clean up CCodec_FlateScanlineDecoder.Lei Zhang
- Merge Create() with the ctor. - Initialize all member variables and mark them const when possible. - Add an enum class for the predictor type. - Move it into an anonymous namespace. Change-Id: If7bb62ddf4a4e00ec2d02355e7c178028a7c187c Reviewed-on: https://pdfium-review.googlesource.com/31233 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2018-04-25Introduce ScopedFPDF types in public/cpp/fpdf_scopers.hTom Sepez
Applies std::remove_ptr to the public API types so that we can deduce a correct unique ptr type no matter how that API might change away from void* usage. Creates shorter names for std::unique_ptr<std::remove_pointer<>, ...> Change-Id: I04a0ff43cb7d5a4d3867939a53a54c9cef00db86 Reviewed-on: https://pdfium-review.googlesource.com/31292 Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-04-25Allow failing to build CFXA_FWLTheme if unable to load fontsRyan Harrison
The current implementation of this class potentially does a lot of work in the constructor. Specifically when getting a calendar font it might cause the whole font loading pipeline to run. This can fail if it is unable to load fonts. Breaking out the font loading part, so that the factory method can return nullptr if it fails. Additionally adding a guard for the case the font manager fails to load, which is the root cause of the crash in the bug. BUG=chromium:835608 Change-Id: I05b987aaad6f0814907066904331610a7fbb7f70 Reviewed-on: https://pdfium-review.googlesource.com/31330 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
2018-04-25Remove unused PNGEncode() code.Lei Zhang
BUG=pdfium:41 Change-Id: I98070a5a6c88a0769f2b571eae4fe62092f7dfcd Reviewed-on: https://pdfium-review.googlesource.com/31232 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-04-25Roll third_party/googletest/src/ a325ad2db..4bd8c4638 (125 commits)Lei Zhang
https://chromium.googlesource.com/external/github.com/google/googletest.git/+log/a325ad2db5de..4bd8c4638ada Created with: roll-dep third_party/googletest/src Change-Id: I963e0b39119ab564754a81d20c38b5641b9230b5 Reviewed-on: https://pdfium-review.googlesource.com/31130 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-04-25Use WindowsPrintMode in more places in place of ints.Lei Zhang
Move WindowsPrintMode assertion into CPSPrinterDriver. Change-Id: I570076b43751e052c5396e89a6674b83a4ad1a1e Reviewed-on: https://pdfium-review.googlesource.com/31298 Reviewed-by: Rebekah Potter <rbpotter@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-04-25Fix behavior of Delete key in XFA edit.Henrique Nakashima
Delete had two issues: it acted as a backspace that did not move the caret; delete was considered a valid char to insert in the character buffer. Bug: chromium:820104 Change-Id: I869eedcbf369b9b1df79f16285d991b8e630cd05 Reviewed-on: https://pdfium-review.googlesource.com/31291 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2018-04-25Fix slight type inconsistencies discovered with strict FPDF API types.Tom Sepez
Moved to an independent CL from https://pdfium-review.googlesource.com/c/pdfium/+/31296 Change-Id: Ia76e5609dc09bb7b483e092b10d9f8522e2dc175 Reviewed-on: https://pdfium-review.googlesource.com/31297 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-04-25Remove CDWriteExt.Lei Zhang
It is never used. Change-Id: I09220eb16a4679c8499079c3c1375574f6fc0450 Reviewed-on: https://pdfium-review.googlesource.com/31300 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-04-25Roll third_party/freetype/src/ 26ad1acbc..2157d8fa6 (21 commits)chromium/3409Nicolas Pena
https://chromium.googlesource.com/chromium/src/third_party/freetype2.git/+log/26ad1acbcb4c..2157d8fa6f7e $ git log 26ad1acbc..2157d8fa6 --date=short --no-merges --format='%ad %ae %s' 2018-04-24 bungeman [base] Avoid undefined behaviour in lcd filtering code (#53727). 2018-04-22 wl * src/base/ftoutln.c (FT_Outline_Decompose): Improve error tracing. 2018-04-22 apodtele [base] Fix bitmap emboldening. 2018-04-22 wl Revert "[base] Fix bitmap copying where the new pitch is smaller." 2018-04-22 wl [base] Fix bitmap copying where the new pitch is smaller. 2018-04-22 wl Another fix for handling invalid format 2 cmaps. 2018-04-19 apodtele Documentation tweaks. 2018-04-19 wl [autofit] Add support for Georgian Mtavruli characters. 2018-04-19 wl Fix handling of invalid format 2 cmaps. 2018-04-17 wl [truetype] Integer overflow issues. 2018-04-16 wl CHANGES: Mention CVE-2018-6942. 2018-04-16 wl [truetype] Integer overflow issues. 2018-04-15 ankit97dhankhar [docmaker] Make it work with python3. 2018-04-15 apodtele [build] Use `info' function of make 3.81. 2018-04-15 wl [truetype]: Limit `SLOOP' bytecode argument to 16 bits. 2018-04-14 wl [truetype] Integer overflow issues. 2018-04-14 wl [autofit] Update to Unicode 11.0.0. 2018-04-07 madigens Modernize CMake build. 2018-04-09 wl [truetype] Integer overflow issues. 2018-04-06 apodtele [windows, wince] Clean up legacy project files. 2018-04-04 wl [cff, type1] Sanitize `BlueFuzz' and `BlueShift'. Created with: roll-dep third_party/freetype/src Bug: pdfium:1070 Change-Id: I097d77d9f9f4e37524edfdeaa2bc49e261ce4f42 Reviewed-on: https://pdfium-review.googlesource.com/31312 Reviewed-by: Nicolás Peña Moreno <npm@chromium.org> Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
2018-04-25Remove m_NodeStack from CFX_XMLParserchromium/3408Dan Sinclair
This CL removes the m_NodeStack member from the CFX_XMLParser. Instead of using the node stack we retrieve the parent by getting the current childs parent. Change-Id: I0c4c220d14e35c5b6edc5c9c6a3008368f2d550a Reviewed-on: https://pdfium-review.googlesource.com/31290 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-04-24Fix include order for cpdfxfa_context.hchromium/3407Tom Sepez
It should include cpdfsdk_helpers, not the other way around. Change-Id: Id2cc3018e8c38f82ce8a35b03bb90e936aa1d446 Reviewed-on: https://pdfium-review.googlesource.com/31294 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-04-24Remove m_CurNodeType from CFX_XMLParserDan Sinclair
This CL removes the m_CurNodeType member from CFX_XMLParser. This was, essentially, duplicating the m_XMLNodeTypeStack. We now use the top() of the stack element to find the same information. Change-Id: I26507d2eee954837210aa42919ff061cfc8e85d8 Reviewed-on: https://pdfium-review.googlesource.com/31277 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2018-04-24Switch declaration order to prevent UAFRyan Harrison
This is occuring when the variables go out of scope, due to C++s first in, last out destruction policy. BUG=chromium:808333 Change-Id: I44f37520a22720bc23df4c8a72ff73994c37eea1 Reviewed-on: https://pdfium-review.googlesource.com/31278 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2018-04-24Remove CFX_BlockBufferchromium/3406Dan Sinclair
This CL removes the usage of CFX_BlockBuffer from CFX_XMLParser. The block buffer has been replaced by a vector which is emptied out after the characters are removed. This should use less memory when parsing XML as the block buffer was previously storing all text characters seen in the file. Change-Id: I89568c664c762bb9feb034348524e5e86c2d9078 Reviewed-on: https://pdfium-review.googlesource.com/31275 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
2018-04-24Fix edit text rendered with wrong offsets after deletion.Henrique Nakashima
Bug: chromium:835924 Change-Id: I3d6a3d1947cb1b8cda246cc74ef0b79a482b7997 Reviewed-on: https://pdfium-review.googlesource.com/31276 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2018-04-24Cleanup CFX_XMLParser entity conversionDan Sinclair
This CL converts the CFX_XMLParser to use the FXSYS methods to convert decimal and hex chars during entity conversion. Change-Id: I7f6c83fc528e95c9f4c2bcdb04f0066da2c15c09 Reviewed-on: https://pdfium-review.googlesource.com/31274 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2018-04-24Fix caret moving to next line on click in multiline XFA edit.Henrique Nakashima
On a mouse click after the end of a line (except for the last line) in an XFA text edit, the caret was moved to the beginning of the next line, as the position after the space was actually in the next line. This CL changes the behavior so that the caret is positioned before the space in this case. Note it's possible to click directly to that position by clicking on the beginning of the next line. Bug: chromium:832293 Change-Id: Ib376e4cca7b32a87d478d3346cb3d8f3bd825daa Reviewed-on: https://pdfium-review.googlesource.com/31110 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2018-04-24Remove duplicate data extraction from CFX_XMLParserDan Sinclair
The methods to get a piece of data from the text buffer are all identical. This CL collapses them all into a single GetTextData method. Change-Id: Ibd2ace9023a3707505c4c80c6aeb01af666445d9 Reviewed-on: https://pdfium-review.googlesource.com/31273 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2018-04-23Cleanup CFX_XMLParser initializationDan Sinclair
This CL moves most initialization of CFX_XMLParser into the header file and re-organizes the members to group members together better. Change-Id: I49031ea65dc0d68c9b47cffe942c65f488bbaf20 Reviewed-on: https://pdfium-review.googlesource.com/31250 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-04-23Pre-allocate more string buffers in barcode codeRyan Harrison
Another couple of examples where the slow down in the barcode code can be fixed by reserving and thus pre-allocating the buffer that backs the Widestring. Doing += in a tight loop caused reallocation thrashing. BUG=chromium:834630 Change-Id: I48a802225351bcaf992c324732fddf81639b4898 Reviewed-on: https://pdfium-review.googlesource.com/31230 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
2018-04-23Make CFX_SeekableStreamProxy a subclass of IFX_SeekableReadStreamchromium/3405Dan Sinclair
This CL changes CFX_SeekableStreamProxy to be an IFX_SeekableReadStream subclass. This is a reland of https://pdfium-review.googlesource.com/c/pdfium/+/30879 after fix bad merge. Change-Id: Iad58abe7e065541867f202059a944e9be4da5713 Reviewed-on: https://pdfium-review.googlesource.com/31195 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-04-23Change CFX_XML Save to take a write streamDan Sinclair
This CL changes CFX_XML to use an IFX_SeekableWriteStream instead of the more generic IFX_SeekableStream. This is a reland of https://pdfium-review.googlesource.com/c/pdfium/+/30877 without pulling in the XML lifetime changes. Change-Id: I5091da6ad37715fff77f3f22d35ab0105f2bc3d0 Reviewed-on: https://pdfium-review.googlesource.com/31194 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-04-23Validate the Size dictionary entry in CPDF_SampledFunc.Lei Zhang
It is required to be an array of positive integers. The existing implementation seems to accommodate non-compliant PDFs where the Size entry is an integer. Change-Id: I58faa3f84ca627f189c67bab5884d4b1f9b105ca Reviewed-on: https://pdfium-review.googlesource.com/31151 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
2018-04-23Revert "Change CFX_XML Save to take a write stream"dsinclair
This reverts commit 9a3a7709103a872037dcea1f3cf0b7785a3da191. Reason for revert: Gerrit did not do what I expected.... Original change's description: > Change CFX_XML Save to take a write stream > > This CL changes CFX_XML to use an IFX_SeekableWriteStream instead of the more > generic IFX_SeekableStream. > > Change-Id: I6e4def380c43eca755d91ad5cb6146c2dfdaee10 > Reviewed-on: https://pdfium-review.googlesource.com/30877 > Commit-Queue: dsinclair <dsinclair@chromium.org> > Reviewed-by: Tom Sepez <tsepez@chromium.org> TBR=tsepez@chromium.org,dsinclair@chromium.org,hnakashima@chromium.org Change-Id: I137e53bf93285b88ade6832dedefca66e3b61e13 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://pdfium-review.googlesource.com/31211 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-04-23Revert "Make CFX_SeekableStreamProxy a subclass of IFX_SeekableReadStream"dsinclair
This reverts commit c6077a0164340fa084be03eb059d608bc2675b2b. Reason for revert: Gerrit did not do what i expected. Original change's description: > Make CFX_SeekableStreamProxy a subclass of IFX_SeekableReadStream > > This CL changes CFX_SeekableStreamProxy to be an IFX_SeekableReadStream > subclass. > > Change-Id: I28ccb4771606fd6c9cc60e57297ae2e776fc5a9f > Reviewed-on: https://pdfium-review.googlesource.com/30879 > Commit-Queue: dsinclair <dsinclair@chromium.org> > Reviewed-by: Tom Sepez <tsepez@chromium.org> TBR=tsepez@chromium.org,dsinclair@chromium.org,hnakashima@chromium.org Change-Id: I65e7647221e9bad2c0db7d068638178996972437 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://pdfium-review.googlesource.com/31210 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-04-23Make CFX_SeekableStreamProxy a subclass of IFX_SeekableReadStreamdan sinclair
This CL changes CFX_SeekableStreamProxy to be an IFX_SeekableReadStream subclass. Change-Id: I28ccb4771606fd6c9cc60e57297ae2e776fc5a9f Reviewed-on: https://pdfium-review.googlesource.com/30879 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2018-04-23Change CFX_XML Save to take a write streamDan Sinclair
This CL changes CFX_XML to use an IFX_SeekableWriteStream instead of the more generic IFX_SeekableStream. Change-Id: I6e4def380c43eca755d91ad5cb6146c2dfdaee10 Reviewed-on: https://pdfium-review.googlesource.com/30877 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2018-04-23Create FPDFPageObjMark_GetParamStringValue().Henrique Nakashima
Bug: pdfium:1037 Change-Id: I05f992d2a4ee5a11b5c57ec51107c4b00011809c Reviewed-on: https://pdfium-review.googlesource.com/31190 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2018-04-23Disable JavaScript entirely if no JSPlatform passed by embedder.Tom Sepez
Allows run-time selection of whether to permit JS inside PDF. Previously, this was a link-time decision only. This requires a little more caution before we decide that we have the CJS_Runtime, and not the CJS_RuntimeStub in a few casts. Adds a kDisableJavaScript option to the form fill embeddertests. Adds a --disable-javascript flag to the pdfium_test executable. Also adds a --disable-xfa flag while we're at it. Change-Id: I8d8ac95f6474459cadba9a60572fbb342e984646 Reviewed-on: https://pdfium-review.googlesource.com/31090 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-04-23Provide double-byte terminator in Windows font variant name.Tom Sepez
When parsing UTF16-LE, the default trailing "\0" from a single-byte character literal isn't suffucient. Bug: 835184 Change-Id: Ie7db53262adbec0ebccb5d0b22752b8c9f5e6229 Reviewed-on: https://pdfium-review.googlesource.com/31191 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-04-23Create API to get PageObject mark parameters.Henrique Nakashima
New calls added in this cl: - FPDFPageObjMark_GetParamKey - FPDFPageObjMark_GetParamValueType - FPDFPageObjMark_GetParamIntValue Bug: pdfium:1037 Change-Id: Iedb74ddbf8a5483de62094ec295dadd6367d5175 Reviewed-on: https://pdfium-review.googlesource.com/30912 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2018-04-23Fix some nits in CPDF_SampledFunc().Lei Zhang
Change-Id: I54aae3c65ded779f1421b8f971a187979e5a204b Reviewed-on: https://pdfium-review.googlesource.com/31150 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-04-23Add more image size checks in CJBig2_Context.Lei Zhang
BUG=chromium:834557 Change-Id: I8fb8d74f87097b39608c3f83f2fa1c4e49e69980 Reviewed-on: https://pdfium-review.googlesource.com/31170 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>