summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-07-10Create API for adding content marks and setting their params.chromium/3488Henrique Nakashima
This CL creates the following new functions in the public API: - FPDFPageObj_AddMark - FPDFPageObjMark_SetIntParam - FPDFPageObjMark_SetStringParam Bug: pdfium:1037 Change-Id: Icabf3fdd8e8153b9156bab807a3708d38a9365d8 Reviewed-on: https://pdfium-review.googlesource.com/37330 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-07-10Make CPDF_StreamContentParser::m_pResources a const pointer.Lei Zhang
Move the code to select what it points at to a separate function, so the CPDF_StreamContentParser constructor only sets it once. Change-Id: I60013e77c8f37246282f94227a4aeb17270ee23c Reviewed-on: https://pdfium-review.googlesource.com/37450 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-07-10Fix m_ExtGID usage in CPDF_CharPosListNicolás Peña
This CL allows Apple to use m_GlyphIndex as a replacement for m_ExtGID when it is invalid. Bug: pdfium:1121 Change-Id: I49e7936201815bae5a2c8a26680fc1e542a60c43 Reviewed-on: https://pdfium-review.googlesource.com/37390 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
2018-07-10Fix duplicate symbols in Chromium builds.Lei Zhang
Commit 43f6bc80 copied over Chromium's base/debug/alias.cc, but that confuses Windows builds and Linux jumbo builds in Chromium. To fix this, wrap PDFium's copy in the pdfium namespace. BUG=chromium:860850 TBR=dsinclair@chromium.org Change-Id: I1ceec28b9ce6c2893bf030a5b6564dce6d6ec376 Reviewed-on: https://pdfium-review.googlesource.com/37430 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-07-09Prevent FX_OutOfMemoryTerminate() from being folded by the linker.Lei Zhang
Copy base::debug::Alias() from Chromium. Use it to prevent ICF from combining FX_OutOfMemoryTerminate() with similar functions. BUG=chromium:860850 Change-Id: Ifccb05c0218f86e44b9bb235847e01383ec36b3f Reviewed-on: https://pdfium-review.googlesource.com/37290 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-07-09Roll third_party/freetype/src/ 125b84800..b532d7ce7 (64 commits)chromium/3487Lei Zhang
https://chromium.googlesource.com/chromium/src/third_party/freetype2.git/+log/125b84800a32..b532d7ce708c Created with: roll-dep third_party/freetype/src BUG=pdfium:1116 Change-Id: Iff8a96107a8269a9ff653fa24436df5a2d38f19b Reviewed-on: https://pdfium-review.googlesource.com/36830 Reviewed-by: Nicolás Peña Moreno <npm@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-07-06Fix regression in CJBig2_TRDProc.chromium/3486chromium/3485chromium/3484Lei Zhang
Commit 7695dd0f mistakenly changed a signed integer to unsigned. This is incorrect because right shifts for negative integers behave differently. BUG=chromium:859284 Change-Id: Id9c54848b15ace1de080c174f261dd2c064018e0 Reviewed-on: https://pdfium-review.googlesource.com/37230 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-07-06Maintain a stack of CPDF_ContentMark while parsing a stream.Henrique Nakashima
This avoids copying the CPDF_ContentMark every time a mark is closed. Another benefit is that the same CPDF_ContentMarkItem vector will be shared by page objects before and after a nested mark. Bug: pdfium:1037 Change-Id: I6197f0b9a4693ef84da9269f86a2629aa50d8685 Reviewed-on: https://pdfium-review.googlesource.com/37190 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2018-07-06Make MarkData::mMarks a vector of RetainPtr<CPDF_ContentMarkItem>Henrique Nakashima
It is currently a vector of CPDF_ContentMarkItem. Copying MarkData whenever a content mark is opened or closed is inefficient since each MarkData will have copies of the same CPDF_ContentMarkItems. This CL changes the vector inside MarkData to contains only pointers to the CPDF_ContentMarkItems rather than copies of those items. More importantly, this unifies the dictionaries of each content mark. Previously, there were as many copies of those dictionaries as content marks scope changes inside the mark with parameters. Bug: pdfium:1037 Change-Id: Ia6f79b401d4e14ac07dbba81bbd97df965b77c94 Reviewed-on: https://pdfium-review.googlesource.com/37135 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2018-07-06Revert "Avoid duplicate data buffering in CPDF_SyntaxParser::ReadStream()."Henrique Nakashima
This reverts commit 77f15f7883638a4ced131d74c053af10a5970ce9. Reason for revert: Causes crbug.com/860210 Bug: chromium:860210 Original change's description: > Avoid duplicate data buffering in CPDF_SyntaxParser::ReadStream(). > > Allow sub-streams created from an IFX_SeekableReadStream to provide > stream data without copying memory. > The data will only reside in the top-level stream. > > For example: > For file > http://www.major-landrover.ru/upload/attachments/f/9/f96aab07dab04ae89c8a509ec1ef2b31.pdf > (18 Mb) > > The memory usage is reduced by ~13 Mb. > > Change-Id: I2595c014d0fbe1fdd181cc04965cfd7d901c2d88 > Reviewed-on: https://pdfium-review.googlesource.com/35930 > Commit-Queue: Art Snake <art-snake@yandex-team.ru> > Reviewed-by: dsinclair <dsinclair@chromium.org> TBR=tsepez@chromium.org,dsinclair@chromium.org,art-snake@yandex-team.ru # Not skipping CQ checks because original CL landed > 1 day ago. Change-Id: I947fca17052765935a952a4f25ca48f6599c4af9 Reviewed-on: https://pdfium-review.googlesource.com/37210 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2018-07-05Fix integer overflow in CPDF_Type3Cachechromium/3483Nicolas Pena
Bug: chromium:845800 Change-Id: Ib878dd991e435a76b63b662ef3d9d33c2cc61a19 Reviewed-on: https://pdfium-review.googlesource.com/37191 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2018-07-05Create content mark APIs to get values by key.Henrique Nakashima
Bug: pdfium:1037 Change-Id: Ie887c0bbf3e543676adec6d8411b0b3254677d3c Reviewed-on: https://pdfium-review.googlesource.com/37170 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2018-07-05Rename CPDF_ContentMark::m_Ref to ::m_pMarkData.Henrique Nakashima
Bug: pdfium:1037 Change-Id: I94efc14ce5f8d0d407853cce025f0184b3866cc4 Reviewed-on: https://pdfium-review.googlesource.com/37134 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2018-07-05Delete CPDF_ContentMark::HasRef()Henrique Nakashima
This is called by many client to make sure CountItems() does not crash. Moving the check to CountItems() makes HasRef() unnecessary. Bug: pdfium:1037 Change-Id: I4f21f33a88c9aad54f0dae18a38b370c6ceaec80 Reviewed-on: https://pdfium-review.googlesource.com/37133 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2018-07-05Clean up ProcessFormatTestValidateRyan Harrison
The existing implementation was overly complex and hard to understand, so this simplifies the logic. As part of this a number of issues, such as the lack of a failure path, have been resolved. The spec implies that a picture clause of "" should only accept the empty string, but existing implementation returns that validation does exist. This is due to the GetPicture() method returning a string, instead of a pointer or an Optional, so there is no mechanism to differentiate between a clause with an empty string and the clause not being present. This CL maintains the existing behaviour, because there may be code elsewhere that depends on it. The existing implementation returns validation not existing if the node under test is non-interactive. Though this seems intuitively correct, it is problematic, because this logic isn't just called via an interaction with the node. The validity check could be initiated by a call from JS attached to an event or a different node. Thus it is possible for a node under test to be non-interactive, but the result of the test is still important. The caller may make the node interactive if it isn't valid, for example. The spec doesn't state anything about interactivity controlling if validity checks run. This CL removes the related logic, since it was causing issues with an example PDF from the wild. BUG=pdfium:1065 Change-Id: Icb5b97e0d90f6fbc7ad6b87d81e256803c757eb0 Reviewed-on: https://pdfium-review.googlesource.com/37131 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
2018-07-05Replace SharedCopyOnWrite<MarkData> with RetainPtrHenrique Nakashima
A RetainPtr is already used inside SharedCopyOnWrite, and the API that CPDF_ContentMark offers is not intuitive. AddMark() and RemoveLastMark() currently copy the MarkData. The new API does not perform these copies, but rather leaves it to the client code. This is the first step to make CPDF_ContentMarkItems modifiable. As long as they are inside a SharedCopyOnWrite, they cannot be changed. Bug: pdfium:1037 Change-Id: I0cd6334b0b8db62070b4412f1d6d1c88bce9891f Reviewed-on: https://pdfium-review.googlesource.com/37132 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2018-07-04Remove gn arg 'use_coverage'chromium/3482Ryan Harrison
This flag was used for enabling GCOV style coverage data generation. Our code coverage tools now use the native LLVM tools, so no longer depend on this flag. Having this flag is confusing and a source of developer error. Change-Id: I42cfce6fe9e5a7d0f0ac13abdb5fec90f61f1c13 Reviewed-on: https://pdfium-review.googlesource.com/37130 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2018-07-03Use unowned ptr to Node from outside XFA node tree.chromium/3481Tom Sepez
Change-Id: Idcd992224fc5411c97f3001293af83a6c581e695 Reviewed-on: https://pdfium-review.googlesource.com/36991 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-07-03Use UnownedPtr<> in cxfa_nodeiteratortemplate.hTom Sepez
Change-Id: I48c20a56ca25a6821bc9b51aa59c037fe2341194 Reviewed-on: https://pdfium-review.googlesource.com/36972 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-07-03Use std::vector<float> in CPDF_Function.Tom Sepez
Change-Id: Ia994118f93f34b5c0c2f2f5ddfd70fe11e9ec549 Reviewed-on: https://pdfium-review.googlesource.com/37010 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-07-03Remove a parameter from CPDF_SyntaxParser::FindTag().Lei Zhang
The limit parameter is always set to 0. Change-Id: Idf7f44e1c5a895e05ad474932d3e9df85f435e3f Reviewed-on: https://pdfium-review.googlesource.com/36990 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-07-03Avoid duplicate data buffering in CPDF_SyntaxParser::ReadStream().Artem Strygin
Allow sub-streams created from an IFX_SeekableReadStream to provide stream data without copying memory. The data will only reside in the top-level stream. For example: For file http://www.major-landrover.ru/upload/attachments/f/9/f96aab07dab04ae89c8a509ec1ef2b31.pdf (18 Mb) The memory usage is reduced by ~13 Mb. Change-Id: I2595c014d0fbe1fdd181cc04965cfd7d901c2d88 Reviewed-on: https://pdfium-review.googlesource.com/35930 Commit-Queue: Art Snake <art-snake@yandex-team.ru> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-07-03Use more UnowendPtr<> in cfgas_formatstring.h and cfx_break.hTom Sepez
Move initializers to .h file (proves none missing). Change-Id: Iff8fe76e46634aa32a32ecd592476594a9d1bafa Reviewed-on: https://pdfium-review.googlesource.com/36950 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-07-03Use UnownedPtr<> in cfwl_notedriver.hTom Sepez
Re-order owned/unowned references to obey lifetime constraint. Change-Id: I589746b3c2e7d8c45d26d63d09eef977b095226d Reviewed-on: https://pdfium-review.googlesource.com/36970 Commit-Queue: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-07-03Test {Byte,Wide}String works with std::begin().Tom Sepez
Test-only CL. Building another container from the string in the manner in the test is desirable. Change-Id: I8f41aecfd82fd27f8b9af159b887b66b566f9ac7 Reviewed-on: https://pdfium-review.googlesource.com/36910 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-07-03Do data request for CPDF_Stream more smoothly.Artem Strygin
For DocumentLoader we should do reconnect to skip non-requested blocks on each requested offset jump. To reduce reconnections, read stream data first, then do all checks. Thereby the DocumentLoader will continue loading data without reconnections. Change-Id: I344d045e59c5de9e1a4aed0002ea122caa92f240 Reviewed-on: https://pdfium-review.googlesource.com/13450 Commit-Queue: Art Snake <art-snake@yandex-team.ru> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-07-03Roll DEPS for catapult to c61a0380Lei Zhang
https://chromium.googlesource.com/external/github.com/catapult-project/catapult.git/+log/8fbdf9f1..c61a0380 TBR=dsinclair@chromium.org Change-Id: Iba97d430fe2f03e37d3cc533f7509fa8ee92ccb3 Reviewed-on: https://pdfium-review.googlesource.com/36898 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-07-03Use unowned ptr in cpdf_stream_accTom Sepez
Change-Id: Ide081e462c83a5a209a2e6462dd12b298993f36f Reviewed-on: https://pdfium-review.googlesource.com/36850 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-07-03Roll third_party/depot_tools/ 869a2857a..5484b866d (244 commits; 34 trivial ↵Lei Zhang
rolls) https://chromium.googlesource.com/chromium/tools/depot_tools.git/+log/869a2857a4f3..5484b866dc93 Created with: roll-dep third_party/depot_tools TBR=dsinclair@chromium.org Change-Id: Ia377bf005acafa11357665fc3ee589a3bd166887 Reviewed-on: https://pdfium-review.googlesource.com/36897 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-07-03Roll third_party/googletest/src/ 4bd8c4638..ce468a17c (52 commits)Lei Zhang
https://chromium.googlesource.com/external/github.com/google/googletest.git/+log/4bd8c4638ada..ce468a17c434 Created with: roll-dep third_party/googletest/src TBR=dsinclair@chromium.org Change-Id: I35ec51d8184044ce6778b5346901f52b53418360 Reviewed-on: https://pdfium-review.googlesource.com/36896 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-07-03Roll tools/memory/ 427f10475..f7b00daf4 (2 commits)Lei Zhang
https://chromium.googlesource.com/chromium/src/tools/memory/+log/427f10475e1a..f7b00daf4df7 Created with: roll-dep tools/memory TBR=dsinclair@chromium.org Change-Id: Ie75566d6c34ecabd9ef423504ef2257e724e5760 Reviewed-on: https://pdfium-review.googlesource.com/36895 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-07-03Roll third_party/jinja2/ d34383206..45571de47 (2 commits)Lei Zhang
https://chromium.googlesource.com/chromium/src/third_party/jinja2.git/+log/d34383206fa4..45571de47328 Created with: roll-dep third_party/jinja2 TBR=dsinclair@chromium.org Change-Id: I55bfac63b3166015350230341a2ee53f12e2ccb6 Reviewed-on: https://pdfium-review.googlesource.com/36894 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-07-03Roll base/trace_event/common/ 0e9a47d74..211b3ed9d (3 commits)Lei Zhang
https://chromium.googlesource.com/chromium/src/base/trace_event/common.git/+log/0e9a47d74970..211b3ed9d048 Created with: roll-dep base/trace_event/common TBR=dsinclair@chromium.org Change-Id: I38ac2555bbdbc159f81f198596e244806abbe3c7 Reviewed-on: https://pdfium-review.googlesource.com/36893 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-07-03Roll third_party/zlib/ 8c371ad77..39b4a6260 (5 commits)Lei Zhang
https://chromium.googlesource.com/chromium/src/third_party/zlib.git/+log/8c371ad77b83..39b4a6260702 Created with: roll-dep third_party/zlib TBR=dsinclair@chromium.org Change-Id: Id5352f7d921e8d752a7f70ee18b11026661f2165 Reviewed-on: https://pdfium-review.googlesource.com/36892 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-07-03Forward declare CPDF_SyntaxParser when possible.Lei Zhang
Change-Id: Ib9b30f7f4e1c41b0e2e2c1757252736599055c96 Reviewed-on: https://pdfium-review.googlesource.com/36870 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-07-03Use UnownedPtr<> in cfwl_messagekillfocus.hTom Sepez
Also make private member along the way. Change-Id: I08a006a1bcca4e8ca21834dfda695a2d77d0a431 Reviewed-on: https://pdfium-review.googlesource.com/36930 Commit-Queue: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-07-03Use UnownedPtr<> in cfwl_scrollbar.h and cfwl_themebackground.hTom Sepez
Change-Id: Ib65197a9cd9de173de8e77db168dcfbb43669022 Reviewed-on: https://pdfium-review.googlesource.com/36911 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-07-03Use UnownedPtr<> in cxfa_{ffwidgethandler,imagrenderer,loadercontext}.hTom Sepez
Change-Id: I25496c9792a99ca27d2ab84c267770ff941cf921 Reviewed-on: https://pdfium-review.googlesource.com/36912 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-07-03Avoid explicit allocs in fxbarcode matrix classes.Tom Sepez
Other cleanups: Remove unused method. Fold Init() into constructor. Return span<> where possible. Change-Id: Ie38d32efb6e63d86ae24e93684903a6dd900810f Reviewed-on: https://pdfium-review.googlesource.com/36810 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-07-03Use more UnownedPtr<> in cfxa_ffpageviewTom Sepez
Change-Id: Ifdb9fb23d61082b7c1b9b93c057e0881959cea2a Reviewed-on: https://pdfium-review.googlesource.com/36530 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-07-03Remove XFA_LAYOUT_INVALIDNODETom Sepez
XFA_LAYOUT_INVALIDNODE is used in place of nullptr, but does not appear to represent a sentinel value distinct from it. Using a non-nullptr value prevents using any kind of smart pointer type in the future. Change-Id: Iab6418b3dc9c3d45780730795496ac07b67de696 Reviewed-on: https://pdfium-review.googlesource.com/36651 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-07-03Add FPDFText_GetTextRenderMode() APIMiklos Vajna
This allows deciding if FPDFPageObj_GetFillColor() or FPDFPageObj_GetStrokeColor() should be used to get the effective color of a text object. Change-Id: Ic6e99a9eb8512b164756da8b5fcd8cd7771271ae Reviewed-on: https://pdfium-review.googlesource.com/36750 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
2018-07-03Use GetPos() and SetPos() in CPDF_SyntaxParser::ReadStream().Lei Zhang
Change-Id: I711508cdffd9756837657390d73b88c2d8c62db5 Reviewed-on: https://pdfium-review.googlesource.com/36891 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Art Snake <art-snake@yandex-team.ru> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-07-03Fix indentation in CPDF_SyntaxParser.Lei Zhang
Change-Id: I293730ea5981ba8e2dca7a522b9036fa62d7cd35 Reviewed-on: https://pdfium-review.googlesource.com/36890 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Art Snake <art-snake@yandex-team.ru> Reviewed-by: dsinclair <dsinclair@chromium.org>
2018-07-02Roll DEPS for build to 7ac2934.chromium/3480Lei Zhang
https://chromium.googlesource.com/chromium/src/build/+log/10a93c2c..7ac2934 TBR=dsinclair@chromium.org Change-Id: Ib19b77165fd2cbafbaac73e79ebb1ac4c0a3af70 Reviewed-on: https://pdfium-review.googlesource.com/36832 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-07-02Roll Clang to dec27d72.Lei Zhang
AKA roll Clang 332838:335864. https://chromium.googlesource.com/chromium/src/tools/clang/+log/c893c7ee..dec27d72 TBR=dsinclair@chromium.org Change-Id: I41b4cb633b5aa82d2fd9e1e5a7d6b313bba88917 Reviewed-on: https://pdfium-review.googlesource.com/36831 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-07-02Kill a malloc/memcpy in cjs_document.cppTom Sepez
Change-Id: Icdbdd1c0e5052490c251009b5b2b31b2c46fb580 Reviewed-on: https://pdfium-review.googlesource.com/36833 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-07-02Virtualize Observable<T>::ObservedPtr::OnDestroy() for CPDF_Avail cleanupTom Sepez
This enables more complicated cleanup when an observed object is destroyed. Use it to make documents observable and to allow the CPDF_Avail to cleanup without the need for intermediate class. Change-Id: I3a8e758b7ff542e0a58710eff1ac8017205cbd45 Reviewed-on: https://pdfium-review.googlesource.com/36373 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-07-02Use std::vector<float> in cpdf_expintfunc.cppTom Sepez
Fix some {} along the way. Change-Id: I5277c03328b63e0cead058fc07dc65311d7b97b0 Reviewed-on: https://pdfium-review.googlesource.com/36791 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-07-02Access a span properly in DetectSRGB().Lei Zhang
Change-Id: Ifeaac7141bd377daa9cf657149937be22b2aa48a Reviewed-on: https://pdfium-review.googlesource.com/36730 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>