summaryrefslogtreecommitdiff
path: root/core
AgeCommit message (Collapse)Author
2017-08-10Make CFX_ByteString(ostringstream) const.Henrique Nakashima
Change-Id: I782379cc7f93b93ed34a5d0a39ee2f198c650465 Reviewed-on: https://pdfium-review.googlesource.com/10430 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2017-08-09Remove CFX_ByteTextBuf from CFX_UTF8EncoderHenrique Nakashima
Also making CFX_ByteString(ostringstream) const. Bug: pdfium:731 Change-Id: Iaee610248a5634e8731eaf05944c32d52c4e8015 Reviewed-on: https://pdfium-review.googlesource.com/10151 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-08-09Add a FPDF_GetFileVersion() test for a linearized document.Lei Zhang
Change the CPDFParserEmbeddertest.Feature_Linearized_Loading test case into FPDFViewEmbeddertest.LinearizedDocument, and add a call to FPDF_GetFileVersion(). Change-Id: I0272c1e71c6f61393838bd3db41b154c4f5620ba Reviewed-on: https://pdfium-review.googlesource.com/10450 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2017-08-09Remove useless code.Artem Strygin
The CPDF_Parser::IsVersionUpdated is not used anymore. Change-Id: I896c42daca3c5bed7b9d700eaea6ced686ab5acb Reviewed-on: https://pdfium-review.googlesource.com/10490 Commit-Queue: Art Snake <art-snake@yandex-team.ru> Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-08-09Unify initialization of CPDF_Parser.Artem Strygin
Move syntax parser initialization in separate method. Change-Id: I701284b1fee26a474c24ca68948a3462cc68faec Reviewed-on: https://pdfium-review.googlesource.com/10291 Commit-Queue: Art Snake <art-snake@yandex-team.ru> Reviewed-by: Lei Zhang <thestig@chromium.org>
2017-08-09Unify of saving documents.chromium/3181Artem Strygin
In the original code the method of writing of objects depends on a much unpredictable factors: as: 1) Is there an updated version of the at least one object in the document. 2) The password is changed. 3) Was this object loaded earlier. 4) The Object is compressed and document have a password. With these factors it is difficult to predict what will be the final file. To reduce volatility use only one method that works in all cases mentioned. This method is parse then serialize. Change-Id: I3d7dcadd10abffbad68d1f993f2dd60b039ed989 Reviewed-on: https://pdfium-review.googlesource.com/9572 Commit-Queue: Art Snake <art-snake@yandex-team.ru> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-08-09Unify CPDF_Parser::ParseIndirectObjectAtXXX methods.Artem Strygin
Change-Id: I9ee1da4d0a9751dae8d595b610cf77c074c22cdc Reviewed-on: https://pdfium-review.googlesource.com/10350 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Art Snake <art-snake@yandex-team.ru>
2017-08-09Move CSS data tables only used in one fileDan Sinclair
This CL moves the cfx_cssdatatable tables and methods which are only used in cfx_cssdeclaration to an anonymous namespace. Change-Id: Ib5dc71cc85c348e2ae7feaab8d6495fc2aa88642 Reviewed-on: https://pdfium-review.googlesource.com/9253 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-08-09Fold CFX_IsOnlyValue define into only usageDan Sinclair
Change-Id: I2cb20fd00436858f035f984fc104bae2c2d01057 Reviewed-on: https://pdfium-review.googlesource.com/9252 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2017-08-08Add validator into CPDF_SyntaxParser.Artem Strygin
Change-Id: I7fe8dcd8854e2f08b7b0ee53bde6c864108142ff Reviewed-on: https://pdfium-review.googlesource.com/9571 Reviewed-by: Lei Zhang <thestig@chromium.org>
2017-08-08Move CSS code to coreDan Sinclair
The xfa/fde/css code has no other links into xfa/. This CL moves the css code to core/fxcrt/css and sets to only build when pdf_enable_xfa is enabled. Change-Id: Iefd208e1f83a28b80b567c574e841e87bce310be Reviewed-on: https://pdfium-review.googlesource.com/9251 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-08-07Tidy fx_codec_jpx_opj.cppchromium/3180Tom Sepez
Single no-op callback. pdfium::clamp() where appropriate. Use post-increment where appropriate. Add helper functions for image type. Change-Id: I1584a1c90b46bd87f6ee983b78b6a2119212d0fb Reviewed-on: https://pdfium-review.googlesource.com/10270 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2017-08-07Convert static functions to anonymous namespaceTom Sepez
Mechanical change to bring into conformance with style guide. Change-Id: I80d06708ed5c40af7e797ea5dc6279a0b4f3cf6a Reviewed-on: https://pdfium-review.googlesource.com/10250 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2017-08-07Fix PartitionAlloc vs. opj_malloc mismatch in fx_codec_jpx_opj.cppTom Sepez
Apply patch suggestions from reporter. Move all FX_Alloc'd memory into unique_ptrs so that no bare FX_Alloc/Free_Free calls remain. Fix a realloc / opj_realloc mismatch. Remove unused functions color_apply_icc_profile() and color_apply_conversion(). Tidy along the way, add some missing statics, and fix a confusing (but not quite member shadowing) local name. Bug: 752829 Change-Id: Ibf2d108a857e3de39e752c2c553a31e002a07caf Reviewed-on: https://pdfium-review.googlesource.com/10230 Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: Chris Palmer <palmer@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2017-08-04Remove CFX_ByteTextBuf from cpdfsdk_interform.cpp and others.chromium/3177Henrique Nakashima
New version of the CL that include fpdf_parser_utility.cpp where there is an overload for CFX_ByteTextBuf << CPDF_Object* used by CFDF_Document. Bug: pdfium:731 Change-Id: I54f4e9ee7e10e94388f6f6584f3999f43689e84c Reviewed-on: https://pdfium-review.googlesource.com/10170 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2017-08-04Enforce recent VC++ version (2015 or later).Tom Sepez
Remove ifdef'd code for versions we know will no longer work. Change-Id: I036c80168f846df1b98e9df4972f84655e8418fb Reviewed-on: https://pdfium-review.googlesource.com/10051 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2017-08-04Revert "Remove CFX_ByteTextBuf from cpdfsdk_interform.cpp and others."Henrique Nakashima
This reverts commit aea80dcc0abc0c310316fa502f91a359bc684758. Reason for revert: WriteBuf's behavior was altered Original change's description: > Remove CFX_ByteTextBuf from cpdfsdk_interform.cpp and others. > > Bug: pdfium:731 > Change-Id: I61d38ab3f2b0ac68b8479ade25bab50f3a73c27b > Reviewed-on: https://pdfium-review.googlesource.com/9770 > Reviewed-by: Tom Sepez <tsepez@chromium.org> > Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> TBR=tsepez@chromium.org,hnakashima@chromium.org,rharrison@chromium.org # Not skipping CQ checks because original CL landed > 1 day ago. Bug: pdfium:731 Change-Id: Ic66a2641c259173fb3792f7a4206e19ee4707fc9 Reviewed-on: https://pdfium-review.googlesource.com/10150 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2017-08-04Replace CFX_ByteTextBuf with ostringstream in fx_win32_gdipext.cppHenrique Nakashima
Bug: pdfium:731 Change-Id: I95d7c16e6c30e6675a17505359b5b7ae1dd5ff12 Reviewed-on: https://pdfium-review.googlesource.com/9950 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-08-03APIs and tests for retrieving raw/decoded data from image objectsJane Liu
Added FPDFImageObj_GetImageDataDecoded() for retrieving the uncompressed data of an image, and FPDFImageObj_GetImageDataRaw() for retrieving the raw data of an image. * Refactored out DecodeStreamMaybeCopyAndReturnLength(), which is used to decode both attachment data and image data. * Within DecodeStreamMaybeCopyAndReturnLength(), used a different decoder function which takes care of multiple filters if exist. As a result, CPDF_StreamParser::DecodeInlineStream() which was made static previously is now moved back into namespace. Bug=pdfium:677 Change-Id: I22a22c99acaca98ef8c15f88911f2646a2c854d5 Reviewed-on: https://pdfium-review.googlesource.com/9811 Commit-Queue: Jane Liu <janeliulwq@google.com> Reviewed-by: Lei Zhang <thestig@chromium.org>
2017-08-03APIs and tests for extracting bitmaps from image objectsJane Liu
Added FPDFImageObj_GetBitmap() that returns the bitmap of an image object, and a FPDFBitmap_GetFormat() that returns the format of a bitmap. * Fixed a small bitmap conversion bug in cfx_dibsource.cpp. * Enabled EmbedderTest::CompareBitmap() to support different formats of bitmaps. * Added an embedder test and a test PDF file with images of many different formats. Bug=pdfium:677 Change-Id: I6a72f9d969cf5f3577db9400ca33197c213622ed Reviewed-on: https://pdfium-review.googlesource.com/9690 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Jane Liu <janeliulwq@google.com>
2017-08-03kill some stray __native_client__ definesTom Sepez
There isn't any work to NaCl PDFium at the moment, and it would take a lot more than these few changes. Change-Id: I6c4bf5f38bbfb9cf4f5a5688128c7720c38a8ce4 Reviewed-on: https://pdfium-review.googlesource.com/10050 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2017-08-03Remove CPDF_Array::Truncate().chromium/3176Lei Zhang
The only non-test caller is gone. Change-Id: I261bc6d97c3047b2935d7b663c1a5f7d15670714 Reviewed-on: https://pdfium-review.googlesource.com/10010 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-08-03Do not truncate the filter array in PDF_DataDecode().Lei Zhang
It is not needed to fix https://crbug.com/552046 and it causes different bug. BUG=chromium:750993 Change-Id: I11627045bd3e73fb439884c3362ab1c26eb95fe3 Reviewed-on: https://pdfium-review.googlesource.com/9990 Reviewed-by: Oliver Chang <ochang@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2017-08-03Avoid a redundant header offset check in CPDF_Parser.Lei Zhang
CPDF_Parser::StartLinearizedParse() calls StartParse(), but already knows the PDF header offset. Refactor StartParse() so it does not have to look for the header again. Change-Id: Id8cc39301ae72da868dafc53921622d5b28ce26e Reviewed-on: https://pdfium-review.googlesource.com/9830 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Art Snake <art-snake@yandex-team.ru>
2017-08-02Replace CFX_ByteTextBuf with ostringstream in cfx_psrenderer.cpp.Henrique Nakashima
Bug: pdfium:731 Change-Id: Iac887a8d3485b5511ec7f3d809efeb8af6ea9ce7 Reviewed-on: https://pdfium-review.googlesource.com/9930 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2017-08-02Replace CFX_ByteTextBuf from cpdf_security_handler.cpp with std::vectorHenrique Nakashima
Bug: pdfium:731 Change-Id: I63532e06aa2c135f34a6adda24ae1cfbc5922ac9 Reviewed-on: https://pdfium-review.googlesource.com/9871 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2017-08-02Remove unused FromUnicode methodRyan Harrison
A helper method for FromUnicode existed that converted wchar_t* to CFX_WideString before calling the remaining FromUnicode. This method is not used in the code base, so it has been removed. This simplifies converting FX_STRSIZE to be unsigned, since one of parameters to this method was of type FX_STRSIZE. BUG=pdfium:828 Change-Id: I3da677b84ac3b82ba48497e26d2ac80dd14302e6 Reviewed-on: https://pdfium-review.googlesource.com/9910 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2017-08-02Unify parsing of cross refs v4Artem Strygin
Change-Id: I7e3d45263a0bae61fd86fd4c3710de7fc0b9347d Reviewed-on: https://pdfium-review.googlesource.com/9290 Reviewed-by: Wei Li <weili@chromium.org> Commit-Queue: Art Snake <art-snake@yandex-team.ru>
2017-08-02Remove parameter from GetIDRyan Harrison
All of the call sites for this method used the default value, so it has been removed. This simplifies converting FX_STRSIZE to be unsigned, since the removed parameter was of this type. BUG=pdfium:828 Change-Id: I369285aed561731ab34ec6d30de0d21fb3431492 Reviewed-on: https://pdfium-review.googlesource.com/9891 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2017-08-02Remove support for out of bounds params in DeleteRyan Harrison
The existing implementation of Delete on the string classes handles some cases where the range being deleted is out of bounds by clipping it to the valid range. This behaviour can lead to programming problems in the calling code being masked by the fact the Delete method still does something. The new version of these methods does an early return if the parameters are invalid. This change also effectively removes support for negative string sizes from the Delete method, so converting FX_STRSIZE to be unsigned will be easier. BUG=pdfium:828 Change-Id: Idbb4a62f70a75eba06e7809e011b25da2d7404c4 Reviewed-on: https://pdfium-review.googlesource.com/9890 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2017-08-02Rewrite how string Insert() methods handle out of bound indicesRyan Harrison
The existing behaviour was to clamp the provided index to the valid bounds. This would lead to programming errors being hidden, since inserting would still do something even if the index calculation was wrong. The behaviour of these methods has been changed to instead early return when this occurs, returning the old length value. The caller can check if the call to Insert actually did anything by comparing the returned value to the length before calling insert. All of the existing calls to Insert have been tested by running all of the tests with asserts in the Insert method to check the index is in bounds. Additionally the call sites have been manually inspected. The majority of them are of the form Insert(0, foo) and the rest tend to be in a loop advancing from 0 to length. Convenience methods InsertAtFront/InsertAtBack have been added to handle calling Insert when the intent is for the character to be added to the beginning or end of the string. Existing call sites to Insert that do this have been converted. This work was originally being performed to check if there would be any issues in these methods with making FX_STRSIZE unsigned. BUG=pdfium:828 Change-Id: I60cee5ad45338aa8ed46569de7bcc78a76db18f7 Reviewed-on: https://pdfium-review.googlesource.com/9870 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-08-02Pass a CPDF_ImageObject* into CPDF_ImageRenderer::Start().Lei Zhang
Instead of passing in a CPDF_PageObject* and then converting it to an image, which is always what it is. Change-Id: I146a476147f4b344417982b5ace002b9bd7b3d80 Reviewed-on: https://pdfium-review.googlesource.com/9810 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2017-08-02Remove unused CPDF_FlateEncoder ctor.Lei Zhang
Callers removed in commit 4b78b18. Change-Id: I6eec6ba18712040180b12d56b59c6a8379de4379 Reviewed-on: https://pdfium-review.googlesource.com/9750 Reviewed-by: Nicolás Peña <npm@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2017-08-02Remove CFX_ByteTextBuf from cpdfsdk_interform.cpp and others.Henrique Nakashima
Bug: pdfium:731 Change-Id: I61d38ab3f2b0ac68b8479ade25bab50f3a73c27b Reviewed-on: https://pdfium-review.googlesource.com/9770 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2017-08-01Add public access for read stream into CPDF_SyntaxParserArtem Strygin
Change-Id: I5deb6049db41387ac030a6ba5296ee6187120190 Reviewed-on: https://pdfium-review.googlesource.com/9470 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2017-08-01Improve readability in CPDF_Parser::ObjectInfo.Artem Strygin
Make CPDF_Parser::ObjectInfo::pos a union, since the data is used as an object number when the object is compressed. Change-Id: Id7c32759f7411cc80285bb7f3088b5aa6ff5bf05 Reviewed-on: https://pdfium-review.googlesource.com/9570 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Art Snake <art-snake@yandex-team.ru>
2017-08-01Implement read Session.Artem Strygin
Helper for validate read problems locally, Change-Id: I2bfbbaab8a67c0fd0cee3dadcd0f9cad5953101c Reviewed-on: https://pdfium-review.googlesource.com/9552 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Art Snake <art-snake@yandex-team.ru>
2017-08-01Change CPDF_Parser::GetIndirectBinary() to return a std::vector.Lei Zhang
Fixes potential leaks in CPDF_Creator::WriteOldIndirectObject(), the only caller. Change-Id: I8a20da8a555c8d28f3bcd467a193a6a81c9f91d9 Reviewed-on: https://pdfium-review.googlesource.com/9751 Reviewed-by: Art Snake <art-snake@yandex-team.ru> Commit-Queue: Lei Zhang <thestig@chromium.org>
2017-08-01Encapsulate some CFX_Char members.Lei Zhang
Change-Id: Iab34de5858ae06582023be220ef7dd0d1d0a91c9 Reviewed-on: https://pdfium-review.googlesource.com/9530 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org>
2017-08-01Remove support for negative params to ReleaseBuffer()Ryan Harrison
This CL removes the default param value for this method, which was negative. It also adds in a method to get buffer lengths, so that the callsites can explictly passing in the length of the buffer if they were using the default value previously. BUG=pdfium:828 Change-Id: I0170771ee81970b8b601631015ab3e6e39fea8ea Reviewed-on: https://pdfium-review.googlesource.com/9790 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2017-08-01Replace raw value for constant error value in string operationsRyan Harrison
Currently Find() and other methods that return a FX_STRSIZE return -1 to indicate error/failure. This means that there is a lot of magic numbers and magic checks floating around. The standard library for similar operations uses a npos constant. This CL implements FX_STRNPOS, and replaces usages of magic number checking. It also does some type cleanup along the way where it was obvious that FX_STRSIZE should be being used. Removing the magic numbers should make eventually changing FX_STRSIZE to be unsigned easier in the future. BUG=pdfium:828 Change-Id: I67e481e44cf2f75a1698afa8fbee4f375a74c490 Reviewed-on: https://pdfium-review.googlesource.com/9651 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-08-01Prevent use of null pFileRead in CPDF_DataAvail.chromium/3174Artem Strygin
Change-Id: I52e668ca410a0c6b96a789ecc18c993152047ead Reviewed-on: https://pdfium-review.googlesource.com/9550 Commit-Queue: Art Snake <art-snake@yandex-team.ru> Reviewed-by: Lei Zhang <thestig@chromium.org>
2017-07-31Initialize CPDF_PathObject members on constructor.Henrique Nakashima
Bug: pdfium:839 Change-Id: I3a069bf7d8a75f32cf9bcc9e9926ad19aa006795 Reviewed-on: https://pdfium-review.googlesource.com/9650 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2017-07-28Use FX_GetUnicodeProperties() in more places.chromium/3173chromium/3172chromium/3171Lei Zhang
Instead of accessing the raw kTextLayoutCodeProperties data. Change-Id: Ie39cf5c098e1564ae2f18d76b234af42f24db4ca Reviewed-on: https://pdfium-review.googlesource.com/9451 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org>
2017-07-28Add CPDF_Stream::ReplaceData method.chromium/3170Artem Strygin
Change-Id: I94b2e8f6fd522b97c917037e32fb3bcbeea0cbeb Reviewed-on: https://pdfium-review.googlesource.com/8911 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2017-07-28Convert calls to Mid() to Left() or Right() if possibleRyan Harrison
The various string/byte classes support Mid(), Left(), and Right() for extracting substrings. Mid() can handle all possible cases, but Left() and Right() are useful for common cases and more explicit about what is going on. Calls like Mid(offset, length - offset) can be converted to Right(length - offset). Calls like Mid(0, length) can be converted to Left(length). If the substring being extracted does not extend all the way to one of the edges of the string, then Mid() still needs to be used. BUG=pdfium:828 Change-Id: I2ec46ad3d71aac0f7b513e103c69cbe8c854cf62 Reviewed-on: https://pdfium-review.googlesource.com/9510 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2017-07-28Return removed value from dictionary.Artem Strygin
Change-Id: I218179565cd991b71fd9c909b94f967bbf80c74d Reviewed-on: https://pdfium-review.googlesource.com/8912 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2017-07-28Implement read validator.Artem Strygin
The wrapper for IFX_SeekableReadStream. Which allow us to check data availability on read request and request downloading of non available data on fly. Change-Id: I27c66cd58f43f8432f73104cc3f4c980515a9b56 Reviewed-on: https://pdfium-review.googlesource.com/9050 Commit-Queue: Art Snake <art-snake@yandex-team.ru> Reviewed-by: (OOO Jul 28 - Aug 8) dsinclair <dsinclair@chromium.org>
2017-07-27Simplify FX_GetMirrorChar() code.Lei Zhang
Change-Id: I43ec0d4a3b60d51c59ba5a540dfe24803e725089 Reviewed-on: https://pdfium-review.googlesource.com/9170 Reviewed-by: Nicolás Peña <npm@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2017-07-27Define SIZEOF_VOIDP and other cleanup in tiffconfNicolas Pena
This CL uses sizeof to calculate sizes in tiffconf. It adds SIZEOF_VOIDP to allow LibTIFF to take codepaths reducing OOMs. Finally, it gets rid of _FX_WIN32_MOBILE_ since it's never defined. Bug: chromium:718494 Change-Id: I9e6fb2812487ccd7d08e56fd1954c716ddccd07b Reviewed-on: https://pdfium-review.googlesource.com/9410 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Nicolás Peña <npm@chromium.org>